mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-23 16:25:26 +03:00
Merge pull request #3303 from giacomo892/nav_launch_safety_fix
NAV_LAUNCH extra safety
This commit is contained in:
commit
e28f7fac55
1 changed files with 6 additions and 2 deletions
|
@ -2350,9 +2350,13 @@ static navigationFSMEvent_t selectNavEventFromBoxModeInput(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
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)) {
|
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