From 731169076e918f741c8d5e638f1ed7593d984f03 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Wed, 1 Nov 2023 22:31:30 -0400 Subject: [PATCH 1/2] replace .show with .root_group = --- adafruit_pyportal/graphics.py | 4 ++-- examples/pyportal_simpletest.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/adafruit_pyportal/graphics.py b/adafruit_pyportal/graphics.py index 3a24e93..5b99016 100755 --- a/adafruit_pyportal/graphics.py +++ b/adafruit_pyportal/graphics.py @@ -62,7 +62,7 @@ def qrcode(self, qr_data, *, qr_size=1, x=0, y=0, hide_background=False): y=y, ) if hide_background: - self.display.show(self._qr_group) + self.display.root_group = self._qr_group self._qr_only = hide_background # pylint: enable=arguments-differ @@ -71,7 +71,7 @@ def hide_QR(self): # pylint: disable=invalid-name """Clear any QR codes that are currently on the screen""" if self._qr_only: - self.display.show(self.splash) + self.display.root_group = self.splash else: try: self._qr_group.pop() diff --git a/examples/pyportal_simpletest.py b/examples/pyportal_simpletest.py index 18b0017..c0a7cdc 100644 --- a/examples/pyportal_simpletest.py +++ b/examples/pyportal_simpletest.py @@ -14,7 +14,7 @@ pyportal = PyPortal(url=TEXT_URL, status_neopixel=board.NEOPIXEL) # Set display to show REPL -board.DISPLAY.show(None) +board.DISPLAY.root_group = None # Go get that data print("Fetching text from", TEXT_URL) From 8f9403fe67fcb96f0db973c434e8395a7dd67a6c Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Wed, 1 Nov 2023 23:35:43 -0400 Subject: [PATCH 2/2] show REPL with CIRCUITPYTHON_TERMINAL --- examples/pyportal_simpletest.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/pyportal_simpletest.py b/examples/pyportal_simpletest.py index c0a7cdc..b98fbcf 100644 --- a/examples/pyportal_simpletest.py +++ b/examples/pyportal_simpletest.py @@ -5,8 +5,10 @@ # NOTE: Make sure you've created your secrets.py file before running this example # https://learn.adafruit.com/adafruit-pyportal/internet-connect#whats-a-secrets-file-17-2 import board +from displayio import CIRCUITPYTHON_TERMINAL from adafruit_pyportal import PyPortal + # Set a data source URL TEXT_URL = "http://wifitest.adafruit.com/testwifi/index.html" @@ -14,7 +16,7 @@ pyportal = PyPortal(url=TEXT_URL, status_neopixel=board.NEOPIXEL) # Set display to show REPL -board.DISPLAY.root_group = None +board.DISPLAY.root_group = CIRCUITPYTHON_TERMINAL # Go get that data print("Fetching text from", TEXT_URL)