1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-12 19:10:27 +03:00

Fix define baro

This commit is contained in:
breadoven 2024-10-06 18:00:31 +01:00 committed by Ray Morris
parent b9db8e00c3
commit d9320e84fb

View file

@ -41,10 +41,12 @@ float applySensorTempCompensation(int16_t sensorTemp, float sensorMeasurement, s
float setting = 0.0f;
if (sensorType == SENSOR_INDEX_ACC) {
setting = accelerometerConfig()->acc_temp_correction;
} else if (sensorType == SENSOR_INDEX_BARO) {
}
#ifdef USE_BARO
else if (sensorType == SENSOR_INDEX_BARO) {
setting = barometerConfig()->baro_temp_correction;
}
#endif
if (!setting) {
return 0.0f;
}
@ -94,9 +96,12 @@ float applySensorTempCompensation(int16_t sensorTemp, float sensorMeasurement, s
if (sensorType == SENSOR_INDEX_ACC) {
accelerometerConfigMutable()->acc_temp_correction = sensor_comp_data[sensorType].correctionFactor;
} else if (sensorType == SENSOR_INDEX_BARO) {
}
#ifdef USE_BARO
else if (sensorType == SENSOR_INDEX_BARO) {
barometerConfigMutable()->baro_temp_correction = sensor_comp_data[sensorType].correctionFactor;
}
#endif
sensor_comp_data[sensorType].calibrationState = SENSOR_TEMP_CAL_COMPLETE;
startTimeMs = 0;
}