winlinvip / SimpleDHT

Simple, Stable and Fast Arduino Temp & Humidity Sensors for DHT11 and DHT22. http://learn.adafruit.com/dht
MIT License
144 stars 61 forks source link

levelTimeout is 5s not 500ms #43

Closed yasiupl closed 3 years ago

yasiupl commented 4 years ago
class SimpleDHT {
protected:
    long levelTimeout = 5000000; // 500ms

I just noticed that the comment in the file SimpleDHT.h says "500ms" for the variable long levelTimeout = 5000000;. The number works out to be 5 seconds, not 500ms. I don't know what value is better, so either the comment should be changed to "5 seconds" or the value should be changed to 500000.

Even better, the value should be customizable using another method, like setTimeout, similar to other Arduino libraries.

yasiupl commented 4 years ago

I think 500ms is enough for a timeout.