Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions adafruit_pyportal/graphics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
Expand Down
4 changes: 3 additions & 1 deletion examples/pyportal_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,18 @@
# 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"

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

# Set display to show REPL
board.DISPLAY.show(None)
board.DISPLAY.root_group = CIRCUITPYTHON_TERMINAL

# Go get that data
print("Fetching text from", TEXT_URL)
Expand Down