Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 20 additions & 3 deletions components/net_sntp/src/net_sntp.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@
#include "esp_log.h"
#include "esp_netif_sntp.h"
#include "esp_sntp.h"
#include "esp_wifi.h"
#include "freertos/FreeRTOS.h"

#if defined(ESP_PLATFORM)
# include "sdkconfig.h"
# if CONFIG_APP_ENABLE_WIFI_HOSTED
# include "esp_wifi.h"
# endif
#endif

static const char* TAG = "net_sntp";

esp_err_t net_sntp_start(const char* server, bool wait_for_sync)
Expand Down Expand Up @@ -47,9 +53,20 @@ esp_err_t net_sntp_start(const char* server, bool wait_for_sync)
ESP_LOGW(TAG, "SNTP sync wait timed out: 0x%x", (unsigned int)err);
}
}
ESP_LOGI(TAG, "SNTP running");

#if defined(ESP_PLATFORM) && CONFIG_APP_ENABLE_WIFI_HOSTED
wifi_mode_t mode = WIFI_MODE_NULL;
esp_wifi_get_mode(&mode);
ESP_LOGI(TAG, "SNTP running (wifi mode=%d)", mode);
esp_err_t wifi_err = esp_wifi_get_mode(&mode);
if (wifi_err == ESP_OK)
{
ESP_LOGI(TAG, "Wi-Fi mode: %d", mode);
}
else
{
ESP_LOGW(TAG, "Failed to query Wi-Fi mode: 0x%x", (unsigned int)wifi_err);
}
#endif
return err;
}

Expand Down
4 changes: 3 additions & 1 deletion custom/integration/settings_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,7 @@ namespace custom::integration

void SettingsController::Impl::test_wifi_connection()
{
#if defined(ESP_PLATFORM)
#if defined(ESP_PLATFORM) && CONFIG_APP_ENABLE_WIFI_HOSTED
wifi_ap_record_t ap_info{};
esp_err_t err = esp_wifi_sta_get_ap_info(&ap_info);
if (err == ESP_OK)
Expand All @@ -923,6 +923,8 @@ namespace custom::integration
{
post_connection_result("wifi", UI_PAGE_SETTINGS_STATUS_UNKNOWN, "Unavailable");
}
#elif defined(ESP_PLATFORM)
post_connection_result("wifi", UI_PAGE_SETTINGS_STATUS_UNKNOWN, "ESP-Hosted disabled");
#else
post_connection_result("wifi", UI_PAGE_SETTINGS_STATUS_WARNING, "Not supported on host");
#endif
Expand Down
4 changes: 2 additions & 2 deletions platforms/tab5/dependencies.lock
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ dependencies:
registry_url: https://components.espressif.com/
type: service
rules:
- if: CONFIG_APP_ENABLE_WIFI_HOSTED
- if: $CONFIG{CONFIG_APP_ENABLE_WIFI_HOSTED} == y
version: 1.4.0
espressif/esp_lcd_ili9881c:
component_hash: eb9ba0484d1d14171b69e5d192716fb1cdd6ef068aa4014dc3202486e124498e
Expand Down Expand Up @@ -228,7 +228,7 @@ dependencies:
registry_url: https://components.espressif.com/
type: service
rules:
- if: CONFIG_APP_ENABLE_WIFI_HOSTED
- if: $CONFIG{CONFIG_APP_ENABLE_WIFI_HOSTED} == y
version: 0.8.5
espressif/led_strip:
component_hash: f907c58f722c58ab8545366668cfd8769cefb7d97a631a14e9d16234cc72bdff
Expand Down
4 changes: 2 additions & 2 deletions platforms/tab5/main/idf_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ dependencies:
espressif/esp_hosted:
version: 1.4.0
rules:
- if: "CONFIG_APP_ENABLE_WIFI_HOSTED"
- if: "$CONFIG{CONFIG_APP_ENABLE_WIFI_HOSTED} == y"
espressif/esp_wifi_remote:
version: 0.8.5
rules:
- if: "CONFIG_APP_ENABLE_WIFI_HOSTED"
- if: "$CONFIG{CONFIG_APP_ENABLE_WIFI_HOSTED} == y"
chmorgan/esp-audio-player: 1.0.7
chmorgan/esp-file-iterator: 1.0.0
espressif/led_strip: 3.0.0
Expand Down
Loading