Skip to content

Commit 53375d8

Browse files
committed
Use MIN_INTERVAL define instead of hardcoded value
1 parent edcd0e0 commit 53375d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

DHT.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ boolean DHT::read(bool force) {
124124
// Check if sensor was read less than two seconds ago and return early
125125
// to use last reading.
126126
uint32_t currenttime = millis();
127-
if (!force && ((currenttime - _lastreadtime) < 2000)) {
127+
if (!force && ((currenttime - _lastreadtime) < MIN_INTERVAL)) {
128128
return _lastresult; // return last correct measurement
129129
}
130130
_lastreadtime = currenttime;

0 commit comments

Comments
 (0)