Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove EKF2 from all builds #25567

Merged
merged 3 commits into from
Nov 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions Tools/ardupilotwaf/boards.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,8 +462,8 @@ def configure_env(self, cfg, env):
# 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.enable_ekf2:
env.CXXFLAGS += ['-DHAL_NAVEKF2_AVAILABLE=1']

if cfg.options.disable_ekf3:
env.CXXFLAGS += ['-DHAL_NAVEKF3_AVAILABLE=0']
Expand Down Expand Up @@ -654,6 +654,12 @@ def configure_env(self, cfg, env):
cfg.define('AP_NOTIFY_LP5562_BUS', 2)
cfg.define('AP_NOTIFY_LP5562_ADDR', 0x30)

try:
env.CXXFLAGS.remove('-DHAL_NAVEKF2_AVAILABLE=0')
except ValueError:
pass
env.CXXFLAGS += ['-DHAL_NAVEKF2_AVAILABLE=1']

if self.with_can:
cfg.define('HAL_NUM_CAN_IFACES', 2)
env.DEFINES.update(CANARD_MULTI_IFACE=1,
Expand Down
6 changes: 3 additions & 3 deletions Tools/autotest/sim_vehicle.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,8 @@ def do_build(opts, frame_options):
if opts.math_check_indexes:
cmd_configure.append("--enable-math-check-indexes")

if opts.disable_ekf2:
cmd_configure.append("--disable-ekf2")
if opts.enable_ekf2:
cmd_configure.append("--enable-ekf2")

if opts.disable_ekf3:
cmd_configure.append("--disable-ekf3")
Expand Down Expand Up @@ -1299,7 +1299,7 @@ def generate_frame_help():
group_sim.add_option("--fram-storage",
action='store_true',
help="use fram storage emulation")
group_sim.add_option("--disable-ekf2",
group_sim.add_option("--enable-ekf2",
action='store_true',
help="disable EKF2 in build")
group_sim.add_option("--disable-ekf3",
Expand Down
4 changes: 2 additions & 2 deletions libraries/AP_AHRS/AP_AHRS_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
#endif

#ifndef HAL_NAVEKF2_AVAILABLE
// only default to EK2 enabled on boards with over 1M flash
#define HAL_NAVEKF2_AVAILABLE (BOARD_FLASH_SIZE>1024)
// EKF2 slated compiled out by default in 4.5, slated to be removed.
#define HAL_NAVEKF2_AVAILABLE 0
#endif

#ifndef HAL_NAVEKF3_AVAILABLE
Expand Down
4 changes: 2 additions & 2 deletions wscript
Original file line number Diff line number Diff line change
Expand Up @@ -360,10 +360,10 @@ configuration in order to save typing.
default=False,
help='Use flash storage emulation.')

g.add_option('--disable-ekf2',
g.add_option('--enable-ekf2',
action='store_true',
default=False,
help='Configure without EKF2.')
help='Configure with EKF2.')

g.add_option('--disable-ekf3',
action='store_true',
Expand Down