Rdzleo c63b35a0e7
Some checks failed
Build Boards / Determine variants to build (push) Successful in 6m26s
Build Boards / Build ${{ matrix.name }} (push) Failing after 6m43s
1、第一次提交项目,项目初始化;
2、修改了RP2040的代码,使其在没有安装摄像头的情况下也可以左右转动眼球和左右转动身体;
3、增加了一些中文注释的说明;
2026-04-09 14:22:24 +08:00

59 lines
1.3 KiB
C++

#include <esp_log.h>
#include <esp_err.h>
#include <string>
#include <cstdlib>
#include <cstring>
#include <font_awesome.h>
#include "display.h"
#include "board.h"
#include "application.h"
#include "audio_codec.h"
#include "settings.h"
#include "assets/lang_config.h"
#include "uart_component.h"
#define TAG "Display"
Display::Display() {
}
Display::~Display() {
}
void Display::SetStatus(const char* status) {
ESP_LOGW(TAG, "SetStatus: %s", status);
}
void Display::ShowNotification(const std::string &notification, int duration_ms) {
ShowNotification(notification.c_str(), duration_ms);
}
void Display::ShowNotification(const char* notification, int duration_ms) {
ESP_LOGW(TAG, "ShowNotification: %s", notification);
}
void Display::UpdateStatusBar(bool update_all) {
}
void Display::SetEmotion(const char* emotion) {
ESP_LOGW(TAG, "SetEmotion: %s", emotion);
uart_send_string(emotion);
}
void Display::SetChatMessage(const char* role, const char* content) {
ESP_LOGW(TAG, "Role:%s", role);
ESP_LOGW(TAG, " %s", content);
}
void Display::SetTheme(Theme* theme) {
current_theme_ = theme;
Settings settings("display", true);
settings.SetString("theme", theme->name());
}
void Display::SetPowerSaveMode(bool on) {
ESP_LOGW(TAG, "SetPowerSaveMode: %d", on);
}