From be883d577e9e3b503277a6b32c2a234650c36322 Mon Sep 17 00:00:00 2001 From: cyberman54 Date: Sun, 27 May 2018 16:52:13 +0200 Subject: [PATCH 1/2] v1.3.6 release --- src/main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.h b/src/main.h index 71220c44..7db20f2b 100644 --- a/src/main.h +++ b/src/main.h @@ -1,6 +1,6 @@ // program version - note: increment version after modifications to configData_t struct!! -#define PROGVERSION "1.3.51" // use max 10 chars here! +#define PROGVERSION "1.3.6" // use max 10 chars here! #define PROGNAME "PAXCNT" //--- Declarations --- From b9e3961609f8b24397ae90e40058d9ef247a0ce7 Mon Sep 17 00:00:00 2001 From: cyberman54 Date: Sun, 27 May 2018 17:42:18 +0200 Subject: [PATCH 2/2] code sanitizations --- src/antenna.cpp | 2 +- src/blecsan.cpp | 7 +++---- src/configmanager.cpp | 2 +- src/lorawan.cpp | 8 +++----- src/macsniff.cpp | 4 +--- src/main.cpp | 8 ++------ src/rcommand.cpp | 2 +- 7 files changed, 12 insertions(+), 21 deletions(-) diff --git a/src/antenna.cpp b/src/antenna.cpp index bcbf1703..6c083275 100644 --- a/src/antenna.cpp +++ b/src/antenna.cpp @@ -5,7 +5,7 @@ #include // Local logging tag -static const char *TAG = "antenna"; +static const char* TAG = "wifi"; typedef enum { ANTENNA_INT = 0, diff --git a/src/blecsan.cpp b/src/blecsan.cpp index 3610def6..18df2135 100644 --- a/src/blecsan.cpp +++ b/src/blecsan.cpp @@ -17,7 +17,7 @@ https://github.com/nkolban/esp32-snippets/tree/master/BLE/scanner #define BT_BD_ADDR_HEX(addr) addr[0], addr[1], addr[2], addr[3], addr[4], addr[5] // local Tag for logging -static const char *TAG = "blescan"; +static const char* TAG = "bluetooth"; // defined in macsniff.cpp bool mac_add(uint8_t *paddr, int8_t rssi, bool sniff_type); @@ -92,9 +92,8 @@ static const char *btsig_gap_type(uint32_t gap_type) { IRAM_ATTR static void gap_callback_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param) { esp_ble_gap_cb_param_t *p = (esp_ble_gap_cb_param_t *)param; - esp_err_t status; - - ESP_LOGD(tag, "BT payload rcvd -> type: 0x%.2x -> %s", *p->scan_rst.ble_adv, btsig_gap_type(*p->scan_rst.ble_adv)); + + ESP_LOGD(TAG, "BT payload rcvd -> type: 0x%.2x -> %s", *p->scan_rst.ble_adv, btsig_gap_type(*p->scan_rst.ble_adv)); switch (event) { diff --git a/src/configmanager.cpp b/src/configmanager.cpp index 808af4b6..5f00752e 100644 --- a/src/configmanager.cpp +++ b/src/configmanager.cpp @@ -5,7 +5,7 @@ #include // Local logging tag -static const char *TAG = "configmanager"; +static const char* TAG = "flash"; nvs_handle my_handle; diff --git a/src/lorawan.cpp b/src/lorawan.cpp index 4cde6d3f..87a5c58f 100644 --- a/src/lorawan.cpp +++ b/src/lorawan.cpp @@ -11,7 +11,7 @@ #endif // Local logging Tag -static const char *TAG = "lorawan"; +static const char* TAG = "lora"; // functions defined in rcommand.cpp void rcommand(uint8_t cmd, uint8_t arg); @@ -79,8 +79,6 @@ void get_hard_deveui(uint8_t *pdeveui) { // Display a key void printKey(const char * name, const uint8_t * key, uint8_t len, bool lsb) { - uint8_t start=lsb?len:0; - uint8_t end = lsb?0:len; const uint8_t * p ; char keystring[len+1] = "", keybyte[3]; for (uint8_t i=0; i do we need this? @@ -188,7 +186,7 @@ void onEvent (ev_t ev) { case EV_TXCOMPLETE: strcpy_P(buff, (LMIC.txrxFlags & TXRX_ACK) ? PSTR("RECEIVED ACK") : PSTR("TX COMPLETE")); - sprintf(display_lora, ""); // clear previous lmic status message from display + sprintf(display_lora, " "); // clear previous lmic status message from display if (LMIC.dataLen) { ESP_LOGI(TAG, "Received %d bytes of payload, RSSI %d SNR %d", LMIC.dataLen, LMIC.rssi, (signed char)LMIC.snr / 4); diff --git a/src/macsniff.cpp b/src/macsniff.cpp index a3712b1a..0f566349 100644 --- a/src/macsniff.cpp +++ b/src/macsniff.cpp @@ -3,13 +3,11 @@ #include "globals.h" #ifdef VENDORFILTER - #include - #include #include "vendor_array.h" #endif // Local logging tag -static const char *TAG = "macsniff"; +static const char* TAG = "wifi"; static wifi_country_t wifi_country = {.cc=WIFI_MY_COUNTRY, .schan=WIFI_CHANNEL_MIN, .nchan=WIFI_CHANNEL_MAX, .policy=WIFI_COUNTRY_POLICY_MANUAL}; diff --git a/src/main.cpp b/src/main.cpp index a33e5787..2b1b3e67 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -61,9 +61,7 @@ std::set macs; // associative container holds total of unique MAC adre static volatile int ButtonPressed = 0, DisplayTimerIRQ = 0, ChannelTimerIRQ = 0; // local Tag for logging -static const char *TAG = "paxcnt"; -// Note: Log level control seems not working during runtime, -// so we need to switch loglevel by compiler build option in platformio.ini +static const char* TAG = "main"; #ifndef VERBOSE int redirect_log(const char * fmt, va_list args) { @@ -241,8 +239,6 @@ uint64_t uptime() { // Print a key on display void DisplayKey(const uint8_t * key, uint8_t len, bool lsb) { - uint8_t start=lsb?len:0; - uint8_t end = lsb?0:len; const uint8_t * p ; for (uint8_t i=0; i // Local logging tag -static const char *TAG = "rcommand"; +static const char* TAG = "main"; // table of remote commands and assigned functions typedef struct {