mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-03 09:49:32 +02:00
Battery and inverter can bus can be selected in the UI
This commit is contained in:
parent
c63ae6eb23
commit
e3de4e546c
29 changed files with 224 additions and 65 deletions
|
@ -417,12 +417,30 @@ void init_webserver() {
|
|||
} else if (p->name() == "battery") {
|
||||
auto type = static_cast<BatteryType>(atoi(p->value().c_str()));
|
||||
settings.saveUInt("BATTTYPE", (int)type);
|
||||
} else if (p->name() == "BATTCHEM") {
|
||||
auto type = static_cast<battery_chemistry_enum>(atoi(p->value().c_str()));
|
||||
settings.saveUInt("BATTCHEM", (int)type);
|
||||
} else if (p->name() == "charger") {
|
||||
auto type = static_cast<ChargerType>(atoi(p->value().c_str()));
|
||||
settings.saveUInt("CHGTYPE", (int)type);
|
||||
} else if (p->name() == "EQSTOP") {
|
||||
auto type = static_cast<STOP_BUTTON_BEHAVIOR>(atoi(p->value().c_str()));
|
||||
settings.saveUInt("EQSTOP", (int)type);
|
||||
} else if (p->name() == "BATTCOMM") {
|
||||
auto type = static_cast<comm_interface>(atoi(p->value().c_str()));
|
||||
settings.saveUInt("BATTCOMM", (int)type);
|
||||
} else if (p->name() == "BATT2COMM") {
|
||||
auto type = static_cast<comm_interface>(atoi(p->value().c_str()));
|
||||
settings.saveUInt("BATT2COMM", (int)type);
|
||||
} else if (p->name() == "INVCOMM") {
|
||||
auto type = static_cast<comm_interface>(atoi(p->value().c_str()));
|
||||
settings.saveUInt("INVCOMM", (int)type);
|
||||
} else if (p->name() == "CHGCOMM") {
|
||||
auto type = static_cast<comm_interface>(atoi(p->value().c_str()));
|
||||
settings.saveUInt("CHGCOMM", (int)type);
|
||||
} else if (p->name() == "SHUNTCOMM") {
|
||||
auto type = static_cast<comm_interface>(atoi(p->value().c_str()));
|
||||
settings.saveUInt("SHUNTCOMM", (int)type);
|
||||
}
|
||||
|
||||
for (auto& boolSetting : boolSettings) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue