Skip to content

Commit

Permalink
Merge pull request #15 from dhalbert/unpack_from-offset
Browse files Browse the repository at this point in the history
Don't use offset kwd in struct.unpack_from()
  • Loading branch information
tannewt committed Aug 2, 2018
2 parents f690fa5 + bea6127 commit 1e4311b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion adafruit_register/i2c_struct_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def __getitem__(self, index):
with self.obj.i2c_device:
self.obj.i2c_device.write(buf, end=1, stop=False)
self.obj.i2c_device.readinto(buf, start=1)
return struct.unpack_from(self.format, buf, offset=1)
return struct.unpack_from(self.format, buf, 1) # offset=1

def __setitem__(self, index, value):
buf = self._get_buffer(index)
Expand Down

0 comments on commit 1e4311b

Please sign in to comment.