From: xue <2144439972@qq.com> Date: Wed, 29 Oct 2025 11:36:37 +0000 (+0800) Subject: 未绑定时对话不进入意图识别 X-Git-Tag: V1.0.9_20251128_194606_LN~151 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F2636%2F1;p=mirrors%2FFD230.git 未绑定时对话不进入意图识别 --- diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp index 824131935..1d8212c3f 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp @@ -2187,6 +2187,12 @@ void ThunderBirdModel::HandleSleepModeStart(const char* theme, int is_intention_result) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ThunderBirdModel::HandleSleepModeStart"); + //判断是否绑定 + if(bind_status == false) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ThunderBirdModel::HandleSleepModeStart: 未绑定,不做处理"); + return; + } if (ThunderBirdMainView::GetInstance()) { int currentView = ThunderBirdMainView::GetInstance()->GetCurrentView(); //若为意图识别结果,则跳转到4,否则跳转到2 @@ -2351,7 +2357,7 @@ // 录音结束处理函数 void ThunderBirdModel::HandleAudioRecordingEnd() { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ThunderBirdModel::HandleAudioRecordingEnd: 录音结束,跳转到播放界面"); + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ThunderBirdModel::HandleAudioRecordingEnd: 录音结束"); // 获取当前视图状态 ThunderBirdMainView *view = ThunderBirdMainView::GetInstance(); diff --git a/code/sdk/zhihui/leiniao/imsl_ln/ln_api_websocket.c b/code/sdk/zhihui/leiniao/imsl_ln/ln_api_websocket.c index 1641ee198..d1465ec6e 100644 --- a/code/sdk/zhihui/leiniao/imsl_ln/ln_api_websocket.c +++ b/code/sdk/zhihui/leiniao/imsl_ln/ln_api_websocket.c @@ -1069,9 +1069,9 @@ void vad_status_callback_ln_ws(int status) LN_WS_INFO("VAD cooldown active, ignoring start request\n"); return; } - #ifdef VAD_TEST + // #ifdef VAD_TEST ln_ws_start_audio_chat(LN_AUDIO_CHAT_VOICE_CHAT_REQUEST); - #endif + // #endif } else if (status==2) @@ -1813,11 +1813,11 @@ static int ln_ws_parse_data_message(const char *json_str, ws_data_msg_t *data_ms cJSON *data_data = cJSON_GetObjectItem(data_obj, "data"); if (data_data && cJSON_IsObject(data_data)) { // 解析storyTheme字段,存储到text_content中 - cJSON *story_theme = cJSON_GetObjectItem(data_data, "storyTheme"); - if (story_theme && cJSON_IsString(story_theme) && story_theme->valuestring) { - strncpy(data_msg->text_content, story_theme->valuestring, sizeof(data_msg->text_content) - 1); - data_msg->text_content[sizeof(data_msg->text_content) - 1] = '\0'; - } + // cJSON *story_theme = cJSON_GetObjectItem(data_data, "storyTheme"); + // if (story_theme && cJSON_IsString(story_theme) && story_theme->valuestring) { + // strncpy(data_msg->text_content, story_theme->valuestring, sizeof(data_msg->text_content) - 1); + // data_msg->text_content[sizeof(data_msg->text_content) - 1] = '\0'; + // } // 解析storyContent字段(RandomStoryResponse特有) cJSON *story_content = cJSON_GetObjectItem(data_data, "storyContent");