Skip to content

Commit cc4c7ba

Browse files
authored
Removed double timeout-check
1 parent 970795f commit cc4c7ba

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

DHT.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -318,11 +318,7 @@ bool DHT::read(bool force) {
318318
for (int i = 0; i < 40; ++i) {
319319
uint32_t lowCycles = cycles[2 * i];
320320
uint32_t highCycles = cycles[2 * i + 1];
321-
if ((lowCycles == TIMEOUT) || (highCycles == TIMEOUT)) {
322-
DEBUG_PRINTLN(F("DHT timeout waiting for pulse."));
323-
_lastresult = false;
324-
return _lastresult;
325-
}
321+
326322
data[i / 8] <<= 1;
327323
// Now compare the low and high cycle times to see if the bit is a 0 or 1.
328324
if (highCycles > lowCycles) {

0 commit comments

Comments
 (0)