Skip to content

Commit

Permalink
add dietPi check for orange pi 4
Browse files Browse the repository at this point in the history
  • Loading branch information
AYastrebov committed Feb 3, 2023
1 parent 8039704 commit c603071
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions adafruit_platformdetect/board.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def id(self) -> Optional[str]:
elif chip_id == chips.RK3308:
board_id = self._rock_pi_id()
elif chip_id == chips.RK3399:
board_id = self._rock_pi_id() or self._armbian_id()
board_id = self._rock_pi_id() or self._armbian_id() or self._diet_pi_id()
elif chip_id == chips.RK3399_T:
board_id = self._rock_pi_id() or self._armbian_id()
elif chip_id == chips.ATOM_X5_Z8350:
Expand Down Expand Up @@ -374,7 +374,11 @@ def _armbian_id(self) -> Optional[str]:

# pylint: enable=too-many-return-statements

# pylint: enable=too-many-return-statements
def _diet_pi_id(self) -> Optional[str]:
board_value = self.detector.get_device_model()
if "OrangePi 4" in board_value:
return boards.ORANGE_PI_4
return None

def _sama5_id(self) -> Optional[str]:
"""Check what type sama5 board."""
Expand Down

0 comments on commit c603071

Please sign in to comment.