mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-02-15 12:27:50 +00:00
Fixed debug on HAN error
This commit is contained in:
@@ -142,8 +142,12 @@ bool PassiveMeterCommunicator::loop() {
|
||||
printHanReadError(pos);
|
||||
len += hanSerial->readBytes(hanBuffer+len, hanBufferSize-len);
|
||||
if(pt != NULL) {
|
||||
pt->publishBytes(hanBuffer+pos, len);
|
||||
pt->publishBytes(hanBuffer, len);
|
||||
}
|
||||
if(debugger->isActive(RemoteDebug::VERBOSE)) {
|
||||
debugger->printf_P(PSTR(" payload:\n"));
|
||||
debugPrint(hanBuffer, 0, len);
|
||||
}
|
||||
while(hanSerial->available()) hanSerial->read(); // Make sure it is all empty, in case we overflowed buffer above
|
||||
len = 0;
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user