#include "settings_html.h"
#include
#include "../../../src/communication/contactorcontrol/comm_contactorcontrol.h"
#include "../../charger/CHARGERS.h"
#include "../../communication/nvm/comm_nvm.h"
#include "../../datalayer/datalayer.h"
#include "../../include.h"
extern bool settingsUpdated;
#ifdef COMMON_IMAGE
String battery_options(BatteryType selected) {
String options;
auto batteries = supported_battery_types();
for (BatteryType type : batteries) {
auto name = name_for_type(type);
if (name != nullptr) {
options +=
("";
}
}
return options;
}
String inverter_options(InverterProtocolType selected) {
String options;
auto inverters = supported_inverter_protocols();
for (InverterProtocolType type : inverters) {
auto name = name_for_type(type);
if (name != nullptr) {
options +=
("";
}
}
return options;
}
String charger_options(ChargerType selected) {
String options;
auto chargers = supported_charger_types();
for (ChargerType type : chargers) {
auto name = name_for_type(type);
if (name != nullptr) {
options +=
("";
}
}
return options;
}
#endif
void render_checkbox(String& content, const char* label, bool enabled, const char* name) {
content += "";
content += "";
}
String settings_processor(const String& var) {
if (var == "X") {
String content = "";
//Page format
content += "";
content += "";
// Start a new block with a specific background color
content += "
";
content += "
SSID: " + String(ssid.c_str()) +
"
";
content +=
"
Password: ########
";
#ifdef COMMON_IMAGE
BatteryEmulatorSettingsStore settings;
// It's important that we read/write settings directly to settings store instead of the run-time values
// since the run-time values may have direct effect on operation.
content +=
"