AP_Airspeed: skip cal on watchdog reset

This commit is contained in:
Andrew Tridgell 2019-04-11 19:57:19 +10:00
parent 77516329fc
commit bbe4c92b58
1 changed files with 4 additions and 0 deletions

View File

@ -319,6 +319,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;