From b367fd0c1e141dc868cf751d50e7dc220fe2063f Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Tue, 16 Apr 2024 21:07:18 +1000 Subject: [PATCH] AP_RCMapper: exclude body of AP_RCMapper based on AP_RCMAPPER_ENABLED --- libraries/AP_RCMapper/AP_RCMapper.cpp | 6 ++++++ libraries/AP_RCMapper/AP_RCMapper_config.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/libraries/AP_RCMapper/AP_RCMapper.cpp b/libraries/AP_RCMapper/AP_RCMapper.cpp index fc09016e1d..39af6944ae 100644 --- a/libraries/AP_RCMapper/AP_RCMapper.cpp +++ b/libraries/AP_RCMapper/AP_RCMapper.cpp @@ -1,3 +1,7 @@ +#include "AP_RCMapper_config.h" + +#if AP_RCMAPPER_ENABLED + #include #include "AP_RCMapper.h" @@ -75,3 +79,5 @@ RCMapper::RCMapper(void) RCMapper *AP::rcmap() { return RCMapper::get_singleton(); } + +#endif // AP_RCMAPPER_ENABLED diff --git a/libraries/AP_RCMapper/AP_RCMapper_config.h b/libraries/AP_RCMapper/AP_RCMapper_config.h index ad11cb1785..021ff08c25 100644 --- a/libraries/AP_RCMapper/AP_RCMapper_config.h +++ b/libraries/AP_RCMapper/AP_RCMapper_config.h @@ -1,5 +1,7 @@ #pragma once +#include + #ifndef AP_RCMAPPER_ENABLED #define AP_RCMAPPER_ENABLED 1 #endif