From 551dae875955b2eb1d5012a87f42370900624860 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Tue, 3 Jan 2023 23:55:28 +1100 Subject: [PATCH] AP_AHRS: break out an AP_AHRS_config.h --- libraries/AP_AHRS/AP_AHRS.h | 16 ++-------------- libraries/AP_AHRS/AP_AHRS_config.h | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 14 deletions(-) create mode 100644 libraries/AP_AHRS/AP_AHRS_config.h diff --git a/libraries/AP_AHRS/AP_AHRS.h b/libraries/AP_AHRS/AP_AHRS.h index a91e6dde25..ddae5e3003 100644 --- a/libraries/AP_AHRS/AP_AHRS.h +++ b/libraries/AP_AHRS/AP_AHRS.h @@ -21,22 +21,10 @@ * */ -#include +#include "AP_AHRS_config.h" + #include -#ifndef HAL_NAVEKF2_AVAILABLE -// only default to EK2 enabled on boards with over 1M flash -#define HAL_NAVEKF2_AVAILABLE (BOARD_FLASH_SIZE>1024) -#endif - -#ifndef HAL_NAVEKF3_AVAILABLE -#define HAL_NAVEKF3_AVAILABLE 1 -#endif - -#ifndef AP_AHRS_SIM_ENABLED -#define AP_AHRS_SIM_ENABLED AP_SIM_ENABLED -#endif - #if AP_AHRS_SIM_ENABLED #include #endif diff --git a/libraries/AP_AHRS/AP_AHRS_config.h b/libraries/AP_AHRS/AP_AHRS_config.h new file mode 100644 index 0000000000..e600487d1d --- /dev/null +++ b/libraries/AP_AHRS/AP_AHRS_config.h @@ -0,0 +1,16 @@ +#pragma once + +#include + +#ifndef HAL_NAVEKF2_AVAILABLE +// only default to EK2 enabled on boards with over 1M flash +#define HAL_NAVEKF2_AVAILABLE (BOARD_FLASH_SIZE>1024) +#endif + +#ifndef HAL_NAVEKF3_AVAILABLE +#define HAL_NAVEKF3_AVAILABLE 1 +#endif + +#ifndef AP_AHRS_SIM_ENABLED +#define AP_AHRS_SIM_ENABLED AP_SIM_ENABLED +#endif