Skip to content

Commit 06ec55e

Browse files
authored
Merge pull request #10 from noahcoad/master
fix crc calc for non-express boards
2 parents eec2e6b + 3aea6c8 commit 06ec55e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

adafruit_lc709203f.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,8 @@ def _generate_crc(self, data):
171171
crc = (crc << 1) ^ 0x07
172172
else:
173173
crc <<= 1
174-
return crc & 0xFF
174+
crc &= 0xFF
175+
return crc
175176

176177
def _read_word(self, command):
177178
self._buf[0] = LC709203F_I2CADDR_DEFAULT * 2 # write byte

0 commit comments

Comments
 (0)