finishing new payload converter structure

This commit is contained in:
Klaus K Wilting 2018-06-16 19:54:48 +02:00
parent 7c03c22765
commit 509b8b6cd3
3 changed files with 10 additions and 12 deletions

View File

@ -46,12 +46,12 @@ extern TinyGPSPlus gps; // Make TinyGPS++ instance globally availabe
#endif #endif
// payload encoder // payload encoder
#if (PAYLOAD_ENCODER == 3) #if (PAYLOAD_ENCODER == 1)
// externe CayenneLPP payload; extern TTNplain payload;
#elif (PAYLOAD_ENCODER == 2) #elif (PAYLOAD_ENCODER == 2)
extern TTNserialized payload; extern TTNserialized payload;
#elif (PAYLOAD_ENCODER == 1) #elif (PAYLOAD_ENCODER == 3)
extern TTNplain payload; //extern CayenneLPP payload;
#else #else
#error "No valid payload converter defined" #error "No valid payload converter defined"
#endif #endif

View File

@ -70,19 +70,17 @@ portMUX_TYPE timerMux =
std::set<uint16_t> macs; // associative container holds total of unique MAC std::set<uint16_t> macs; // associative container holds total of unique MAC
// adress hashes (Wifi + BLE) // adress hashes (Wifi + BLE)
// select payload encoder // initialize payload encoder
#if (PAYLOAD_ENCODER == 3) #if (PAYLOAD_ENCODER == 1)
// CayenneLPP payload(PAYLOAD_BUFFER_SIZE); TTNplain payload(PAYLOAD_BUFFER_SIZE);
#elif (PAYLOAD_ENCODER == 2) #elif (PAYLOAD_ENCODER == 2)
TTNserialized payload(PAYLOAD_BUFFER_SIZE); TTNserialized payload(PAYLOAD_BUFFER_SIZE);
#elif (PAYLOAD_ENCODER == 1) #elif (PAYLOAD_ENCODER == 3)
TTNplain payload(PAYLOAD_BUFFER_SIZE); //CayenneLPP payload(PAYLOAD_BUFFER_SIZE);
#else #else
#error "No valid payload converter defined" #error "No valid payload converter defined"
#endif #endif
// TTNplain payload(PAYLOAD_BUFFER_SIZE);
// this variables will be changed in the ISR, and read in main loop // this variables will be changed in the ISR, and read in main loop
static volatile int ButtonPressedIRQ = 0, DisplayTimerIRQ = 0, static volatile int ButtonPressedIRQ = 0, DisplayTimerIRQ = 0,
ChannelTimerIRQ = 0; ChannelTimerIRQ = 0;

View File

@ -39,7 +39,7 @@
#define SEND_SECS 30 // [seconds/2] -> 60 sec. #define SEND_SECS 30 // [seconds/2] -> 60 sec.
#define MEM_LOW 2048 // [Bytes] low memory threshold triggering a send cycle #define MEM_LOW 2048 // [Bytes] low memory threshold triggering a send cycle
#define RETRANSMIT_RCMD 5 // [seconds] wait time before retransmitting rcommand results #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 #define PAYLOAD_BUFFER_SIZE 51 // maximum size of payload block per transmit
// Default LoRa Spreadfactor // Default LoRa Spreadfactor