From f79793f365e8f7db61aff3501c578880c8bfb0b7 Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Thu, 14 Aug 2025 14:32:12 +0800 Subject: [PATCH] =?utf8?q?=E8=BF=98=E5=8E=9F=E4=B9=8B=E5=89=8D=E8=81=86?= =?utf8?q?=E5=90=AC=E7=95=8C=E9=9D=A2=E8=B6=85=E6=97=B6=E7=A7=92=E6=95=B0?= =?utf8?q?=E4=B8=BA10=E7=A7=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../fd230app/nativeui/aivoice/src/AiVoiceModel.cpp | 4 ++-- .../fd230app/nativeui/aivoice/src/AiVoicePresenter.cpp | 10 +++++----- .../fd230app/nativeui/aivoice/src/AiVoiceView.cpp | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceModel.cpp index aa3f81484..792781ad2 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceModel.cpp @@ -1327,7 +1327,7 @@ namespace OHOS return false; } static osTimerId_t g_listeningEndHandle = nullptr; - static int8_t LISTENING_TIMEOUT = 6; // 10s钟无操作关闭该视图 + static int8_t LISTENING_TIMEOUT = 10; // 10s钟无操作关闭该视图 static void AIListeningCallbackProc(int data) { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AIListeningCallbackProc %d", LISTENING_TIMEOUT); @@ -1406,7 +1406,7 @@ namespace OHOS WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "osTimerDelete failed, ret = %lx!!", ret); } g_listeningEndHandle = nullptr; - LISTENING_TIMEOUT = 6; + LISTENING_TIMEOUT = 10; } } diff --git a/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoicePresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoicePresenter.cpp index 7674b9852..596253b83 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoicePresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoicePresenter.cpp @@ -39,8 +39,7 @@ namespace OHOS #include "pm_veto.h" #include #include -#include "bleService.h" -extern void set_need_tts_reconnect(uint8_t flag); + extern void set_need_tts_reconnect(uint8_t flag); void remove_4GAI_vote(void) { @@ -332,9 +331,10 @@ extern void set_need_tts_reconnect(uint8_t flag); break; case AIVOICE_LISTENING_VIEWID: - set_stop_send_ai_flag(1); // 停止发送AI数据 model->StopListenAndRecordingUserQuestion(); model->stop_listening_timer(); + LOS_Msleep(100); + set_stop_send_ai_flag(1); // 停止发送AI数据 break; case AIVOICE_THINKING_VIEWID: @@ -342,7 +342,7 @@ extern void set_need_tts_reconnect(uint8_t flag); break; case AIVOICE_RETURN_RESULT_TEXT_VIEWID: - set_need_tts_reconnect(0); // 停止tts重连 + set_need_tts_reconnect(0); // 停止tts重连 AiVoiceModel::GetInstance().ClearQuestionAndAiAnswerStr(); // 清空上次用户问题和Ai回答字符串 AiVoiceModel::GetInstance().SetIsClickable(false); AiVoiceModel::GetInstance().SetIsLimitDisplayed(false); @@ -362,7 +362,7 @@ extern void set_need_tts_reconnect(uint8_t flag); AiVoiceModel::GetInstance().start_ai_isready_timer(); break; case AIVOICE_RETURN_RESULT_TEXT_VIEWID: - set_need_tts_reconnect(1); // 开始tts重连 + set_need_tts_reconnect(1); // 开始tts重连 break; case AIVOICE_LISTENING_VIEWID: set_stop_send_ai_flag(0); // 开始发送AI数据 diff --git a/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceView.cpp b/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceView.cpp index 9b8b87154..b48036da6 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceView.cpp @@ -710,7 +710,7 @@ namespace OHOS if (p_AivoiceListeningView) { p_AivoiceListeningView->StartOrStopAivoiceListeningImageAnimatorView(true); - p_AivoiceListeningView->GetShowtimeoutLabel()->SetText("6"); + p_AivoiceListeningView->GetShowtimeoutLabel()->SetText("10"); p_AivoiceListeningView->GetShowtimeoutLabel()->Invalidate(); } return true; -- 2.17.1