Update to 2.0.0
This commit is contained in:
@@ -19,10 +19,6 @@
|
||||
|
||||
#define TAG "ZHENGCHEN_1_54TFT_WIFI"
|
||||
|
||||
LV_FONT_DECLARE(font_puhui_20_4);
|
||||
LV_FONT_DECLARE(font_awesome_20_4);
|
||||
|
||||
|
||||
class ZHENGCHEN_1_54TFT_WIFI : public WifiBoard {
|
||||
private:
|
||||
Button boot_button_;
|
||||
@@ -91,7 +87,6 @@ private:
|
||||
app.ToggleChatState();
|
||||
});
|
||||
|
||||
|
||||
// 设置开机按钮的长按事件(直接进入配网模式)
|
||||
boot_button_.OnLongPress([this]() {
|
||||
// 唤醒电源保存定时器
|
||||
@@ -166,12 +161,7 @@ private:
|
||||
ESP_ERROR_CHECK(esp_lcd_panel_invert_color(panel_, true));
|
||||
|
||||
display_ = new ZHENGCHEN_LcdDisplay(panel_io_, panel_, DISPLAY_WIDTH, DISPLAY_HEIGHT, DISPLAY_OFFSET_X, DISPLAY_OFFSET_Y,
|
||||
DISPLAY_MIRROR_X, DISPLAY_MIRROR_Y, DISPLAY_SWAP_XY,
|
||||
{
|
||||
.text_font = &font_puhui_20_4,
|
||||
.icon_font = &font_awesome_20_4,
|
||||
.emoji_font = font_emoji_64_init(),
|
||||
});
|
||||
DISPLAY_MIRROR_X, DISPLAY_MIRROR_Y, DISPLAY_SWAP_XY);
|
||||
display_->SetupHighTempWarningPopup();
|
||||
}
|
||||
|
||||
@@ -179,7 +169,7 @@ private:
|
||||
}
|
||||
|
||||
public:
|
||||
ZHENGCHEN_1_54TFT_WIFI() :
|
||||
ZHENGCHEN_1_54TFT_WIFI() :
|
||||
boot_button_(BOOT_BUTTON_GPIO),
|
||||
volume_up_button_(VOLUME_UP_BUTTON_GPIO),
|
||||
volume_down_button_(VOLUME_DOWN_BUTTON_GPIO) {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define ZHENGCHEN_LCD_DISPLAY_H
|
||||
|
||||
#include "display/lcd_display.h"
|
||||
#include "lvgl_theme.h"
|
||||
#include <esp_lvgl_port.h>
|
||||
|
||||
class ZHENGCHEN_LcdDisplay : public SpiLcdDisplay {
|
||||
@@ -14,10 +15,12 @@ public:
|
||||
using SpiLcdDisplay::SpiLcdDisplay;
|
||||
|
||||
void SetupHighTempWarningPopup() {
|
||||
auto lvgl_theme = static_cast<LvglTheme*>(current_theme_);
|
||||
auto text_font = lvgl_theme->text_font()->font();
|
||||
// 创建高温警告弹窗
|
||||
high_temp_popup_ = lv_obj_create(lv_screen_active()); // 使用当前屏幕
|
||||
lv_obj_set_scrollbar_mode(high_temp_popup_, LV_SCROLLBAR_MODE_OFF);
|
||||
lv_obj_set_size(high_temp_popup_, LV_HOR_RES * 0.9, fonts_.text_font->line_height * 2);
|
||||
lv_obj_set_size(high_temp_popup_, LV_HOR_RES * 0.9, text_font->line_height * 2);
|
||||
lv_obj_align(high_temp_popup_, LV_ALIGN_BOTTOM_MID, 0, 0);
|
||||
lv_obj_set_style_bg_color(high_temp_popup_, lv_palette_main(LV_PALETTE_RED), 0);
|
||||
lv_obj_set_style_radius(high_temp_popup_, 10, 0);
|
||||
|
||||
Reference in New Issue
Block a user