mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-02-04 07:52:39 +00:00
Fixed red HAN after 49.7 days
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "IEC6205621.h"
|
||||
#include "Uptime.h"
|
||||
|
||||
IEC6205621::IEC6205621(const char* p, Timezone* tz) {
|
||||
if(strlen(p) < 16)
|
||||
@@ -6,7 +7,7 @@ IEC6205621::IEC6205621(const char* p, Timezone* tz) {
|
||||
|
||||
String payload(p+1);
|
||||
|
||||
lastUpdateMillis = millis();
|
||||
lastUpdateMillis = millis64();
|
||||
listId = payload.substring(payload.startsWith("/") ? 1 : 0, payload.indexOf("\n"));
|
||||
|
||||
if(listId.startsWith(F("ADN"))) {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "lwip/def.h"
|
||||
#include "Timezone.h"
|
||||
#include "ntohll.h"
|
||||
#include "Uptime.h"
|
||||
|
||||
IEC6205675::IEC6205675(const char* d, uint8_t useMeterType, MeterConfig* meterConfig, DataParserContext &ctx) {
|
||||
float val;
|
||||
@@ -127,7 +128,7 @@ IEC6205675::IEC6205675(const char* d, uint8_t useMeterType, MeterConfig* meterCo
|
||||
reactiveExportCounter = ntohl(data->dlu.data) / 1000.0;
|
||||
}
|
||||
|
||||
lastUpdateMillis = millis();
|
||||
lastUpdateMillis = millis64();
|
||||
} else if(listId.startsWith("ISK")) { // Iskra special case
|
||||
this->listId = listId;
|
||||
meterType = AmsTypeIskra;
|
||||
@@ -181,7 +182,7 @@ IEC6205675::IEC6205675(const char* d, uint8_t useMeterType, MeterConfig* meterCo
|
||||
data = getCosemDataAt(idx++, ((char *) (d)));
|
||||
l3activeExportPower = ntohl(data->dlu.data);
|
||||
|
||||
lastUpdateMillis = millis();
|
||||
lastUpdateMillis = millis64();
|
||||
} else if(data->base.length == 0x0C) {
|
||||
listType = 3;
|
||||
idx += 4;
|
||||
@@ -199,7 +200,7 @@ IEC6205675::IEC6205675(const char* d, uint8_t useMeterType, MeterConfig* meterCo
|
||||
data = getCosemDataAt(idx++, ((char *) (d)));
|
||||
reactiveExportCounter = ntohl(data->dlu.data) / 1000.0;
|
||||
|
||||
lastUpdateMillis = millis();
|
||||
lastUpdateMillis = millis64();
|
||||
}
|
||||
}
|
||||
} else if(useMeterType == AmsTypeKaifa && data->base.type == CosemTypeDLongUnsigned) {
|
||||
@@ -207,7 +208,7 @@ IEC6205675::IEC6205675(const char* d, uint8_t useMeterType, MeterConfig* meterCo
|
||||
listType = 1;
|
||||
meterType = AmsTypeKaifa;
|
||||
activeImportPower = ntohl(data->dlu.data);
|
||||
lastUpdateMillis = millis();
|
||||
lastUpdateMillis = millis64();
|
||||
}
|
||||
// Kaifa end
|
||||
} else {
|
||||
@@ -451,7 +452,7 @@ IEC6205675::IEC6205675(const char* d, uint8_t useMeterType, MeterConfig* meterCo
|
||||
}
|
||||
}
|
||||
|
||||
lastUpdateMillis = millis();
|
||||
lastUpdateMillis = millis64();
|
||||
}
|
||||
|
||||
if(meterConfig->wattageMultiplier > 0) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "LNG.h"
|
||||
#include "lwip/def.h"
|
||||
#include "ntohll.h"
|
||||
#include "Uptime.h"
|
||||
|
||||
LNG::LNG(const char* payload, uint8_t useMeterType, MeterConfig* meterConfig, DataParserContext &ctx, RemoteDebug* debugger) {
|
||||
LngHeader* h = (LngHeader*) payload;
|
||||
@@ -117,7 +118,7 @@ LNG::LNG(const char* payload, uint8_t useMeterType, MeterConfig* meterConfig, Da
|
||||
data += 3;
|
||||
}
|
||||
|
||||
lastUpdateMillis = millis();
|
||||
lastUpdateMillis = millis64();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "LNG2.h"
|
||||
#include "Uptime.h"
|
||||
|
||||
LNG2::LNG2(const char* payload, uint8_t useMeterType, MeterConfig* meterConfig, DataParserContext &ctx, RemoteDebug* debugger) {
|
||||
CosemBasic* h = (CosemBasic*) payload;
|
||||
@@ -26,7 +27,7 @@ LNG2::LNG2(const char* payload, uint8_t useMeterType, MeterConfig* meterConfig,
|
||||
this->meterId = String(str);
|
||||
}
|
||||
listType = 3;
|
||||
lastUpdateMillis = millis();
|
||||
lastUpdateMillis = millis64();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user