mirror of https://github.com/joan2937/pigpio
Merge f88425505b
into c33738a320
This commit is contained in:
commit
4db03927e8
|
@ -88,7 +88,7 @@ class DHT11(object):
|
||||||
total = self.humidity + self.temperature
|
total = self.humidity + self.temperature
|
||||||
# is checksum ok ?
|
# is checksum ok ?
|
||||||
if not (total & 255) == self.checksum:
|
if not (total & 255) == self.checksum:
|
||||||
raise
|
raise ValueError("Checksum incorrect")
|
||||||
elif 16 <= self.bit < 24: # in temperature byte
|
elif 16 <= self.bit < 24: # in temperature byte
|
||||||
self.temperature = (self.temperature << 1) + val
|
self.temperature = (self.temperature << 1) + val
|
||||||
elif 0 <= self.bit < 8: # in humidity byte
|
elif 0 <= self.bit < 8: # in humidity byte
|
||||||
|
|
Loading…
Reference in New Issue