From bef489b006a2ec0179b172fac37b26c1df7ec630 Mon Sep 17 00:00:00 2001 From: arendst Date: Sun, 10 Sep 2017 17:27:56 +0200 Subject: [PATCH] v5.7.1b - Add timeout to some sensors 5.7.1b * Add timeout to DHT and DS18B20 sensors (#852) --- sonoff/xsns_dht.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonoff/xsns_dht.ino b/sonoff/xsns_dht.ino index 55d01140e..998fd6a3e 100644 --- a/sonoff/xsns_dht.ino +++ b/sonoff/xsns_dht.ino @@ -197,7 +197,7 @@ void dht_init() for (byte i = 0; i < dht_sensors; i++) { pinMode(dht[i].pin, INPUT_PULLUP); - dht[i].lastreadtime -= MIN_INTERVAL; + dht[i].lastreadtime = 0; dht[i].lastresult = 0; switch (dht[i].type) { case GPIO_DHT11: