Skip to content

Commit b603aaa

Browse files
authored
4.rc.1 error: make buffer length match unpacked
Issue: when running this on 4.rc.1 it was unable to load properly on instantiation due to the length of the "chip_data" buffer being one too long. the length of '>HBBBBBB' is now equal to the length of chip_data.
1 parent 2f2f9c8 commit b603aaa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_focaltouch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def __init__(self, i2c, address=_FT6206_DEFAULT_I2C_ADDR, debug=False):
8787
self._i2c = I2CDevice(i2c, address)
8888
self._debug = debug
8989

90-
chip_data = self._read(_FT6XXX_REG_LIBH, 9)
90+
chip_data = self._read(_FT6XXX_REG_LIBH, 8)
9191
lib_ver, chip_id, _, _, firm_id, _, vend_id = struct.unpack('>HBBBBBB', chip_data)
9292

9393
if vend_id != 0x11:

0 commit comments

Comments
 (0)