1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-29 07:24:13 +01:00

Fix a bug in calculating air temperature in baro sensor when it goes below 20

deg C.
This commit is contained in:
James Cotton 2012-04-22 10:37:09 -05:00
parent 63285ea451
commit f06439ecf5

View File

@ -144,7 +144,7 @@ int32_t PIOS_MS5611_ReadADC(void)
RawTemperature = (Data[0] << 16) | (Data[1] << 8) | Data[2];
deltaTemp = RawTemperature - (CalibData.C[4] << 8);
deltaTemp = ((int32_t) RawTemperature) - (CalibData.C[4] << 8);
Temperature = 2000l + ((deltaTemp * CalibData.C[5]) >> 23);
} else {