From 69c31c42bae2156bec685a8607b855ff69dc8c5e Mon Sep 17 00:00:00 2001 From: foamyguy Date: Tue, 27 May 2025 16:58:55 -0500 Subject: [PATCH 1/2] displayio API updates --- adafruit_slideshow.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/adafruit_slideshow.py b/adafruit_slideshow.py index 68f5d07..6d05e0e 100755 --- a/adafruit_slideshow.py +++ b/adafruit_slideshow.py @@ -33,6 +33,7 @@ # text slides are an optional feature and require adafruit_display_text import json + import busdisplay import terminalio from adafruit_display_text import bitmap_label @@ -101,7 +102,7 @@ class SlideShow: """ Class for displaying a slideshow of .bmp images on displays. - :param displayio.Display display: The display to use + :param busdisplay.BusDisplay display: The display to use :param PWMOut backlight_pwm: The PWMOut object used for the backlight :param str folder: Specify the folder containing the image files, in quotes. Default is the root directory, ``"/"``. @@ -182,7 +183,7 @@ class SlideShow: def __init__( self, - display: displayio.Display, + display: busdisplay.BusDisplay, backlight_pwm: Optional[PWMOut] = None, *, folder: str = "/", From 40fd67e03ab4019bf84b0e870e536b125fecdd72 Mon Sep 17 00:00:00 2001 From: foamyguy Date: Tue, 27 May 2025 17:00:06 -0500 Subject: [PATCH 2/2] move typing import to proper section --- adafruit_slideshow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adafruit_slideshow.py b/adafruit_slideshow.py index 6d05e0e..994ce37 100755 --- a/adafruit_slideshow.py +++ b/adafruit_slideshow.py @@ -33,7 +33,6 @@ # text slides are an optional feature and require adafruit_display_text import json - import busdisplay import terminalio from adafruit_display_text import bitmap_label @@ -54,6 +53,7 @@ try: from typing import Optional + import busdisplay from pwmio import PWMOut except ImportError: pass