feat: implement system time synchronization, web server handlers, and clock application components

This commit is contained in:
dark98
2026-09-25 20:57:19 +01:00
parent 4bf31f908a
commit 59b0318579
11 changed files with 442 additions and 33 deletions
+3 -1
View File
@@ -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));
}