mirror of https://github.com/ArduPilot/ardupilot
waf: point developers at the new build
This commit is contained in:
parent
15853adb04
commit
646c6f4361
|
@ -268,12 +268,29 @@ def get_boards_names():
|
||||||
|
|
||||||
return sorted(list(_board_classes.keys()), key=str.lower)
|
return sorted(list(_board_classes.keys()), key=str.lower)
|
||||||
|
|
||||||
|
def get_removed_boards():
|
||||||
|
'''list of boards which have been removed'''
|
||||||
|
return sorted(['px4-v1', 'px4-v2', 'px4-v3', 'px4-v4', 'px4-v4pro'])
|
||||||
|
|
||||||
@conf
|
@conf
|
||||||
def get_board(ctx):
|
def get_board(ctx):
|
||||||
global _board
|
global _board
|
||||||
if not _board:
|
if not _board:
|
||||||
if not ctx.env.BOARD:
|
if not ctx.env.BOARD:
|
||||||
ctx.fatal('BOARD environment variable must be set before first call to get_board()')
|
ctx.fatal('BOARD environment variable must be set before first call to get_board()')
|
||||||
|
if ctx.env.BOARD in get_removed_boards():
|
||||||
|
print('''
|
||||||
|
The board target %s has been removed from ArduPilot with the removal of NuttX support and HAL_PX4.
|
||||||
|
|
||||||
|
Please use a replacement build as follows:
|
||||||
|
|
||||||
|
px4-v2 Use Pixhawk1 build
|
||||||
|
px4-v3 Use Pixhawk1 or CubeBlack builds
|
||||||
|
px4-v4 Use Pixracer build
|
||||||
|
px4-v4pro Use DrotekP3Pro build
|
||||||
|
''' % ctx.env.BOARD)
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
_board = _board_classes[ctx.env.BOARD]()
|
_board = _board_classes[ctx.env.BOARD]()
|
||||||
return _board
|
return _board
|
||||||
|
|
||||||
|
|
3
wscript
3
wscript
|
@ -63,9 +63,10 @@ def options(opt):
|
||||||
g = opt.ap_groups['configure']
|
g = opt.ap_groups['configure']
|
||||||
|
|
||||||
boards_names = boards.get_boards_names()
|
boards_names = boards.get_boards_names()
|
||||||
|
removed_names = boards.get_removed_boards()
|
||||||
g.add_option('--board',
|
g.add_option('--board',
|
||||||
action='store',
|
action='store',
|
||||||
choices=boards_names,
|
choices=boards_names + removed_names,
|
||||||
default=None,
|
default=None,
|
||||||
help='Target board to build, choices are %s.' % ', '.join(boards_names))
|
help='Target board to build, choices are %s.' % ', '.join(boards_names))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue