commander/failsafe: fix user takeover not possible in fallback Land action when configured RTL is not possible

This commit is contained in:
Matthias Grob
2026-01-09 10:10:23 +01:00
parent 4cf4f82233
commit 0e615816b3
+3 -3
View File
@@ -499,9 +499,9 @@ void FailsafeBase::getSelectedAction(const State &state, const failsafe_flags_s
allow_user_takeover = UserTakeoverAllowed::AlwaysModeSwitchOnly;
}
// User takeover is activated on user intented mode update (w/o action change, so takeover is not immediately
// requested when entering failsafe) or rc stick movements
bool want_user_takeover_mode_switch = user_intended_mode_updated && _selected_action == selected_action;
// User takeover interrupting a failsafe is triggered by a change of the user-intended mode
// (only if a failsafe action is already active otherwise there can be immediate takeover when entering a failsafe) or by stick movement
bool want_user_takeover_mode_switch = user_intended_mode_updated && (_selected_action > Action::Warn);
bool want_user_takeover = want_user_takeover_mode_switch || rc_sticks_takeover_request;
bool takeover_allowed =
(allow_user_takeover == UserTakeoverAllowed::Always && (_user_takeover_active || want_user_takeover))