waf: added --disable-ekf2 and --disable-ekf3 build options

allows for testing disables in SITL
This commit is contained in:
Andrew Tridgell 2020-04-12 08:25:09 +10:00
parent c36e06e7fa
commit 823d666bc2
2 changed files with 15 additions and 0 deletions

View File

@ -290,6 +290,11 @@ class Board:
# We always want to use PRI format macros
cfg.define('__STDC_FORMAT_MACROS', 1)
if cfg.options.disable_ekf2:
env.CXXFLAGS += ['-DHAL_NAVEKF2_AVAILABLE=0']
if cfg.options.disable_ekf3:
env.CXXFLAGS += ['-DHAL_NAVEKF3_AVAILABLE=0']
def pre_build(self, bld):
'''pre-build hook that gets called before dynamic sources'''

10
wscript
View File

@ -199,6 +199,16 @@ configuration in order to save typing.
action='store_true',
default=False,
help='Configure for building SITL with flash storage emulation.')
g.add_option('--disable-ekf2',
action='store_true',
default=False,
help='Configure without EKF2.')
g.add_option('--disable-ekf3',
action='store_true',
default=False,
help='Configure without EKF3.')
g.add_option('--static',
action='store_true',