Skip to content

Commit 2fbc1f0

Browse files
committed
Changed check order of Rock 5 and Rock 5C
1 parent 00973a2 commit 2fbc1f0

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

adafruit_platformdetect/board.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -636,11 +636,9 @@ def _rock_pi_id(self) -> Optional[str]:
636636
if self.detector.check_board_name_value() == "ROCK Pi X":
637637
board = boards.ROCK_PI_X
638638
if board_value and "ROCK 5" in board_value.upper():
639-
rock_board_value = board_value.upper()
640-
if "ROCK 5C" in rock_board_value:
641-
board = boards.ROCK_PI_5C
642-
else:
643-
board = boards.ROCK_PI_5
639+
board = boards.ROCK_PI_5
640+
if board_value and "ROCK 5C" in board_value.upper():
641+
board = boards.ROCK_PI_5C
644642
if board_value and "RADXA ROCK 4C+" in board_value.upper():
645643
board = boards.ROCK_PI_4_C_PLUS
646644
if board_value and "RADXA ROCK 4SE" in board_value.upper():

0 commit comments

Comments
 (0)