failsafe: When rtl_time_estimate failsafe is triggered, only disable it when the user changes the mode, or it is disarmed.

This commit is contained in:
Konrad 2023-09-13 14:02:18 +02:00 committed by Beat Küng
parent 98a35971af
commit 679a532e61
1 changed files with 2 additions and 1 deletions

View File

@ -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) {