AP_Airspeed: allow zero offset if we are skipping calibration

This commit is contained in:
Peter Barker 2021-09-14 14:59:04 +10:00 committed by Andrew Tridgell
parent bf695e4eeb
commit 16c11fc4fa

View File

@ -123,7 +123,8 @@ public:
bool healthy(uint8_t i) const {
bool ok = state[i].healthy && enabled(i);
#ifndef HAL_BUILD_AP_PERIPH
ok &= (fabsf(param[i].offset) > 0 || state[i].use_zero_offset);
// sanity check the offset parameter. Zero is permitted if we are skipping calibration.
ok &= (fabsf(param[i].offset) > 0 || state[i].use_zero_offset || param[i].skip_cal);
#endif
return ok;
}