From 679a532e61abc04f40a4417751445e69f1641fc5 Mon Sep 17 00:00:00 2001 From: Konrad Date: Wed, 13 Sep 2023 14:02:18 +0200 Subject: [PATCH] failsafe: When rtl_time_estimate failsafe is triggered, only disable it when the user changes the mode, or it is disarmed. --- src/modules/commander/failsafe/failsafe.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/commander/failsafe/failsafe.cpp b/src/modules/commander/failsafe/failsafe.cpp index 961f955470..f8d64308d4 100644 --- a/src/modules/commander/failsafe/failsafe.cpp +++ b/src/modules/commander/failsafe/failsafe.cpp @@ -404,7 +404,8 @@ void Failsafe::checkStateAndMode(const hrt_abstime &time_us, const State &state, CHECK_FAILSAFE(status_flags, primary_geofence_breached, fromGfActParam(_param_gf_action.get()).cannotBeDeferred()); // Battery - CHECK_FAILSAFE(status_flags, battery_low_remaining_time, ActionOptions(Action::RTL).causedBy(Cause::BatteryLow)); + CHECK_FAILSAFE(status_flags, battery_low_remaining_time, + ActionOptions(Action::RTL).causedBy(Cause::BatteryLow).clearOn(ClearCondition::OnModeChangeOrDisarm)); CHECK_FAILSAFE(status_flags, battery_unhealthy, Action::Warn); switch (status_flags.battery_warning) {