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