Update to 2.0.0

This commit is contained in:
2025-09-13 23:40:38 +08:00
parent 5a929f5b06
commit 63e404d610
247 changed files with 13586 additions and 11497 deletions

View File

@@ -21,7 +21,6 @@
#include "axp2101.h"
#include "power_save_timer.h"
#include "esp_lcd_axs15231b.h"
#include "custom_lcd_display.h"
@@ -34,11 +33,6 @@
#define TAG "waveshare_lcd_3_5b"
LV_FONT_DECLARE(font_puhui_16_4);
LV_FONT_DECLARE(font_awesome_16_4);
static const axs15231b_lcd_init_cmd_t lcd_init_cmds[] = {
{0xBB, (uint8_t[]){0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA5}, 8, 0},
{0xA0, (uint8_t[]){0xC0, 0x10, 0x00, 0x02, 0x00, 0x00, 0x04, 0x3F, 0x20, 0x05, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00}, 17, 0},
@@ -75,8 +69,6 @@ static const axs15231b_lcd_init_cmd_t lcd_init_cmds[] = {
{0x2a, (uint8_t[]){0x00, 0x00, 0x01, 0x3f}, 4, 0},
{0x2b, (uint8_t[]){0x00, 0x00, 0x01, 0xdf}, 4, 0}};
class Pmic : public Axp2101 {
public:
Pmic(i2c_master_bus_handle_t i2c_bus, uint8_t addr) : Axp2101(i2c_bus, addr) {
@@ -260,8 +252,7 @@ private:
.vendor_config = (void *)&vendor_config,
};
esp_lcd_new_panel_axs15231b(panel_io, &panel_config, &panel);
esp_lcd_panel_reset(panel);
esp_lcd_panel_init(panel);
@@ -271,14 +262,7 @@ private:
esp_lcd_panel_mirror(panel, DISPLAY_MIRROR_X, DISPLAY_MIRROR_Y);
display_ = new CustomLcdDisplay(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_16_4,
.icon_font = &font_awesome_16_4,
.emoji_font = font_emoji_32_init(),
});
// display_ = new CustomLcdDisplay(panel_io, panel, DISPLAY_BACKLIGHT_PIN, DISPLAY_BACKLIGHT_OUTPUT_INVERT,
// DISPLAY_WIDTH, DISPLAY_HEIGHT, DISPLAY_OFFSET_X, DISPLAY_OFFSET_Y, DISPLAY_MIRROR_X, DISPLAY_MIRROR_Y, DISPLAY_SWAP_XY);
DISPLAY_WIDTH, DISPLAY_HEIGHT, DISPLAY_OFFSET_X, DISPLAY_OFFSET_Y, DISPLAY_MIRROR_X, DISPLAY_MIRROR_Y, DISPLAY_SWAP_XY);
}
void InitializeButtons() {
@@ -291,7 +275,6 @@ private:
});
}
void InitializeTouch()
{
esp_lcd_touch_handle_t tp;
@@ -324,7 +307,6 @@ private:
ESP_LOGI(TAG, "Touch panel initialized successfully");
}
public:
CustomBoard() :
boot_button_(BOOT_BUTTON_GPIO) {
@@ -364,6 +346,7 @@ public:
virtual Camera* GetCamera() override {
return camera_;
}
#if PMIC_ENABLE
virtual bool GetBatteryLevel(int &level, bool& charging, bool& discharging) override {
static bool last_discharging = false;