Skip to content

Commit 89626df

Browse files
committed
cp7 version of OnDiskBitmap usage for kittypaw keyboard
1 parent 1e64c04 commit 89626df

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

Kitty_Paw_Keypad/code.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,20 @@
5252
# display setup
5353
display = ST7789(display_bus, width=240, height=240, rowstart=80)
5454

55+
# CircuitPython 6 & 7 compatible
5556
# bitmap setup
5657
bitmap = displayio.OnDiskBitmap(open("/parrot-240-sheet.bmp", "rb"))
5758

5859
# Create a TileGrid to hold the bitmap
5960
parrot0_grid = displayio.TileGrid(bitmap, pixel_shader=getattr(bitmap, 'pixel_shader', displayio.ColorConverter()),
60-
width=1, height=1,
61-
tile_height=240, tile_width=240,
62-
default_tile=0,
63-
x=0, y=0)
61+
tile_height=240, tile_width=240)
62+
63+
# # CircuitPython 7+ compatible
64+
# bitmap = displayio.OnDiskBitmap("/parrot-240-sheet.bmp")
65+
66+
# Create a TileGrid to hold the bitmap
67+
# parrot0_grid = displayio.TileGrid(bitmap, pixel_shader=bitmap.pixel_shader,
68+
# tile_height=240, tile_width=240)
6469

6570
# Create a Group to hold the TileGrid
6671
group = displayio.Group()

0 commit comments

Comments
 (0)