修复ESP-Hi报错 (#1643)
Some checks failed
Build Boards / Determine variants to build (push) Has been cancelled
Build Boards / Build ${{ matrix.name }} (push) Has been cancelled

* Update esp_hi.cc

* Remove error check for event loop creation

If event loop already created, this function returns ESP_ERR_INVALID_STATE

---------

Co-authored-by: Xiaoxia <terrence@tenclass.com>
This commit is contained in:
顿玄 2026-01-10 16:29:12 +08:00 committed by GitHub
parent 7240ea99f1
commit b48506171b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -224,6 +224,7 @@ private:
SetLedColor(0x00, 0x00, 0x00); SetLedColor(0x00, 0x00, 0x00);
#ifdef CONFIG_ESP_HI_WEB_CONTROL_ENABLED #ifdef CONFIG_ESP_HI_WEB_CONTROL_ENABLED
esp_event_loop_create_default();
ESP_ERROR_CHECK(esp_event_handler_register(WIFI_EVENT, WIFI_EVENT_STA_CONNECTED, ESP_ERROR_CHECK(esp_event_handler_register(WIFI_EVENT, WIFI_EVENT_STA_CONNECTED,
&wifi_event_handler, this)); &wifi_event_handler, this));
#endif //CONFIG_ESP_HI_WEB_CONTROL_ENABLED #endif //CONFIG_ESP_HI_WEB_CONTROL_ENABLED