mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-04-26 12:17:56 +00:00
Initialize all meter data to 0. Removed calculations for i2
This commit is contained in:
BIN
doc/Aidon-HAN-Interface-Description-v11A-ID-34331.pdf
Normal file
BIN
doc/Aidon-HAN-Interface-Description-v11A-ID-34331.pdf
Normal file
Binary file not shown.
@@ -163,11 +163,12 @@ void AmsData::extractFromAidon(HanReader& hanReader, int listSize) {
|
|||||||
activeExportPower = hanReader.getInt( (int)Aidon_List3PhaseIT::ActiveExportPower);
|
activeExportPower = hanReader.getInt( (int)Aidon_List3PhaseIT::ActiveExportPower);
|
||||||
reactiveExportPower = hanReader.getInt( (int)Aidon_List3PhaseIT::ReactiveExportPower);
|
reactiveExportPower = hanReader.getInt( (int)Aidon_List3PhaseIT::ReactiveExportPower);
|
||||||
l1current = ((double) hanReader.getInt( (int)Aidon_List3PhaseIT::CurrentL1)) / 10;
|
l1current = ((double) hanReader.getInt( (int)Aidon_List3PhaseIT::CurrentL1)) / 10;
|
||||||
|
l2current = 0;
|
||||||
l3current = ((double) hanReader.getInt( (int)Aidon_List3PhaseIT::CurrentL3)) / 10;
|
l3current = ((double) hanReader.getInt( (int)Aidon_List3PhaseIT::CurrentL3)) / 10;
|
||||||
l1voltage = ((double) hanReader.getInt( (int)Aidon_List3PhaseIT::VoltageL1)) / 10;
|
l1voltage = ((double) hanReader.getInt( (int)Aidon_List3PhaseIT::VoltageL1)) / 10;
|
||||||
l2voltage = ((double) hanReader.getInt( (int)Aidon_List3PhaseIT::VoltageL2)) / 10;
|
l2voltage = ((double) hanReader.getInt( (int)Aidon_List3PhaseIT::VoltageL2)) / 10;
|
||||||
l3voltage = ((double) hanReader.getInt( (int)Aidon_List3PhaseIT::VoltageL3)) / 10;
|
l3voltage = ((double) hanReader.getInt( (int)Aidon_List3PhaseIT::VoltageL3)) / 10;
|
||||||
l2current = ((activeImportPower * sqrt(3)) - (l1voltage * l1current) - (l3voltage * l3current)) / l2voltage;
|
//l2current = ((activeImportPower * sqrt(3)) - (l1voltage * l1current) - (l3voltage * l3current)) / l2voltage;
|
||||||
threePhase = true;
|
threePhase = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,15 +48,15 @@ public:
|
|||||||
bool isThreePhase();
|
bool isThreePhase();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
unsigned long lastUpdateMillis;
|
unsigned long lastUpdateMillis = 0;
|
||||||
int listType;
|
int listType = 0;
|
||||||
unsigned long packageTimestamp;
|
unsigned long packageTimestamp = 0;
|
||||||
String listId, meterId, meterType;
|
String listId, meterId, meterType;
|
||||||
unsigned long meterTimestamp;
|
unsigned long meterTimestamp = 0;
|
||||||
int activeImportPower, reactiveImportPower, activeExportPower, reactiveExportPower;
|
int activeImportPower = 0, reactiveImportPower = 0, activeExportPower = 0, reactiveExportPower = 0;
|
||||||
double l1voltage, l2voltage, l3voltage, l1current, l2current, l3current;
|
double l1voltage = 0, l2voltage = 0, l3voltage = 0, l1current = 0, l2current = 0, l3current = 0;
|
||||||
double activeImportCounter, reactiveImportCounter, activeExportCounter, reactiveExportCounter;
|
double activeImportCounter = 0, reactiveImportCounter = 0, activeExportCounter = 0, reactiveExportCounter = 0;
|
||||||
bool threePhase;
|
bool threePhase = false;
|
||||||
|
|
||||||
void extractFromKaifa(HanReader& hanReader, int listSize);
|
void extractFromKaifa(HanReader& hanReader, int listSize);
|
||||||
void extractFromAidon(HanReader& hanReader, int listSize);
|
void extractFromAidon(HanReader& hanReader, int listSize);
|
||||||
|
|||||||
Reference in New Issue
Block a user