mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-07-24 15:27:41 +08:00
fix(commander): add warning-only mode to COM_PARACHUTE (#27903)
This commit is contained in:
committed by
Claudio Chies
parent
b727fe527a
commit
d204b27646
@@ -304,7 +304,7 @@ The parachute health failsafe is triggered when a [MAVLink parachute](../periphe
|
||||
|
||||
| Parameter | Description |
|
||||
| -------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| <a id="COM_PARACHUTE"></a>[COM_PARACHUTE](../advanced_config/parameter_reference.md#COM_PARACHUTE) | Parachute system monitoring and failsafe action.<br>`0`: Disabled (default), `1`: [Warning](#act_warn), `2`: [Return](#act_return), `3`: [Land](#act_land).<br><br>- Everything but `Disabled` prevents arming with a failing check.<br>- [Return](#act_return) and [Land](#act_land) start the associated action when a failure happens in-flight. |
|
||||
| <a id="COM_PARACHUTE"></a>[COM_PARACHUTE](../advanced_config/parameter_reference.md#COM_PARACHUTE) | Parachute system monitoring and failsafe action.<br>`0`: Disabled (default), `1`: [Warning](#act_warn), `2`: Error, `3`: [Return](#act_return), `4`: [Land](#act_land).<br><br>- `Warning` warns with a failing check but does not prevent arming.<br>- `Error`, `Return` and `Land` prevent arming with a failing check.<br>- [Return](#act_return) and [Land](#act_land) start the associated action when a failure happens in-flight. |
|
||||
|
||||
## Quad-chute Failsafe
|
||||
|
||||
|
||||
@@ -180,7 +180,7 @@ For users upgrading from v1.17, please take a moment to review the following bef
|
||||
## Safety
|
||||
|
||||
- Rotary-wing vehicles now support uncommanded altitude loss detection: if the vehicle descends more than [FD_ALT_LOSS](../advanced_config/parameter_reference.md#FD_ALT_LOSS) meters below its setpoint in altitude-controlled flight, flight termination (and parachute deployment) is triggered. See [Altitude Loss Trigger](../config/safety.md#altitude-loss-trigger). ([PX4-Autopilot#26837](https://github.com/PX4/PX4-Autopilot/pull/26837))
|
||||
- [Parachute health failsafe](../peripherals/parachute.md): extended [COM_PARACHUTE](../advanced_config/parameter_reference.md#COM_PARACHUTE) from a boolean into a configurable in-flight failsafe action (Return or Land) parameter. The previously enabled value `COM_PARACHUTE=1` causes a warning like before. ([PX4-Autopilot#26918](https://github.com/PX4/PX4-Autopilot/pull/26918))
|
||||
- [Parachute health failsafe](../peripherals/parachute.md): extended [COM_PARACHUTE](../advanced_config/parameter_reference.md#COM_PARACHUTE) from a boolean into a configurable arming check and in-flight failsafe action parameter (Warning, Error, Return, or Land). The previously enabled value `COM_PARACHUTE=1` (Warning) now only warns without preventing arming; use `COM_PARACHUTE=2` (Error) or higher to prevent arming when the parachute system is missing or unhealthy. ([PX4-Autopilot#26918](https://github.com/PX4/PX4-Autopilot/pull/26918))
|
||||
- [GNSS check failsafe](../config/safety.md#gnss-check-failsafe): new failsafe that monitors the number of usable GNSS receivers with a 3D fix and their position consistency. The required number of receivers is set via [SYS_HAS_NUM_GNSS](../advanced_config/parameter_reference.md#SYS_HAS_NUM_GNSS) and the failsafe action via [COM_GNSSLOSS_ACT](../advanced_config/parameter_reference.md#COM_GNSSLOSS_ACT). ([PX4-Autopilot#26863](https://github.com/PX4/PX4-Autopilot/pull/26863))
|
||||
- New companion computer over-temperature warning: [COM_CC_TEMP_WARN](../advanced_config/parameter_reference.md#COM_CC_TEMP_WARN) (default `80` C, set `-1` to disable) raises a warning when the reported companion computer temperature exceeds the threshold. ([PX4-Autopilot#27637](https://github.com/PX4/PX4-Autopilot/pull/27637))
|
||||
- New ESC over-temperature warning: [COM_ESC_OT_WARN](../advanced_config/parameter_reference.md#COM_ESC_OT_WARN) (default `90` C, set `-1` to disable) raises a warning when a reported ESC temperature exceeds the threshold. ([PX4-Autopilot#27626](https://github.com/PX4/PX4-Autopilot/pull/27626))
|
||||
|
||||
@@ -41,6 +41,11 @@ void ParachuteChecks::checkAndReport(const Context &context, Report &reporter)
|
||||
|
||||
reporter.failsafeFlags().parachute_unhealthy = !context.status().parachute_system_present || !context.status().parachute_system_healthy;
|
||||
|
||||
// COM_PARACHUTE 1 (Warning) only warns, higher values also prevent arming
|
||||
const bool is_error = _param_com_parachute.get() >= 2;
|
||||
const NavModes affected_modes = is_error ? NavModes::All : NavModes::None;
|
||||
const events::Log log_level = is_error ? events::Log::Error : events::Log::Warning;
|
||||
|
||||
if (!context.status().parachute_system_present) {
|
||||
/* EVENT
|
||||
* @description
|
||||
@@ -50,10 +55,10 @@ void ParachuteChecks::checkAndReport(const Context &context, Report &reporter)
|
||||
* Configured by <param>COM_PARACHUTE</param>
|
||||
* </profile>
|
||||
*/
|
||||
reporter.healthFailure(NavModes::All, health_component_t::parachute, events::ID("check_parachute_missing"),
|
||||
events::Log::Error, "Parachute system missing");
|
||||
reporter.healthFailure(affected_modes, health_component_t::parachute, events::ID("check_parachute_missing"),
|
||||
log_level, "Parachute system missing");
|
||||
|
||||
if (reporter.mavlink_log_pub()) {
|
||||
if (reporter.mavlink_log_pub() && is_error) {
|
||||
mavlink_log_critical(reporter.mavlink_log_pub(), "Preflight Fail: Parachute system missing");
|
||||
}
|
||||
|
||||
@@ -67,10 +72,10 @@ void ParachuteChecks::checkAndReport(const Context &context, Report &reporter)
|
||||
* Configured by <param>COM_PARACHUTE</param>
|
||||
* </profile>
|
||||
*/
|
||||
reporter.healthFailure(NavModes::All, health_component_t::parachute, events::ID("check_parachute_unhealthy"),
|
||||
events::Log::Error, "Parachute system not ready");
|
||||
reporter.healthFailure(affected_modes, health_component_t::parachute, events::ID("check_parachute_unhealthy"),
|
||||
log_level, "Parachute system not ready");
|
||||
|
||||
if (reporter.mavlink_log_pub()) {
|
||||
if (reporter.mavlink_log_pub() && is_error) {
|
||||
mavlink_log_critical(reporter.mavlink_log_pub(), "Preflight Fail: Parachute system not ready");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -482,12 +482,15 @@ parameters:
|
||||
short: Parachute requirement and failsafe
|
||||
long: |-
|
||||
Require a MAVLink parachute system for arming and the failsafe action when missing or unhealthy.
|
||||
|
||||
Warning only warns without preventing arming. Actions other than Warning also prevent arming.
|
||||
type: enum
|
||||
values:
|
||||
0: Disabled
|
||||
1: Warning
|
||||
2: Return
|
||||
3: Land
|
||||
2: Error
|
||||
3: Return
|
||||
4: Land
|
||||
default: 0
|
||||
COM_ARM_CHK_ESCS:
|
||||
description:
|
||||
@@ -606,8 +609,8 @@ parameters:
|
||||
description:
|
||||
short: Companion computer high-temperature warning threshold
|
||||
long: |-
|
||||
|
||||
|
||||
|
||||
|
||||
Arming is not prevented as the temperature typically drops in flight.
|
||||
|
||||
Set to -1 to disable.
|
||||
|
||||
@@ -425,6 +425,7 @@ FailsafeBase::ActionOptions Failsafe::fromParachuteActParam(int param_value)
|
||||
break;
|
||||
|
||||
case parachute_unhealthy_failsafe_mode::Warning:
|
||||
case parachute_unhealthy_failsafe_mode::Error:
|
||||
options.action = Action::Warn;
|
||||
options.clear_condition = ClearCondition::WhenConditionClears;
|
||||
break;
|
||||
|
||||
@@ -163,8 +163,9 @@ private:
|
||||
enum class parachute_unhealthy_failsafe_mode : int32_t {
|
||||
Disabled = 0,
|
||||
Warning = 1,
|
||||
Return = 2,
|
||||
Land = 3,
|
||||
Error = 2,
|
||||
Return = 3,
|
||||
Land = 4,
|
||||
};
|
||||
|
||||
enum class gps_redundancy_failsafe_mode : int32_t {
|
||||
|
||||
Reference in New Issue
Block a user