diff --git a/src/modules/mc_att_control/mc_att_control_main.cpp b/src/modules/mc_att_control/mc_att_control_main.cpp index dd8a54555c05e63a8e0267e47683e470e62f4233..c4858a5db364cc56871d8343ddb2563438b34c04 100644 --- a/src/modules/mc_att_control/mc_att_control_main.cpp +++ b/src/modules/mc_att_control/mc_att_control_main.cpp @@ -876,13 +876,12 @@ MulticopterAttitudeControl::run() attitude_dt += dt; /* Check if we are in rattitude mode and the pilot is above the threshold on pitch - * or roll (yaw can rotate 360 in normal att control). If both are true don't + * or roll (yaw can rotate 360 in normal att control). If both are true don't * even bother running the attitude controllers */ if (_v_control_mode.flag_control_rattitude_enabled) { - if (fabsf(_manual_control_sp.y) > _rattitude_thres.get() || - fabsf(_manual_control_sp.x) > _rattitude_thres.get()) { - _v_control_mode.flag_control_attitude_enabled = false; - } + _v_control_mode.flag_control_attitude_enabled = + fabsf(_manual_control_sp.y) <= _rattitude_thres.get() && + fabsf(_manual_control_sp.x) <= _rattitude_thres.get(); } bool attitude_setpoint_generated = false;