mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-15 08:50:34 +08:00
Commander: never allow to switch out of Terminate state with user intend
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user