Skip to content

Commit 4caf8bb

Browse files
committed
Add OrangePI R1 detetion
1 parent 2054c4c commit 4caf8bb

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

adafruit_platformdetect/board.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
GENERIC_LINUX_PC = "GENERIC_LINUX_PC"
2626
PYBOARD = "PYBOARD"
2727
NODEMCU = "NODEMCU"
28-
ORANGE_PI_PC = "ORANGE_PI_PC"
29-
ORANGE_PI_R1 = "ORANGE_PI_R1"
3028
GIANT_BOARD = "GIANT_BOARD"
3129

3230
# NVIDIA Jetson boards
@@ -60,6 +58,12 @@
6058
FTDI_FT232H = "FT232H"
6159
# pylint: enable=bad-whitespace
6260

61+
#OrangePI
62+
_ORANGE_PI_IDS = (
63+
ORANGE_PI_PC,
64+
ORANGE_PI_R1
65+
)
66+
6367
_CORAL_IDS = (
6468
CORAL_EDGE_TPU_DEV,
6569
)
@@ -331,11 +335,11 @@ def _beaglebone_id(self):
331335
# pylint: enable=no-self-use
332336

333337
def _armbian_id(self):
334-
"""Check whether the current board is an OrangePi PC."""
338+
"""Check whether the current board is an OrangePi PC or OrangePI R1."""
335339
board_value = self.detector.get_armbian_release_field('BOARD')
336340
if board_value == "orangepipc":
337341
return ORANGE_PI_PC
338-
if board_value == "orangepi-r1":
342+
if board_value == "orangepi-r1":
339343
return ORANGE_PI_R1
340344
return None
341345

@@ -384,7 +388,7 @@ def any_beaglebone(self):
384388
@property
385389
def any_orange_pi(self):
386390
"""Check whether the current board is any defined Orange Pi."""
387-
return self.ORANGE_PI_PC
391+
return self.ORANGE_PI_IDS
388392

389393
@property
390394
def any_coral_board(self):

0 commit comments

Comments
 (0)