From ee7376afb1090f7f87dc5756fa14ba168711fdbf Mon Sep 17 00:00:00 2001 From: Rhys Mainwaring Date: Sun, 15 Dec 2024 11:46:11 +0000 Subject: [PATCH] SITL: follow standard pattern for including ENABLED guards Signed-off-by: Rhys Mainwaring --- libraries/SITL/SIM_Airspeed_DLVR.cpp | 4 +++- libraries/SITL/SIM_BattMonitor_SMBus_Maxell.cpp | 4 +++- libraries/SITL/SIM_BattMonitor_SMBus_Rotoye.cpp | 4 +++- libraries/SITL/SIM_MS5525.cpp | 4 +++- libraries/SITL/SIM_MS5611.cpp | 4 +++- libraries/SITL/SIM_Temperature_MCP9600.cpp | 4 +++- libraries/SITL/SIM_Temperature_TSYS01.cpp | 4 +++- 7 files changed, 21 insertions(+), 7 deletions(-) diff --git a/libraries/SITL/SIM_Airspeed_DLVR.cpp b/libraries/SITL/SIM_Airspeed_DLVR.cpp index d6bb09b10c..46fc1c5318 100644 --- a/libraries/SITL/SIM_Airspeed_DLVR.cpp +++ b/libraries/SITL/SIM_Airspeed_DLVR.cpp @@ -1,7 +1,9 @@ -#include "SIM_Airspeed_DLVR.h" +#include "SIM_config.h" #if AP_SIM_AIRSPEED_DLVR_ENABLED +#include "SIM_Airspeed_DLVR.h" + #include "SITL.h" int SITL::Airspeed_DLVR::rdwr(I2C::i2c_rdwr_ioctl_data *&data) diff --git a/libraries/SITL/SIM_BattMonitor_SMBus_Maxell.cpp b/libraries/SITL/SIM_BattMonitor_SMBus_Maxell.cpp index 4a9cc2c32b..f2982335c5 100644 --- a/libraries/SITL/SIM_BattMonitor_SMBus_Maxell.cpp +++ b/libraries/SITL/SIM_BattMonitor_SMBus_Maxell.cpp @@ -1,7 +1,9 @@ -#include "SIM_BattMonitor_SMBus_Maxell.h" +#include "SIM_config.h" #if AP_SIM_BATT_MONITOR_SMBUS_MAXELL_ENABLED +#include "SIM_BattMonitor_SMBus_Maxell.h" + SITL::Maxell::Maxell() : SIM_BattMonitor_SMBus_Generic() { diff --git a/libraries/SITL/SIM_BattMonitor_SMBus_Rotoye.cpp b/libraries/SITL/SIM_BattMonitor_SMBus_Rotoye.cpp index ce52f38b20..ea1d1dddbf 100644 --- a/libraries/SITL/SIM_BattMonitor_SMBus_Rotoye.cpp +++ b/libraries/SITL/SIM_BattMonitor_SMBus_Rotoye.cpp @@ -1,7 +1,9 @@ -#include "SIM_BattMonitor_SMBus_Rotoye.h" +#include "SIM_config.h" #if AP_SIM_BATT_MONITOR_SMBUS_ROTOYE_ENABLED +#include "SIM_BattMonitor_SMBus_Rotoye.h" + #include SITL::Rotoye::Rotoye() : diff --git a/libraries/SITL/SIM_MS5525.cpp b/libraries/SITL/SIM_MS5525.cpp index 30ae091c39..53bd9f887f 100644 --- a/libraries/SITL/SIM_MS5525.cpp +++ b/libraries/SITL/SIM_MS5525.cpp @@ -1,7 +1,9 @@ -#include "SIM_MS5525.h" +#include "SIM_config.h" #if AP_SIM_MS5525_ENABLED +#include "SIM_MS5525.h" + #include using namespace SITL; diff --git a/libraries/SITL/SIM_MS5611.cpp b/libraries/SITL/SIM_MS5611.cpp index cce4927711..7d20614b81 100644 --- a/libraries/SITL/SIM_MS5611.cpp +++ b/libraries/SITL/SIM_MS5611.cpp @@ -1,7 +1,9 @@ -#include "SIM_MS5611.h" +#include "SIM_config.h" #if AP_SIM_MS5611_ENABLED +#include "SIM_MS5611.h" + #include #include diff --git a/libraries/SITL/SIM_Temperature_MCP9600.cpp b/libraries/SITL/SIM_Temperature_MCP9600.cpp index be6304f745..7718fc181a 100644 --- a/libraries/SITL/SIM_Temperature_MCP9600.cpp +++ b/libraries/SITL/SIM_Temperature_MCP9600.cpp @@ -1,7 +1,9 @@ -#include "SIM_Temperature_MCP9600.h" +#include "SIM_config.h" #if AP_SIM_TEMPERATURE_MCP9600_ENABLED +#include "SIM_Temperature_MCP9600.h" + using namespace SITL; #include diff --git a/libraries/SITL/SIM_Temperature_TSYS01.cpp b/libraries/SITL/SIM_Temperature_TSYS01.cpp index a97ca72c46..68f5f55e33 100644 --- a/libraries/SITL/SIM_Temperature_TSYS01.cpp +++ b/libraries/SITL/SIM_Temperature_TSYS01.cpp @@ -1,7 +1,9 @@ -#include "SIM_Temperature_TSYS01.h" +#include "SIM_config.h" #if AP_SIM_TEMPERATURE_TSYS01_ENABLED +#include "SIM_Temperature_TSYS01.h" + #include constexpr const int32_t SITL::TSYS01::_k[5];