Skip to content

Commit f81d412

Browse files
authored
Merge pull request #199 from Avnet/MaaXBoard
Added full model name for MaaXBoards to fix conflict with other i.MX8M devices
2 parents 8784c46 + 3274256 commit f81d412

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

adafruit_platformdetect/board.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,9 +336,9 @@ def _stm32mp1_id(self):
336336
def _imx8mx_id(self):
337337
"""Check what type iMX8M board."""
338338
board_value = self.detector.get_device_model()
339-
if "i.MX8MM" in board_value:
339+
if "FSL i.MX8MM DDR4 EVK" in board_value:
340340
return boards.MAAXBOARD_MINI
341-
if "i.MX8MQ" in board_value:
341+
if "Freescale i.MX8MQ EVK" in board_value:
342342
return boards.MAAXBOARD
343343
if "Phanbell" in board_value:
344344
return boards.CORAL_EDGE_TPU_DEV
@@ -610,6 +610,11 @@ def any_bananapi(self):
610610
"""Check whether the current board is any BananaPi-family system."""
611611
return self.id in boards._BANANA_PI_IDS
612612

613+
@property
614+
def any_maaxboard(self):
615+
"""Check whether the current board is any BananaPi-family system."""
616+
return self.id in boards._MAAXBOARD_IDS
617+
613618
@property
614619
def any_embedded_linux(self):
615620
"""Check whether the current board is any embedded Linux device."""
@@ -636,6 +641,7 @@ def any_embedded_linux(self):
636641
self.any_stm32mp1,
637642
self.any_lubancat,
638643
self.any_bananapi,
644+
self.any_maaxboard,
639645
]
640646
)
641647

adafruit_platformdetect/constants/boards.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,4 +463,4 @@
463463
_UDOO_BOARD_IDS = {UDOO_BOLT_V8: ("SC40-2000-0000-C0|C",), UDOO_X86: ("dummy",)}
464464

465465
# MaaXBoard boards
466-
_MAAXBOARD_DEV_IDS = ("MAAXBOARD", "MAAXBOARD_MINI")
466+
_MAAXBOARD_IDS = ("MAAXBOARD", "MAAXBOARD_MINI")

0 commit comments

Comments
 (0)