Browse Source

Merge pull request #199 from Avnet/MaaXBoard

Added full model name for MaaXBoards to fix conflict with other i.MX8M devices
pull/202/head 3.17.2
Melissa LeBlanc-Williams 2 months ago
committed by GitHub
parent
commit
f81d412e88
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions
  1. +8
    -2
      adafruit_platformdetect/board.py
  2. +1
    -1
      adafruit_platformdetect/constants/boards.py

+ 8
- 2
adafruit_platformdetect/board.py View File

@ -336,9 +336,9 @@ class Board:
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
@ -610,6 +610,11 @@ class Board:
"""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."""
@ -636,6 +641,7 @@ class Board:
self.any_stm32mp1,
self.any_lubancat,
self.any_bananapi,
self.any_maaxboard,
]
)


+ 1
- 1
adafruit_platformdetect/constants/boards.py View File

@ -463,4 +463,4 @@ _ROCK_PI_IDS = (ROCK_PI_S, ROCK_PI_4, ROCK_PI_X, ROCK_PI_E)
_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")

Loading…
Cancel
Save