bugfix payload encoder (txpower was missing)

This commit is contained in:
Klaus K Wilting committed 2018-07-15 19:41:22 +02:00
1 parent 477b6bd749
commit d55899a83f
6 files changed
+38 -58

No files matched your search

+1 -1
View File
@@ -24,7 +24,7 @@ function Decoder(bytes, port) {
if (port === 3) {
// device config data
return decode(bytes, [uint8, uint16, uint8, uint8, uint8, uint8, bitmap], ['lorasf', 'rssilimit', 'sendcycle', 'wifichancycle', 'blescantime', 'rgblum', 'flags']);
return decode(bytes, [uint8, uint8, uint16, uint8, uint8, uint8, uint8, bitmap], ['lorasf', 'txpower', 'rssilimit', 'sendcycle', 'wifichancycle', 'blescantime', 'rgblum', 'flags']);
}
if (port === 4) {
+5 -5
View File
@@ -1,5 +1,6 @@
/*
ESP32-Paxcounter
//////////////////////// ESP32-Paxcounter \\\\\\\\\\\\\\\\\\\\\\\\\\
Copyright 2018 Oliver Brandmueller <ob@sysadm.in>
Copyright 2018 Klaus Wilting <verkehrsrot@arcor.de>
@@ -28,11 +29,10 @@ licenses. Refer to LICENSE.txt file in repository for more details.
// Initialize global variables
configData_t cfg; // struct holds current device configuration
char display_line6[16], display_line7[16]; // display buffers
uint64_t uptimecounter = 0; // timer global for uptime counter
uint8_t DisplayState = 0; // globals for state machine
uint8_t DisplayState = 0, channel = 0; // globals for state machine
uint16_t macs_total = 0, macs_wifi = 0,
macs_ble = 0; // MAC counters globals for display
uint8_t channel = 0; // wifi channel rotation counter global for display
macs_ble = 0; // MAC counters globals for display
uint64_t uptimecounter = 0; // timer global for uptime counter
hw_timer_t *channelSwitch = NULL, *displaytimer = NULL,
*sendCycle = NULL; // configure hardware timer for cyclic tasks
-2
View File
@@ -39,8 +39,6 @@
#define PROGVERSION "1.3.91" // use max 10 chars here!
#define PROGNAME "PAXCNT"
//--- Declarations ---
// Struct holding devices's runtime configuration
typedef struct {
uint8_t lorasf; // 7-12, lora spreadfactor
+2
View File
@@ -44,6 +44,7 @@ void TTNplain::addGPS(gpsStatus_t value) {
void TTNplain::addConfig(configData_t value) {
buffer[cursor++] = value.lorasf;
buffer[cursor++] = value.txpower;
buffer[cursor++] = value.adrmode;
buffer[cursor++] = value.screensaver;
buffer[cursor++] = value.screenon;
@@ -112,6 +113,7 @@ void TTNpacked::addGPS(gpsStatus_t value) {
void TTNpacked::addConfig(configData_t value) {
writeUint8(value.lorasf);
writeUint8(value.txpower);
writeUint16(value.rssilimit);
writeUint8(value.sendcycle);
writeUint8(value.wifichancycle);