Added List2 for 1 phase meters. Will add List3 when List2 is confirmed

This commit is contained in:
Gunnar Skjold
2019-04-04 12:00:59 +02:00
parent 61603f3d73
commit 29368b35af
2 changed files with 62 additions and 1 deletions

View File

@@ -184,7 +184,7 @@ void readHanPort()
void readHanPort_Aidon(int listSize)
{
if (listSize == (int)Aidon::List1 || listSize == (int)Aidon::List2 || listSize == (int)Aidon::List3)
if (listSize == (int)Aidon::List1 || listSize == (int)Aidon::List2 || listSize == (int)Aidon::List3 || listSize == (int)Aidon::List2_p1 ||)
{
if (listSize == (int)Aidon::List2)
{
@@ -235,6 +235,16 @@ void readHanPort_Aidon(int listSize)
data["U2"] = ((double) hanReader.getInt((int)Aidon_List2::VoltageL2)) / 10;
data["U3"] = ((double) hanReader.getInt((int)Aidon_List2::VoltageL3)) / 10;
}
else if (listSize == (int)Aidon::List2_p1)
{
data["lv"] = hanReader.getString((int)Aidon_List2_p1::ListVersionIdentifier);
data["id"] = hanReader.getString((int)Aidon_List2_p1::MeterID);
data["type"] = hanReader.getString((int)Aidon_List2_p1::MeterType);
data["P"] = hanReader.getInt((int)Aidon_List2_p1::ActiveImportPower);
data["Q"] = hanReader.getInt((int)Aidon_List2_p1::ReactiveExportPower);
data["I1"] = ((double) hanReader.getInt((int)Aidon_List2_p1::Current)) / 10;
data["U1"] = ((double) hanReader.getInt((int)Aidon_List2_p1::Voltage)) / 10;
}
else if (listSize == (int)Aidon::List3)
{
data["lv"] = hanReader.getString((int)Aidon_List3::ListVersionIdentifier);