add st7789

This commit is contained in:
Terrence
2024-11-06 10:06:05 +08:00
parent 3575448373
commit 20deb2b777
13 changed files with 250 additions and 28 deletions

View File

@@ -18,12 +18,14 @@ void Display::SetupUI() {
Lock();
label_ = lv_label_create(lv_disp_get_scr_act(disp_));
// lv_obj_set_style_text_font(label_, font_, 0);
lv_obj_set_style_text_color(label_, lv_color_black(), 0);
lv_label_set_text(label_, "Initializing...");
lv_obj_set_width(label_, disp_->driver->hor_res);
lv_obj_set_height(label_, disp_->driver->ver_res);
notification_ = lv_label_create(lv_disp_get_scr_act(disp_));
// lv_obj_set_style_text_font(notification_, font_, 0);
lv_obj_set_style_text_color(notification_, lv_color_black(), 0);
lv_label_set_text(notification_, "Notification\nTest");
lv_obj_set_width(notification_, disp_->driver->hor_res);
lv_obj_set_height(notification_, disp_->driver->ver_res);
@@ -106,7 +108,7 @@ void Display::ShowNotification(const std::string &text) {
void Display::UpdateDisplay() {
auto chat_state = Application::GetInstance().GetChatState();
if (chat_state == kChatStateIdle || chat_state == kChatStateConnecting || chat_state == kChatStateListening) {
if (chat_state == kChatStateIdle) {
std::string text;
auto& board = Board::GetInstance();
std::string network_name;