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
// 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

View File

@ -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;

View File

@ -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