Skip to content

Conversation

@sensei-hacker
Copy link
Member

@sensei-hacker sensei-hacker commented Oct 1, 2023

When disarmed, the existing code is intended to set "servo" outputs that use throttle to minimum:

servo[target] = motorConfig()->mincommand;

Which was expected to set the value to 1000.

However, the range at that point is intended to be -500 to +500.
servoParams(target)->middle is added a few lines later.
Therefore this ended up setting them to minimum + middle = 2500. Ie full throttle when disarmed.

PR subtracts servoParams(target)->middle, to offset the fact it's added a few lines later.

Tested by me and by INAV Discord user "driftingS13".

@sensei-hacker sensei-hacker changed the title servos.c: Correct servo throttle *off* when disarmed (not full throttle at disarm) SAFETY issue -- servos.c: Correct servo throttle *off* when disarmed (not full throttle at disarm) Oct 9, 2023
@MrD-RC MrD-RC added this to the 7.0 milestone Oct 23, 2023
@DzikuVx
Copy link
Member

DzikuVx commented Oct 26, 2023

@sensei-hacker this might be a better solution #9413

@DzikuVx
Copy link
Member

DzikuVx commented Oct 26, 2023

what do you think?

@DzikuVx DzikuVx merged commit e4bd847 into iNavFlight:master Oct 27, 2023
@sensei-hacker
Copy link
Member Author

what do you think?

Looks good and tests good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants