Skip to content

Commit 139c43d

Browse files
authored
Merge pull request #304 from atomicmaster/OrantePi5
OrangePi 5 detection for not Armbian
2 parents ec11070 + 199d16d commit 139c43d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

adafruit_platformdetect/board.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def id(self) -> Optional[str]:
177177
elif chip_id == chips.RK3568:
178178
board_id = self._rk3568_id()
179179
elif chip_id == chips.RK3588:
180-
board_id = self._rock_pi_id() or self._armbian_id()
180+
board_id = self._rock_pi_id() or self._orange_pi_id() or self._armbian_id()
181181
elif chip_id == chips.RYZEN_V1605B:
182182
board_id = self._udoo_id()
183183
elif chip_id == chips.PENTIUM_N3710:
@@ -414,6 +414,12 @@ def _diet_pi_id(self) -> Optional[str]:
414414
return boards.ORANGE_PI_4
415415
return None
416416

417+
def _orange_pi_id(self) -> Optional[str]:
418+
board_value = self.detector.get_device_model()
419+
if "Orange Pi 5" in board_value:
420+
return boards.ORANGE_PI_5
421+
return None
422+
417423
def _sama5_id(self) -> Optional[str]:
418424
"""Check what type sama5 board."""
419425
board_value = self.detector.get_device_model()

0 commit comments

Comments
 (0)