Fix: Wrong detection of HM-300 inverters
Was introduced in v23.8.1; Fixes #1198
This commit is contained in:
parent
77528f6e6a
commit
686112e4ee
@ -210,15 +210,19 @@ uint8_t DevInfoParser::getDevIdx()
|
||||
&& devInfo[pos].hwPart[2] == _payloadDevInfoSimple[4]
|
||||
&& devInfo[pos].hwPart[3] == _payloadDevInfoSimple[5]) {
|
||||
ret = pos;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Then only for 3 bytes
|
||||
// Then only for 3 bytes but only if not already found
|
||||
if (ret == 0xff) {
|
||||
for (pos = 0; pos < sizeof(devInfo) / sizeof(devInfo_t); pos++) {
|
||||
if (devInfo[pos].hwPart[0] == _payloadDevInfoSimple[2]
|
||||
&& devInfo[pos].hwPart[1] == _payloadDevInfoSimple[3]
|
||||
&& devInfo[pos].hwPart[2] == _payloadDevInfoSimple[4]) {
|
||||
ret = pos;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user