Skip to content

Convert .show() to .root_group = for CircuitPython 9 #48

Closed
@dhalbert

Description

@dhalbert
Contributor
No description provided.

Activity

prcutler

prcutler commented on Nov 2, 2023

@prcutler
Contributor

The file macropad_grid_layout.py (https://github.com/adafruit/Adafruit_CircuitPython_MacroPad/blob/main/examples/macropad_grid_layout.py) has this code in it:

macropad.display.show(main_group) on line 17

I assume this should not be updated with the root_group fix for CP9 as that functionality is from the MacroPad module?

FoamyGuy

FoamyGuy commented on Nov 2, 2023

@FoamyGuy
Contributor

@prcutler it should be changed. That usage is on the macropad class which isn't what changed so your instinct does make sense. But the macropad actually has a normal display object on it that is being accessed so it will use the new API as well. Here is the code inside of Macropad class where it sets up the display that is being used:

# Define display:
if not isinstance(board.DISPLAY, type(None)):
self.display = board.DISPLAY

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @prcutler@FoamyGuy@dhalbert

      Issue actions

        Convert `.show()` to `.root_group =` for CircuitPython 9 · Issue #48 · adafruit/Adafruit_CircuitPython_MacroPad