Update to 2.0.0
This commit is contained in:
@@ -21,10 +21,6 @@
|
||||
|
||||
#define TAG "waveshare_lcd_1_46"
|
||||
|
||||
LV_FONT_DECLARE(font_puhui_16_4);
|
||||
LV_FONT_DECLARE(font_awesome_16_4);
|
||||
|
||||
|
||||
// 在waveshare_lcd_1_46类之前添加新的显示类
|
||||
class CustomLcdDisplay : public SpiLcdDisplay {
|
||||
public:
|
||||
@@ -47,12 +43,7 @@ public:
|
||||
bool mirror_y,
|
||||
bool swap_xy)
|
||||
: SpiLcdDisplay(io_handle, panel_handle,
|
||||
width, height, offset_x, offset_y, mirror_x, mirror_y, swap_xy,
|
||||
{
|
||||
.text_font = &font_puhui_16_4,
|
||||
.icon_font = &font_awesome_16_4,
|
||||
.emoji_font = font_emoji_64_init(),
|
||||
}) {
|
||||
width, height, offset_x, offset_y, mirror_x, mirror_y, swap_xy) {
|
||||
DisplayLockGuard lock(this);
|
||||
lv_display_add_event_cb(display_, rounder_event_cb, LV_EVENT_INVALIDATE_AREA, NULL);
|
||||
}
|
||||
@@ -68,7 +59,6 @@ private:
|
||||
button_driver_t* pwr_btn_driver_ = nullptr;
|
||||
static CustomBoard* instance_;
|
||||
|
||||
|
||||
void InitializeI2c() {
|
||||
// Initialize I2C peripheral
|
||||
i2c_master_bus_config_t i2c_bus_cfg = {
|
||||
@@ -160,6 +150,7 @@ private:
|
||||
// gpio_set_level(PWR_Control_PIN, false);
|
||||
gpio_set_level(PWR_Control_PIN, true);
|
||||
}
|
||||
|
||||
void InitializeButtons() {
|
||||
instance_ = this;
|
||||
InitializeButtonsCustom();
|
||||
|
||||
Reference in New Issue
Block a user