mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-04-29 05:16:03 +00:00
Fixed error
This commit is contained in:
@@ -801,7 +801,7 @@ bool readHanPort() {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
CosemDateTime timestamp = {0};
|
CosemDateTime timestamp = {0};
|
||||||
HDLCContext context;
|
HDLCContext context = {0,0,0};
|
||||||
AmsData data;
|
AmsData data;
|
||||||
if(currentMeterType == 1) { // DLMS
|
if(currentMeterType == 1) { // DLMS
|
||||||
int pos = HDLC_FRAME_INCOMPLETE;
|
int pos = HDLC_FRAME_INCOMPLETE;
|
||||||
@@ -827,7 +827,7 @@ bool readHanPort() {
|
|||||||
}
|
}
|
||||||
if(ma->append((uint8_t *) hanBuffer, len) < 0) {
|
if(ma->append((uint8_t *) hanBuffer, len) < 0) {
|
||||||
debugE("MBUS assembler failed");
|
debugE("MBUS assembler failed");
|
||||||
pos = 0;
|
len = 0;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(Debug.isActive(RemoteDebug::VERBOSE)) {
|
if(Debug.isActive(RemoteDebug::VERBOSE)) {
|
||||||
@@ -847,7 +847,7 @@ bool readHanPort() {
|
|||||||
pos = HDLC_validate((uint8_t *) hanBuffer, len, hc, ×tamp, &context);
|
pos = HDLC_validate((uint8_t *) hanBuffer, len, hc, ×tamp, &context);
|
||||||
} else {
|
} else {
|
||||||
debugE("MBUS assembler failed");
|
debugE("MBUS assembler failed");
|
||||||
pos = 0;
|
len = 0;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -861,7 +861,7 @@ bool readHanPort() {
|
|||||||
ga->init((uint8_t *) hanBuffer, &context);
|
ga->init((uint8_t *) hanBuffer, &context);
|
||||||
if(ga->append((uint8_t *) hanBuffer+context.apduStart, len, &Debug) < 0) {
|
if(ga->append((uint8_t *) hanBuffer+context.apduStart, len, &Debug) < 0) {
|
||||||
debugE("GBT assembler failed");
|
debugE("GBT assembler failed");
|
||||||
pos = 0;
|
len = 0;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(Debug.isActive(RemoteDebug::VERBOSE)) {
|
if(Debug.isActive(RemoteDebug::VERBOSE)) {
|
||||||
@@ -881,7 +881,7 @@ bool readHanPort() {
|
|||||||
pos = HDLC_validate((uint8_t *) hanBuffer, len, hc, ×tamp, &context);
|
pos = HDLC_validate((uint8_t *) hanBuffer, len, hc, ×tamp, &context);
|
||||||
} else {
|
} else {
|
||||||
debugE("GBT assembler failed");
|
debugE("GBT assembler failed");
|
||||||
pos = 0;
|
len = 0;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user