Added calculated value for L2 current when missing from Aidon

This commit is contained in:
Gunnar Skjold 2020-02-25 14:08:04 +01:00
parent 9671e1eba3
commit 5b94d8ff61

View File

@ -167,6 +167,7 @@ void AmsData::extractFromAidon(HanReader& hanReader, int listSize) {
l1voltage = ((double) hanReader.getInt( (int)Aidon_List3PhaseIT::VoltageL1)) / 10;
l2voltage = ((double) hanReader.getInt( (int)Aidon_List3PhaseIT::VoltageL2)) / 10;
l3voltage = ((double) hanReader.getInt( (int)Aidon_List3PhaseIT::VoltageL3)) / 10;
l2current = ((activeImportPower * sqrt(3)) - (l1voltage * l1current) - (l3voltage * l3current)) / l2voltage;
threePhase = true;
break;
}