[FAP] htu21d falsely reading temp as humidity

compiled and tested by blowing onto the sensor.

fixes #174
This commit is contained in:
Jan-Stefan Janetzky 2022-11-20 23:53:11 +01:00 committed by GitHub
parent 17cb7533cb
commit a5e3df0375
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -113,7 +113,7 @@ static bool temperature_sensor_fetch_data(double* temperature, double* humidity)
*temperature = (float)(adc_raw * 175.72 / 65536.00) - 46.85;
// Fetch humidity
ret = temperature_sensor_cmd((uint8_t)HTU21D_CMD_TEMPERATURE, buffer, 2);
ret = temperature_sensor_cmd((uint8_t)HTU21D_CMD_HUMIDITY, buffer, 2);
if(ret) {
// Calculate humidity