Baji_Rtc_Toy/main/display/ai_chat_display.cc
Rdzleo 58c33e3cb4 feat: AI对话模式emoji表情系统 + 中文字体 + 分区优化
1. 新增AI对话LVGL界面(ai_chat_ui),支持emoji图片 + 状态文本 + 聊天消息
2. 新增7个emoji表情资源(64×64 PNG C数组):neutral/happy/sad/angry/crying/funny/laughing
3. 新增阿里巴巴普惠体20px 4bpp中文字体(GB2312字符集)
4. 利用火山RTC会话状态(VOLC_MSG_CONV_STATUS)驱动emoji切换:
   - LISTENING→happy, THINKING→neutral, ANSWERING→laughing
   - INTERRUPTED→funny, ANSWER_FINISH→happy
5. 设备状态emoji映射:Listening→happy, Speaking→laughing, Dialog→happy
6. 配网模式显示happy emoji
7. 分区优化:model 3MB→64KB,OTA 5MB→6.5MB
8. 编译优化:-Og→-Os,移除SimSun CJK字体

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 18:14:19 +08:00

27 lines
753 B
C++

#include "ai_chat_display.h"
// 通过 extern "C" 调用纯 C 的 AI 界面函数(避免 display.h 的 lv_font_t 与 lvgl.h 冲突)
extern "C" {
void ai_chat_set_status(const char* status);
void ai_chat_set_emotion(const char* emotion);
void ai_chat_set_chat_message(const char* role, const char* content);
}
AiChatDisplay::AiChatDisplay() {
width_ = 360;
height_ = 360;
}
void AiChatDisplay::SetStatus(const char* status) {
// SimSun CJK 字体支持中文,直接显示
ai_chat_set_status(status);
}
void AiChatDisplay::SetEmotion(const char* emotion) {
ai_chat_set_emotion(emotion);
}
void AiChatDisplay::SetChatMessage(const char* role, const char* content) {
ai_chat_set_chat_message(role, content);
}