mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-13 00:46:38 +02:00
Patch no_eeprom_pl
This commit is contained in:
parent
f53933b473
commit
7c7a7d25b8
8 changed files with 25 additions and 92 deletions
|
@ -237,31 +237,6 @@ void web::showSave(AsyncWebServerRequest *request) {
|
|||
memset(buf, 0, 20);
|
||||
iv->serial.u64 = mMain->Serial2u64(buf);
|
||||
|
||||
// active power limit
|
||||
uint16_t actPwrLimit = request->arg("inv" + String(i) + "ActivePowerLimit").toInt();
|
||||
uint16_t actPwrLimitControl = request->arg("inv" + String(i) + "PowerLimitControl").toInt();
|
||||
if(NoPowerLimit != actPwrLimitControl) {
|
||||
if (actPwrLimit != 0xffff && actPwrLimit > 0){
|
||||
iv->powerLimit[0] = actPwrLimit;
|
||||
iv->powerLimit[1] = actPwrLimitControl;
|
||||
iv->devControlCmd = ActivePowerContr;
|
||||
iv->devControlRequest = true;
|
||||
if ((iv->powerLimit[1] & 0x0001) == 0x0001)
|
||||
DPRINTLN(DBG_INFO, F("Power limit for inverter ") + String(iv->id) + F(" set to ") + String(iv->powerLimit[0]) + F("%") );
|
||||
else {
|
||||
DPRINTLN(DBG_INFO, F("Power limit for inverter ") + String(iv->id) + F(" set to ") + String(iv->powerLimit[0]) + F("W") );
|
||||
DPRINTLN(DBG_INFO, F("Power Limit Control Setting ") + String(iv->powerLimit[1]));
|
||||
}
|
||||
}
|
||||
if (actPwrLimit == 0xffff) { // set to 100%
|
||||
iv->powerLimit[0] = 100;
|
||||
iv->powerLimit[1] = RelativPersistent;
|
||||
iv->devControlCmd = ActivePowerContr;
|
||||
iv->devControlRequest = true;
|
||||
DPRINTLN(DBG_INFO, F("Power limit for inverter ") + String(iv->id) + F(" set to unlimted"));
|
||||
}
|
||||
}
|
||||
|
||||
// name
|
||||
request->arg("inv" + String(i) + "Name").toCharArray(iv->name, MAX_NAME_LENGTH);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue