diff --git a/Software/src/devboard/webserver/advanced_battery_html.cpp b/Software/src/devboard/webserver/advanced_battery_html.cpp index 61013b24..fb0d44d9 100644 --- a/Software/src/devboard/webserver/advanced_battery_html.cpp +++ b/Software/src/devboard/webserver/advanced_battery_html.cpp @@ -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 battery_commands = { {"clearIsolation", "Clear isolation fault", "clear any active isolation fault?", [](Battery* b) { return b && b->supports_clear_isolation(); }, diff --git a/Software/src/devboard/webserver/advanced_battery_html.h b/Software/src/devboard/webserver/advanced_battery_html.h index 1bd47cf9..2ca88309 100644 --- a/Software/src/devboard/webserver/advanced_battery_html.h +++ b/Software/src/devboard/webserver/advanced_battery_html.h @@ -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;