Baji_Rtc_Toy_Key/main/display/ai_chat_display.cc
Rdzleo dbdd304905 代码初始化:
本项目为触摸版项目代码复制而来,基于此版本进行按键功能的适配!
2026-03-23 11:14:56 +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);
}