Skip to content

Commit

Permalink
ActuatorEffectiveness: add comment for 2% magic number to stop motors
Browse files Browse the repository at this point in the history
Signed-off-by: Silvan Fuhrer <[email protected]>
  • Loading branch information
sfuhrer authored and MaEtUgR committed Aug 17, 2023
1 parent 0914e7f commit eaad11b
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit eaad11b

Please sign in to comment.