From 11ad677f8ebbd995934f947ce2b72ae79eedce82 Mon Sep 17 00:00:00 2001 From: Jacob Dahl <37091262+dakejahl@users.noreply.github.com> Date: Tue, 22 Sep 2026 15:00:32 -0800 Subject: [PATCH] fix(commander): clarify sensor startup diagnostics (#28620) Use the arming-check events to explain initialization waits without misleading legacy preflight messages. Assisted-by: Codex Signed-off-by: Jacob Dahl --- .../HealthAndArmingChecks/checks/estimatorCheck.cpp | 4 ---- .../HealthAndArmingChecks/checks/magnetometerCheck.cpp | 7 +------ 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/modules/commander/HealthAndArmingChecks/checks/estimatorCheck.cpp b/src/modules/commander/HealthAndArmingChecks/checks/estimatorCheck.cpp index 526123a9a74..c59d8edbf3f 100644 --- a/src/modules/commander/HealthAndArmingChecks/checks/estimatorCheck.cpp +++ b/src/modules/commander/HealthAndArmingChecks/checks/estimatorCheck.cpp @@ -115,10 +115,6 @@ void EstimatorChecks::checkAndReport(const Context &context, Report &reporter) reporter.armingCheckFailure(required_groups, health_component_t::local_position_estimate, events::ID("check_estimator_missing_data"), events::Log::Info, "Waiting for estimator to initialize"); - - if (reporter.mavlink_log_pub()) { - mavlink_log_critical(reporter.mavlink_log_pub(), "Preflight Fail: ekf2 missing data"); - } } } else { diff --git a/src/modules/commander/HealthAndArmingChecks/checks/magnetometerCheck.cpp b/src/modules/commander/HealthAndArmingChecks/checks/magnetometerCheck.cpp index ac35a618032..b690fbad74c 100644 --- a/src/modules/commander/HealthAndArmingChecks/checks/magnetometerCheck.cpp +++ b/src/modules/commander/HealthAndArmingChecks/checks/magnetometerCheck.cpp @@ -148,12 +148,7 @@ void MagnetometerChecks::checkAndReport(const Context &context, Report &reporter */ reporter.armingCheckFailure(NavModes::All, health_component_t::magnetometer, events::ID("check_mag_sys_has_mag_missing"), - events::Log::Error, "Found {1} compass (required: {2})", num_enabled_and_valid_calibration, _param_sys_has_mag.get()); - - if (reporter.mavlink_log_pub()) { - mavlink_log_critical(reporter.mavlink_log_pub(), "Preflight Fail: Found %i compass (required: %" PRId32 ")", - num_enabled_and_valid_calibration, _param_sys_has_mag.get()); - } + events::Log::Info, "Waiting for compass (found {1}, required: {2})", num_enabled_and_valid_calibration, _param_sys_has_mag.get()); } } }