v1.7.7: 支持 EC801E 模组,增加 xmini-c3-v3, xmini-c3-4g (#930)

This commit is contained in:
Xiaoxia
2025-07-17 20:18:21 +08:00
committed by GitHub
parent ea8769e1fc
commit 6bb95073a4
39 changed files with 1156 additions and 158 deletions

View File

@@ -29,7 +29,7 @@ bool WebsocketProtocol::Start() {
}
bool WebsocketProtocol::SendAudio(const AudioStreamPacket& packet) {
if (websocket_ == nullptr) {
if (websocket_ == nullptr || !websocket_->IsConnected()) {
return false;
}
@@ -61,7 +61,7 @@ bool WebsocketProtocol::SendAudio(const AudioStreamPacket& packet) {
}
bool WebsocketProtocol::SendText(const std::string& text) {
if (websocket_ == nullptr) {
if (websocket_ == nullptr || !websocket_->IsConnected()) {
return false;
}
@@ -100,8 +100,9 @@ bool WebsocketProtocol::OpenAudioChannel() {
error_occurred_ = false;
websocket_ = Board::GetInstance().CreateWebSocket();
auto network = Board::GetInstance().GetNetwork();
websocket_ = network->CreateWebSocket(1);
if (!token.empty()) {
// If token not has a space, add "Bearer " prefix
if (token.find(" ") == std::string::npos) {