Initial changes for v2.3

This commit is contained in:
Gunnar Skjold
2023-11-16 18:21:56 +01:00
parent 8cada69aaf
commit ae82914795
121 changed files with 6175 additions and 3080 deletions

View File

@@ -1,3 +1,9 @@
/**
* @copyright Utilitech AS 2023
* License: Fair Source
*
*/
#include "HdlcParser.h"
#include "lwip/def.h"
#include "crc.h"
@@ -49,7 +55,10 @@ int8_t HDLCParser::parse(uint8_t *d, DataParserContext &ctx) {
ptr += 3;
// Exclude all of header and 3 byte footer
ctx.length -= ptr-d+3;
ctx.length -= ptr-d;
if(ctx.length > 1) {
ctx.length -= 3;
}
return ptr-d;
}
return DATA_PARSE_UNKNOWN_DATA;