mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-13 00:46:38 +02:00
fix setup for multiple inverters
This commit is contained in:
parent
35d8fdcab2
commit
f2a794d518
4 changed files with 31 additions and 3 deletions
|
@ -236,6 +236,12 @@ void web::showSave(AsyncWebServerRequest *request) {
|
|||
if(strlen(buf) == 0)
|
||||
memset(buf, 0, 20);
|
||||
iv->serial.u64 = mMain->Serial2u64(buf);
|
||||
switch(iv->serial.b[4]) {
|
||||
case 0x21: iv->type = INV_TYPE_1CH; iv->channels = 1; break;
|
||||
case 0x41: iv->type = INV_TYPE_2CH; iv->channels = 2; break;
|
||||
case 0x61: iv->type = INV_TYPE_4CH; iv->channels = 4; break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
// name
|
||||
request->arg("inv" + String(i) + "Name").toCharArray(iv->name, MAX_NAME_LENGTH);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue