From b1863fe5774cbe1a5bfb99b1783f4dc37920e950 Mon Sep 17 00:00:00 2001 From: foamyguy Date: Sat, 7 Aug 2021 17:48:00 -0500 Subject: [PATCH] cp7 version of OnDiskBitmap usage for pygamer thermal cam --- PyGamer_Thermal_Camera/code.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/PyGamer_Thermal_Camera/code.py b/PyGamer_Thermal_Camera/code.py index 3b8f0f895..d4ee30d51 100644 --- a/PyGamer_Thermal_Camera/code.py +++ b/PyGamer_Thermal_Camera/code.py @@ -30,6 +30,7 @@ font = bitmap_font.load_font("/fonts/OpenSans-9.bdf") # Display splash graphics and play startup tones +# CircuitPython 6 & 7 compatible with open("/thermal_cam_splash.bmp", "rb") as bitmap_file: bitmap = displayio.OnDiskBitmap(bitmap_file) splash = displayio.Group() @@ -37,6 +38,14 @@ pixel_shader=getattr(bitmap, 'pixel_shader', displayio.ColorConverter()))) board.DISPLAY.show(splash) time.sleep(0.1) # Allow the splash to display + +# # CircuitPython 7+ compatible +# splash = displayio.Group() +# bitmap = displayio.OnDiskBitmap("/thermal_cam_splash.bmp") +# splash.append(displayio.TileGrid(bitmap, pixel_shader=bitmap.pixel_shader)) +# board.DISPLAY.show(splash) +# time.sleep(0.1) # Allow the splash to display + panel.play_tone(440, 0.1) # A4 panel.play_tone(880, 0.1) # A5