Skip to content

Commit ac9bcac

Browse files
committed
Update examples to use root_group instead of splash
1 parent 86168da commit ac9bcac

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

adafruit_pyportal/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def __init__( # noqa: PLR0912,PLR0913,PLR0915 Too many branches,Too many argume
178178

179179
# Convenience Shortcuts for compatibility
180180
self.peripherals = Peripherals(
181-
spi, display=self.display, splash_group=self.splash, debug=debug
181+
spi, display=self.display, display_group=self.root_group, debug=debug
182182
)
183183
self.set_backlight = self.peripherals.set_backlight
184184
self.sd_check = self.peripherals.sd_check

adafruit_pyportal/graphics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def hide_QR(self):
6767
"""Clear any QR codes that are currently on the screen"""
6868

6969
if self._qr_only:
70-
self.display.root_group = self.splash
70+
self.display.root_group = self.root_group
7171
else:
7272
try:
7373
self._qr_group.pop()

adafruit_pyportal/peripherals.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
class Peripherals:
5050
"""Peripherals Helper Class for the PyPortal Library"""
5151

52-
def __init__(self, spi, display, splash_group, debug=False): # noqa: PLR0912,PLR0913 Too many branches,Too many arguments in function definition
52+
def __init__(self, spi, display, display_group, debug=False): # noqa: PLR0912,PLR0913 Too many branches,Too many arguments in function definition
5353
# Speaker Enable
5454
self._speaker_enable = DigitalInOut(board.SPEAKER_ENABLE)
5555
self._speaker_enable.switch_to_output(False)
@@ -109,7 +109,7 @@ def __init__(self, spi, display, splash_group, debug=False): # noqa: PLR0912,PL
109109

110110
if debug:
111111
print("Init cursor")
112-
self.mouse_cursor = Cursor(board.DISPLAY, display_group=splash_group, cursor_speed=8)
112+
self.mouse_cursor = Cursor(board.DISPLAY, display_group=display_group, cursor_speed=8)
113113
self.mouse_cursor.hide()
114114
self.cursor = CursorManager(self.mouse_cursor)
115115
else:

0 commit comments

Comments
 (0)