Skip to content

Commit a733886

Browse files
authored
Merge pull request #1763 from FoamyGuy/pygamer_thermal_cam_cp7
cp7 version of OnDiskBitmap usage for pygamer thermal cam
2 parents 60a005c + b1863fe commit a733886

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

PyGamer_Thermal_Camera/code.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,22 @@
3030
font = bitmap_font.load_font("/fonts/OpenSans-9.bdf")
3131

3232
# Display splash graphics and play startup tones
33+
# CircuitPython 6 & 7 compatible
3334
with open("/thermal_cam_splash.bmp", "rb") as bitmap_file:
3435
bitmap = displayio.OnDiskBitmap(bitmap_file)
3536
splash = displayio.Group()
3637
splash.append(displayio.TileGrid(bitmap,
3738
pixel_shader=getattr(bitmap, 'pixel_shader', displayio.ColorConverter())))
3839
board.DISPLAY.show(splash)
3940
time.sleep(0.1) # Allow the splash to display
41+
42+
# # CircuitPython 7+ compatible
43+
# splash = displayio.Group()
44+
# bitmap = displayio.OnDiskBitmap("/thermal_cam_splash.bmp")
45+
# splash.append(displayio.TileGrid(bitmap, pixel_shader=bitmap.pixel_shader))
46+
# board.DISPLAY.show(splash)
47+
# time.sleep(0.1) # Allow the splash to display
48+
4049
panel.play_tone(440, 0.1) # A4
4150
panel.play_tone(880, 0.1) # A5
4251

0 commit comments

Comments
 (0)