mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Added failsafe if parachute is not detected mid flight
This commit is contained in:
parent
60872afd90
commit
6b51eddecc
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user