Skip to content

Commit e68fb4f

Browse files
committed
Changed power crc is raised to from 0x131 to 0x31 to be in line with the datasheet and the other crc code from Sensirion. It is 0x131 in the original code from Sensirion, however their docs and github now use a helper library which uses 0x31. 0x31 is Probably the correct polynomial.
1 parent d1e1834 commit e68fb4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_sht31d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def _crc(data):
115115
for _ in range(8):
116116
if crc & 0x80:
117117
crc <<= 1
118-
crc ^= 0x131
118+
crc ^= 0x31 #
119119
else:
120120
crc <<= 1
121121
return crc & 0xFF

0 commit comments

Comments
 (0)