diff --git a/platformio.ini b/platformio.ini index f48e0050..211a3e88 100644 --- a/platformio.ini +++ b/platformio.ini @@ -11,8 +11,8 @@ ; ---> SELECT TARGET PLATFORM HERE! <--- [platformio] -env_default = ebox -;env_default = generic +env_default = generic +;env_default = ebox ;env_default = heltec ;env_default = ttgov1 ;env_default = ttgov2 @@ -43,8 +43,8 @@ build_flags = ; ---> NOTE: For production run set DEBUG_LEVEL level to NONE! <--- ; otherwise device may leak RAM ; - -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_NONE -; -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_INFO +; -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_NONE + -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_INFO ; -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG ; -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_VERBOSE ; @@ -52,7 +52,7 @@ build_flags = -D_lmic_config_h_ -include "src/paxcounter.conf" -include "src/hal/${PIOENV}.h" -; -w + -w [env:ebox] platform = ${common_env_data.platform_espressif32} diff --git a/src/TTN/packed_decoder.js b/src/TTN/packed_decoder.js index 549a5ae7..6bf29f09 100644 --- a/src/TTN/packed_decoder.js +++ b/src/TTN/packed_decoder.js @@ -56,14 +56,6 @@ var bytesToInt = function (bytes) { return i; }; -var uptime = function (bytes) { - if (bytes.length !== uptime.BYTES) { - throw new Error('uptime must have exactly 8 bytes'); - } - return bytesToInt(bytes); -}; -uptime.BYTES = 4; - var uint8 = function (bytes) { if (bytes.length !== uint8.BYTES) { throw new Error('uint8 must have exactly 1 byte'); @@ -96,6 +88,14 @@ var latLng = function (bytes) { }; latLng.BYTES = 4; +var uptime = function (bytes) { + if (bytes.length !== uptime.BYTES) { + throw new Error('Uptime must have exactly 8 bytes'); + } + return bytesToInt(bytes); +}; +uptime.BYTES = 8; + var hdop = function (bytes) { if (bytes.length !== hdop.BYTES) { throw new Error('hdop must have exactly 2 bytes'); @@ -177,9 +177,10 @@ var decode = function (bytes, mask, names) { if (typeof module === 'object' && typeof module.exports !== 'undefined') { module.exports = { - uptime: uptime, uint8: uint8, uint16: uint16, + uint32: uint32, + uptime: uptime, temperature: temperature, humidity: humidity, latLng: latLng, diff --git a/src/paxcounter.conf b/src/paxcounter.conf index bcecc56d..7cf76677 100644 --- a/src/paxcounter.conf +++ b/src/paxcounter.conf @@ -9,7 +9,7 @@ // Payload send cycle and encoding #define SEND_SECS 30 // payload send cycle [seconds/2] -> 60 sec. -#define PAYLOAD_ENCODER 2 // payload encoder: 1=Plain, 2=Packed, 3=CayenneLPP dynamic, 4=CayenneLPP packed +#define PAYLOAD_ENCODER 1 // payload encoder: 1=Plain, 2=Packed, 3=CayenneLPP dynamic, 4=CayenneLPP packed // Set this to include BLE counting and vendor filter functions #define VENDORFILTER 1 // comment out if you want to count things, not people diff --git a/src/rcommand.cpp b/src/rcommand.cpp index f925f1da..60df3f4c 100644 --- a/src/rcommand.cpp +++ b/src/rcommand.cpp @@ -1,6 +1,3 @@ -// remote command interpreter, parses and executes commands with arguments in -// array - // Basic Config #include "globals.h" #include "rcommand.h" @@ -31,7 +28,7 @@ void set_reset(uint8_t val[]) { break; case 3: // reset send queues ESP_LOGI(TAG, "Remote command: flush send queue"); - sprintf(display_line6, "Flush queues"); + sprintf(display_line6, "Queue reset"); flushQueues(); break; default: