File tree Expand file tree Collapse file tree 4 files changed +5
-6
lines changed
Expand file tree Collapse file tree 4 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 1414
1515#include "Arduino.h"
1616
17+ #define DECODER_BUFFER_SIZE 1024
1718//#define HANDLE_RPC_ERRORS
1819#include "transport.h"
1920#include "client.h"
Original file line number Diff line number Diff line change 1919using namespace RpcUtils ::detail;
2020
2121#define MIN_RPC_BYTES 4
22-
23- #define MAX_BUFFER_SIZE 1024
2422#define CHUNK_SIZE 32
2523
26- template <size_t BufferSize = MAX_BUFFER_SIZE >
24+ template <size_t BufferSize = DECODER_BUFFER_SIZE >
2725class RpcDecoder {
2826
2927public:
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ class RpcDecoderManager {
5151 struct DecoderStorage {
5252 union {
5353 RpcDecoder<> instance;
54- uint8_t raw[sizeof (RpcDecoder<>)];
54+ uint8_t raw[sizeof (RpcDecoder<>)]{} ;
5555 };
5656
5757 DecoderStorage () {}
Original file line number Diff line number Diff line change 1212#ifndef RPCLITE_REQUEST_H
1313#define RPCLITE_REQUEST_H
1414
15- #define DEFAULT_RPC_BUFFER_SIZE 256
15+ #define DEFAULT_RPC_BUFFER_SIZE (DECODER_BUFFER_SIZE / 4 )
1616
1717
1818#include " rpclite_utils.h"
@@ -21,7 +21,7 @@ template<size_t BufferSize = DEFAULT_RPC_BUFFER_SIZE>
2121class RPCRequest {
2222
2323public:
24- uint8_t buffer[BufferSize] = {};
24+ uint8_t buffer[BufferSize]{};
2525 size_t size = 0 ;
2626 int type = NO_MSG;
2727 uint32_t msg_id = 0 ;
You can’t perform that action at this time.
0 commit comments