Skip to content

Commit 6e602b3

Browse files
committed
Update examples to remove older style tilegrid creation
1 parent 1d4cf22 commit 6e602b3

File tree

3 files changed

+3
-12
lines changed

3 files changed

+3
-12
lines changed

examples/ssd1680_2.13_featherwing.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@
4545
with open("/display-ruler.bmp", "rb") as f:
4646
pic = displayio.OnDiskBitmap(f)
4747

48-
t = displayio.TileGrid(
49-
pic, pixel_shader=getattr(pic, "pixel_shader", displayio.ColorConverter())
50-
)
48+
t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader)
5149

5250
g.append(t)
5351

examples/ssd1680_2.13_tricolor_breakout.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,7 @@
4444
with open("/display-ruler.bmp", "rb") as f:
4545
pic = displayio.OnDiskBitmap(f)
4646

47-
t = displayio.TileGrid(
48-
pic, pixel_shader=getattr(pic, "pixel_shader", displayio.ColorConverter())
49-
)
47+
t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader)
5048

5149
g.append(t)
5250

examples/ssd1680_simpletest.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,7 @@
5050

5151
with open("/display-ruler.bmp", "rb") as f:
5252
pic = displayio.OnDiskBitmap(f)
53-
# CircuitPython 6 & 7 compatible
54-
t = displayio.TileGrid(
55-
pic, pixel_shader=getattr(pic, "pixel_shader", displayio.ColorConverter())
56-
)
57-
# CircuitPython 7 compatible only
58-
# t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader)
53+
t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader)
5954
g.append(t)
6055

6156
display.show(g)

0 commit comments

Comments
 (0)