failsafe: do not add additional hold delay if failsafe action is hold

This commit is contained in:
bresch
2024-08-16 14:05:06 +02:00
committed by Mathieu Bresciani
parent ea673b0b5b
commit ad1d9e1312
+1 -1
View File
@@ -477,7 +477,7 @@ void FailsafeBase::getSelectedAction(const State &state, const failsafe_flags_s
// Check if we should enter delayed Hold
if (_current_delay > 0 && !_user_takeover_active && allow_user_takeover <= UserTakeoverAllowed::AlwaysModeSwitchOnly
&& selected_action != Action::Disarm && selected_action != Action::Terminate) {
&& selected_action != Action::Disarm && selected_action != Action::Terminate && selected_action != Action::Hold) {
returned_state.delayed_action = selected_action;
selected_action = Action::Hold;
allow_user_takeover = UserTakeoverAllowed::AlwaysModeSwitchOnly;