diff --git a/src/modules/commander/UserModeIntention.cpp b/src/modules/commander/UserModeIntention.cpp index 9bb3d08407f9..ac56b9f78225 100644 --- a/src/modules/commander/UserModeIntention.cpp +++ b/src/modules/commander/UserModeIntention.cpp @@ -73,7 +73,10 @@ bool UserModeIntention::change(uint8_t user_intended_nav_state, ModeChangeSource _had_mode_change = true; _user_intented_nav_state = user_intended_nav_state; - if (!_health_and_arming_checks.modePreventsArming(user_intended_nav_state)) { + // Special case termination state: even though this mode prevents arming, + // still don't switch out of it after disarm and thus store it in _nav_state_after_disarming. + if (!_health_and_arming_checks.modePreventsArming(user_intended_nav_state) + || user_intended_nav_state == vehicle_status_s::NAVIGATION_STATE_TERMINATION) { _nav_state_after_disarming = user_intended_nav_state; }