Exploring through the mixer code on the px4io firmware I’ve noticed that we are protecting against motors spinning during disarm by doing the following:
-Assigning the actuator_control_0->controls to NaN (in mixer.cpp/mixer_callback)
-Having this NaN propagate through the mixer and corrupt the calculations to make the outputs[i] index for the motors be NaN
-In pwm_limit.cpp if the control_value is not finite, set the pwm to “disarmed_pwm” for that channel.
Is this correct?
If so, is this the best method to handle ensuring safe values are passed through the mixer during disarm? I believe this could be documented a little better for people making custom mixers- they should expect a NaN value for thrust control during disarm and need to be able to handle that case.