From 70d318a41a52baddff0cee0af662cbbfb7562da3 Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Thu, 15 Jul 2021 11:39:51 -0700 Subject: [PATCH 1/2] Fixed BeagleBoard Star V detection on latest build --- adafruit_platformdetect/board.py | 5 +++++ adafruit_platformdetect/chip.py | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/adafruit_platformdetect/board.py b/adafruit_platformdetect/board.py index 70b0a0a0..f41a7915 100644 --- a/adafruit_platformdetect/board.py +++ b/adafruit_platformdetect/board.py @@ -235,9 +235,14 @@ def _beaglebone_id(self): """Try to detect id of a Beaglebone.""" board_value = self.detector.get_device_compatible() + # Older Builds if "freedom-u74-arty" in board_value: return boards.BEAGLEV_STARLIGHT + # Newer Builds + if "beaglev-starlight" in board_value: + return boards.BEAGLEV_STARLIGHT + try: with open("/sys/bus/nvmem/devices/0-00500/nvmem", "rb") as eeprom: eeprom_bytes = eeprom.read(16) diff --git a/adafruit_platformdetect/chip.py b/adafruit_platformdetect/chip.py index e59830e0..32a2ab9b 100644 --- a/adafruit_platformdetect/chip.py +++ b/adafruit_platformdetect/chip.py @@ -186,9 +186,14 @@ def _linux_id(self): if self.detector.check_dt_compatible_value("sun20iw1p1"): return chips.C906 + # Older Builds if self.detector.check_dt_compatible_value("sifive"): return chips.JH71x0 + # Newer Builds + if self.detector.check_dt_compatible_value("jh7100"): + return chips.JH71x0 + if self.detector.check_dt_compatible_value("sun8i-a33"): return chips.A33 From 4d5157d9c41427b5983b9dbfe6d8db02c6f49ccd Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Thu, 15 Jul 2021 11:58:49 -0700 Subject: [PATCH 2/2] Linted --- adafruit_platformdetect/board.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adafruit_platformdetect/board.py b/adafruit_platformdetect/board.py index 2d19bd92..5153c7e4 100644 --- a/adafruit_platformdetect/board.py +++ b/adafruit_platformdetect/board.py @@ -52,7 +52,7 @@ def __init__(self, detector): self.detector = detector self._board_id = None - # pylint: disable=invalid-name, protected-access + # pylint: disable=invalid-name, protected-access, too-many-return-statements @property def id(self): """Return a unique id for the detected board, if any."""