Skip to content

Commit a7bf114

Browse files
update for CircuitPython 8.x+/9.0 displayio compatibility
1 parent 4885dc0 commit a7bf114

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

cedargrove_touchcalibrator/built_in.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,15 @@ class Colors:
7171
if DISPLAY_ROTATION is not None and DISPLAY_ROTATION in (0, 90, 180, 270):
7272
display.rotation = DISPLAY_ROTATION
7373
else:
74-
print("Warning: invalid rotation value -- defalting to zero")
74+
print("Warning: invalid rotation value -- defaulting to zero")
7575
display.rotation = 0
7676
time.sleep(1)
7777

7878
# Activate the display graphics unless REPL_ONLY=True.
7979
if not REPL_ONLY:
8080
display_group = displayio.Group()
81-
display.show(display_group)
81+
# display.show(display_group)
82+
display.root_group = display_group
8283

8384
# Instantiate touch screen without calibration or display size parameters
8485
if display.rotation == 0:

cedargrove_touchcalibrator/featherwing.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,15 @@
101101
if DISPLAY_ROTATION is not None and DISPLAY_ROTATION in (0, 90, 180, 270):
102102
display.rotation = DISPLAY_ROTATION
103103
else:
104-
print("Warning: invalid rotation value -- defalting to zero")
104+
print("Warning: invalid rotation value -- defaulting to zero")
105105
display.rotation = 0
106106
time.sleep(1)
107107

108108
# Activate the display graphics unless REPL_ONLY=True.
109109
if not REPL_ONLY:
110110
display_group = displayio.Group()
111-
display.show(display_group)
111+
# display.show(display_group)
112+
display.root_group = display_group
112113

113114
# Instantiate touchscreen.
114115
ts_cs = digitalio.DigitalInOut(board.D6)

0 commit comments

Comments
 (0)