AP_Airspeed: skip cal on watchdog reset

This commit is contained in:
Andrew Tridgell 2019-04-11 19:57:19 +10:00
parent 9d34494bfd
commit 7e675805fa

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
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++) {
if (!enabled(i)) {
continue;