From a18dde1644101efe22b0f971113c997092b3e890 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 21 Aug 2019 16:38:04 -0700 Subject: [PATCH] Remove stop kwarg and use write_then_readinto. See https://github.com/adafruit/circuitpython/issues/2082 for details. --- adafruit_amg88xx.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/adafruit_amg88xx.py b/adafruit_amg88xx.py index 0da3f36..685ce5f 100644 --- a/adafruit_amg88xx.py +++ b/adafruit_amg88xx.py @@ -157,8 +157,7 @@ def pixels(self): for col in range(0, _PIXEL_ARRAY_WIDTH): i = row * _PIXEL_ARRAY_HEIGHT + col buf[0] = _PIXEL_OFFSET + (i << 1) - i2c.write(buf, end=1, stop=False) - i2c.readinto(buf, start=1) + i2c.write_then_readinto(buf, buf, out_end=1, in_start=1) raw = (buf[2] << 8) | buf[1] retbuf[row][col] = _signed_12bit_to_float(raw) * _PIXEL_TEMP_CONVERSION