mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-22 22:32:11 +08:00
failsafe: do not add additional hold delay if failsafe action is hold
This commit is contained in:
committed by
Mathieu Bresciani
parent
ea673b0b5b
commit
ad1d9e1312
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user