mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-16 08:29:15 +01:00
OP-1793 - Fix enabling condition for baro temp correction
This commit is contained in:
parent
a6b43ecef0
commit
8eaf7f9918
@ -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));
|
||||
}
|
||||
/**
|
||||
* @}
|
||||
|
Loading…
x
Reference in New Issue
Block a user