From faaf9be303bf106fd383fee3ec13cd3e262b7e7b Mon Sep 17 00:00:00 2001 From: RetiredWizard Date: Wed, 1 Nov 2023 22:16:49 -0400 Subject: [PATCH] Remove depreciated .show from library --- adafruit_portalbase/graphics.py | 2 +- examples/portalbase_simpletest.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/adafruit_portalbase/graphics.py b/adafruit_portalbase/graphics.py index 598ff88..c9bbb0d 100644 --- a/adafruit_portalbase/graphics.py +++ b/adafruit_portalbase/graphics.py @@ -56,7 +56,7 @@ def __init__(self, display, *, default_bg=0x000000, scale=1, debug=False): # set the default background if default_bg is not None: - self.display.show(self.splash) + self.display.root_group = self.splash self.set_background(default_bg) gc.collect() diff --git a/examples/portalbase_simpletest.py b/examples/portalbase_simpletest.py index 7b9fce4..1454c0f 100644 --- a/examples/portalbase_simpletest.py +++ b/examples/portalbase_simpletest.py @@ -11,6 +11,7 @@ import board +import displayio from adafruit_pyportal import PyPortal # Set a data source URL @@ -20,7 +21,7 @@ pyportal = PyPortal(url=TEXT_URL, status_neopixel=board.NEOPIXEL) # Set display to show REPL -board.DISPLAY.show(None) +board.DISPLAY.root_group = displayio.CIRCUITPYTHON_TERMINAL # Go get that data print("Fetching text from", TEXT_URL)