added first DLE unit tests

This commit is contained in:
2021-08-18 18:03:38 +02:00
parent 026f7f00de
commit 57b13731e0
3 changed files with 64 additions and 1 deletions

View File

@ -41,7 +41,7 @@ ReturnValue_t DleEncoder::encode(const uint8_t* sourceStream,
ReturnValue_t DleEncoder::encodeStreamEscaped(const uint8_t *sourceStream, size_t sourceLen,
uint8_t *destStream, size_t maxDestLen, size_t *encodedLen,
bool addStxEtx) {
size_t encodedIndex = 2;
size_t encodedIndex = 1;
size_t sourceIndex = 0;
uint8_t nextByte = 0;
while (encodedIndex < maxDestLen and sourceIndex < sourceLen) {