Skip to content

Commit 512efd8

Browse files
committed
Ensure the splash group always exists
so we can call pycam.display_message even without the rest of the camera ui
1 parent c3a682a commit 512efd8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

adafruit_pycamera/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ def __init__(self) -> None: # pylint: disable=too-many-statements
198198
self.display = None
199199
self.pixels = None
200200
self.sdcard = None
201-
self.splash = None
201+
self.splash = displayio.Group()
202202

203203
# Reset display and I/O expander
204204
self._tft_aw_reset = DigitalInOut(board.TFT_RESET)
@@ -246,7 +246,6 @@ def make_debounced_expander_pin(pin_no):
246246

247247
def make_camera_ui(self):
248248
"""Create displayio widgets for the standard camera UI"""
249-
self.splash = displayio.Group()
250249
self._sd_label = label.Label(
251250
terminalio.FONT, text="SD ??", color=0x0, x=150, y=10, scale=2
252251
)

0 commit comments

Comments
 (0)