Skip to content

Commit 287633c

Browse files
authored
Merge pull request #369 from Rippanda12/main
Add Indiedroid Support
2 parents a6897f7 + 47ce0ad commit 287633c

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

adafruit_platformdetect/board.py

+13
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()
@@ -483,6 +484,12 @@ def _diet_pi_id(self) -> Optional[str]:
483484
return boards.ORANGE_PI_4
484485
return None
485486

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
491+
return None
492+
486493
def _orange_pi_id(self) -> Optional[str]:
487494
board_value = self.detector.get_device_model()
488495
if "Orange Pi 5 Plus" in board_value:
@@ -942,6 +949,11 @@ def any_beaglebone(self) -> bool:
942949
"""Check whether the current board is any Beaglebone-family system."""
943950
return self.id in boards._BEAGLEBONE_IDS
944951

952+
@property
953+
def any_ameridroid(self) -> bool:
954+
"""Check whether the current board is any Ameridroid device."""
955+
return self.id in boards._AMERIDROID_IDS
956+
945957
@property
946958
def any_orange_pi(self) -> bool:
947959
"""Check whether the current board is any defined Orange Pi."""
@@ -1130,6 +1142,7 @@ def lazily_generate_conditions():
11301142
yield self.any_raspberry_pi_40_pin
11311143
yield self.any_raspberry_pi
11321144
yield self.any_beaglebone
1145+
yield self.any_ameridroid
11331146
yield self.any_orange_pi
11341147
yield self.any_nanopi
11351148
yield self.any_giant_board

adafruit_platformdetect/constants/boards.py

+5
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)