Skip to content

Commit ebd4118

Browse files
Rewrite the changes as this is example code.
1 parent 13e42db commit ebd4118

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

examples/gizmo_eink_simpletest.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@
1616
with open("/display-ruler.bmp", "rb") as file:
1717
picture = displayio.OnDiskBitmap(file)
1818
# Create a Tilegrid with the bitmap and put in the displayio group
19+
# CircuitPython 6 & 7 compatible
1920
sprite = displayio.TileGrid(
2021
picture,
2122
pixel_shader=getattr(picture, "pixel_shader", displayio.ColorConverter()),
22-
# TODO: Once CP6 is no longer supported, replace the above line with below
23-
# pixel_shader=picture.pixel_shader,
2423
)
24+
# CircuitPython 7 compatible only
25+
# sprite = displayio.TileGrid(picture, pixel_shader=bitmap.pixel_shader)
2526
display_group.append(sprite)
2627

2728
# Place the display group on the screen

examples/gizmo_tft_thermometer.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,13 @@ def c_to_f(c_val):
4444
bitmap = displayio.OnDiskBitmap(bitmap_file)
4545

4646
# Create a TileGrid to hold the bitmap
47+
# CircuitPython 6 & 7 compatible
4748
tile_grid = displayio.TileGrid(
4849
bitmap,
4950
pixel_shader=getattr(bitmap, "pixel_shader", displayio.ColorConverter()),
50-
# TODO: Once CP6 is no longer supported, replace the above line with below
51-
# pixel_shader=bitmap.pixel_shader,
5251
)
52+
# CircuitPython 7 compatible only
53+
# tile_grid = displayio.TileGrid(bitmap, pixel_shader=bitmap.pixel_shader)
5354

5455
# Create a Group to hold the TileGrid
5556
group = displayio.Group()

0 commit comments

Comments
 (0)