From 6caf427dd22b4576c99fbb1f074d0e8bcc2bbfa8 Mon Sep 17 00:00:00 2001 From: Ryan Friedman Date: Sat, 23 Mar 2024 16:53:05 -0600 Subject: [PATCH] AP_ExternalAHRS: Provide warning for init failure * If the device hasn't initialized in 5 seconds, give a warning Signed-off-by: Ryan Friedman --- libraries/AP_ExternalAHRS/AP_ExternalAHRS_MicroStrain7.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libraries/AP_ExternalAHRS/AP_ExternalAHRS_MicroStrain7.cpp b/libraries/AP_ExternalAHRS/AP_ExternalAHRS_MicroStrain7.cpp index 72da0d1e0c..53be7b6e08 100644 --- a/libraries/AP_ExternalAHRS/AP_ExternalAHRS_MicroStrain7.cpp +++ b/libraries/AP_ExternalAHRS/AP_ExternalAHRS_MicroStrain7.cpp @@ -71,7 +71,11 @@ AP_ExternalAHRS_MicroStrain7::AP_ExternalAHRS_MicroStrain7(AP_ExternalAHRS *_fro uint16_t(AP_ExternalAHRS::AvailableSensor::COMPASS)); hal.scheduler->delay(5000); - GCS_SEND_TEXT(MAV_SEVERITY_INFO, "MicroStrain7 ExternalAHRS initialised"); + if(initialised()) { + GCS_SEND_TEXT(MAV_SEVERITY_INFO, "MicroStrain7 ExternalAHRS initialised."); + } else { + GCS_SEND_TEXT(MAV_SEVERITY_WARNING, "MicroStrain7 ExternalAHRS failed to initialise."); + } } void AP_ExternalAHRS_MicroStrain7::update_thread(void)