diff --git a/libraries/AP_BattMonitor/AP_BattMonitor_Scripting.cpp b/libraries/AP_BattMonitor/AP_BattMonitor_Scripting.cpp index 337c9d9b7ac2c..e7b846258dd4f 100644 --- a/libraries/AP_BattMonitor/AP_BattMonitor_Scripting.cpp +++ b/libraries/AP_BattMonitor/AP_BattMonitor_Scripting.cpp @@ -1,7 +1,9 @@ -#include "AP_BattMonitor_Scripting.h" +#include "AP_BattMonitor_config.h" #if AP_BATTERY_SCRIPTING_ENABLED +#include "AP_BattMonitor_Scripting.h" + #define AP_BATT_MONITOR_SCRIPTING_TIMEOUT_US 5000000 bool AP_BattMonitor_Scripting::capacity_remaining_pct(uint8_t &percentage) const @@ -81,4 +83,3 @@ bool AP_BattMonitor_Scripting::handle_scripting(const BattMonitorScript_State &b } #endif // AP_BATTERY_SCRIPTING_ENABLED - diff --git a/libraries/AP_BattMonitor/AP_BattMonitor_Scripting.h b/libraries/AP_BattMonitor/AP_BattMonitor_Scripting.h index f68f11b9dceb5..382437d0aa55e 100644 --- a/libraries/AP_BattMonitor/AP_BattMonitor_Scripting.h +++ b/libraries/AP_BattMonitor/AP_BattMonitor_Scripting.h @@ -1,9 +1,11 @@ #pragma once -#include "AP_BattMonitor_Backend.h" +#include "AP_BattMonitor_config.h" #if AP_BATTERY_SCRIPTING_ENABLED +#include "AP_BattMonitor_Backend.h" + class AP_BattMonitor_Scripting : public AP_BattMonitor_Backend { public: @@ -28,5 +30,4 @@ class AP_BattMonitor_Scripting : public AP_BattMonitor_Backend HAL_Semaphore sem; }; -#endif // AP_BATTMONITOR_SCRIPTING_ENABLED - +#endif // AP_BATTERY_SCRIPTING_ENABLED