AP_Airspeed: skip cal on watchdog reset

This commit is contained in:
Andrew Tridgell 2019-04-11 19:57:19 +10:00 committed by Randy Mackay
parent e105bf258c
commit 69528a9892

View File

@ -290,6 +290,10 @@ bool AP_Airspeed::get_temperature(uint8_t i, float &temperature)
// least once before the get_airspeed() interface can be used // least once before the get_airspeed() interface can be used
void AP_Airspeed::calibrate(bool in_startup) void AP_Airspeed::calibrate(bool in_startup)
{ {
if (hal.util->was_watchdog_reset()) {
gcs().send_text(MAV_SEVERITY_INFO,"Airspeed: skipping cal");
return;
}
for (uint8_t i=0; i<AIRSPEED_MAX_SENSORS; i++) { for (uint8_t i=0; i<AIRSPEED_MAX_SENSORS; i++) {
if (!enabled(i)) { if (!enabled(i)) {
continue; continue;