Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AP_BattMonitor: tidy defines in scripting backend #26213

Merged
merged 1 commit into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading