Browse Source

AP_Airspeed: allow zero offset if we are skipping calibration

gps-1.3.1
Peter Barker 3 years ago committed by Andrew Tridgell
parent
commit
16c11fc4fa
  1. 3
      libraries/AP_Airspeed/AP_Airspeed.h

3
libraries/AP_Airspeed/AP_Airspeed.h

@ -123,7 +123,8 @@ public: @@ -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;
}

Loading…
Cancel
Save