mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-01-15 08:22:10 +00:00
Added one-phase meter
This commit is contained in:
parent
959283aa09
commit
dce4db7dd6
@ -60,20 +60,20 @@ bool HanReader::read(byte data)
|
||||
|
||||
void HanReader::debugPrint(byte *buffer, int start, int length)
|
||||
{
|
||||
for (int i = start; i < start + length; i++)
|
||||
{
|
||||
if (buffer[i] < 0x10)
|
||||
debug->print("0");
|
||||
debug->print(buffer[i], HEX);
|
||||
debug->print(" ");
|
||||
if ((i - start + 1) % 16 == 0)
|
||||
debug->println("");
|
||||
else if ((i - start + 1) % 4 == 0)
|
||||
debug->print(" ");
|
||||
|
||||
yield(); // Let other get some resources too
|
||||
}
|
||||
debug->println("");
|
||||
for (int i = start; i < start + length; i++)
|
||||
{
|
||||
if (buffer[i] < 0x10)
|
||||
debug->print("0");
|
||||
debug->print(buffer[i], HEX);
|
||||
debug->print(" ");
|
||||
if ((i - start + 1) % 16 == 0)
|
||||
debug->println("");
|
||||
else if ((i - start + 1) % 4 == 0)
|
||||
debug->print(" ");
|
||||
|
||||
yield(); // Let other get some resources too
|
||||
}
|
||||
debug->println("");
|
||||
}
|
||||
|
||||
bool HanReader::read()
|
||||
|
||||
@ -7,7 +7,9 @@
|
||||
enum class Kamstrup
|
||||
{
|
||||
List1 = 0x19,
|
||||
List2 = 0x23
|
||||
List2 = 0x23,
|
||||
List3 = 0x11,
|
||||
List4 = 0x1B
|
||||
};
|
||||
|
||||
enum class Kamstrup_List1
|
||||
@ -81,6 +83,59 @@ enum class Kamstrup_List2
|
||||
CumulativeReactiveExportEnergy
|
||||
};
|
||||
|
||||
enum class Kamstrup_List3
|
||||
{
|
||||
ListSize,
|
||||
ListVersionIdentifier,
|
||||
MeterID_OBIS,
|
||||
MeterID,
|
||||
MeterType_OBIS,
|
||||
MeterType,
|
||||
ActiveImportPower_OBIS,
|
||||
ActiveImportPower,
|
||||
ActiveExportPower_OBIS,
|
||||
ActiveExportPower,
|
||||
ReactiveImportPower_OBIS,
|
||||
ReactiveImportPower,
|
||||
ReactiveExportPower_OBIS,
|
||||
ReactiveExportPower,
|
||||
CurrentL1_OBIS,
|
||||
CurrentL1,
|
||||
VoltageL1_OBIS,
|
||||
VoltageL1
|
||||
};
|
||||
|
||||
enum class Kamstrup_List4
|
||||
{
|
||||
ListSize,
|
||||
ListVersionIdentifier,
|
||||
MeterID_OBIS,
|
||||
MeterID,
|
||||
MeterType_OBIS,
|
||||
MeterType,
|
||||
ActiveImportPower_OBIS,
|
||||
ActiveImportPower,
|
||||
ActiveExportPower_OBIS,
|
||||
ActiveExportPower,
|
||||
ReactiveImportPower_OBIS,
|
||||
ReactiveImportPower,
|
||||
ReactiveExportPower_OBIS,
|
||||
ReactiveExportPower,
|
||||
CurrentL1_OBIS,
|
||||
CurrentL1,
|
||||
VoltageL1_OBIS,
|
||||
VoltageL1,
|
||||
MeterClock_OBIS,
|
||||
MeterClock,
|
||||
CumulativeActiveImportEnergy_OBIS,
|
||||
CumulativeActiveImportEnergy,
|
||||
CumulativeActiveExportEnergy_OBIS,
|
||||
CumulativeActiveExportEnergy,
|
||||
CumulativeReactiveImportEnergy_OBIS,
|
||||
CumulativeReactiveImportEnergy,
|
||||
CumulativeReactiveExportEnergy_OBIS,
|
||||
CumulativeReactiveExportEnergy
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user