waf: added --ekf-double configure option

This commit is contained in:
Andrew Tridgell 2021-05-04 21:12:52 +10:00
parent db37898e36
commit c659352ebe
2 changed files with 17 additions and 1 deletions

View File

@ -340,7 +340,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:

10
wscript
View File

@ -251,6 +251,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',