Skip to content

Commit 8f4bf4a

Browse files
committed
Adding _ASUS_TINKER_BOARD_IDS
Changed some things up to have everything match formatting for multiple boards so that more Tinker Board types can be added easily (I'm hoping to add the S after the original Tinker Board is all set)
1 parent 07e8625 commit 8f4bf4a

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

adafruit_platformdetect/board.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ def any_udoo_board(self):
421421

422422
def any_asus_tinker_board(self):
423423
"""Check to see if the current board is an ASUS Tinker Board"""
424-
return self.id in boards._ASUS_Tinker_Board
424+
return self.id in boards._ASUS_TINKER_BOARD_IDS
425425

426426
@property
427427
def any_embedded_linux(self):

adafruit_platformdetect/constants/boards.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
NODEMCU = "NODEMCU"
2525
GIANT_BOARD = "GIANT_BOARD"
2626

27+
# ASUS Tinker Boards
28+
ASUS_TINKER_BOARD = "ASUS_TINKER_BOARD"
29+
2730
# Clockwork Pi boards
2831
CLOCKWORK_CPI3 = "CLOCKWORK_CPI3"
2932

@@ -98,10 +101,10 @@
98101
UDOO_BOLT_V3 = "UDOO_BOLT_V3"
99102
UDOO_BOLT_V8 = "UDOO_BOLT_V8"
100103

101-
ASUS_TINKER_BOARD = "ASUS_TINKER_BOARD"
102-
103104
# pylint: enable=bad-whitespace
104105

106+
_ASUS_TINKER_BOARD_IDS = ASUS_TINKER_BOARD
107+
105108
# OrangePI
106109
_ORANGE_PI_IDS = (
107110
ORANGE_PI_PC,

bin/detect.py

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

6060
if detector.board.any_clockwork_pi:
6161
print("Clockwork Pi device detected.")
62+
63+
if detector.board.any_asus_tinker_board:
64+
print("ASUS Tinker Board device detected.")

0 commit comments

Comments
 (0)