Skip to content

Commit b806b4d

Browse files
authored
Merge pull request #15 from RetiredWizard/main
Replace depreciated .show()
2 parents dfac274 + 81f9cda commit b806b4d

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

adafruit_dash_display.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,14 @@ def __init__(
158158
print("Connecting to Adafruit IO...")
159159
io_mqtt.connect()
160160

161-
self.display.show(None)
161+
self.display.root_group = None
162162

163163
self.splash = displayio.Group()
164164

165165
self.rect = Rect(0, 0, 240, 30, fill=0xFFFFFF)
166166
self.splash.append(self.rect)
167167

168-
self.display.show(self.splash)
168+
self.display.root_group = self.splash
169169

170170
def simple_text_callback(
171171
self, client: IO_MQTT, feed_id: str, message: str
@@ -291,7 +291,7 @@ def loop(self):
291291
feed = self.feeds[list(self.feeds.keys())[self.selected - 1]]
292292
if feed.pub:
293293
feed.pub(feed.last_val)
294-
self.display.show(self.splash)
294+
self.display.root_group = self.splash
295295
while self.select.value:
296296
pass
297297

examples/dash_display_advancedtest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,11 @@
9696

9797

9898
def rgb(last):
99-
display.show(None)
99+
display.root_group = None
100100
rgb_group[3].text = "00"
101101
rgb_group[4].text = "00"
102102
rgb_group[5].text = "00"
103-
display.show(rgb_group)
103+
display.root_group = rgb_group
104104
time.sleep(0.2)
105105
index = 0
106106
colors = [00, 00, 00]
@@ -139,7 +139,7 @@ def rgb(last):
139139
break
140140
time.sleep(0.1)
141141

142-
display.show(None)
142+
display.root_group = None
143143
time.sleep(0.1)
144144

145145

examples/dash_display_client_examples/battery_daughter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def message(client, feed_id, payload):
9696
display = adafruit_displayio_ssd1306.SSD1306(display_bus, width=WIDTH, height=HEIGHT)
9797

9898
splash = displayio.Group()
99-
display.show(splash)
99+
display.root_group = splash
100100

101101
digital_label = label.Label(
102102
terminalio.FONT, text="Battery Percent: ", color=0xFFFFFF, x=4, y=4

examples/dash_display_client_examples/neopixel_setter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
funhouse = FunHouse(default_bg=None)
99

10-
funhouse.display.show(None)
10+
funhouse.display.root_group = None
1111
rect = Rect(31, 105, 30, 30, fill=0xFFFFFF)
1212
funhouse.splash.append(rect)
1313
R_label = funhouse.add_text(
@@ -28,7 +28,7 @@
2828
B = funhouse.add_text(
2929
text="00", text_position=(205, 120), text_scale=2, text_color=0x000000
3030
)
31-
funhouse.display.show(funhouse.splash)
31+
funhouse.display.root_group = funhouse.splash
3232

3333
index = 0
3434
colors = [00, 00, 00]

examples/dash_display_client_examples/neopixel_setter_daughter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
except AdafruitIO_RequestError:
124124
neopixel_feed = io.create_new_feed("neopixel")
125125

126-
board.DISPLAY.show(group)
126+
board.DISPLAY.root_group = group
127127
print("ready")
128128
last_color = 257
129129
last_index = 0

0 commit comments

Comments
 (0)