From 527c4543196b4d1ad600a7caf7058251bb09e3ee Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Wed, 15 Jan 2025 13:19:14 -0800 Subject: [PATCH 1/2] Add Pi500 and CM5 Support --- .github/workflows/build.yml | 4 ++-- src/board.py | 8 +------- src/neopixel_write.py | 2 +- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ea5eab57..80940d0f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,10 +16,10 @@ jobs: - name: Translate Repo Name For Build Tools filename_prefix id: repo-name run: echo "repo-name=Adafruit-Blinka" >> $GITHUB_OUTPUT - - name: Set up Python 3.7 + - name: Set up Python 3.8 uses: actions/setup-python@v4 with: - python-version: 3.7 + python-version: 3.8 - name: Versions run: | python3 --version diff --git a/src/board.py b/src/board.py index c0d141e9..5a85cc75 100644 --- a/src/board.py +++ b/src/board.py @@ -41,13 +41,7 @@ elif board_id == ap_board.RASPBERRY_PI_PICO: from adafruit_blinka.board.raspberrypi.pico import * -elif ( - detector.board.RASPBERRY_PI_4B - or detector.board.RASPBERRY_PI_CM4 - or detector.board.RASPBERRY_PI_CM4S - or detector.board.RASPBERRY_PI_400 - or detector.board.RASPBERRY_PI_5 -): +elif detector.board.any_raspberry_pi_4_board or detector.board.any_raspberry_pi_5_board: from adafruit_blinka.board.raspberrypi.raspi_4b import * elif detector.board.any_raspberry_pi_40_pin: diff --git a/src/neopixel_write.py b/src/neopixel_write.py index 641a2021..7b3c8085 100644 --- a/src/neopixel_write.py +++ b/src/neopixel_write.py @@ -16,7 +16,7 @@ from adafruit_blinka.agnostic import detector, board_id if detector.board.any_raspberry_pi: - if board_id == "RASPBERRY_PI_5": + if detector.board.any_raspberry_pi_5_board: import adafruit_raspberry_pi5_neopixel_write as _neopixel else: from adafruit_blinka.microcontroller.bcm283x import neopixel as _neopixel From 5333af83fdab9c6dc61b6017ae34470e3c30d9a7 Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Thu, 16 Jan 2025 11:03:29 -0800 Subject: [PATCH 2/2] Remove unused import --- src/neopixel_write.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/neopixel_write.py b/src/neopixel_write.py index 7b3c8085..cc9835a7 100644 --- a/src/neopixel_write.py +++ b/src/neopixel_write.py @@ -13,7 +13,7 @@ # pylint: disable=too-many-boolean-expressions, ungrouped-imports import sys -from adafruit_blinka.agnostic import detector, board_id +from adafruit_blinka.agnostic import detector if detector.board.any_raspberry_pi: if detector.board.any_raspberry_pi_5_board: