AP_ExternalAHRS: Provide warning for init failure

* If the device hasn't initialized in 5 seconds, give a warning

Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
This commit is contained in:
Ryan Friedman 2024-03-23 16:53:05 -06:00 committed by Andrew Tridgell
parent dc2815e9f5
commit 67b89a9b1f
1 changed files with 5 additions and 1 deletions

View File

@ -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)