From 095334a2a600cb2a690c31cb099c17b8f68d6dc4 Mon Sep 17 00:00:00 2001 From: Klaus K Wilting Date: Sun, 17 Jun 2018 00:05:26 +0200 Subject: [PATCH] new payload encoder (experimental) --- src/paxcounter.conf | 4 ++-- src/payload.cpp | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/paxcounter.conf b/src/paxcounter.conf index b1c31537..9a122198 100644 --- a/src/paxcounter.conf +++ b/src/paxcounter.conf @@ -41,9 +41,9 @@ #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 3 // select payload encoder: 1 = Plain [default], 2 = Lora-serialized, 3 = CayenneLPP +#define PAYLOAD_ENCODER 1 // select payload encoder: 1 = Plain [default], 2 = Lora-serialized, 3 = CayenneLPP #define PAYLOAD_BUFFER_SIZE 51 // maximum size of payload block per transmit -#define CAYENNE_LPP 1 // uncomment this, if you need Cayenne LPP payload encoding +//#define CAYENNE_LPP 1 // uncomment this, if you need Cayenne LPP payload encoding // Default LoRa Spreadfactor #define LORASFDEFAULT 9 // 7 ... 12 SF, according to LoRaWAN specs diff --git a/src/payload.cpp b/src/payload.cpp index f1a9df55..608bc3db 100644 --- a/src/payload.cpp +++ b/src/payload.cpp @@ -81,12 +81,11 @@ void TTNplain::addStatus(uint16_t voltage, uint64_t uptime, float cputemp) { TTNserialized::TTNserialized(uint8_t size) { buffer = (uint8_t *)malloc(size); - // LoraEncoder message(buffer); } TTNserialized::~TTNserialized(void) { free(buffer); } -void TTNserialized::reset(void) { delete buffer; } +void TTNserialized::reset(void) { } uint8_t TTNserialized::getSize(void) { return sizeof(buffer); }