mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-20 06:45:14 +03:00
Update navigation.c
This commit is contained in:
parent
88a4ceb1aa
commit
66f477e04b
1 changed files with 3 additions and 2 deletions
|
@ -3141,14 +3141,15 @@ static navigationFSMEvent_t selectNavEventFromBoxModeInput(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// RTH/Failsafe_RTH can override MANUAL
|
// Failsafe_RTH (can override MANUAL)
|
||||||
if (posControl.flags.forcedRTHActivated) {
|
if (posControl.flags.forcedRTHActivated) {
|
||||||
// If we request forced RTH - attempt to activate it no matter what
|
// If we request forced RTH - attempt to activate it no matter what
|
||||||
// This might switch to emergency landing controller if GPS is unavailable
|
// This might switch to emergency landing controller if GPS is unavailable
|
||||||
return NAV_FSM_EVENT_SWITCH_TO_RTH;
|
return NAV_FSM_EVENT_SWITCH_TO_RTH;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pilot-triggered RTH, also fall-back for WP if there is no mission loaded
|
// Pilot-triggered RTH (can override MANUAL), also fall-back for WP if there is no mission loaded
|
||||||
|
// Prevent MANUAL falling back to RTH if selected during active mission (canActivateWaypoint is set false on MANUAL selection)
|
||||||
if (IS_RC_MODE_ACTIVE(BOXNAVRTH) || (IS_RC_MODE_ACTIVE(BOXNAVWP) && !canActivateWaypoint && !IS_RC_MODE_ACTIVE(BOXMANUAL))) {
|
if (IS_RC_MODE_ACTIVE(BOXNAVRTH) || (IS_RC_MODE_ACTIVE(BOXNAVWP) && !canActivateWaypoint && !IS_RC_MODE_ACTIVE(BOXMANUAL))) {
|
||||||
// Check for isExecutingRTH to prevent switching our from RTH in case of a brief GPS loss
|
// Check for isExecutingRTH to prevent switching our from RTH in case of a brief GPS loss
|
||||||
// If don't keep this, loss of any of the canActivatePosHold && canActivateNavigation && canActivateAltHold
|
// If don't keep this, loss of any of the canActivatePosHold && canActivateNavigation && canActivateAltHold
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue