Indicator for estimated I2. Also fix on charts

This commit is contained in:
Gunnar Skjold
2023-12-04 11:59:18 +01:00
parent ddd08e25df
commit a30cd76354
11 changed files with 40 additions and 25 deletions

View File

@@ -102,6 +102,7 @@ IEC6205675::IEC6205675(const char* d, uint8_t useMeterType, MeterConfig* meterCo
l2voltage = sqrt(pow(l1voltage - l3voltage * cos(60 * (PI/180)), 2) + pow(l3voltage * sin(60 * (PI/180)),2));
if(l2voltage > 0) {
l2current = (((activeImportPower - activeExportPower) * sqrt(3)) - (l1voltage * l1current) - (l3voltage * l3current)) / l2voltage;
l2currentEstimated = true;
}
}
@@ -493,6 +494,7 @@ IEC6205675::IEC6205675(const char* d, uint8_t useMeterType, MeterConfig* meterCo
if(activeExportPower == 0.0) {
l2current = max((float) 0.0, l2current);
}
l2currentEstimated = true;
}
} else if(twoPhase && l1current > 0.0 && l2current > 0.0 && l3current > 0.0) {
l2voltage = sqrt(pow(l1voltage - l3voltage * cos(60.0 * (PI/180.0)), 2) + pow(l3voltage * sin(60.0 * (PI/180.0)),2));