We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a512ac1 commit 048711cCopy full SHA for 048711c
adafruit_htu31d.py
@@ -40,7 +40,7 @@
40
_HTU31D_READSERIAL = const(0x0A) # Read Out of Serial Register
41
_HTU31D_SOFTRESET = const(0x1E) # Soft Reset
42
_HTU31D_HEATERON = const(0x04) # Enable heater
43
-_HTU31D_HEATEROFF = const(0x02) # Disable heater
+_HTU31D_HEATEROFF = const(0x02) # Disable heater
44
_HTU31D_CONVERSION = const(0x40) # Start a conversion
45
_HTU31D_READTEMPHUM = const(0x00) # Read the conversion values
46
@@ -81,7 +81,7 @@ def heater(self):
81
@heater.setter
82
def heater(self, new_mode):
83
# check its a boolean
84
- if (new_mode != True) and (new_mode != False):
+ if not new_mode in (True, False):
85
raise AttributeError("Heater mode must be boolean")
86
# cache the mode
87
self._heater = new_mode
0 commit comments