Skip to content

add dietPi check for orange pi 4 #279

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

Merged
merged 1 commit into from
Feb 21, 2023
Merged
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
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