mirror of
https://github.com/adafruit/DHT-sensor-library.git
synced 2025-08-03 02:44:28 +02:00
fix initilization of _lastreadtime
This commit is contained in:
2
DHT.cpp
2
DHT.cpp
@@ -27,7 +27,7 @@ void DHT::begin(void) {
|
|||||||
// Using this value makes sure that millis() - lastreadtime will be
|
// Using this value makes sure that millis() - lastreadtime will be
|
||||||
// >= MIN_INTERVAL right away. Note that this assignment wraps around,
|
// >= MIN_INTERVAL right away. Note that this assignment wraps around,
|
||||||
// but so will the subtraction.
|
// but so will the subtraction.
|
||||||
_lastreadtime = -MIN_INTERVAL;
|
_lastreadtime = millis()-MIN_INTERVAL;
|
||||||
DEBUG_PRINT("Max clock cycles: "); DEBUG_PRINTLN(_maxcycles, DEC);
|
DEBUG_PRINT("Max clock cycles: "); DEBUG_PRINTLN(_maxcycles, DEC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user