Skip to content
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

Add Indiedroid Support #369

Merged
merged 2 commits into from
Oct 7, 2024
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
13 changes: 13 additions & 0 deletions adafruit_platformdetect/board.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ def id(self) -> Optional[str]:
or self._orange_pi_id()
or self._armbian_id()
or self._rk3588_id()
or self._ameridroid_id()
)
elif chip_id == chips.RYZEN_V1605B:
board_id = self._udoo_id()
Expand Down Expand Up @@ -483,6 +484,12 @@ def _diet_pi_id(self) -> Optional[str]:
return boards.ORANGE_PI_4
return None

def _ameridroid_id(self) -> Optional[str]:
board_value = self.detector.get_device_model().upper()
if "INDIEDROID NOVA" in board_value:
return boards.INDIEDROID_NOVA
return None

def _orange_pi_id(self) -> Optional[str]:
board_value = self.detector.get_device_model()
if "Orange Pi 5 Plus" in board_value:
Expand Down Expand Up @@ -942,6 +949,11 @@ def any_beaglebone(self) -> bool:
"""Check whether the current board is any Beaglebone-family system."""
return self.id in boards._BEAGLEBONE_IDS

@property
def any_ameridroid(self) -> bool:
"""Check whether the current board is any Ameridroid device."""
return self.id in boards._AMERIDROID_IDS

@property
def any_orange_pi(self) -> bool:
"""Check whether the current board is any defined Orange Pi."""
Expand Down Expand Up @@ -1130,6 +1142,7 @@ def lazily_generate_conditions():
yield self.any_raspberry_pi_40_pin
yield self.any_raspberry_pi
yield self.any_beaglebone
yield self.any_ameridroid
yield self.any_orange_pi
yield self.any_nanopi
yield self.any_giant_board
Expand Down
5 changes: 5 additions & 0 deletions adafruit_platformdetect/constants/boards.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,9 @@
LUCKFOX_PICO_MINI = "LUCKFOX_PICO_MINI"
LUCKFOX_PICO_PLUS = "LUCKFOX_PICO_PLUS"

# Ameridroid boards
INDIEDROID_NOVA = "INDIEDROID_NOVA"

# StarFive boards
_STARFIVE_BOARD_IDS = (VISIONFIVE2,)
# Asus Tinkerboard
Expand Down Expand Up @@ -626,5 +629,7 @@
LUCKFOX_PICO_PLUS,
)

_AMERIDROID_IDS = (INDIEDROID_NOVA,)

# Agnostic board
OS_AGNOSTIC_BOARD = "OS_AGNOSTIC_BOARD"
Loading