Skip to content

Commit bcdc7a7

Browse files
committed
fix continuation line - add comment
1 parent ddb9d66 commit bcdc7a7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

adafruit_dht.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ def measure(self):
138138
delay_between_readings = 0.5
139139
if self._dht11:
140140
delay_between_readings = 1.0
141+
# Initialte new reading if this is the first call or if sufficient delay
142+
# If delay not sufficient - return previous reading.
143+
# This allows back to back access for temperature and humidity for same reading
141144
if (self._last_called == 0 or
142145
(time.monotonic()-self._last_called) > delay_between_readings):
143146
self._last_called = time.monotonic()

0 commit comments

Comments
 (0)