Added failsafe if parachute is not detected mid flight

This commit is contained in:
gguidone 2026-03-03 15:39:43 +01:00 committed by Matthias Grob
parent 60872afd90
commit 6b51eddecc
3 changed files with 10 additions and 0 deletions

View File

@ -58,3 +58,6 @@ bool fd_critical_failure # Critical failure (attitude/altitude limi
bool fd_esc_arming_failure # ESC failed to arm
bool fd_imbalanced_prop # Imbalanced propeller detected
bool fd_motor_failure # Motor failure
# Parachute
bool parachute_unhealthy # Parachute system missing or unhealthy

View File

@ -42,6 +42,10 @@ void ParachuteChecks::checkAndReport(const Context &context, Report &reporter)
return;
}
reporter.failsafeFlags().parachute_unhealthy =
!context.status().parachute_system_present ||
!context.status().parachute_system_healthy;
if (!context.status().parachute_system_present) {
/* EVENT
* @description

View File

@ -574,6 +574,9 @@ void Failsafe::checkStateAndMode(const hrt_abstime &time_us, const State &state,
CHECK_FAILSAFE(status_flags, battery_unhealthy, Action::Warn);
}
// Parachute system health failsafe
CHECK_FAILSAFE(status_flags, parachute_unhealthy, Action::RTL);
// Battery low failsafe
// If battery was low and arming was allowed through COM_ARM_BAT_MIN, don't failsafe immediately for the current low battery warning state
const bool warning_worse_than_at_arming = (status_flags.battery_warning > _battery_warning_at_arming);