From 895ab6c089c8e7d3162d7471e84557d51ee1a02b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 22 Jun 2021 15:57:34 +1000 Subject: [PATCH] waf: added --postype-single option for SITL with single precision postype_t --- Tools/ardupilotwaf/boards.py | 3 +++ wscript | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/Tools/ardupilotwaf/boards.py b/Tools/ardupilotwaf/boards.py index 1ba0d0f3c3..ec378b65da 100644 --- a/Tools/ardupilotwaf/boards.py +++ b/Tools/ardupilotwaf/boards.py @@ -330,6 +330,9 @@ class Board: if cfg.options.disable_ekf3: env.CXXFLAGS += ['-DHAL_NAVEKF3_AVAILABLE=0'] + if cfg.options.postype_single: + env.CXXFLAGS += ['-DHAL_WITH_POSTYPE_DOUBLE=0'] + if cfg.options.osd or cfg.options.osd_fonts: env.CXXFLAGS += ['-DOSD_ENABLED=1', '-DHAL_MSP_ENABLED=1'] diff --git a/wscript b/wscript index e4a8f5fb57..98560fbbf0 100644 --- a/wscript +++ b/wscript @@ -257,6 +257,11 @@ configuration in order to save typing. default=False, help='Force a static build') + g.add_option('--postype-single', + action='store_true', + default=False, + help='force single precision postype_t') + def _collect_autoconfig_files(cfg): for m in sys.modules.values(): paths = []