Skip to content

Commit 73551a1

Browse files
authored
Merge pull request #53 from yeyeto2788/orangepi
Add Orange Pi boards (One, Lite, PC +)
2 parents 18c9682 + 8e069fd commit 73551a1

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

adafruit_platformdetect/board.py

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,15 @@
2727
GENERIC_LINUX_PC = "GENERIC_LINUX_PC"
2828
PYBOARD = "PYBOARD"
2929
NODEMCU = "NODEMCU"
30+
GIANT_BOARD = "GIANT_BOARD"
31+
32+
# Orange Pi boards
3033
ORANGE_PI_PC = "ORANGE_PI_PC"
3134
ORANGE_PI_R1 = "ORANGE_PI_R1"
3235
ORANGE_PI_ZERO = "ORANGE_PI_ZERO"
33-
GIANT_BOARD = "GIANT_BOARD"
36+
ORANGE_PI_ONE = "ORANGE_PI_ONE"
37+
ORANGE_PI_LITE = "ORANGE_PI_LITE"
38+
ORANGE_PI_PC_PLUS = "ORANGE_PI_PC_PLUS"
3439

3540
# NVIDIA Jetson boards
3641
JETSON_TX1 = 'JETSON_TX1'
@@ -85,7 +90,10 @@
8590
_ORANGE_PI_IDS = (
8691
ORANGE_PI_PC,
8792
ORANGE_PI_R1,
88-
ORANGE_PI_ZERO
93+
ORANGE_PI_ZERO,
94+
ORANGE_PI_ONE,
95+
ORANGE_PI_LITE,
96+
ORANGE_PI_LITE
8997
)
9098

9199
_CORAL_IDS = (
@@ -440,6 +448,7 @@ def _beaglebone_id(self):
440448
return None
441449
# pylint: enable=no-self-use
442450

451+
# pylint: disable=too-many-return-statements
443452
def _armbian_id(self):
444453
"""Check whether the current board is an OrangePi PC or OrangePI R1."""
445454
board_value = self.detector.get_armbian_release_field('BOARD')
@@ -449,9 +458,17 @@ def _armbian_id(self):
449458
return ORANGE_PI_R1
450459
if board_value == "orangepizero":
451460
return ORANGE_PI_ZERO
461+
if board_value == "orangepione":
462+
return ORANGE_PI_ONE
463+
if board_value == "orangepilite":
464+
return ORANGE_PI_LITE
465+
if board_value == "orangepipcplus":
466+
return ORANGE_PI_PC_PLUS
452467
if board_value == "pinebook-a64":
453468
return PINEBOOK
469+
454470
return None
471+
# pylint: enable=too-many-return-statements
455472

456473
def _sama5_id(self):
457474
"""Check what type sama5 board."""

0 commit comments

Comments
 (0)