Skip to content

Commit

Permalink
AP_BattMonitor: tidy defines in scripting backend
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker committed Feb 14, 2024
1 parent 40f0001 commit e15f9d3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions libraries/AP_BattMonitor/AP_BattMonitor_Scripting.cpp
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -81,4 +83,3 @@ bool AP_BattMonitor_Scripting::handle_scripting(const BattMonitorScript_State &b
}

#endif // AP_BATTERY_SCRIPTING_ENABLED

7 changes: 4 additions & 3 deletions libraries/AP_BattMonitor/AP_BattMonitor_Scripting.h
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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

0 comments on commit e15f9d3

Please sign in to comment.