mirror of
https://github.com/esphome/esphome.git
synced 2024-11-27 09:18:00 +01:00
code cleaning
This commit is contained in:
parent
0339726a73
commit
3cad896379
2 changed files with 12 additions and 9 deletions
|
@ -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(
|
||||
|
|
|
@ -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!!!");
|
||||
|
|
Loading…
Reference in a new issue