From 3979bb2d708d4d2baadb3336b59206ddee25f89b Mon Sep 17 00:00:00 2001 From: James Carr Date: Wed, 28 Jul 2021 14:21:28 +0100 Subject: [PATCH] Remove max_size usage with displayio.Group --- FunHouse_IOT_Hub/battery_peripheral/code.py | 2 +- FunHouse_IOT_Hub/code.py | 26 ++++++++++----------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/FunHouse_IOT_Hub/battery_peripheral/code.py b/FunHouse_IOT_Hub/battery_peripheral/code.py index 8dca90c05..19dbf7c9a 100644 --- a/FunHouse_IOT_Hub/battery_peripheral/code.py +++ b/FunHouse_IOT_Hub/battery_peripheral/code.py @@ -105,7 +105,7 @@ def message(client, feed_id, payload): display = adafruit_displayio_ssd1306.SSD1306(display_bus, width=WIDTH, height=HEIGHT) -splash = displayio.Group(max_size=10) +splash = displayio.Group() display.show(splash) digital_label = label.Label( diff --git a/FunHouse_IOT_Hub/code.py b/FunHouse_IOT_Hub/code.py index ea29a0fa4..d0dda2fb8 100644 --- a/FunHouse_IOT_Hub/code.py +++ b/FunHouse_IOT_Hub/code.py @@ -40,29 +40,29 @@ raise # Make the rgb group for setting rgb hex values for NeoPixels -rgb_group = displayio.Group(max_size=9) +rgb_group = displayio.Group() R_label = Label( terminalio.FONT, text=" +\nR:\n -", color=0xFFFFFF, - anchor_point=((0, 0.5)), - anchored_position=((5, 120)), + anchor_point=(0, 0.5), + anchored_position=(5, 120), scale=2, ) G_label = Label( terminalio.FONT, text=" +\nG:\n -", color=0xFFFFFF, - anchor_point=((0, 0.5)), - anchored_position=((90, 120)), + anchor_point=(0, 0.5), + anchored_position=(90, 120), scale=2, ) B_label = Label( terminalio.FONT, text=" +\nB:\n -", color=0xFFFFFF, - anchor_point=((0, 0.5)), - anchored_position=((175, 120)), + anchor_point=(0, 0.5), + anchored_position=(175, 120), scale=2, ) rgb_group.append(R_label) @@ -72,24 +72,24 @@ terminalio.FONT, text="00", color=0xFFFFFF, - anchor_point=((0, 0.5)), - anchored_position=((35, 120)), + anchor_point=(0, 0.5), + anchored_position=(35, 120), scale=2, ) G = Label( terminalio.FONT, text="00", color=0xFFFFFF, - anchor_point=((0, 0.5)), - anchored_position=((120, 120)), + anchor_point=(0, 0.5), + anchored_position=(120, 120), scale=2, ) B = Label( terminalio.FONT, text="00", color=0xFFFFFF, - anchor_point=((0, 0.5)), - anchored_position=((205, 120)), + anchor_point=(0, 0.5), + anchored_position=(205, 120), scale=2, ) rgb_group.append(R)