prevent RC while failsafe

This commit is contained in:
xp31
2021-01-29 09:40:23 +01:00
committed by Gautier Hattenberger
parent 013c399281
commit 79dcd14ef1
@@ -349,7 +349,8 @@ void autopilot_static_on_rc_frame(void)
autopilot_static_set_mode(new_autopilot_mode);
}
/* if in HOME mode, don't allow switching to non-manual modes */
else if ((autopilot.mode != AP_MODE_HOME)
else if (((autopilot.mode != AP_MODE_HOME) && (autopilot.mode != AP_MODE_FAILSAFE))
#if UNLOCKED_HOME_MODE
/* Allowed to leave home mode when UNLOCKED_HOME_MODE */
|| !too_far_from_home