Skip to content

Commit 380dda2

Browse files
committed
Adding NXP NavQPlus to detected boardys (Uses an IMX8M SOC module so the chip is already detected)
Future boards using the same SOC may need to edit the board name or detection line in bin/detect.py so it doesn't list it as an NXP NAVq board Original NavQ board not available to I couldn't add it too. Added for the Hovergames 3 Team Mcfly 2023 Changes to be committed: modified: adafruit_platformdetect/board.py modified: adafruit_platformdetect/constants/boards.py modified: bin/detect.py
1 parent 2477c89 commit 380dda2

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

adafruit_platformdetect/board.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,8 @@ def _imx8mx_id(self) -> Optional[str]:
418418
return boards.MAAXBOARD
419419
if "Phanbell" in board_value:
420420
return boards.CORAL_EDGE_TPU_DEV
421+
if "NXP i.MX8MPlus SOM " in board_value:
422+
return boards.NXP_IMX8MPLUS_SOM
421423
return None
422424

423425
def _imx6ull_id(self) -> Optional[str]:
@@ -797,6 +799,11 @@ def any_libre_computer_board(self) -> bool:
797799
"""Check whether the current board is any defined Libre Computer board."""
798800
return self.id in boards._LIBRE_COMPUTER_IDS
799801

802+
@property
803+
def any_nxp_navq_board(self) -> bool:
804+
"""Check whether the current board is any NXP NavQ board"""
805+
return self.id in boards._NXP_SOM_IDS
806+
800807
@property
801808
def os_environ_board(self) -> bool:
802809
"""Check whether the current board is an OS environment variable special case."""
@@ -851,7 +858,7 @@ def lazily_generate_conditions():
851858
yield self.any_pcduino_board
852859
yield self.any_libre_computer_board
853860
yield self.generic_linux
854-
861+
yield self.any_nxp_navq_board
855862
return any(condition for condition in lazily_generate_conditions())
856863

857864
@property

adafruit_platformdetect/constants/boards.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,3 +585,11 @@
585585
AML_S905X_CC,
586586
ROC_RK3328_CC,
587587
)
588+
589+
# NXP System on Module Computer boards
590+
NXP_IMX8MPLUS_SOM = "NXP_IMX8MPLUS_SOM"
591+
592+
_NXP_SOM_IDS = (
593+
NXP_IMX8MPLUS_SOM,
594+
)
595+

bin/detect.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,6 @@
111111

112112
if detector.board.any_siemens_simatic_iot2000:
113113
print("Siemens Simatic IOT2000 Gateway detected.")
114+
115+
if detector.board.any_nxp_navq_board:
116+
print("NXP NavQ board detected.")

0 commit comments

Comments
 (0)