Skip to content

Commit b682743

Browse files
committed
Added support for board 'Lemaker Banana Pro'
1 parent ec11070 commit b682743

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

adafruit_platformdetect/board.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ def _tisk_id(self) -> Optional[str]:
342342

343343
# pylint: disable=too-many-return-statements
344344
def _armbian_id(self) -> Optional[str]:
345-
"""Check whether the current board is an OrangePi board."""
345+
"""Get the current board via the ARMBIAN release field."""
346346
board_value = self.detector.get_armbian_release_field("BOARD")
347347
board = None
348348

@@ -384,6 +384,8 @@ def _armbian_id(self) -> Optional[str]:
384384
board = boards.BANANA_PI_M2_BERRY
385385
elif board_value == "bananapim5":
386386
board = boards.BANANA_PI_M5
387+
elif board_value == "bananapipro":
388+
board = boards.LEMAKER_BANANA_PRO
387389
elif board_value == "orangepizeroplus2-h5":
388390
board = boards.ORANGE_PI_ZERO_PLUS_2H5
389391
elif board_value == "orangepizeroplus":
@@ -854,6 +856,11 @@ def any_bananapi(self) -> bool:
854856
"""Check whether the current board is any BananaPi-family system."""
855857
return self.id in boards._BANANA_PI_IDS
856858

859+
@property
860+
def any_lemaker(self) -> bool:
861+
"""Check whether the current board is any LeMaker board."""
862+
return self.id in boards._LEMAKER_IDS
863+
857864
@property
858865
def any_maaxboard(self) -> bool:
859866
"""Check whether the current board is any BananaPi-family system."""

adafruit_platformdetect/constants/boards.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@
7070
BANANA_PI_M2_BERRY = "BANANA_PI_M2_BERRY"
7171
BANANA_PI_M5 = "BANANA_PI_M5"
7272

73+
# LeMaker boards
74+
LEMAKER_BANANA_PRO = "LEMAKER_BANANA_PRO"
75+
7376
# NVIDIA Jetson boards
7477
JETSON_TX1 = "JETSON_TX1"
7578
JETSON_TX2 = "JETSON_TX2"
@@ -243,7 +246,11 @@
243246
)
244247

245248
# NanoPi
246-
_NANOPI_IDS = (NANOPI_NEO_AIR, NANOPI_DUO2, NANOPI_NEO)
249+
_NANOPI_IDS = (
250+
NANOPI_NEO_AIR,
251+
NANOPI_DUO2,
252+
NANOPI_NEO,
253+
)
247254

248255
# BananaPI
249256
_BANANA_PI_IDS = (
@@ -253,6 +260,11 @@
253260
BANANA_PI_M5,
254261
)
255262

263+
# LeMaker
264+
_LEMAKER_IDS = (
265+
LEMAKER_BANANA_PRO,
266+
)
267+
256268
# LubanCat
257269
_LUBANCAT_IDS = (
258270
LUBANCAT_IMX6ULL,

bin/detect.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@
8585
if detector.board.any_orange_pi:
8686
print("Orange Pi detected.")
8787

88+
if detector.board.any_lemaker:
89+
print("LeMaker board detected.")
90+
8891
if detector.board.any_odroid_40_pin:
8992
print("Odroid detected.")
9093

0 commit comments

Comments
 (0)