feat: add emote style for v2 (#1217)

* feat: add emote style for v2

* feat: delete asset probe apply
This commit is contained in:
espressif2022
2025-09-19 14:14:43 +08:00
committed by GitHub
parent 4616fa3486
commit 8d58bdb21b
19 changed files with 1275 additions and 569 deletions

View File

@@ -1,11 +1,11 @@
#include "wifi_board.h"
#include "codecs/box_audio_codec.h"
#include "display/lcd_display.h"
#include "display/emote_display.h"
#include "application.h"
#include "button.h"
#include "config.h"
#include "backlight.h"
#include "emote_display.h"
#include <wifi_station.h>
#include <esp_log.h>
@@ -26,7 +26,6 @@
#define TAG "EchoEar"
#define USE_LVGL_DEFAULT 0
temperature_sensor_handle_t temp_sensor = NULL;
static const st77916_lcd_init_cmd_t vendor_specific_init_yysj[] = {
@@ -387,11 +386,7 @@ private:
Cst816s* cst816s_;
Charge* charge_;
Button boot_button_;
#if USE_LVGL_DEFAULT
LcdDisplay* display_;
#else
anim::EmoteDisplay* display_ = nullptr;
#endif
Display* display_ = nullptr;
PwmBacklight* backlight_ = nullptr;
esp_timer_handle_t touchpad_timer_;
esp_lcd_touch_handle_t tp; // LCD touch handle
@@ -517,13 +512,12 @@ private:
void InitializeSpi()
{
spi_bus_config_t bus_config = TAIJIPI_ST77916_PANEL_BUS_QSPI_CONFIG(QSPI_PIN_NUM_LCD_PCLK,
QSPI_PIN_NUM_LCD_DATA0,
QSPI_PIN_NUM_LCD_DATA1,
QSPI_PIN_NUM_LCD_DATA2,
QSPI_PIN_NUM_LCD_DATA3,
QSPI_LCD_H_RES * 80 * sizeof(uint16_t));
// bus_config.isr_cpu_id = ESP_INTR_CPU_AFFINITY_1;
const spi_bus_config_t bus_config = TAIJIPI_ST77916_PANEL_BUS_QSPI_CONFIG(QSPI_PIN_NUM_LCD_PCLK,
QSPI_PIN_NUM_LCD_DATA0,
QSPI_PIN_NUM_LCD_DATA1,
QSPI_PIN_NUM_LCD_DATA2,
QSPI_PIN_NUM_LCD_DATA3,
QSPI_LCD_H_RES * 80 * sizeof(uint16_t));
ESP_ERROR_CHECK(spi_bus_initialize(QSPI_LCD_HOST, &bus_config, SPI_DMA_CH_AUTO));
}
@@ -559,11 +553,11 @@ private:
esp_lcd_panel_swap_xy(panel, DISPLAY_SWAP_XY);
esp_lcd_panel_mirror(panel, DISPLAY_MIRROR_X, DISPLAY_MIRROR_Y);
#if USE_LVGL_DEFAULT
#if CONFIG_USE_EMOTE_MESSAGE_STYLE
display_ = new emote::EmoteDisplay(panel, panel_io, DISPLAY_WIDTH, DISPLAY_HEIGHT);
#else
display_ = new SpiLcdDisplay(panel_io, panel,
DISPLAY_WIDTH, DISPLAY_HEIGHT, DISPLAY_OFFSET_X, DISPLAY_OFFSET_Y, DISPLAY_MIRROR_X, DISPLAY_MIRROR_Y, DISPLAY_SWAP_XY);
#else
display_ = new anim::EmoteDisplay(panel, panel_io);
#endif
backlight_ = new PwmBacklight(DISPLAY_BACKLIGHT_PIN, DISPLAY_BACKLIGHT_OUTPUT_INVERT);
backlight_->RestoreBrightness();