Skip to content

Commit 6df2d80

Browse files
Merge branch 'main' into pypi
2 parents b1a7889 + c569002 commit 6df2d80

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

examples/ssd1681_simpletest.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,12 @@
4141

4242
with open("/display-ruler.bmp", "rb") as f:
4343
pic = displayio.OnDiskBitmap(f)
44-
t = displayio.TileGrid(pic, pixel_shader=displayio.ColorConverter())
44+
# CircuitPython 6 & 7 compatible
45+
t = displayio.TileGrid(
46+
pic, pixel_shader=getattr(pic, "pixel_shader", displayio.ColorConverter())
47+
)
48+
# CircuitPython 7 compatible only
49+
# t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader)
4550
g.append(t)
4651

4752
display.show(g)

0 commit comments

Comments
 (0)