From 08155d20f871eff204f76d2aa860655c500b66f8 Mon Sep 17 00:00:00 2001 From: Silvan Fuhrer Date: Wed, 13 Nov 2024 18:37:45 +0100 Subject: [PATCH] estimatorCheck: have low position warning as health component failure to fix reporting Signed-off-by: Silvan Fuhrer --- .../HealthAndArmingChecks/checks/estimatorCheck.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/modules/commander/HealthAndArmingChecks/checks/estimatorCheck.cpp b/src/modules/commander/HealthAndArmingChecks/checks/estimatorCheck.cpp index bbd26e8125f6..20dfdfb073e7 100644 --- a/src/modules/commander/HealthAndArmingChecks/checks/estimatorCheck.cpp +++ b/src/modules/commander/HealthAndArmingChecks/checks/estimatorCheck.cpp @@ -704,11 +704,12 @@ void EstimatorChecks::lowPositionAccuracy(const Context &context, Report &report * This check can be configured via COM_POS_LOW_EPH and COM_POS_LOW_ACT parameters. * */ - events::send(events::ID("check_estimator_low_position_accuracy"), {events::Log::Error, events::LogInternal::Info}, - "Local position estimate has low accuracy"); + reporter.armingCheckFailure(NavModes::All, health_component_t::local_position_estimate, + events::ID("check_estimator_low_position_accuracy"), + events::Log::Error, "Position estimate has low accuracy"); if (reporter.mavlink_log_pub()) { - mavlink_log_warning(reporter.mavlink_log_pub(), "Local position estimate has low accuracy\t"); + mavlink_log_warning(reporter.mavlink_log_pub(), "Position estimate has low accuracy\t"); } } }