Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace .show with .root_group = #130

Merged
merged 2 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion examples/pyportal_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
dhalbert marked this conversation as resolved.
Show resolved Hide resolved

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