Skip to content

Commit 216c9bd

Browse files
committed
re-init display on SD card failure
1 parent 71e3653 commit 216c9bd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

adafruit_pycamera.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,9 @@ def __init__(self) -> None:
166166
self.accel.range = adafruit_lis3dh.RANGE_2_G
167167

168168
# built in neopixels
169-
neopix = neopixel.NeoPixel(board.NEOPIXEL, 1, brightness=0.1)
170-
neopix.fill(0)
169+
# MEME FIX: https://github.com/adafruit/circuitpython/issues/8488
170+
#neopix = neopixel.NeoPixel(board.NEOPIXEL, 1, brightness=0.1)
171+
#neopix.fill(0)
171172

172173
# camera!
173174
self._cam_reset = self._aw.get_pin(_AW_CAMRST)
@@ -346,6 +347,8 @@ def deinit_display(self):
346347
def display_message(self, message, color=0xFF0000, scale=3):
347348
text_area = label.Label(terminalio.FONT, text=message, color=color, scale=scale)
348349
text_area.anchor_point = (0.5, 0.5)
350+
if not self.display:
351+
self.init_display()
349352
text_area.anchored_position = (self.display.width / 2, self.display.height / 2)
350353

351354
# Show it

0 commit comments

Comments
 (0)