From db9b57c0a3509ac9fa34470901a1ffff2ed2cf3e Mon Sep 17 00:00:00 2001 From: Iampete1 Date: Tue, 12 Jul 2022 00:46:03 +0100 Subject: [PATCH] AP_AIS: move to config.h pattern --- libraries/AP_AIS/AP_AIS.h | 10 +--------- libraries/AP_AIS/AP_AIS_config.h | 11 +++++++++++ libraries/AP_AIS/LogStructure.h | 2 +- 3 files changed, 13 insertions(+), 10 deletions(-) create mode 100644 libraries/AP_AIS/AP_AIS_config.h 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,\