diff --git a/src/modules/commander/UserModeIntention.cpp b/src/modules/commander/UserModeIntention.cpp index ac56b9f78225..02b4a7f3f7e1 100644 --- a/src/modules/commander/UserModeIntention.cpp +++ b/src/modules/commander/UserModeIntention.cpp @@ -69,6 +69,9 @@ bool UserModeIntention::change(uint8_t user_intended_nav_state, ModeChangeSource } } + // never allow to change out of termination state + allow_change &= _vehicle_status.nav_state != vehicle_status_s::NAVIGATION_STATE_TERMINATION; + if (allow_change) { _had_mode_change = true; _user_intented_nav_state = user_intended_nav_state;