AP_BattMonitor: tidy defines in scripting backend

This commit is contained in:
Peter Barker 2024-02-14 10:56:56 +11:00 committed by Peter Barker
parent 40f0001aea
commit e15f9d3f39
2 changed files with 7 additions and 5 deletions

View File

@ -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

View File

@ -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 @@ protected:
HAL_Semaphore sem;
};
#endif // AP_BATTMONITOR_SCRIPTING_ENABLED
#endif // AP_BATTERY_SCRIPTING_ENABLED