From 176a80f242c951264cdfbc907aae5646dc767782 Mon Sep 17 00:00:00 2001 From: "Konstantin Sharlaimov (DigitalEntity)" Date: Mon, 7 Jan 2019 20:55:45 +0100 Subject: [PATCH] [NAV] Fix failsafe RTH getting stuck if RTH->other_NAV_mode transition is not handled --- src/main/navigation/navigation.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/navigation/navigation.c b/src/main/navigation/navigation.c index 566eab484e..2c004fc329 100755 --- a/src/main/navigation/navigation.c +++ b/src/main/navigation/navigation.c @@ -3180,8 +3180,10 @@ void activateForcedRTH(void) void abortForcedRTH(void) { + // Disable failsafe RTH and make sure we back out of navigation mode to IDLE + // If any navigation mode was active prior to RTH it will be re-enabled with next RX update posControl.flags.forcedRTHActivated = false; - navProcessFSMEvents(selectNavEventFromBoxModeInput()); + navProcessFSMEvents(NAV_FSM_EVENT_SWITCH_TO_IDLE); } rthState_e getStateOfForcedRTH(void)