Skip to content

Commit a18dde1

Browse files
committed
Remove stop kwarg and use write_then_readinto.
See adafruit/circuitpython#2082 for details.
1 parent 4f0eb51 commit a18dde1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

adafruit_amg88xx.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,7 @@ def pixels(self):
157157
for col in range(0, _PIXEL_ARRAY_WIDTH):
158158
i = row * _PIXEL_ARRAY_HEIGHT + col
159159
buf[0] = _PIXEL_OFFSET + (i << 1)
160-
i2c.write(buf, end=1, stop=False)
161-
i2c.readinto(buf, start=1)
160+
i2c.write_then_readinto(buf, buf, out_end=1, in_start=1)
162161

163162
raw = (buf[2] << 8) | buf[1]
164163
retbuf[row][col] = _signed_12bit_to_float(raw) * _PIXEL_TEMP_CONVERSION

0 commit comments

Comments
 (0)