Skip to content

Commit 7fcf46b

Browse files
committed
Add Indiedroid Support
1 parent a6897f7 commit 7fcf46b

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

adafruit_platformdetect/board.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ def id(self) -> Optional[str]:
196196
or self._orange_pi_id()
197197
or self._armbian_id()
198198
or self._rk3588_id()
199+
or self._ameridroid_id()
199200
)
200201
elif chip_id == chips.RYZEN_V1605B:
201202
board_id = self._udoo_id()
@@ -482,6 +483,11 @@ def _diet_pi_id(self) -> Optional[str]:
482483
if "OrangePi 4" in board_value:
483484
return boards.ORANGE_PI_4
484485
return None
486+
487+
def _ameridroid_id(self) -> Optional[str]:
488+
board_value = self.detector.get_device_model().upper()
489+
if "INDIEDROID NOVA" in board_value:
490+
return boards.INDIEDROID_NOVA
485491

486492
def _orange_pi_id(self) -> Optional[str]:
487493
board_value = self.detector.get_device_model()
@@ -941,6 +947,11 @@ def any_raspberry_pi_cm(self) -> bool:
941947
def any_beaglebone(self) -> bool:
942948
"""Check whether the current board is any Beaglebone-family system."""
943949
return self.id in boards._BEAGLEBONE_IDS
950+
951+
@property
952+
def any_ameridroid(self) -> bool:
953+
"""Check whether the current board is any Ameridroid device."""
954+
return self.id in boards._AMERIDROID_IDS
944955

945956
@property
946957
def any_orange_pi(self) -> bool:
@@ -1130,6 +1141,7 @@ def lazily_generate_conditions():
11301141
yield self.any_raspberry_pi_40_pin
11311142
yield self.any_raspberry_pi
11321143
yield self.any_beaglebone
1144+
yield self.any_ameridroid
11331145
yield self.any_orange_pi
11341146
yield self.any_nanopi
11351147
yield self.any_giant_board

adafruit_platformdetect/constants/boards.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,9 @@
248248
LUCKFOX_PICO_MINI = "LUCKFOX_PICO_MINI"
249249
LUCKFOX_PICO_PLUS = "LUCKFOX_PICO_PLUS"
250250

251+
# Ameridroid boards
252+
INDIEDROID_NOVA = "INDIEDROID_NOVA"
253+
251254
# StarFive boards
252255
_STARFIVE_BOARD_IDS = (VISIONFIVE2,)
253256
# Asus Tinkerboard
@@ -626,5 +629,7 @@
626629
LUCKFOX_PICO_PLUS,
627630
)
628631

632+
_AMERIDROID_IDS = (INDIEDROID_NOVA,)
633+
629634
# Agnostic board
630635
OS_AGNOSTIC_BOARD = "OS_AGNOSTIC_BOARD"

0 commit comments

Comments
 (0)