Merge pull request #2176 from atiselsts/bugfix/hdc_sensor

Fix HDC sensor reading conversion
This commit is contained in:
George Oikonomou 2017-04-08 00:11:05 +01:00 committed by GitHub
commit d0ddb7221e

View File

@ -186,7 +186,7 @@ static void
convert(float *temp, float *hum)
{
/* Convert temperature to degrees C */
*temp = ((double)(int16_t)raw_temp / 65536) * 165 - 40;
*temp = ((double)raw_temp / 65536) * 165 - 40;
/* Convert relative humidity to a %RH value */
*hum = ((double)raw_hum / 65536) * 100;