Skip to content

Added full model name for MaaXBoards to fix conflict with other i.MX8M devices #199

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 2 commits into from
Nov 12, 2021
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
10 changes: 8 additions & 2 deletions adafruit_platformdetect/board.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,9 @@ def _stm32mp1_id(self):
def _imx8mx_id(self):
"""Check what type iMX8M board."""
board_value = self.detector.get_device_model()
if "i.MX8MM" in board_value:
if "FSL i.MX8MM DDR4 EVK" in board_value:
return boards.MAAXBOARD_MINI
if "i.MX8MQ" in board_value:
if "Freescale i.MX8MQ EVK" in board_value:
return boards.MAAXBOARD
if "Phanbell" in board_value:
return boards.CORAL_EDGE_TPU_DEV
Expand Down Expand Up @@ -610,6 +610,11 @@ def any_bananapi(self):
"""Check whether the current board is any BananaPi-family system."""
return self.id in boards._BANANA_PI_IDS

@property
def any_maaxboard(self):
"""Check whether the current board is any BananaPi-family system."""
return self.id in boards._MAAXBOARD_IDS

@property
def any_embedded_linux(self):
"""Check whether the current board is any embedded Linux device."""
Expand All @@ -636,6 +641,7 @@ def any_embedded_linux(self):
self.any_stm32mp1,
self.any_lubancat,
self.any_bananapi,
self.any_maaxboard,
]
)

Expand Down
2 changes: 1 addition & 1 deletion adafruit_platformdetect/constants/boards.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,4 +463,4 @@
_UDOO_BOARD_IDS = {UDOO_BOLT_V8: ("SC40-2000-0000-C0|C",), UDOO_X86: ("dummy",)}

# MaaXBoard boards
_MAAXBOARD_DEV_IDS = ("MAAXBOARD", "MAAXBOARD_MINI")
_MAAXBOARD_IDS = ("MAAXBOARD", "MAAXBOARD_MINI")