wscript: add support for setting number of auxiliary IMUs

This commit is contained in:
bugobliterator 2023-03-04 11:03:08 +11:00 committed by Andrew Tridgell
parent e7533c006b
commit 7d61a5df8e
1 changed files with 9 additions and 1 deletions

View File

@ -377,6 +377,11 @@ configuration in order to save typing.
default=None, default=None,
help='fail configure if not using the specified gcc version') help='fail configure if not using the specified gcc version')
g.add_option('--num-aux-imus',
type='int',
default=0,
help='number of auxiliary IMUs')
def _collect_autoconfig_files(cfg): def _collect_autoconfig_files(cfg):
for m in sys.modules.values(): for m in sys.modules.values():
paths = [] paths = []
@ -444,6 +449,9 @@ def configure(cfg):
cfg.msg('Using static linking', 'yes', color='YELLOW') cfg.msg('Using static linking', 'yes', color='YELLOW')
cfg.env.STATIC_LINKING = True cfg.env.STATIC_LINKING = True
if cfg.options.num_aux_imus > 0:
cfg.define('INS_AUX_INSTANCES', cfg.options.num_aux_imus)
cfg.load('ap_library') cfg.load('ap_library')
cfg.msg('Setting board to', cfg.options.board) cfg.msg('Setting board to', cfg.options.board)