Skip to content

Commit 5302ba8

Browse files
authored
Merge pull request #130 from dhalbert/no-show
replace .show with .root_group =
2 parents a14d41b + 8f9403f commit 5302ba8

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

adafruit_pyportal/graphics.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def qrcode(self, qr_data, *, qr_size=1, x=0, y=0, hide_background=False):
6262
y=y,
6363
)
6464
if hide_background:
65-
self.display.show(self._qr_group)
65+
self.display.root_group = self._qr_group
6666
self._qr_only = hide_background
6767

6868
# pylint: enable=arguments-differ
@@ -71,7 +71,7 @@ def hide_QR(self): # pylint: disable=invalid-name
7171
"""Clear any QR codes that are currently on the screen"""
7272

7373
if self._qr_only:
74-
self.display.show(self.splash)
74+
self.display.root_group = self.splash
7575
else:
7676
try:
7777
self._qr_group.pop()

examples/pyportal_simpletest.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,18 @@
55
# NOTE: Make sure you've created your secrets.py file before running this example
66
# https://learn.adafruit.com/adafruit-pyportal/internet-connect#whats-a-secrets-file-17-2
77
import board
8+
from displayio import CIRCUITPYTHON_TERMINAL
89
from adafruit_pyportal import PyPortal
910

11+
1012
# Set a data source URL
1113
TEXT_URL = "http://wifitest.adafruit.com/testwifi/index.html"
1214

1315
# Create the PyPortal object
1416
pyportal = PyPortal(url=TEXT_URL, status_neopixel=board.NEOPIXEL)
1517

1618
# Set display to show REPL
17-
board.DISPLAY.show(None)
19+
board.DISPLAY.root_group = CIRCUITPYTHON_TERMINAL
1820

1921
# Go get that data
2022
print("Fetching text from", TEXT_URL)

0 commit comments

Comments
 (0)