mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-01 13:38:38 -04:00
waf: boards: allow defining board name
If the name is not defined, then the class name will be used.
This commit is contained in:
parent
4f55c75767
commit
36b49debf6
@ -13,7 +13,10 @@ class BoardMeta(type):
|
||||
super(BoardMeta, cls).__init__(name, bases, dct)
|
||||
if name == 'Board':
|
||||
return
|
||||
_board_classes[name] = cls
|
||||
board_name = getattr(cls, 'name', name)
|
||||
if board_name in _board_classes:
|
||||
raise Exception('board named %s already exists' % board_name)
|
||||
_board_classes[board_name] = cls
|
||||
|
||||
class Board:
|
||||
def configure(self, cfg):
|
||||
|
Loading…
Reference in New Issue
Block a user