Skip to content

Commit 1cfff20

Browse files
update for CircuitPython 8.x+/9.0 displayio compatibility
1 parent fe92eb7 commit 1cfff20

File tree

5 files changed

+5
-6
lines changed

5 files changed

+5
-6
lines changed

examples/gradient_shape.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
display.brightness = 0.005
2828

2929
primary_group = displayio.Group()
30-
display.show(primary_group)
30+
display.root_group = primary_group
3131

3232
# Create Red/Yellow/Green light-style spectrum
3333
spectrum_1 = Spectrum([0xFF0000, 0xFFFF00, 0x00FF00], mode="continuous", gamma=0.6)

examples/paletteslice_acme_simpletest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def print_palette(new_palette):
167167
primary_group.append(slice_label)
168168

169169
# Show the test image and label
170-
display.show(primary_group)
170+
display.root_group = primary_group
171171
print("\n" + ("=" * 15))
172172
print("TEST of source image")
173173
slice_label.text = "PALETTE SLICE: source image and palette"

examples/paletteslice_simpletest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def print_palette(new_palette):
8585
primary_group.append(slice_label)
8686

8787
# Show the test image and label
88-
display.show(primary_group)
88+
display.root_group = primary_group
8989
print("TEST of source image")
9090
slice_label.text = "PALETTE SLICE: source image and palette"
9191
time.sleep(2)

examples/paletteslice_ulab_test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,12 @@
5858
primary_group.append(slice_label)
5959

6060
# Display the primary group
61-
display.show(primary_group)
61+
display.root_group = primary_group
6262

6363
# pylint: disable=no-member
6464
print(f"memory free: {gc.mem_free()} bytes")
6565

6666
while True:
67-
6867
# Show the source image and label
6968
# print("TEST of source image and palette")
7069
test_tile.pixel_shader = test_palette_source

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ dynamic = ["dependencies", "optional-dependencies"]
4040
[tool.setuptools]
4141
# TODO: IF LIBRARY FILES ARE A PACKAGE FOLDER,
4242
# CHANGE `py_modules = ['...']` TO `packages = ['...']`
43-
py-modules = ["cedargrove_paletteslice"]
43+
packages = ["cedargrove_paletteslice"]
4444

4545
[tool.setuptools.dynamic]
4646
dependencies = {file = ["requirements.txt"]}

0 commit comments

Comments
 (0)