Make new voltage limit settings actually save

This commit is contained in:
Jonny 2025-08-16 10:08:07 +01:00
parent 0e871e477a
commit 2a8f8713e7

View file

@ -445,6 +445,18 @@ void init_webserver() {
} else if (p->name() == "BATTCOMM") { } else if (p->name() == "BATTCOMM") {
auto type = static_cast<comm_interface>(atoi(p->value().c_str())); auto type = static_cast<comm_interface>(atoi(p->value().c_str()));
settings.saveUInt("BATTCOMM", (int)type); settings.saveUInt("BATTCOMM", (int)type);
} else if (p->name() == "BATTPVMAX") {
auto type = p->value().toFloat() * 10.0;
settings.saveUInt("BATTPVMAX", (int)type);
} else if (p->name() == "BATTPVMIN") {
auto type = p->value().toFloat() * 10.0;
settings.saveUInt("BATTPVMIN", (int)type);
} else if (p->name() == "BATTCVMAX") {
auto type = atoi(p->value().c_str());
settings.saveUInt("BATTCVMAX", type);
} else if (p->name() == "BATTCVMIN") {
auto type = atoi(p->value().c_str());
settings.saveUInt("BATTCVMIN", type);
} else if (p->name() == "charger") { } else if (p->name() == "charger") {
auto type = static_cast<ChargerType>(atoi(p->value().c_str())); auto type = static_cast<ChargerType>(atoi(p->value().c_str()));
settings.saveUInt("CHGTYPE", (int)type); settings.saveUInt("CHGTYPE", (int)type);