finishing new payload converter structure
This commit is contained in:
parent
7c03c22765
commit
509b8b6cd3
@ -46,12 +46,12 @@ extern TinyGPSPlus gps; // Make TinyGPS++ instance globally availabe
|
||||
#endif
|
||||
|
||||
// payload encoder
|
||||
#if (PAYLOAD_ENCODER == 3)
|
||||
// externe CayenneLPP payload;
|
||||
#if (PAYLOAD_ENCODER == 1)
|
||||
extern TTNplain payload;
|
||||
#elif (PAYLOAD_ENCODER == 2)
|
||||
extern TTNserialized payload;
|
||||
#elif (PAYLOAD_ENCODER == 1)
|
||||
extern TTNplain payload;
|
||||
#elif (PAYLOAD_ENCODER == 3)
|
||||
//extern CayenneLPP payload;
|
||||
#else
|
||||
#error "No valid payload converter defined"
|
||||
#endif
|
12
src/main.cpp
12
src/main.cpp
@ -70,19 +70,17 @@ portMUX_TYPE timerMux =
|
||||
std::set<uint16_t> macs; // associative container holds total of unique MAC
|
||||
// adress hashes (Wifi + BLE)
|
||||
|
||||
// select payload encoder
|
||||
#if (PAYLOAD_ENCODER == 3)
|
||||
// CayenneLPP payload(PAYLOAD_BUFFER_SIZE);
|
||||
// initialize payload encoder
|
||||
#if (PAYLOAD_ENCODER == 1)
|
||||
TTNplain payload(PAYLOAD_BUFFER_SIZE);
|
||||
#elif (PAYLOAD_ENCODER == 2)
|
||||
TTNserialized payload(PAYLOAD_BUFFER_SIZE);
|
||||
#elif (PAYLOAD_ENCODER == 1)
|
||||
TTNplain payload(PAYLOAD_BUFFER_SIZE);
|
||||
#elif (PAYLOAD_ENCODER == 3)
|
||||
//CayenneLPP payload(PAYLOAD_BUFFER_SIZE);
|
||||
#else
|
||||
#error "No valid payload converter defined"
|
||||
#endif
|
||||
|
||||
// TTNplain payload(PAYLOAD_BUFFER_SIZE);
|
||||
|
||||
// this variables will be changed in the ISR, and read in main loop
|
||||
static volatile int ButtonPressedIRQ = 0, DisplayTimerIRQ = 0,
|
||||
ChannelTimerIRQ = 0;
|
||||
|
@ -39,7 +39,7 @@
|
||||
#define SEND_SECS 30 // [seconds/2] -> 60 sec.
|
||||
#define MEM_LOW 2048 // [Bytes] low memory threshold triggering a send cycle
|
||||
#define RETRANSMIT_RCMD 5 // [seconds] wait time before retransmitting rcommand results
|
||||
#define PAYLOAD_ENCODER 2 // select payload encoder: 1 = Plain [default], 2 = Lora-hserialized, 3 = Cayenne LPP
|
||||
#define PAYLOAD_ENCODER 1 // select payload encoder: 1 = Plain [default], 2 = Lora-hserialized, 3 = Cayenne LPP
|
||||
#define PAYLOAD_BUFFER_SIZE 51 // maximum size of payload block per transmit
|
||||
|
||||
// Default LoRa Spreadfactor
|
||||
|
Loading…
Reference in New Issue
Block a user