From b603aaad99e058d4b333ec8f0d6915dc43c128f8 Mon Sep 17 00:00:00 2001 From: TG-Techie <39284876+TG-Techie@users.noreply.github.com> Date: Mon, 6 May 2019 13:16:45 -0400 Subject: [PATCH] 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. --- adafruit_focaltouch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adafruit_focaltouch.py b/adafruit_focaltouch.py index 5ee7fe1..4a2262d 100644 --- a/adafruit_focaltouch.py +++ b/adafruit_focaltouch.py @@ -87,7 +87,7 @@ def __init__(self, i2c, address=_FT6206_DEFAULT_I2C_ADDR, debug=False): self._i2c = I2CDevice(i2c, address) self._debug = debug - chip_data = self._read(_FT6XXX_REG_LIBH, 9) + chip_data = self._read(_FT6XXX_REG_LIBH, 8) lib_ver, chip_id, _, _, firm_id, _, vend_id = struct.unpack('>HBBBBBB', chip_data) if vend_id != 0x11: