Workaround invalid detection of SHT3x sensors

Workaround invalid detection of SHT3x sensors (#6067)
This commit is contained in:
Theo Arends 2019-07-11 10:56:12 +02:00
parent d0c8d56171
commit a439ef9f0e
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ bool Sht3xRead(float &t, float &h, uint8_t sht3x_address)
};
t = ConvertTemp((float)((((data[0] << 8) | data[1]) * 175) / 65535.0) - 45);
h = ConvertHumidity((float)((((data[3] << 8) | data[4]) * 100) / 65535.0)); // Set global humidity
return (!isnan(t) && !isnan(h));
return (!isnan(t) && !isnan(h) && (h != 0));
}
/********************************************************************************************/