Skip to content

Commit 8a0c6ff

Browse files
authored
Merge pull request #26 from makermelissa/master
Updated 96 Boards detection to be more specific
2 parents 9b4cad9 + 47aa164 commit 8a0c6ff

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

adafruit_platformdetect/board.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
ODROID_C2 = "ODROID_C2"
5959

6060
FTDI_FT232H = "FT232H"
61-
LINARO_96BOARDS = "LINARO_96BOARDS"
61+
DRAGONBOARD_410C = "DRAGONBOARD_410C"
6262
# pylint: enable=bad-whitespace
6363

6464
#OrangePI
@@ -113,6 +113,10 @@
113113
OSD3358_SM_RED,
114114
)
115115

116+
_LINARO_96BOARDS_IDS = (
117+
DRAGONBOARD_410C,
118+
)
119+
116120
# BeagleBone eeprom board ids from:
117121
# https://github.com/beagleboard/image-builder
118122
# Thanks to zmatt on freenode #beagle for pointers.
@@ -291,7 +295,7 @@ def id(self):
291295
elif chip_id == ap_chip.FT232H:
292296
board_id = FTDI_FT232H
293297
elif chip_id == ap_chip.APQ8016:
294-
board_id = LINARO_96BOARDS
298+
board_id = DRAGONBOARD_410C
295299
elif chip_id in (ap_chip.T210, ap_chip.T186, ap_chip.T194):
296300
board_id = self._tegra_id()
297301
return board_id
@@ -378,12 +382,8 @@ def _tegra_id(self):
378382

379383
@property
380384
def any_96boards(self):
381-
"""Check if the current board is any 96Boards-family board."""
382-
return (
383-
self.detector.check_dt_compatible_value("qcom,apq8016-sbc")
384-
or self.detector.check_dt_compatible_value("hisilicon,hi3660-hikey960")
385-
or self.detector.check_dt_compatible_value("hisilicon,hi6220-hikey")
386-
)
385+
"""Check whether the current board is any 96boards board."""
386+
return self.id in _LINARO_96BOARDS_IDS
387387

388388
@property
389389
def any_raspberry_pi(self):

bin/detect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
print("Board id: ", detector.board.id)
1010

11-
print("Is this a 96Boards board?", detector.board.LINARO_96BOARDS)
11+
print("Is this a DragonBoard 410c?", detector.board.DRAGONBOARD_410C)
1212
print("Is this a Pi 3B+?", detector.board.RASPBERRY_PI_3B_PLUS)
1313
print("Is this a 40-pin Raspberry Pi?", detector.board.any_raspberry_pi_40_pin)
1414
print("Is this a BBB?", detector.board.BEAGLEBONE_BLACK)

0 commit comments

Comments
 (0)