mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-23 00:05:28 +03:00
Extra safety for NAV_LAUNCH if enabled via BOX
This commit is contained in:
parent
5c76229981
commit
05c5f0f866
1 changed files with 6 additions and 2 deletions
|
@ -2322,9 +2322,13 @@ static navigationFSMEvent_t selectNavEventFromBoxModeInput(void)
|
|||
}
|
||||
}
|
||||
else {
|
||||
// If we were in LAUNCH mode - force switch to IDLE
|
||||
// If we were in LAUNCH mode - force switch to IDLE only if the throttle is low
|
||||
if (FLIGHT_MODE(NAV_LAUNCH_MODE)) {
|
||||
return NAV_FSM_EVENT_SWITCH_TO_IDLE;
|
||||
throttleStatus_e throttleStatus = calculateThrottleStatus();
|
||||
if (throttleStatus != THROTTLE_LOW)
|
||||
return NAV_FSM_EVENT_NONE;
|
||||
else
|
||||
return NAV_FSM_EVENT_SWITCH_TO_IDLE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue