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 {