AP_Motors: Allow the user to control minimum PWM time when coming out of SAFE_DISARM #12319
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
M_SAFE_DISARM
allows you to ensure there are no pulses while disarmed. Depending upon the ESC you have you will need a minimum time at minimum throttle to enable the ESC to spin up. This introduces a parameter to control the ramp up time on the motor. The initial patch was done by @lthall I did the bench testing of it and had to add a patch to restore a regression around sending pulses when it shouldn't be. The main change I introduced on top of what @lthall did was that when going into the shutdown state on the motors I removed the spool down time. I think this is actually appropriate though as while I need a second of the motor being at a low throttle to start the motors, I really don't want or need a second of minimum throttle when stopping the motors. And the act of disarming the aircraft already has the same effect of cutting the throttle output so I think this is a safe path.