2024-11-18 06:17:39 +08:00
|
|
|
#include <esp_log.h>
|
|
|
|
|
#include <esp_err.h>
|
|
|
|
|
#include <string>
|
|
|
|
|
#include <cstdlib>
|
2025-03-06 05:22:06 +08:00
|
|
|
#include <cstring>
|
2025-08-29 09:04:23 +08:00
|
|
|
#include <font_awesome.h>
|
2024-11-18 06:17:39 +08:00
|
|
|
|
|
|
|
|
#include "display.h"
|
|
|
|
|
#include "board.h"
|
|
|
|
|
#include "application.h"
|
|
|
|
|
#include "audio_codec.h"
|
2025-02-14 01:15:10 +08:00
|
|
|
#include "settings.h"
|
2025-03-06 05:22:06 +08:00
|
|
|
#include "assets/lang_config.h"
|
2024-11-18 06:17:39 +08:00
|
|
|
|
|
|
|
|
#define TAG "Display"
|
|
|
|
|
|
|
|
|
|
Display::Display() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Display::~Display() {
|
|
|
|
|
}
|
|
|
|
|
|
2025-02-19 23:54:59 +08:00
|
|
|
void Display::SetStatus(const char* status) {
|
2025-09-10 18:43:47 +08:00
|
|
|
ESP_LOGW(TAG, "SetStatus: %s", status);
|
2024-11-18 06:17:39 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Display::ShowNotification(const std::string ¬ification, int duration_ms) {
|
2025-02-19 23:54:59 +08:00
|
|
|
ShowNotification(notification.c_str(), duration_ms);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Display::ShowNotification(const char* notification, int duration_ms) {
|
2025-09-10 18:43:47 +08:00
|
|
|
ESP_LOGW(TAG, "ShowNotification: %s", notification);
|
2024-11-18 06:17:39 +08:00
|
|
|
}
|
|
|
|
|
|
2025-05-24 07:25:34 +08:00
|
|
|
void Display::UpdateStatusBar(bool update_all) {
|
2024-11-18 06:17:39 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2025-02-19 23:54:59 +08:00
|
|
|
void Display::SetEmotion(const char* emotion) {
|
2025-09-10 18:43:47 +08:00
|
|
|
ESP_LOGW(TAG, "SetEmotion: %s", emotion);
|
2024-11-18 06:17:39 +08:00
|
|
|
}
|
|
|
|
|
|
2025-02-19 23:54:59 +08:00
|
|
|
void Display::SetChatMessage(const char* role, const char* content) {
|
2025-09-10 18:43:47 +08:00
|
|
|
ESP_LOGW(TAG, "Role:%s", role);
|
|
|
|
|
ESP_LOGW(TAG, " %s", content);
|
2024-11-18 06:17:39 +08:00
|
|
|
}
|
2025-03-20 03:00:07 +08:00
|
|
|
|
2025-09-10 18:43:47 +08:00
|
|
|
void Display::SetTheme(Theme* theme) {
|
2025-09-11 03:53:12 +08:00
|
|
|
current_theme_ = theme;
|
|
|
|
|
Settings settings("display", true);
|
|
|
|
|
settings.SetString("theme", theme->name());
|
2025-03-20 03:00:07 +08:00
|
|
|
}
|
2025-07-19 22:45:22 +08:00
|
|
|
|
2025-07-29 15:25:40 +08:00
|
|
|
void Display::SetPowerSaveMode(bool on) {
|
2025-09-11 03:53:12 +08:00
|
|
|
ESP_LOGW(TAG, "SetPowerSaveMode: %d", on);
|
2025-09-04 15:41:28 +08:00
|
|
|
}
|