forked from xiaozhi/xiaozhi-esp32
Enhance device activation and OTA update process
- Add support for device activation with audio feedback - Refactor OTA update flow to include activation code handling - Update asset management for localized sound resources - Improve error handling and device state management - Reorganize binary asset includes and CMake configuration
This commit is contained in:
@@ -10,8 +10,6 @@
|
||||
|
||||
#define TAG "WS"
|
||||
|
||||
#ifdef CONFIG_CONNECTION_TYPE_WEBSOCKET
|
||||
|
||||
WebsocketProtocol::WebsocketProtocol() {
|
||||
event_group_handle_ = xEventGroupCreate();
|
||||
}
|
||||
@@ -61,7 +59,7 @@ bool WebsocketProtocol::OpenAudioChannel() {
|
||||
websocket_->SetHeader("Authorization", token.c_str());
|
||||
websocket_->SetHeader("Protocol-Version", "1");
|
||||
websocket_->SetHeader("Device-Id", SystemInfo::GetMacAddress().c_str());
|
||||
websocket_->SetHeader("X-Uuid", Board::GetInstance().GetUuid().c_str());
|
||||
websocket_->SetHeader("Client-Id", Board::GetInstance().GetUuid().c_str());
|
||||
|
||||
websocket_->OnData([this](const char* data, size_t len, bool binary) {
|
||||
if (binary) {
|
||||
@@ -147,5 +145,3 @@ void WebsocketProtocol::ParseServerHello(const cJSON* root) {
|
||||
|
||||
xEventGroupSetBits(event_group_handle_, WEBSOCKET_PROTOCOL_SERVER_HELLO_EVENT);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user