From e503df48ff2fa99bf93ef894bd453ecca3c47b0a Mon Sep 17 00:00:00 2001 From: Peter Barker <pbarker@barker.dropbear.id.au> Date: Thu, 11 Oct 2018 07:38:53 +1100 Subject: [PATCH] AP_Baro: emit calibrated messages for each connected baro Thanks to OlliW for pointing this out --- libraries/AP_Baro/AP_Baro.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libraries/AP_Baro/AP_Baro.cpp b/libraries/AP_Baro/AP_Baro.cpp index 72e3b262ac..edc1da5c2f 100644 --- a/libraries/AP_Baro/AP_Baro.cpp +++ b/libraries/AP_Baro/AP_Baro.cpp @@ -244,12 +244,16 @@ void AP_Baro::calibrate(bool save) _guessed_ground_temperature = get_external_temperature(); // panic if all sensors are not calibrated + uint8_t num_calibrated = 0; for (uint8_t i=0; i<_num_sensors; i++) { if (sensors[i].calibrated) { - gcs().send_text(MAV_SEVERITY_INFO, "Barometer calibration complete"); - return; + gcs().send_text(MAV_SEVERITY_INFO, "Barometer %u calibration complete", i+1); + num_calibrated++; } } + if (num_calibrated) { + return; + } AP_HAL::panic("AP_Baro: all sensors uncalibrated"); }