From 27ef4fb1f547fe023c286ca53de768bc10d678bb Mon Sep 17 00:00:00 2001 From: Mehmet Killioglu Date: Thu, 5 Sep 2024 09:10:58 +0300 Subject: [PATCH] Commander: Failsafe: set clear condition for action Land like for RTL (OnModeChangeOrDisarm) This change should be removed during the rebasing to a newer version of PX4-firmware. --- src/modules/commander/failsafe/failsafe.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/commander/failsafe/failsafe.cpp b/src/modules/commander/failsafe/failsafe.cpp index 2f79e92cffbd..9165ff0730b8 100644 --- a/src/modules/commander/failsafe/failsafe.cpp +++ b/src/modules/commander/failsafe/failsafe.cpp @@ -60,6 +60,7 @@ FailsafeBase::ActionOptions Failsafe::fromNavDllOrRclActParam(int param_value) case gcs_connection_loss_failsafe_mode::Land_mode: options.action = Action::Land; + options.clear_condition = ClearCondition::OnModeChangeOrDisarm; break; case gcs_connection_loss_failsafe_mode::Terminate: @@ -113,6 +114,7 @@ FailsafeBase::ActionOptions Failsafe::fromGfActParam(int param_value) case geofence_violation_action::Land_mode: options.action = Action::Land; + options.clear_condition = ClearCondition::OnModeChangeOrDisarm; break; default: