[Luxtronik] Fix possible out ouf bound error for older heatpumps (#11318)
* [Luxtronik] Fix possible out ouf bound error for older heatpumps Signed-off-by: Stefan Giehl <stefangiehl@gmail.com> * fix typo Signed-off-by: Stefan Giehl <stefangiehl@gmail.com>
This commit is contained in:
parent
b35c00c752
commit
ff272bc828
|
@ -71,7 +71,7 @@ public class HeatpumpConnector {
|
||||||
// the thermal energies can be unreasonably high in some cases, probably due to a sign bug in the firmware
|
// the thermal energies can be unreasonably high in some cases, probably due to a sign bug in the firmware
|
||||||
// trying to correct this issue here
|
// trying to correct this issue here
|
||||||
for (int i = 151; i <= 154; i++) {
|
for (int i = 151; i <= 154; i++) {
|
||||||
if (heatpumpValues[i] >= 214748364) {
|
if (heatpumpValues.length > i && heatpumpValues[i] >= 214748364) {
|
||||||
heatpumpValues[i] -= 214748364;
|
heatpumpValues[i] -= 214748364;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue