Skip to content

Commit 2eba577

Browse files
committed
add try/except for wait_for_frame call for CP5.0 caompatibility
1 parent c4913d5 commit 2eba577

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

adafruit_slideshow.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,12 @@ def advance(self):
320320
sprite = self._sprite_class(odb,
321321
pixel_shader=displayio.ColorConverter(), position=(0, 0))
322322
self._group.append(sprite)
323-
self._display.wait_for_frame()
323+
# wait_for_frame is no longer needed in CP5.0
324+
# use try/except for backward compatibility
325+
try:
326+
self._display.wait_for_frame()
327+
except AttributeError:
328+
pass
324329

325330
self._fade_up()
326331
self._img_start = time.monotonic()

0 commit comments

Comments
 (0)