diff --git a/.gitattributes b/.gitattributes index e50acf163..f055836c9 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,6 +2,7 @@ * text=auto # These are unit test files and should use crlf +regression/targets/* eol=crlf *.ASC text eol=crlf *.asc text eol=crlf *.txt text eol=crlf diff --git a/regression/targets/BESTUTMBIN.GPS.ABBREV_ASCII b/regression/targets/BESTUTMBIN.GPS.ABBREV_ASCII index df391a966..048be2054 100644 Binary files a/regression/targets/BESTUTMBIN.GPS.ABBREV_ASCII and b/regression/targets/BESTUTMBIN.GPS.ABBREV_ASCII differ diff --git a/regression/targets/BESTUTMBIN.GPS.ASCII b/regression/targets/BESTUTMBIN.GPS.ASCII index 4081a22fc..3d295b877 100644 Binary files a/regression/targets/BESTUTMBIN.GPS.ASCII and b/regression/targets/BESTUTMBIN.GPS.ASCII differ diff --git a/regression/targets/BESTUTMBIN.GPS.BINARY b/regression/targets/BESTUTMBIN.GPS.BINARY index 3856b74a1..4d6188967 100644 Binary files a/regression/targets/BESTUTMBIN.GPS.BINARY and b/regression/targets/BESTUTMBIN.GPS.BINARY differ diff --git a/regression/targets/BESTUTMBIN.GPS.FLATTENED_BINARY b/regression/targets/BESTUTMBIN.GPS.FLATTENED_BINARY index 7a59573cd..850735215 100644 Binary files a/regression/targets/BESTUTMBIN.GPS.FLATTENED_BINARY and b/regression/targets/BESTUTMBIN.GPS.FLATTENED_BINARY differ diff --git a/regression/targets/BESTUTMBIN.GPS.JSON b/regression/targets/BESTUTMBIN.GPS.JSON index a8dca6a01..8e379b5d3 100644 Binary files a/regression/targets/BESTUTMBIN.GPS.JSON and b/regression/targets/BESTUTMBIN.GPS.JSON differ diff --git a/src/decoders/oem/src/message_decoder.cpp b/src/decoders/oem/src/message_decoder.cpp index 4fdd56b7d..5a1836bf7 100644 --- a/src/decoders/oem/src/message_decoder.cpp +++ b/src/decoders/oem/src/message_decoder.cpp @@ -44,7 +44,13 @@ void MessageDecoder::InitOemFieldMaps() // ========================================================= // ASCII Field Mapping // ========================================================= - asciiFieldMap[CalculateBlockCrc32("c")] = SimpleAsciiMapEntry(); + asciiFieldMap[CalculateBlockCrc32("c")] = [](std::vector& vIntermediateFormat_, const BaseField* pstMessageDataType_, + const char** ppcToken_, [[maybe_unused]] const size_t tokenLength_, + [[maybe_unused]] JsonReader* pclMsgDb_) { + // TODO: check that the character is printable + // if (!isprint(**ppcToken_)) { throw ... } + vIntermediateFormat_.emplace_back(static_cast(**ppcToken_), pstMessageDataType_); + }; asciiFieldMap[CalculateBlockCrc32("k")] = SimpleAsciiMapEntry(); asciiFieldMap[CalculateBlockCrc32("lk")] = SimpleAsciiMapEntry();