feat: implement system time synchronization, web server handlers, and clock application components
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "sys_wifi.h"
|
||||
#include "sys_wifi.h"
|
||||
#include "web_server.h"
|
||||
#include "sys_time.h"
|
||||
#include "os_event.h"
|
||||
#include "os_status.h"
|
||||
#include "sdkconfig.h"
|
||||
@@ -84,6 +85,7 @@ static void wifi_event_handler(void *arg, esp_event_base_t event_base, int32_t e
|
||||
if (esp_wifi_sta_get_ap_info(&record) == ESP_OK) rssi = record.rssi;
|
||||
set_status(WIFI_STATE_CONNECTED, rssi);
|
||||
web_server_start();
|
||||
sys_time_start_sntp();
|
||||
const ip_event_got_ip_t *got_ip = (const ip_event_got_ip_t *)event_data;
|
||||
ESP_LOGI(TAG, "Wi-Fi connected, web server at http://" IPSTR, IP2STR(&got_ip->ip_info.ip));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user