File tree Expand file tree Collapse file tree 3 files changed +18
-1
lines changed
Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 88#include "Arduino.h"
99
1010//#define HANDLE_RPC_ERRORS
11+ //#define DEBUG
1112#include "rpc.h"
1213#include "transport.h"
1314#include "client.h"
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ class RPCClient {
7171 MsgPack::arr_size_t resp_size;
7272
7373 if (!unpacker.deserialize (resp_size, r_msg_type, r_msg_id)){
74- Serial.println (" malformed response" );
74+ Serial.println (" incomplete or malformed response" );
7575 continue ;
7676 };
7777
Original file line number Diff line number Diff line change 1919uint8_t raw_buffer [MAX_BUFFER_SIZE ] = {0 };
2020size_t raw_buffer_fill = 0 ;
2121
22+
23+ #ifdef DEBUG
24+
25+ void print_raw_buf (){
26+
27+ Serial .print ("RPC buffer content" );
28+ for (size_t i = 0 ; i < raw_buffer_fill ; i ++ ) {
29+ Serial .print (raw_buffer [i ]);
30+ Serial .print (" " );
31+ }
32+ Serial .println (" " );
33+
34+ }
35+
36+ #endif
37+
2238inline void flush_buffer (){
2339 raw_buffer_fill = 0 ;
2440}
You can’t perform that action at this time.
0 commit comments