diff --git a/libraries/AP_AIS/AP_AIS.h b/libraries/AP_AIS/AP_AIS.h index fa1f7795dc..f8a2f30b86 100644 --- a/libraries/AP_AIS/AP_AIS.h +++ b/libraries/AP_AIS/AP_AIS.h @@ -14,15 +14,7 @@ */ #pragma once -#include - -#ifndef AP_AIS_ENABLED -#if BOARD_FLASH_SIZE <= 1024 - #define AP_AIS_ENABLED 0 -#else - #define AP_AIS_ENABLED 2 -#endif -#endif +#include "AP_AIS_config.h" #if AP_AIS_ENABLED // 0 fully disabled and compiled out diff --git a/libraries/AP_AIS/AP_AIS_config.h b/libraries/AP_AIS/AP_AIS_config.h new file mode 100644 index 0000000000..d80b65934d --- /dev/null +++ b/libraries/AP_AIS/AP_AIS_config.h @@ -0,0 +1,11 @@ +#pragma once + +#include + +#ifndef AP_AIS_ENABLED +#if BOARD_FLASH_SIZE <= 1024 + #define AP_AIS_ENABLED 0 +#else + #define AP_AIS_ENABLED 2 +#endif +#endif diff --git a/libraries/AP_AIS/LogStructure.h b/libraries/AP_AIS/LogStructure.h index b55656fae1..2eeb701f91 100644 --- a/libraries/AP_AIS/LogStructure.h +++ b/libraries/AP_AIS/LogStructure.h @@ -1,7 +1,7 @@ #pragma once #include -#include "AP_AIS.h" +#include "AP_AIS_config.h" #define LOG_IDS_FROM_AIS \ LOG_AIS_RAW_MSG,\