feat: update emote display (#1629)

This commit is contained in:
espressif2022
2026-01-07 20:39:17 +08:00
committed by GitHub
parent 906d819454
commit 1e8fefbede
17 changed files with 412 additions and 1014 deletions

View File

@ -1,6 +1,7 @@
#include "wifi_board.h"
#include "codecs/box_audio_codec.h"
#include "display/lcd_display.h"
#include "display/emote_display.h"
#include "esp_lcd_ili9341.h"
#include "application.h"
#include "button.h"
@ -38,7 +39,7 @@ class EspBox3Board : public WifiBoard {
private:
i2c_master_bus_handle_t i2c_bus_;
Button boot_button_;
LcdDisplay* display_;
Display* display_;
void InitializeI2c() {
// Initialize I2C peripheral
@ -125,8 +126,13 @@ private:
esp_lcd_panel_swap_xy(panel, DISPLAY_SWAP_XY);
esp_lcd_panel_mirror(panel, DISPLAY_MIRROR_X, DISPLAY_MIRROR_Y);
esp_lcd_panel_disp_on_off(panel, true);
#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);
#endif
}
public: