ActuatorEffectiveness: add comment for 2% magic number to stop motors

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Silvan Fuhrer 2023-08-17 10:02:48 +02:00 committed by Matthias Grob
parent 0914e7feaa
commit eaad11bb74

View File

@ -91,6 +91,8 @@ void ActuatorEffectiveness::stopMaskedMotorsWithZeroThrust(uint32_t stoppable_mo
const uint32_t motor_mask = (1u << actuator_idx);
if (stoppable_motors_mask & motor_mask) {
// Stop motor if its setpoint is below 2%. This value was determined empirically (RC stick inaccuracy)
if (fabsf(actuator_sp(actuator_idx)) < .02f) {
_stopped_motors_mask |= motor_mask;