Skip to content

Commit

Permalink
Updated after review 1
Browse files Browse the repository at this point in the history
  • Loading branch information
KingPharoo committed Dec 2, 2023
1 parent 3562120 commit e363928
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions adafruit_platformdetect/board.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ def _allwinner_variants_id(self) -> Optional[str]:
# TODO: Add other specifc board contexts here

elif "lime2" in board_value:
board = boards.LIME2
board = boards.OLIMEX_LIME2
return board

# pylint: disable=too-many-return-statements
Expand Down Expand Up @@ -931,9 +931,9 @@ def any_nxp_navq_board(self) -> bool:
return self.id in boards._NXP_SOM_IDS

@property
def any_lime2_board(self):
def any_olimex_lime2_board(self):
"""Check whether the current board is any Pine64 device."""
return self.id in boards.LIME2
return self.id in boards.OLIMEX_LIME2

@property
def os_environ_board(self) -> bool:
Expand All @@ -955,7 +955,6 @@ def lazily_generate_conditions():
yield self.board.QTPY_U2IF
yield self.board.QT2040_TRINKEY_U2IF
yield self.board.KB2040_U2IF
yield self.board.lime2

return any(condition for condition in lazily_generate_conditions())

Expand Down Expand Up @@ -998,7 +997,7 @@ def lazily_generate_conditions():
yield self.generic_linux
yield self.any_nxp_navq_board
yield self.any_walnutpi
yield self.any_lime2_board
yield self.any_olimex_lime2_board

return any(condition for condition in lazily_generate_conditions())

Expand Down
2 changes: 1 addition & 1 deletion adafruit_platformdetect/constants/boards.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
BEAGLELOGIC_STANDALONE = "BEAGLELOGIC_STANDALONE"
OSD3358_DEV_BOARD = "OSD3358_DEV_BOARD"
OSD3358_SM_RED = "OSD3358_SM_RED"
LIME2 = "LIME2"
OLIMEX_LIME2 = "OLIMEX_LIME2"
FEATHER_HUZZAH = "FEATHER_HUZZAH"
FEATHER_M0_EXPRESS = "FEATHER_M0_EXPRESS"
GENERIC_LINUX_PC = "GENERIC_LINUX_PC"
Expand Down

0 comments on commit e363928

Please sign in to comment.