From 16c11fc4fa63cfce63c5101d8a28d6f7d311ae93 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Tue, 14 Sep 2021 14:59:04 +1000 Subject: [PATCH] AP_Airspeed: allow zero offset if we are skipping calibration --- libraries/AP_Airspeed/AP_Airspeed.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/AP_Airspeed/AP_Airspeed.h b/libraries/AP_Airspeed/AP_Airspeed.h index 7c3fb5d7ec..31db740b0d 100644 --- a/libraries/AP_Airspeed/AP_Airspeed.h +++ b/libraries/AP_Airspeed/AP_Airspeed.h @@ -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; }