From 823d666bc2de1143cb099e1e28385a6e689ce7fe Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 12 Apr 2020 08:25:09 +1000 Subject: [PATCH] waf: added --disable-ekf2 and --disable-ekf3 build options allows for testing disables in SITL --- Tools/ardupilotwaf/boards.py | 5 +++++ wscript | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/Tools/ardupilotwaf/boards.py b/Tools/ardupilotwaf/boards.py index bbc72a392b..634e4ea6fb 100644 --- a/Tools/ardupilotwaf/boards.py +++ b/Tools/ardupilotwaf/boards.py @@ -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''' diff --git a/wscript b/wscript index 598a902e3c..c420f3054f 100644 --- a/wscript +++ b/wscript @@ -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',