From b0b96f6fb2d6bdbbcea2becb3f88dfba89d0ba75 Mon Sep 17 00:00:00 2001 From: DarkMechanikum Date: Thu, 27 Jun 2024 17:30:15 +0300 Subject: [PATCH] added _any functions for visionfive2 --- adafruit_platformdetect/board.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/adafruit_platformdetect/board.py b/adafruit_platformdetect/board.py index fc00772..dec5c05 100644 --- a/adafruit_platformdetect/board.py +++ b/adafruit_platformdetect/board.py @@ -234,6 +234,11 @@ def _starfive_id(self) -> Optional[str]: model = boards.VISIONFIVE2 return model + @property + def any_starfive_id(self): + """Check whether the current board is any Pine64 device.""" + return self.id in boards._STARFIVE_BOARD_IDS + def _pi_id(self) -> Optional[str]: """Try to detect id of a Raspberry Pi.""" # Check for Pi boards: @@ -1125,6 +1130,7 @@ def lazily_generate_conditions(): yield self.any_milkv_board yield self.any_luckfox_pico_board yield self.any_vivid_unit + yield self.any_starfive_id return any(condition for condition in lazily_generate_conditions())