mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 05:53:33 +08:00
HealthAndArmingChecks: improve messaging for position estimate failure
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
committed by
Matthias Grob
parent
da8827883f
commit
9cb12d8e8e
@@ -77,29 +77,35 @@ void ModeChecks::checkAndReport(const Context &context, Report &reporter)
|
||||
|
||||
if (local_position_modes != NavModes::None) {
|
||||
/* EVENT
|
||||
* @description
|
||||
* The available positioning data is not sufficient to execute the selected mode.
|
||||
*/
|
||||
reporter.armingCheckFailure(local_position_modes, health_component_t::local_position_estimate,
|
||||
events::ID("check_modes_local_pos"),
|
||||
events::Log::Error, "No valid local position estimate");
|
||||
events::Log::Error, "Navigation error: No valid local position estimate");
|
||||
reporter.clearCanRunBits(local_position_modes);
|
||||
}
|
||||
|
||||
if (reporter.failsafeFlags().global_position_invalid && reporter.failsafeFlags().mode_req_global_position != 0) {
|
||||
/* EVENT
|
||||
* @description
|
||||
* The available positioning data is not sufficient to execute the selected mode.
|
||||
*/
|
||||
reporter.armingCheckFailure((NavModes)reporter.failsafeFlags().mode_req_global_position,
|
||||
health_component_t::global_position_estimate,
|
||||
events::ID("check_modes_global_pos"),
|
||||
events::Log::Error, "No valid global position estimate");
|
||||
events::Log::Error, "Navigation error: No valid global position estimate");
|
||||
reporter.clearCanRunBits((NavModes)reporter.failsafeFlags().mode_req_global_position);
|
||||
}
|
||||
|
||||
if (reporter.failsafeFlags().local_altitude_invalid && reporter.failsafeFlags().mode_req_local_alt != 0) {
|
||||
/* EVENT
|
||||
* @description
|
||||
* The available positioning data is not sufficient to execute the selected mode.
|
||||
*/
|
||||
reporter.armingCheckFailure((NavModes)reporter.failsafeFlags().mode_req_local_alt, health_component_t::system,
|
||||
events::ID("check_modes_local_alt"),
|
||||
events::Log::Critical, "No valid altitude estimate");
|
||||
events::Log::Critical, "Navigation error: No valid altitude estimate");
|
||||
reporter.clearCanRunBits((NavModes)reporter.failsafeFlags().mode_req_local_alt);
|
||||
}
|
||||
|
||||
|
||||
@@ -80,12 +80,13 @@ void SystemChecks::checkAndReport(const Context &context, Report &reporter)
|
||||
* <profile name="dev">
|
||||
* This check can be configured via <param>COM_ARM_WO_GPS</param> parameter.
|
||||
* </profile>
|
||||
* The available positioning data is not sufficient to determine the vehicle's global position.
|
||||
*/
|
||||
reporter.armingCheckFailure(NavModes::All, health_component_t::system, events::ID("check_system_no_global_pos"),
|
||||
events::Log::Error, "Global position required");
|
||||
events::Log::Error, "Global position estimate required");
|
||||
|
||||
if (reporter.mavlink_log_pub()) {
|
||||
mavlink_log_critical(reporter.mavlink_log_pub(), "Preflight Fail: Global position required");
|
||||
mavlink_log_critical(reporter.mavlink_log_pub(), "Preflight Fail: Global position estimate required");
|
||||
}
|
||||
|
||||
} else if (reporter.failsafeFlags().home_position_invalid) {
|
||||
|
||||
Reference in New Issue
Block a user