Browse Source

Updated 96 Boards detection to be more specific

pull/26/head
Melissa LeBlanc-Williams 5 years ago
parent
commit
15a7d4b99b
2 changed files with 8 additions and 9 deletions
  1. +7
    -8
      adafruit_platformdetect/board.py
  2. +1
    -1
      bin/detect.py

+ 7
- 8
adafruit_platformdetect/board.py View File

@ -58,7 +58,7 @@ ODROID_C1_PLUS = "ODROID_C1_PLUS"
ODROID_C2 = "ODROID_C2"
FTDI_FT232H = "FT232H"
LINARO_96BOARDS = "LINARO_96BOARDS"
DRAGONBOARD_410C = "DRAGONBOARD_410C"
# pylint: enable=bad-whitespace
#OrangePI
@ -113,6 +113,10 @@ _BEAGLEBONE_IDS = (
OSD3358_SM_RED,
)
_LINARO_96BOARDS_IDS = (
DRAGONBOARD_410C,
)
# BeagleBone eeprom board ids from:
# https://github.com/beagleboard/image-builder
# Thanks to zmatt on freenode #beagle for pointers.
@ -291,7 +295,7 @@ class Board:
elif chip_id == ap_chip.FT232H:
board_id = FTDI_FT232H
elif chip_id == ap_chip.APQ8016:
board_id = LINARO_96BOARDS
board_id = DRAGONBOARD_410C
elif chip_id in (ap_chip.T210, ap_chip.T186, ap_chip.T194):
board_id = self._tegra_id()
return board_id
@ -378,12 +382,7 @@ class Board:
@property
def any_96boards(self):
"""Check if the current board is any 96Boards-family board."""
return (
self.detector.check_dt_compatible_value("qcom,apq8016-sbc")
or self.detector.check_dt_compatible_value("hisilicon,hi3660-hikey960")
or self.detector.check_dt_compatible_value("hisilicon,hi6220-hikey")
)
return self.id in _LINARO_96BOARDS_IDS
@property
def any_raspberry_pi(self):


+ 1
- 1
bin/detect.py View File

@ -8,7 +8,7 @@ print("Chip id: ", detector.chip.id)
print("Board id: ", detector.board.id)
print("Is this a 96Boards board?", detector.board.LINARO_96BOARDS)
print("Is this a DragonBoard 410c?", detector.board.DRAGONBOARD_410C)
print("Is this a Pi 3B+?", detector.board.RASPBERRY_PI_3B_PLUS)
print("Is this a 40-pin Raspberry Pi?", detector.board.any_raspberry_pi_40_pin)
print("Is this a BBB?", detector.board.BEAGLEBONE_BLACK)


|||||||
x
 
000:0
Loading…
Cancel
Save