Re-read temperature on error.

This commit is contained in:
Blaz Kristan 2022-01-09 21:43:49 +01:00
parent f66d847032
commit ee0d6420a0

View File

@ -178,6 +178,7 @@ class UsermodTemperature : public Usermod {
// we were waiting for a conversion to complete, have we waited log enough? // we were waiting for a conversion to complete, have we waited log enough?
if (now - lastTemperaturesRequest >= 750 /* 93.75ms per the datasheet but can be up to 750ms */) { if (now - lastTemperaturesRequest >= 750 /* 93.75ms per the datasheet but can be up to 750ms */) {
readTemperature(); readTemperature();
if (getTemperatureC() < -100.0f) lastMeasurement = now - readingInterval + 300; // force new measurement in 300ms
if (WLED_MQTT_CONNECTED) { if (WLED_MQTT_CONNECTED) {
char subuf[64]; char subuf[64];