From 3cad8963792f07bb0ed684f71ebd99fd067fb20f Mon Sep 17 00:00:00 2001 From: Chelios Date: Thu, 17 Oct 2024 08:24:40 +0300 Subject: [PATCH] code cleaning --- esphome/components/modem/__init__.py | 2 +- esphome/components/modem/modem_component.cpp | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/esphome/components/modem/__init__.py b/esphome/components/modem/__init__.py index 349150975a..3180154fd4 100644 --- a/esphome/components/modem/__init__.py +++ b/esphome/components/modem/__init__.py @@ -106,7 +106,7 @@ async def to_code(config): cg.add_library("WiFi", None) if CORE.using_esp_idf: add_idf_sdkconfig_option("CONFIG_LWIP_PPP_SUPPORT", True) - add_idf_sdkconfig_option("CONFIG_TASK_WDT_TIMEOUT_S", 60) + # add_idf_sdkconfig_option("CONFIG_TASK_WDT_TIMEOUT_S", 60) # add_idf_sdkconfig_option("CONFIG_LOG_MAXIMUM_EQUALS_DEFAULT", False) # add_idf_sdkconfig_option("CONFIG_LOG_MAXIMUM_LEVEL_VERBOSE", True) add_idf_component( diff --git a/esphome/components/modem/modem_component.cpp b/esphome/components/modem/modem_component.cpp index ab73ae9d36..56f3d122c5 100644 --- a/esphome/components/modem/modem_component.cpp +++ b/esphome/components/modem/modem_component.cpp @@ -33,12 +33,15 @@ ModemComponent::ModemComponent() { global_modem_component = this; } // setup void ModemComponent::setup() { - esp_log_level_set("esp-netif_lwip-ppp", ESP_LOG_VERBOSE); - esp_log_level_set("esp-netif_lwip", ESP_LOG_VERBOSE); - esp_log_level_set("modem", ESP_LOG_VERBOSE); - esp_log_level_set("mqtt", ESP_LOG_VERBOSE); - esp_log_level_set("command_lib", ESP_LOG_VERBOSE); - esp_log_level_set("uart_terminal", ESP_LOG_VERBOSE); + // esp_log_level_set("esp-netif_lwip-ppp", ESP_LOG_VERBOSE); + // esp_log_level_set("esp-netif_lwip", ESP_LOG_VERBOSE); + // esp_log_level_set("modem", ESP_LOG_VERBOSE); + // esp_log_level_set("mqtt", ESP_LOG_VERBOSE); + // esp_log_level_set("command_lib", ESP_LOG_VERBOSE); + // esp_log_level_set("uart_terminal", ESP_LOG_VERBOSE); + // esp_log_level_set("vfs_socket_creator", ESP_LOG_VERBOSE); + // esp_log_level_set("vfs_uart_creator", ESP_LOG_VERBOSE); + // esp_log_level_set("fs_terminal", ESP_LOG_VERBOSE); ESP_LOGCONFIG(TAG, "Setting up modem..."); if (this->power_pin_) { @@ -337,9 +340,9 @@ void ModemComponent::got_ip_event_handler(void *arg, esp_event_base_t event_base ESP_LOGI(TAG, "Netmask : " IPSTR, IP2STR(&event->ip_info.netmask)); ESP_LOGI(TAG, "Gateway : " IPSTR, IP2STR(&event->ip_info.gw)); esp_netif_get_dns_info(netif, ESP_NETIF_DNS_MAIN, &dns_info); - ESP_LOGI(TAG, "Name Server1: " IPSTR, IP2STR(&dns_info.ip.u_addr.ip4)); + ESP_LOGI(TAG, "DNS 1: " IPSTR, IP2STR(&dns_info.ip.u_addr.ip4)); esp_netif_get_dns_info(netif, ESP_NETIF_DNS_BACKUP, &dns_info); - ESP_LOGI(TAG, "Name Server2: " IPSTR, IP2STR(&dns_info.ip.u_addr.ip4)); + ESP_LOGI(TAG, "DNS 2: " IPSTR, IP2STR(&dns_info.ip.u_addr.ip4)); ESP_LOGI(TAG, "~~~~~~~~~~~~~~"); ESP_LOGD(TAG, "GOT ip event!!!");