1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-23 00:05:28 +03:00

Fix failsafe & navigation clash

This commit is contained in:
Konstantin Sharlaimov (DigitalEntity) 2017-07-08 21:46:21 +10:00
parent a1f34965de
commit 9baede1ab7
3 changed files with 16 additions and 0 deletions

View file

@ -2342,6 +2342,11 @@ static navigationFSMEvent_t selectNavEventFromBoxModeInput(void)
//We can switch modes only when ARMED
if (ARMING_FLAG(ARMED)) {
// Ask failsafe system if we can use navigation system
if (failsafeBypassNavigation()) {
return NAV_FSM_EVENT_SWITCH_TO_IDLE;
}
// Flags if we can activate certain nav modes (check if we have required sensors and they provide valid data)
bool canActivateAltHold = canActivateAltHoldMode();
bool canActivatePosHold = canActivatePosHoldMode();