Skip to content

Improved Odroid C2 Detection #24

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 1 commit into from
Jun 5, 2019
Merged
Show file tree
Hide file tree
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
7 changes: 6 additions & 1 deletion adafruit_platformdetect/board.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,11 @@ def any_giant_board(self):
"""Check whether the current board is any defined Giant Board."""
return self.GIANT_BOARD

@property
def any_odroid_40_pin(self):
"""Check whether the current board is any defined 40-pin Odroid."""
return self.id in _ODROID_40_PIN_IDS

@property
def any_jetson_board(self):
"""Check whether the current board is any defined Jetson Board."""
Expand All @@ -412,7 +417,7 @@ def any_embedded_linux(self):
"""Check whether the current board is any embedded Linux device."""
return self.any_raspberry_pi or self.any_beaglebone or \
self.any_orange_pi or self.any_giant_board or self.any_jetson_board or \
self.any_coral_board
self.any_coral_board or self.any_odroid_40_pin

def __getattr__(self, attr):
"""
Expand Down
2 changes: 2 additions & 0 deletions adafruit_platformdetect/chip.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ def _linux_id(self): # pylint: disable=too-many-branches
linux_id = T194
if compatible and 'imx8m' in compatible:
linux_id = IMX8MX
if compatible and 'odroid-c2' in compatible:
linux_id = S905

elif hardware in ("BCM2708", "BCM2709", "BCM2835"):
linux_id = BCM2XXX
Expand Down
9 changes: 7 additions & 2 deletions bin/detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
print("Is this a Pi 3B+?", detector.board.RASPBERRY_PI_3B_PLUS)
print("Is this a 40-pin Raspberry Pi?", detector.board.any_raspberry_pi_40_pin)
print("Is this a BBB?", detector.board.BEAGLEBONE_BLACK)
print("Is this an Orange Pi PC?", detector.board.ORANGE_PI_PC)
print("Is this a Giant Board?", detector.board.GIANT_BOARD)
print("Is this a Coral Edge TPU?", detector.board.CORAL_EDGE_TPU_DEV)
print("Is this an embedded Linux system?", detector.board.any_embedded_linux)
Expand All @@ -21,4 +20,10 @@
print("Raspberry Pi detected.")

if detector.board.any_jetson_board:
print("Jetson platform detected.")
print("Jetson platform detected.")

if detector.board.any_orange_pi:
print("Orange Pi detected.")

if detector.board.any_odroid_40_pin:
print("Odroid detected.")