@@ -55,7 +55,15 @@ class DHTBase:
55
55
56
56
__hiLevel = 51
57
57
58
- def __init__ (self , dht11 : bool , pin : Pin , trig_wait : int , use_pulseio : bool , * , max_pulses : int = 81 ):
58
+ def __init__ (
59
+ self ,
60
+ dht11 : bool ,
61
+ pin : Pin ,
62
+ trig_wait : int ,
63
+ use_pulseio : bool ,
64
+ * ,
65
+ max_pulses : int = 81
66
+ ):
59
67
"""
60
68
:param boolean dht11: True if device is DHT11, otherwise DHT22.
61
69
:param ~board.Pin pin: digital pin used for communication
@@ -284,7 +292,7 @@ class DHT11(DHTBase):
284
292
"""
285
293
286
294
def __init__ (self , pin : Pin , use_pulseio : bool = _USE_PULSEIO ):
287
- super ().__init__ (True , pin , 18000 , 81 , use_pulseio )
295
+ super ().__init__ (True , pin , 18000 , use_pulseio )
288
296
289
297
290
298
class DHT22 (DHTBase ):
@@ -294,7 +302,7 @@ class DHT22(DHTBase):
294
302
"""
295
303
296
304
def __init__ (self , pin : Pin , use_pulseio : bool = _USE_PULSEIO ):
297
- super ().__init__ (False , pin , 1000 , 81 , use_pulseio )
305
+ super ().__init__ (False , pin , 1000 , use_pulseio )
298
306
299
307
300
308
class DHT21 (DHTBase ):
@@ -308,4 +316,4 @@ class DHT21(DHTBase):
308
316
# If that would be 81, the dummy pulses will be read and the real data would be truncated.
309
317
# Hence setting maxPulses to 129, taking both real data and dummy bytes into buffer.
310
318
def __init__ (self , pin : Pin , use_pulseio : bool = _USE_PULSEIO ):
311
- super ().__init__ (False , pin , 1000 , 129 , use_pulseio )
319
+ super ().__init__ (False , pin , 1000 , use_pulseio , max_pulses = 129 )
0 commit comments