diff --git a/Tools/ardupilotwaf/boards.py b/Tools/ardupilotwaf/boards.py index 2ca6e13286..df4b5f9be7 100644 --- a/Tools/ardupilotwaf/boards.py +++ b/Tools/ardupilotwaf/boards.py @@ -359,7 +359,13 @@ class Board: for f in os.listdir('libraries/AP_OSD/fonts'): if fnmatch.fnmatch(f, "font*bin"): env.ROMFS_FILES += [(f,'libraries/AP_OSD/fonts/'+f)] - + + if cfg.options.ekf_double: + env.CXXFLAGS += ['-DHAL_EKF_DOUBLE=1'] + + if cfg.options.ekf_single: + env.CXXFLAGS += ['-DHAL_EKF_DOUBLE=0'] + def pre_build(self, bld): '''pre-build hook that gets called before dynamic sources''' if bld.env.ROMFS_FILES: diff --git a/wscript b/wscript index ee95965666..a76f269d91 100644 --- a/wscript +++ b/wscript @@ -255,6 +255,16 @@ configuration in order to save typing. action='store_true', default=False, help='Configure without EKF3.') + + g.add_option('--ekf-double', + action='store_true', + default=False, + help='Configure EKF as double precision.') + + g.add_option('--ekf-single', + action='store_true', + default=False, + help='Configure EKF as single precision.') g.add_option('--static', action='store_true',