优化表情逻辑(补)
authorxue <2144439972@qq.com>
Mon, 8 Dec 2025 07:53:41 +0000 (15:53 +0800)
committerxue <2144439972@qq.com>
Mon, 8 Dec 2025 07:53:41 +0000 (15:53 +0800)
code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp

index d0f54cb..97e491f 100644 (file)
@@ -142,7 +142,7 @@ extern "C" {
          printf("  screenImageAsEmoji_ = %d", screenImageAsEmoji_);
          
          // 初始化对话状态显示变量
-         m_currentExpression = "CloseEyes";
+         m_currentExpression = "winking";
          m_currentStatusText = "发呆中...";
          //初始化音量
          AudioManager::GetInstance().SetVolume(AUDIO_STREAM_VOICE_ASSISTANT, m_volume);
@@ -1599,9 +1599,9 @@ extern "C" {
             {
                 if (init_falg == false) 
                 {
-                    cat1_gettime();
                     //发送获取绑定用户ID
                     do_ln_http_server_send_data(LN_HTTP_SERVICE_CMD_GET_USER_ID, NULL, 0);
+                    cat1_gettime();
                     // 网络连接成功,调用HTTP服务获取设备Token
                     // 获取一下OTA 是否有最新版本
 
@@ -3072,8 +3072,10 @@ extern "C" {
         if(ThunderBirdDialogueView::GetInstance() && currentSubView == ThunderBirdDialogueView::THUNDERBIRD_DIALOGUEVIEW_SPEAKING)
         {
             // 检查传入的表情是否与当前对话界面表情不同
-            if (m_dialogueExpression != emotion && m_currentExpression != emotion) {
+            if (m_dialogueExpression != emotion) {
                 // 记录新的对话界面表情
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ThunderBirdModel::HandleNpcEmotionChange: 记录新的对话界面表情: %s", emotion);
+                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ThunderBirdModel::HandleNpcEmotionChange: 当前对话界面表情: %s", m_dialogueExpression.c_str()); 
                 m_dialogueExpression = emotion;
                 
                 // 切换表情 - 根据眼睛颜色和形状判断是否为默认表情
@@ -3201,6 +3203,7 @@ extern "C" {
         // 恢复到进入对话模式前记录的时间线表情
         if (!m_currentExpression.empty()) {
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ThunderBirdModel::OnExitDialogueMode: 恢复时间线表情: %s", m_dialogueExpression.c_str());
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ThunderBirdModel::OnExitDialogueMode: 当前表情: %s", m_currentExpression.c_str());
             //如果相同直接返回
             if(m_dialogueExpression == m_currentExpression)     
             {