diff --git a/library.json b/library.json index 98abd73..9666cda 100644 --- a/library.json +++ b/library.json @@ -11,7 +11,7 @@ "url": "https://github.com/eigen-value", "maintainer": true }, - "version": "0.2.0", + "version": "0.2.1", "license": "MPL2.0", "frameworks": "arduino", "platforms": "*", diff --git a/library.properties b/library.properties index 307032e..de0055a 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Arduino_RPClite -version=0.2.0 +version=0.2.1 author=Arduino, Lucio Rossi (eigen-value) maintainer=Arduino, Lucio Rossi (eigen-value) sentence=A MessagePack RPC library for Arduino diff --git a/src/decoder.h b/src/decoder.h index c969f50..d0716ca 100644 --- a/src/decoder.h +++ b/src/decoder.h @@ -6,12 +6,14 @@ This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ #ifndef RPCLITE_DECODER_H #define RPCLITE_DECODER_H +// MsgPack log level +#define DEBUGLOG_DEFAULT_LOG_LEVEL_WARN + #include "MsgPack.h" #include "transport.h" #include "rpclite_utils.h" @@ -206,7 +208,7 @@ class RpcDecoder { size_t bytes_checked = 0; size_t container_size; - int type; + int type = NO_MSG; MsgPack::Unpacker unpacker; while (bytes_checked + offset < _bytes_stored){ @@ -343,4 +345,4 @@ class RpcDecoder { }; -#endif \ No newline at end of file +#endif diff --git a/src/error.h b/src/error.h index c98cb7d..d177c52 100644 --- a/src/error.h +++ b/src/error.h @@ -14,6 +14,9 @@ #include +// MsgPack log level +#define DEBUGLOG_DEFAULT_LOG_LEVEL_WARN + #include "MsgPack.h" #define NO_ERR 0x00 @@ -43,4 +46,4 @@ struct RpcError { MSGPACK_DEFINE(code, traceback); // -> [code, traceback] }; -#endif \ No newline at end of file +#endif