mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-04 18:29:48 +02:00
Clarify BatteryCommand with some documentation
This commit is contained in:
parent
0eb852997c
commit
17a22dc59d
2 changed files with 4 additions and 0 deletions
|
@ -5,6 +5,7 @@
|
|||
#include "../../datalayer/datalayer_extended.h"
|
||||
#include "../../include.h"
|
||||
|
||||
// Available generic battery commands that are taken into use based on what the selected battery supports.
|
||||
std::vector<BatteryCommand> battery_commands = {
|
||||
{"clearIsolation", "Clear isolation fault", "clear any active isolation fault?",
|
||||
[](Battery* b) { return b && b->supports_clear_isolation(); },
|
||||
|
|
|
@ -15,6 +15,9 @@ String advanced_battery_processor(const String& var);
|
|||
|
||||
class Battery;
|
||||
|
||||
// Each BatteryCommand defines a command that can be performed by a battery.
|
||||
// Whether the selected battery supports the command is determined at run-time
|
||||
// by calling the condition callback.
|
||||
struct BatteryCommand {
|
||||
// The unique name of the route in the API to execute the command or a function in Javascript
|
||||
const char* identifier;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue