diff --git a/flight/modules/Sensors/sensors.c b/flight/modules/Sensors/sensors.c index c45024d59..623480dd5 100644 --- a/flight/modules/Sensors/sensors.c +++ b/flight/modules/Sensors/sensors.c @@ -591,8 +591,12 @@ static void settingsUpdatedCb(__attribute__((unused)) UAVObjEvent *objEv) RevoSettingsBaroTempCorrectionPolynomialGet(&baroCorrection); RevoSettingsBaroTempCorrectionExtentGet(&baroCorrectionExtent); - baro_temp_correction_enabled = !(baroCorrectionExtent.max - baroCorrectionExtent.min < 0.1f || - (baroCorrection.a < 1e-9f && baroCorrection.b < 1e-9f && baroCorrection.c < 1e-9f && baroCorrection.d < 1e-9f)); + baro_temp_correction_enabled = + (baroCorrectionExtent.max - baroCorrectionExtent.min > 0.1f && + (fabsf(baroCorrection.a) > 1e-9f || + fabsf(baroCorrection.b) > 1e-9f || + fabsf(baroCorrection.c) > 1e-9f || + fabsf(baroCorrection.d) > 1e-9f)); } /** * @}