Skip to content

Commit f6cf2cd

Browse files
committed
Updating board.py
adding any_asus_tinker_board for embedded linux system identification
1 parent 98cdaa4 commit f6cf2cd

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

adafruit_platformdetect/board.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,14 @@ def _udoo_id(self):
326326
return board_id
327327
return None
328328

329+
def _asus_tinker_board_id(self):
330+
"""Check what type of Tinker Board."""
331+
board_value = self.detector.get_device_model()
332+
board = None
333+
if board_value and "ASUS Tinker Board" in board_value:
334+
board = boards.ASUS_TINKER_BOARD
335+
return board
336+
329337
@property
330338
def any_96boards(self):
331339
"""Check whether the current board is any 96boards board."""
@@ -411,6 +419,10 @@ def any_udoo_board(self):
411419
"""Check to see if the current board is an UDOO board"""
412420
return self.id in boards._UDOO_BOARD_IDS
413421

422+
def any_asus_tinker_board(self):
423+
"""Check to see if the current board is an ASUS Tinker Board"""
424+
return self.id in boards._ASUS_Tinker_Board
425+
414426
@property
415427
def any_embedded_linux(self):
416428
"""Check whether the current board is any embedded Linux device."""
@@ -431,6 +443,7 @@ def any_embedded_linux(self):
431443
self.any_rock_pi_board,
432444
self.any_clockwork_pi_board,
433445
self.any_udoo_board,
446+
self.any_asus_tinker_board,
434447
]
435448
)
436449

0 commit comments

Comments
 (0)