Skip to content

Add Orange Pi boards (One, Lite, PC +) #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 16, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions adafruit_platformdetect/board.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,15 @@
GENERIC_LINUX_PC = "GENERIC_LINUX_PC"
PYBOARD = "PYBOARD"
NODEMCU = "NODEMCU"
GIANT_BOARD = "GIANT_BOARD"

# Orange Pi boards
ORANGE_PI_PC = "ORANGE_PI_PC"
ORANGE_PI_R1 = "ORANGE_PI_R1"
ORANGE_PI_ZERO = "ORANGE_PI_ZERO"
GIANT_BOARD = "GIANT_BOARD"
ORANGE_PI_ONE = "ORANGE_PI_ONE"
ORANGE_PI_LITE = "ORANGE_PI_LITE"
ORANGE_PI_PC_PLUS = "ORANGE_PI_PC_PLUS"

# NVIDIA Jetson boards
JETSON_TX1 = 'JETSON_TX1'
Expand Down Expand Up @@ -85,7 +90,10 @@
_ORANGE_PI_IDS = (
ORANGE_PI_PC,
ORANGE_PI_R1,
ORANGE_PI_ZERO
ORANGE_PI_ZERO,
ORANGE_PI_ONE,
ORANGE_PI_LITE,
ORANGE_PI_LITE
)

_CORAL_IDS = (
Expand Down Expand Up @@ -440,6 +448,7 @@ def _beaglebone_id(self):
return None
# pylint: enable=no-self-use

# pylint: disable=too-many-return-statements
def _armbian_id(self):
"""Check whether the current board is an OrangePi PC or OrangePI R1."""
board_value = self.detector.get_armbian_release_field('BOARD')
Expand All @@ -449,9 +458,17 @@ def _armbian_id(self):
return ORANGE_PI_R1
if board_value == "orangepizero":
return ORANGE_PI_ZERO
if board_value == "orangepione":
return ORANGE_PI_ONE
if board_value == "orangepilite":
return ORANGE_PI_LITE
if board_value == "orangepipcplus":
return ORANGE_PI_PC_PLUS
if board_value == "pinebook-a64":
return PINEBOOK

return None
# pylint: enable=too-many-return-statements

def _sama5_id(self):
"""Check what type sama5 board."""
Expand Down