feat: 实现时间同步、NVS稳定性修复和ESP-IDF v6.0兼容性改进
This commit is contained in:
@@ -27,6 +27,8 @@
|
||||
#include "heartbeat/heartbeat.h"
|
||||
#include "skills/skill_loader.h"
|
||||
#include "onboard/wifi_onboard.h"
|
||||
#include "time_sync/time_sync.h"
|
||||
#include "nvs_safety/nvs_safety.h"
|
||||
|
||||
static const char *TAG = "mimi";
|
||||
|
||||
@@ -120,6 +122,7 @@ void app_main(void)
|
||||
|
||||
/* Phase 1: Core infrastructure */
|
||||
ESP_ERROR_CHECK(init_nvs());
|
||||
nvs_safety_check();
|
||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||
ESP_ERROR_CHECK(init_spiffs());
|
||||
|
||||
@@ -151,6 +154,7 @@ void app_main(void)
|
||||
if (wifi_manager_wait_connected(30000) == ESP_OK) {
|
||||
wifi_ok = true;
|
||||
ESP_LOGI(TAG, "WiFi connected: %s", wifi_manager_get_ip());
|
||||
time_sync_init();
|
||||
} else {
|
||||
ESP_LOGW(TAG, "WiFi connection timeout");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user