time sync on startup, check enabled interfaces on http server start

This commit is contained in:
Bogdan Pilyugin 2022-08-17 09:03:52 +02:00
parent 79a0122927
commit 4bee09c770

View File

@ -59,9 +59,21 @@ void app_main(void)
WiFiSTAStart(); WiFiSTAStart();
} }
#endif #endif
/*Start time synchronization*/
if (CONFIG_WEBGUIAPP_GPRS_ENABLE ||
CONFIG_WEBGUIAPP_ETHERNET_ENABLE ||
(CONFIG_WEBGUIAPP_WIFI_ENABLE && GetSysConf()->wifiSettings.Flags1.bIsAP))
StartTimeGet();
/*Start web server*/
if (CONFIG_WEBGUIAPP_GPRS_ENABLE ||
CONFIG_WEBGUIAPP_ETHERNET_ENABLE ||
CONFIG_WEBGUIAPP_WIFI_ENABLE)
ESP_ERROR_CHECK(start_file_server()); ESP_ERROR_CHECK(start_file_server());
while (true) { while (true)
{
printf("Hello from app_main!\n"); printf("Hello from app_main!\n");
sleep(1); sleep(1);
} }