mirror of https://github.com/ArduPilot/ardupilot
waf: fixed case insensitive board name
This commit is contained in:
parent
b1bbe09602
commit
9e50c1b64e
|
@ -295,12 +295,6 @@ Please use a replacement build as follows:
|
|||
''' % ctx.env.BOARD)
|
||||
|
||||
boards = _board_classes.keys()
|
||||
if not ctx.env.BOARD in boards:
|
||||
# try case-insensitive match
|
||||
for b in boards:
|
||||
if b.upper() == ctx.env.BOARD.upper():
|
||||
ctx.env.BOARD = b
|
||||
break
|
||||
if not ctx.env.BOARD in boards:
|
||||
ctx.fatal("Invalid board '%s': choices are %s" % (ctx.env.BOARD, ', '.join(boards)))
|
||||
_board = _board_classes[ctx.env.BOARD]()
|
||||
|
|
7
wscript
7
wscript
|
@ -325,6 +325,13 @@ def configure(cfg):
|
|||
if cfg.options.board is None:
|
||||
cfg.options.board = 'sitl'
|
||||
|
||||
boards_names = boards.get_boards_names()
|
||||
if not cfg.options.board in boards_names:
|
||||
for b in boards_names:
|
||||
if b.upper() == cfg.options.board.upper():
|
||||
cfg.options.board = b
|
||||
break
|
||||
|
||||
cfg.env.BOARD = cfg.options.board
|
||||
cfg.env.DEBUG = cfg.options.debug
|
||||
cfg.env.AUTOCONFIG = cfg.options.autoconfig
|
||||
|
|
Loading…
Reference in New Issue