From a18b7a481538c1f90f3ba98440b955896e4038bb Mon Sep 17 00:00:00 2001 From: Mikhael Skvortsov Date: Sat, 25 May 2024 19:49:19 +0300 Subject: [PATCH] Pay off the debt --- arch/esp32/esp32.ini | 1 - src/mesh/wifi/WiFiAPClient.cpp | 8 ++++---- src/sleep.cpp | 5 +++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/esp32/esp32.ini b/arch/esp32/esp32.ini index 2a013e5537..bf7348f8ac 100644 --- a/arch/esp32/esp32.ini +++ b/arch/esp32/esp32.ini @@ -37,7 +37,6 @@ build_flags = -DCONFIG_NIMBLE_CPP_LOG_LEVEL=2 -DCONFIG_BT_NIMBLE_MAX_CCCDS=20 -DCONFIG_BT_NIMBLE_HOST_TASK_STACK_SIZE=5120 - -DESP_OPENSSL_SUPPRESS_LEGACY_WARNING -DSERIAL_BUFFER_SIZE=4096 -DLIBPAX_ARDUINO -DLIBPAX_WIFI diff --git a/src/mesh/wifi/WiFiAPClient.cpp b/src/mesh/wifi/WiFiAPClient.cpp index 6cc45cd5c8..502bc70172 100644 --- a/src/mesh/wifi/WiFiAPClient.cpp +++ b/src/mesh/wifi/WiFiAPClient.cpp @@ -308,10 +308,10 @@ static void WiFiEvent(WiFiEvent_t event) LOG_INFO("Obtained IP address: %s\n", WiFi.localIP().toString().c_str()); onNetworkConnected(); break; - // XXX - // case ARDUINO_EVENT_WIFI_STA_GOT_IP6: - // LOG_INFO("Obtained IP6 address: %s\n", WiFi.localIPv6().toString().c_str()); - // break; + case ARDUINO_EVENT_WIFI_STA_GOT_IP6: + LOG_INFO("Obtained link-local IP6 address: %s\n", WiFi.linkLocalIPv6().toString().c_str()); + LOG_INFO("Obtained global IP6 address: %s\n", WiFi.globalIPv6().toString().c_str()); + break; case ARDUINO_EVENT_WIFI_STA_LOST_IP: LOG_INFO("Lost IP address and IP address is reset to 0\n"); if (!isReconnecting) { diff --git a/src/sleep.cpp b/src/sleep.cpp index dd0871b986..50d7d271e5 100644 --- a/src/sleep.cpp +++ b/src/sleep.cpp @@ -335,8 +335,9 @@ esp_sleep_wakeup_cause_t doLightSleep(uint64_t sleepMsec) // FIXME, use a more r // NOTE! ESP docs say we must disable bluetooth and wifi before light sleep // We want RTC peripherals to stay on - // XXX - // esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_ON); +#if SOC_PM_SUPPORT_RTC_PERIPH_PD + esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_ON); +#endif #if defined(BUTTON_PIN) && defined(BUTTON_NEED_PULLUP) gpio_pullup_en((gpio_num_t)BUTTON_PIN);