1
0
Fork 0
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:
Konstantin Sharlaimov 2018-06-02 19:21:56 +02:00 committed by GitHub
commit e28f7fac55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2350,9 +2350,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;
}
}
}