Merge pull request #369 from Rippanda12/main

Add Indiedroid Support
This commit is contained in:
foamyguy 2024-10-07 11:08:53 -05:00 committed by GitHub
commit 287633cb1b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 additions and 0 deletions

View file

@ -196,6 +196,7 @@ class Board:
or self._orange_pi_id() or self._orange_pi_id()
or self._armbian_id() or self._armbian_id()
or self._rk3588_id() or self._rk3588_id()
or self._ameridroid_id()
) )
elif chip_id == chips.RYZEN_V1605B: elif chip_id == chips.RYZEN_V1605B:
board_id = self._udoo_id() board_id = self._udoo_id()
@ -483,6 +484,12 @@ class Board:
return boards.ORANGE_PI_4 return boards.ORANGE_PI_4
return None 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]: def _orange_pi_id(self) -> Optional[str]:
board_value = self.detector.get_device_model() board_value = self.detector.get_device_model()
if "Orange Pi 5 Plus" in board_value: if "Orange Pi 5 Plus" in board_value:
@ -942,6 +949,11 @@ class Board:
"""Check whether the current board is any Beaglebone-family system.""" """Check whether the current board is any Beaglebone-family system."""
return self.id in boards._BEAGLEBONE_IDS 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 @property
def any_orange_pi(self) -> bool: def any_orange_pi(self) -> bool:
"""Check whether the current board is any defined Orange Pi.""" """Check whether the current board is any defined Orange Pi."""
@ -1130,6 +1142,7 @@ class Board:
yield self.any_raspberry_pi_40_pin yield self.any_raspberry_pi_40_pin
yield self.any_raspberry_pi yield self.any_raspberry_pi
yield self.any_beaglebone yield self.any_beaglebone
yield self.any_ameridroid
yield self.any_orange_pi yield self.any_orange_pi
yield self.any_nanopi yield self.any_nanopi
yield self.any_giant_board yield self.any_giant_board

View file

@ -248,6 +248,9 @@ LUCKFOX_PICO_MAX = "LUCKFOX_PICO_MAX"
LUCKFOX_PICO_MINI = "LUCKFOX_PICO_MINI" LUCKFOX_PICO_MINI = "LUCKFOX_PICO_MINI"
LUCKFOX_PICO_PLUS = "LUCKFOX_PICO_PLUS" LUCKFOX_PICO_PLUS = "LUCKFOX_PICO_PLUS"
# Ameridroid boards
INDIEDROID_NOVA = "INDIEDROID_NOVA"
# StarFive boards # StarFive boards
_STARFIVE_BOARD_IDS = (VISIONFIVE2,) _STARFIVE_BOARD_IDS = (VISIONFIVE2,)
# Asus Tinkerboard # Asus Tinkerboard
@ -626,5 +629,7 @@ _LUCKFOX_IDS = (
LUCKFOX_PICO_PLUS, LUCKFOX_PICO_PLUS,
) )
_AMERIDROID_IDS = (INDIEDROID_NOVA,)
# Agnostic board # Agnostic board
OS_AGNOSTIC_BOARD = "OS_AGNOSTIC_BOARD" OS_AGNOSTIC_BOARD = "OS_AGNOSTIC_BOARD"