mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-03 09:49:32 +02:00
Make new voltage limit settings actually save
This commit is contained in:
parent
0e871e477a
commit
2a8f8713e7
1 changed files with 12 additions and 0 deletions
|
@ -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);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue