feat: add button-activated field network diagnostics

This commit is contained in:
chenjintao
2026-10-20 14:12:28 +08:00
parent b2c78208bf
commit 8bff1f569e
8 changed files with 406 additions and 24 deletions
@@ -3,7 +3,8 @@
#include <librws.h>
#include "cJSON.h"
#include "app_inc.h"
#include "talkingq_wss.h"
#include "talkingq_wss.h"
#include "net_diag.h"
#include "ql_rtos.h"
#include "ql_application.h"
#include "ql_audio.h"
@@ -222,6 +223,7 @@ static void onopen(rws_socket socket)
if (socket != app->socket || !app->init) return;
wss_connect_counter=0;
net_diag_event("WSS连接建立(尚不代表鉴权或AI回复完成)", 0);
LOG_D("websocket connected. ");
if(ws_connect_sem){
ql_rtos_semaphore_release(ws_connect_sem);
@@ -245,6 +247,7 @@ static void onclose(rws_socket socket)
}
if (socket != app->socket) return;
net_diag_event("WSS连接断开", error_code);
xiaoice_wss_connect_status = 0;
app->socket = NULL;
/* The worker owns and releases this socket after the callback. */