AP_Airspeed: do not cal if backend does not exist

This commit is contained in:
Hwurzburg 2021-10-05 17:42:22 -05:00 committed by Peter Barker
parent 3a6a6b63f2
commit b327f80946

View File

@ -486,6 +486,10 @@ void AP_Airspeed::calibrate(bool in_startup)
if (in_startup && param[i].skip_cal) {
continue;
}
if (sensor[i] == nullptr) {
GCS_SEND_TEXT(MAV_SEVERITY_INFO,"Airspeed %u not initalized, cannot cal", i+1);
continue;
}
state[i].cal.start_ms = AP_HAL::millis();
state[i].cal.count = 0;
state[i].cal.sum = 0;