eagle tree airspeed allow negative differential pressure

This commit is contained in:
Daniel Agar
2017-07-08 13:57:59 -04:00
committed by Lorenz Meier
parent 9d9da229cc
commit e303c2ad89
+2 -2
View File
@@ -154,12 +154,12 @@ ETSAirspeed::collect()
return ret;
}
uint16_t diff_pres_pa_raw = val[1] << 8 | val[0];
float diff_pres_pa_raw = (float)(val[1] << 8 | val[0]);
differential_pressure_s report;
report.timestamp = hrt_absolute_time();
if (diff_pres_pa_raw == 0) {
if (diff_pres_pa_raw < FLT_EPSILON) {
// a zero value indicates no measurement
// since the noise floor has been arbitrarily killed
// it defeats our stuck sensor detection - the best we