From 8604f77d907b9eef251e5dbd7c4eaa8a95920eaf Mon Sep 17 00:00:00 2001 From: Jonas Arnold Date: Fri, 4 Nov 2022 15:31:48 +0100 Subject: [PATCH] fixed ESP Log stuff --- ADIS_ESP32_Eclipse/main/led.c | 2 +- ADIS_ESP32_Eclipse/main/timer.c | 2 +- ADIS_ESP32_Eclipse/main/udp_client.c | 2 +- ADIS_ESP32_Eclipse/main/wifi.c | 5 +++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ADIS_ESP32_Eclipse/main/led.c b/ADIS_ESP32_Eclipse/main/led.c index 099d8ad..6307eb5 100644 --- a/ADIS_ESP32_Eclipse/main/led.c +++ b/ADIS_ESP32_Eclipse/main/led.c @@ -16,7 +16,7 @@ #include "McuLED.h" #include "McuLog.h" -#define TAG "Blinky" +#define TAG "Blinky" /* tag for logging with ESP_LOG */ static McuLED_Handle_t ledHandle; diff --git a/ADIS_ESP32_Eclipse/main/timer.c b/ADIS_ESP32_Eclipse/main/timer.c index 6e5479c..64d39bf 100644 --- a/ADIS_ESP32_Eclipse/main/timer.c +++ b/ADIS_ESP32_Eclipse/main/timer.c @@ -11,7 +11,7 @@ #include "esp_log.h" #include "McuTimeDate.h" -static const char *TAG = "Timer"; +#define TAG "Timer" /* tag for logging with ESP_LOG */ static TimerHandle_t timer; diff --git a/ADIS_ESP32_Eclipse/main/udp_client.c b/ADIS_ESP32_Eclipse/main/udp_client.c index b2945d2..ee2ca51 100644 --- a/ADIS_ESP32_Eclipse/main/udp_client.c +++ b/ADIS_ESP32_Eclipse/main/udp_client.c @@ -40,7 +40,7 @@ static uint16_t udp_client_destination_port = PORT; static unsigned char udp_client_destination_host[24] = HOST_IP_ADDR; -static const char *TAG = "udp_client"; +#define TAG "udp_client" /* tag for logging with ESP_LOG */ static TaskHandle_t taskHandle = NULL; /* udp client task handle */ #if 0 diff --git a/ADIS_ESP32_Eclipse/main/wifi.c b/ADIS_ESP32_Eclipse/main/wifi.c index 8eb4f68..e3363fa 100644 --- a/ADIS_ESP32_Eclipse/main/wifi.c +++ b/ADIS_ESP32_Eclipse/main/wifi.c @@ -50,6 +50,7 @@ #define EAP_PEAP 1 /* WPA2 Enterprise with password and no certificate */ #define EAP_TTLS 2 /* TLS method */ +#define TAG "WiFi" /* tag for logging with ESP_LOG */ #include "pwd.h" /* local file with login information */ @@ -253,7 +254,7 @@ static void WiFiTask(void *pv) { #endif if (state == WIFI_STATE_INIT && isConnected) { /* first connection */ state = WIFI_STATE_CONNECTED; - //ESP_LOGI(TAG, "WiFi is connected."); + ESP_LOGI(TAG, "WiFi is connected."); if (isConnected) { APP_WiFi_PrintIP(); } @@ -270,7 +271,7 @@ static void WiFiTask(void *pv) { McuLog_error("failed getting SNTP time."); } #endif -#if 0 +#if 1 } else if (isConnected) { ESP_LOGI(TAG, "still connected."); APP_WiFi_PrintIP();