mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-23 15:57:35 +08:00
HealthChecks: correct indentation for EVENT metadata
This commit is contained in:
@@ -37,13 +37,13 @@ void ArmPermissionChecks::checkAndReport(const Context &context, Report &reporte
|
||||
{
|
||||
if (_param_com_armable.get() < 1) {
|
||||
/* EVENT
|
||||
* @description
|
||||
* Vehicle is in safety configuration and denies arming.
|
||||
*
|
||||
* <profile name="dev">
|
||||
* This check can be configured via <param>COM_ARMABLE</param> parameter.
|
||||
* </profile>
|
||||
*/
|
||||
* @description
|
||||
* Vehicle is in safety configuration and denies arming.
|
||||
*
|
||||
* <profile name="dev">
|
||||
* This check can be configured via <param>COM_ARMABLE</param> parameter.
|
||||
* </profile>
|
||||
*/
|
||||
reporter.armingCheckFailure(NavModes::All, health_component_t::system,
|
||||
events::ID("check_armable_configuration"),
|
||||
events::Log::Error, "Vehicle is in safety configuration");
|
||||
|
||||
@@ -211,13 +211,13 @@ void BatteryChecks::checkAndReport(const Context &context, Report &reporter)
|
||||
// This is declared critical so QGC displays a yellow box and reads "low battery" out loud making the user aware
|
||||
|
||||
/* EVENT
|
||||
* @description
|
||||
* The lowest battery state of charge is below the low threshold.
|
||||
*
|
||||
* <profile name="dev">
|
||||
* Can be configured with <param>BAT_LOW_THR</param>.
|
||||
* </profile>
|
||||
*/
|
||||
* @description
|
||||
* The lowest battery state of charge is below the low threshold.
|
||||
*
|
||||
* <profile name="dev">
|
||||
* Can be configured with <param>BAT_LOW_THR</param>.
|
||||
* </profile>
|
||||
*/
|
||||
reporter.armingCheckFailure(affected_modes, health_component_t::battery, events::ID("check_battery_low"),
|
||||
events::Log::Critical, "Low battery");
|
||||
|
||||
@@ -229,13 +229,13 @@ void BatteryChecks::checkAndReport(const Context &context, Report &reporter)
|
||||
|
||||
case battery_status_s::WARNING_CRITICAL:
|
||||
/* EVENT
|
||||
* @description
|
||||
* The lowest battery state of charge is below the critical threshold.
|
||||
*
|
||||
* <profile name="dev">
|
||||
* Can be configured with <param>BAT_CRIT_THR</param> and from when to disalow arming with <param>COM_ARM_BAT_MIN</param>.
|
||||
* </profile>
|
||||
*/
|
||||
* @description
|
||||
* The lowest battery state of charge is below the critical threshold.
|
||||
*
|
||||
* <profile name="dev">
|
||||
* Can be configured with <param>BAT_CRIT_THR</param> and from when to disalow arming with <param>COM_ARM_BAT_MIN</param>.
|
||||
* </profile>
|
||||
*/
|
||||
reporter.armingCheckFailure(affected_modes, health_component_t::battery, events::ID("check_battery_critical"),
|
||||
events::Log::Critical, "Critical battery");
|
||||
|
||||
@@ -247,13 +247,13 @@ void BatteryChecks::checkAndReport(const Context &context, Report &reporter)
|
||||
|
||||
case battery_status_s::WARNING_EMERGENCY:
|
||||
/* EVENT
|
||||
* @description
|
||||
* The lowest battery state of charge is below the emergency threshold.
|
||||
*
|
||||
* <profile name="dev">
|
||||
* Can be configured with <param>BAT_EMERGEN_THR</param>.
|
||||
* </profile>
|
||||
*/
|
||||
* @description
|
||||
* The lowest battery state of charge is below the emergency threshold.
|
||||
*
|
||||
* <profile name="dev">
|
||||
* Can be configured with <param>BAT_EMERGEN_THR</param>.
|
||||
* </profile>
|
||||
*/
|
||||
reporter.armingCheckFailure(affected_modes, health_component_t::battery, events::ID("check_battery_emergency"),
|
||||
events::Log::Emergency, "Emergency battery level");
|
||||
|
||||
|
||||
@@ -140,11 +140,11 @@ uint16_t EscChecks::checkEscOnline(const Context &context, Report &reporter, con
|
||||
|
||||
uint8_t esc_nr = esc_index + 1;
|
||||
/* EVENT
|
||||
* @description
|
||||
* <profile name="dev">
|
||||
* This check can be configured via <param>COM_ARM_CHK_ESCS</param> parameter.
|
||||
* </profile>
|
||||
*/
|
||||
* @description
|
||||
* <profile name="dev">
|
||||
* This check can be configured via <param>COM_ARM_CHK_ESCS</param> parameter.
|
||||
* </profile>
|
||||
*/
|
||||
reporter.healthFailure<uint8_t>(NavModes::All, health_component_t::motors_escs, events::ID("check_escs_offline"),
|
||||
events::Log::Critical, "ESC {1} offline", esc_nr);
|
||||
snprintf(esc_fail_msg + strlen(esc_fail_msg), sizeof(esc_fail_msg) - strlen(esc_fail_msg), "ESC%d ", esc_nr);
|
||||
@@ -206,13 +206,13 @@ uint16_t EscChecks::checkEscStatus(const Context &context, Report &reporter, con
|
||||
}
|
||||
|
||||
/* EVENT
|
||||
* @description
|
||||
* {3}
|
||||
*
|
||||
* <profile name="dev">
|
||||
* This check can be configured via <param>COM_ARM_CHK_ESCS</param> parameter.
|
||||
* </profile>
|
||||
*/
|
||||
* @description
|
||||
* {3}
|
||||
*
|
||||
* <profile name="dev">
|
||||
* This check can be configured via <param>COM_ARM_CHK_ESCS</param> parameter.
|
||||
* </profile>
|
||||
*/
|
||||
reporter.healthFailure<uint8_t, events::px4::enums::esc_fault_reason_t, events::px4::enums::suggested_action_t>(
|
||||
NavModes::All, health_component_t::motors_escs, events::ID("check_failure_detector_arm_esc"),
|
||||
events::Log::Critical, "ESC {1}: {2}", esc_index + 1, fault_reason_index, action);
|
||||
@@ -291,11 +291,11 @@ uint16_t EscChecks::checkMotorStatus(const Context &context, Report &reporter, c
|
||||
|
||||
if (_esc_undercurrent_hysteresis[i].get_state()) {
|
||||
/* EVENT
|
||||
* @description
|
||||
* <profile name="dev">
|
||||
* This check can be configured via <param>FD_ACT_EN</param> parameter.
|
||||
* </profile>
|
||||
*/
|
||||
* @description
|
||||
* <profile name="dev">
|
||||
* This check can be configured via <param>FD_ACT_EN</param> parameter.
|
||||
* </profile>
|
||||
*/
|
||||
reporter.healthFailure<uint8_t>(NavModes::All, health_component_t::motors_escs,
|
||||
events::ID("check_failure_detector_motor_uc"),
|
||||
events::Log::Critical, "Motor {1} undercurrent detected", actuator_function_index + 1);
|
||||
@@ -308,11 +308,11 @@ uint16_t EscChecks::checkMotorStatus(const Context &context, Report &reporter, c
|
||||
|
||||
if (_esc_overcurrent_hysteresis[i].get_state()) {
|
||||
/* EVENT
|
||||
* @description
|
||||
* <profile name="dev">
|
||||
* This check can be configured via <param>FD_ACT_EN</param> parameter.
|
||||
* </profile>
|
||||
*/
|
||||
* @description
|
||||
* <profile name="dev">
|
||||
* This check can be configured via <param>FD_ACT_EN</param> parameter.
|
||||
* </profile>
|
||||
*/
|
||||
reporter.healthFailure<uint8_t>(NavModes::All, health_component_t::motors_escs,
|
||||
events::ID("check_failure_detector_motor_oc"),
|
||||
events::Log::Critical, "Motor {1} overcurrent detected", actuator_function_index + 1);
|
||||
@@ -352,11 +352,11 @@ void EscChecks::updateEscsStatus(const Context &context, Report &reporter, const
|
||||
|
||||
if (_esc_arm_hysteresis.get_state()) {
|
||||
/* EVENT
|
||||
* @description
|
||||
* <profile name="dev">
|
||||
* This check can be configured via <param>COM_ARM_CHK_ESCS</param> parameter.
|
||||
* </profile>
|
||||
*/
|
||||
* @description
|
||||
* <profile name="dev">
|
||||
* This check can be configured via <param>COM_ARM_CHK_ESCS</param> parameter.
|
||||
* </profile>
|
||||
*/
|
||||
reporter.healthFailure(NavModes::All, health_component_t::motors_escs,
|
||||
events::ID("check_escs_not_all_armed"),
|
||||
events::Log::Critical, "Not all ESCs are armed");
|
||||
|
||||
@@ -80,9 +80,9 @@ void FlightTimeChecks::checkAndReport(const Context &context, Report &reporter)
|
||||
}
|
||||
|
||||
/* EVENT
|
||||
* @description
|
||||
* Maximal flight time warning (less than 1min remaining)
|
||||
*/
|
||||
* @description
|
||||
* Maximal flight time warning (less than 1min remaining)
|
||||
*/
|
||||
events::send<int16_t>(events::ID("commander_max_flight_time_warning_seconds"), events::Log::Warning,
|
||||
"Approaching max flight time (system will RTL in {1} seconds)", floored_remaining_flight_time_sec);
|
||||
|
||||
@@ -97,9 +97,9 @@ void FlightTimeChecks::checkAndReport(const Context &context, Report &reporter)
|
||||
}
|
||||
|
||||
/* EVENT
|
||||
* @description
|
||||
* Maximal flight time warning (more than 1min remaining)
|
||||
*/
|
||||
* @description
|
||||
* Maximal flight time warning (more than 1min remaining)
|
||||
*/
|
||||
events::send<int16_t>(events::ID("commander_max_flight_time_warning_minutes"), events::Log::Warning,
|
||||
"Approaching max flight time (system will RTL in {1} minutes)", floored_remaining_flight_time_min);
|
||||
}
|
||||
|
||||
@@ -51,11 +51,11 @@ void GeofenceChecks::checkAndReport(const Context &context, Report &reporter)
|
||||
|
||||
if (geofence_result.geofence_max_dist_triggered) {
|
||||
/* EVENT
|
||||
* @description
|
||||
* <profile name="dev">
|
||||
* This check can be configured via <param>GF_ACTION</param> and <param>GF_MAX_HOR_DIST</param> parameters.
|
||||
* </profile>
|
||||
*/
|
||||
* @description
|
||||
* <profile name="dev">
|
||||
* This check can be configured via <param>GF_ACTION</param> and <param>GF_MAX_HOR_DIST</param> parameters.
|
||||
* </profile>
|
||||
*/
|
||||
reporter.armingCheckFailure(NavModes::All, health_component_t::system,
|
||||
events::ID("check_gf_violation_max_hor_dist"),
|
||||
events::Log::Error, "Geofence violation: exceeding maximum distance to Home");
|
||||
@@ -67,11 +67,11 @@ void GeofenceChecks::checkAndReport(const Context &context, Report &reporter)
|
||||
|
||||
if (geofence_result.geofence_max_alt_triggered) {
|
||||
/* EVENT
|
||||
* @description
|
||||
* <profile name="dev">
|
||||
* This check can be configured via <param>GF_ACTION</param> and <param>GF_MAX_VER_DIST</param> parameters.
|
||||
* </profile>
|
||||
*/
|
||||
* @description
|
||||
* <profile name="dev">
|
||||
* This check can be configured via <param>GF_ACTION</param> and <param>GF_MAX_VER_DIST</param> parameters.
|
||||
* </profile>
|
||||
*/
|
||||
reporter.armingCheckFailure(NavModes::All, health_component_t::system,
|
||||
events::ID("check_gf_violation_max_alt"),
|
||||
events::Log::Error, "Geofence violation: exceeding maximum altitude above Home");
|
||||
@@ -83,11 +83,11 @@ void GeofenceChecks::checkAndReport(const Context &context, Report &reporter)
|
||||
|
||||
if (geofence_result.geofence_custom_fence_triggered) {
|
||||
/* EVENT
|
||||
* @description
|
||||
* <profile name="dev">
|
||||
* This check can be configured via <param>GF_ACTION</param> parameter.
|
||||
* </profile>
|
||||
*/
|
||||
* @description
|
||||
* <profile name="dev">
|
||||
* This check can be configured via <param>GF_ACTION</param> parameter.
|
||||
* </profile>
|
||||
*/
|
||||
reporter.armingCheckFailure(NavModes::All, health_component_t::system,
|
||||
events::ID("check_gf_violation_custom_gf"),
|
||||
events::Log::Error, "Geofence violation: approaching or outside geofence");
|
||||
|
||||
Reference in New Issue
Block a user