From 5b3fbbba7fd71d1e645150a217b4dfc05e5ca0d5 Mon Sep 17 00:00:00 2001 From: Bogdan Pilyugin Date: Mon, 13 Mar 2023 14:42:01 +0200 Subject: [PATCH] fix config default wifi dhcp setting --- extlibs/libespfs | 2 +- src/WebGUIAppMain.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/extlibs/libespfs b/extlibs/libespfs index 5342a39..a646e3e 160000 --- a/extlibs/libespfs +++ b/extlibs/libespfs @@ -1 +1 @@ -Subproject commit 5342a39a179a4dddede680615bf4694755d2a59d +Subproject commit a646e3ee0594ec2301e9b3fe6373ea274eb39e39 diff --git a/src/WebGUIAppMain.c b/src/WebGUIAppMain.c index 9fe6d7b..e24b530 100644 --- a/src/WebGUIAppMain.c +++ b/src/WebGUIAppMain.c @@ -289,8 +289,9 @@ static void ResetSysConfig(SYS_CONFIG *Conf) sizeof(CONFIG_WEBGUIAPP_WIFI_SSID_STA)); memcpy(Conf->wifiSettings.InfSecurityKey, CONFIG_WEBGUIAPP_WIFI_KEY_STA, sizeof(CONFIG_WEBGUIAPP_WIFI_KEY_STA)); - - Conf->wifiSettings.Flags1.bIsDHCPEnabled = CONFIG_WEBGUIAPP_WIFI_DHCP_ON; +#if CONFIG_WEBGUIAPP_WIFI_DHCP_ON + Conf->wifiSettings.Flags1.bIsDHCPEnabled = true; +#endif esp_netif_str_to_ip4(CONFIG_WEBGUIAPP_DNS1_ADDRESS_DEFAULT, (esp_ip4_addr_t*) &Conf->wifiSettings.DNSAddr1); esp_netif_str_to_ip4(CONFIG_WEBGUIAPP_DNS2_ADDRESS_DEFAULT,