Switch programming for throttle cut

Good afternoon,

I have been putting together a multiple-engine plane and have a quick programmable switch question. I have a motor on aux out ch 1 that at some point in a flight would like to be able to limit the power output ( to somewhat of an idle state). I would like to program a switch so when flipped that channel will output a constant PWM signal. Is this possible and what would be the best way to go about this?

The intent of this motor is to act as a take-off assistant and then when the switch is flipped it is just at a 0 drag idled state.


There is likely a better way, but the simplest solution I can think of is to set the SERVOx_MAX_PWM value using a Lua script that polls the switch position.

In one switch position, the PWM for that motor could have full range, and in the other, it could be clamped to a low value.

This may very well induce some tuning issues.

What kind of tuning issues are you referring to? I have never written a lua script for a pixhawk but sure I can figure it out.

You’ll be inducing a major variable, changing thrust available this way.

If you tune with the boost motor in its idle state, then you may want to avoid using it in flight modes where throttle is automated.

I should caveat my comments here by saying I have little experience with the Plane branch of the firmware, and you should probably gather a little more info/advice on how to solve your problem and how it may affect overall vehicle performance before proceeding.