From 6ebd73f14405513b061fd7724ca9e531b218ed3d Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sun, 19 Mar 2023 09:55:12 +1100 Subject: [PATCH] AP_RCTelemetry: add and use AP_RCTelemetry_config.h --- libraries/AP_RCTelemetry/AP_CRSF_Telem.h | 13 ++----------- libraries/AP_RCTelemetry/AP_RCTelemetry_config.h | 13 +++++++++++++ 2 files changed, 15 insertions(+), 11 deletions(-) create mode 100644 libraries/AP_RCTelemetry/AP_RCTelemetry_config.h diff --git a/libraries/AP_RCTelemetry/AP_CRSF_Telem.h b/libraries/AP_RCTelemetry/AP_CRSF_Telem.h index b2ee4e4777..9bbeeaf03a 100644 --- a/libraries/AP_RCTelemetry/AP_CRSF_Telem.h +++ b/libraries/AP_RCTelemetry/AP_CRSF_Telem.h @@ -14,20 +14,11 @@ */ #pragma once -#include -#include -#include - -#ifndef HAL_CRSF_TELEM_ENABLED -#define HAL_CRSF_TELEM_ENABLED AP_FRSKY_SPORT_PASSTHROUGH_ENABLED -#endif - -#ifndef HAL_CRSF_TELEM_TEXT_SELECTION_ENABLED -#define HAL_CRSF_TELEM_TEXT_SELECTION_ENABLED OSD_ENABLED && OSD_PARAM_ENABLED && HAL_CRSF_TELEM_ENABLED && BOARD_FLASH_SIZE > 1024 -#endif +#include "AP_RCTelemetry_config.h" #if HAL_CRSF_TELEM_ENABLED +#include #include #include "AP_RCTelemetry.h" #include diff --git a/libraries/AP_RCTelemetry/AP_RCTelemetry_config.h b/libraries/AP_RCTelemetry/AP_RCTelemetry_config.h new file mode 100644 index 0000000000..de3220d4f3 --- /dev/null +++ b/libraries/AP_RCTelemetry/AP_RCTelemetry_config.h @@ -0,0 +1,13 @@ +#pragma once + +#include +#include +#include + +#ifndef HAL_CRSF_TELEM_ENABLED +#define HAL_CRSF_TELEM_ENABLED AP_FRSKY_SPORT_PASSTHROUGH_ENABLED +#endif + +#ifndef HAL_CRSF_TELEM_TEXT_SELECTION_ENABLED +#define HAL_CRSF_TELEM_TEXT_SELECTION_ENABLED OSD_ENABLED && OSD_PARAM_ENABLED && HAL_CRSF_TELEM_ENABLED && BOARD_FLASH_SIZE > 1024 +#endif