preflight check: restore old nav_state only once

previously it would always change _user_mode_intention to
_prev_nav_state forever. now we change it only if we are in preflight
check mode to not interfere with anything else later.
This commit is contained in:
Balduin
2025-02-18 10:03:54 +01:00
parent 0253f9798e
commit 71afdb5680
+3 -2
View File
@@ -1894,8 +1894,9 @@ void Commander::run()
// }
} else {
// leave the mode again somehow...
_user_mode_intention.change(_prev_nav_state);
if (_vehicle_status.nav_state == vehicle_status_s::NAVIGATION_STATE_CS_PREFLIGHT_CHECK) {
_user_mode_intention.change(_prev_nav_state);
}
}
modeManagementUpdate();