Skip to content

Commit 0ca46b6

Browse files
committed
Added support for D-Robotics RDK-X5
1 parent bca962c commit 0ca46b6

File tree

5 files changed

+11
-1
lines changed

5 files changed

+11
-1
lines changed

adafruit_platformdetect/board.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,8 @@ def id(self) -> Optional[str]:
243243
board_id = self._rv1106_id()
244244
elif chip_id == chips.SUNRISE_X3:
245245
board_id = boards.RDK_X3
246+
elif chip_id == chips.SUNRISE_X5:
247+
board_id = boards.RDK_X5
246248
elif chip_id == chips.QCM6490:
247249
board_id = boards.PARTICLE_TACHYON
248250
self._board_id = board_id

adafruit_platformdetect/chip.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,9 @@ def _linux_id(self) -> Optional[str]:
349349
if self.detector.check_dt_compatible_value("hobot,x3"):
350350
return chips.SUNRISE_X3
351351

352+
if self.detector.check_dt_compatible_value("Horizon, x5"):
353+
return chips.SUNRISE_X5
354+
352355
if self.detector.check_dt_compatible_value("particle,tachyon"):
353356
return chips.QCM6490
354357

adafruit_platformdetect/constants/boards.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@
270270

271271
# Horizon
272272
RDK_X3 = "RDK_X3"
273+
RDK_X5 = "RDK_X5"
273274

274275
# Particle
275276
PARTICLE_TACHYON = "PARTICLE_TACHYON"
@@ -702,7 +703,7 @@
702703
)
703704

704705
# Horizon
705-
_HORIZON_IDS = (RDK_X3,)
706+
_HORIZON_IDS = (RDK_X3, RDK_X5)
706707

707708
_AMERIDROID_IDS = (INDIEDROID_NOVA,)
708709

adafruit_platformdetect/constants/chips.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
RZV2N = "RZV2N"
8989
RZV2H = "RZV2H"
9090
SUNRISE_X3 = "SUNRISE_X3"
91+
SUNRISE_X5 = "SUNRISE_X5"
9192
QCM6490 = "QCM6490"
9293

9394
BCM_RANGE = {"BCM2708", "BCM2709", "BCM2711", "BCM2712", "BCM2835", "BCM2837"}

bin/detect.py

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

126126
if detector.board.any_walnutpi:
127127
print("Walnut Pi detected.")
128+
129+
if detector.board.any_horizon_board:
130+
print("Horizon detected.")

0 commit comments

Comments
 (0)