Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion main/Kconfig.projbuild
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ choice DISPLAY_STYLE

config USE_EMOTE_MESSAGE_STYLE
bool "Emote animation style"
depends on BOARD_TYPE_ESP_BOX_3 || BOARD_TYPE_ECHOEAR
depends on BOARD_TYPE_ESP_BOX_3 || BOARD_TYPE_ECHOEAR || BOARD_TYPE_LICHUANG_DEV_S3
endchoice

choice WAKE_WORD_TYPE
Expand Down
22 changes: 22 additions & 0 deletions main/boards/lichuang-dev/emote.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[
{"emote": "happy", "src": "Happy.eaf", "loop": true, "fps": 20},
{"emote": "laughing", "src": "Happy.eaf", "loop": true, "fps": 20},
{"emote": "funny", "src": "Happy.eaf", "loop": true, "fps": 20},
{"emote": "loving", "src": "Happy.eaf", "loop": true, "fps": 20},
{"emote": "embarrassed", "src": "Happy.eaf", "loop": true, "fps": 20},
{"emote": "confident", "src": "Happy.eaf", "loop": true, "fps": 20},
{"emote": "delicious", "src": "Happy.eaf", "loop": true, "fps": 20},
{"emote": "sad", "src": "Sad.eaf", "loop": true, "fps": 20},
{"emote": "crying", "src": "cry.eaf", "loop": true, "fps": 20},
{"emote": "sleepy", "src": "sleep.eaf", "loop": true, "fps": 20},
{"emote": "silly", "src": "Happy.eaf", "loop": true, "fps": 20},
{"emote": "angry", "src": "angry.eaf", "loop": true, "fps": 20},
{"emote": "surprised", "src": "Happy.eaf", "loop": true, "fps": 20},
{"emote": "shocked", "src": "shocked.eaf", "loop": true, "fps": 20},
{"emote": "thinking", "src": "confused.eaf", "loop": true, "fps": 20},
{"emote": "winking", "src": "neutral.eaf", "loop": true, "fps": 20},
{"emote": "relaxed", "src": "Happy.eaf", "loop": true, "fps": 20},
{"emote": "confused", "src": "confused.eaf", "loop": true, "fps": 20},
{"emote": "neutral", "src": "winking.eaf", "loop": false, "fps": 20},
{"emote": "idle", "src": "neutral.eaf", "loop": false, "fps": 20}
]
37 changes: 37 additions & 0 deletions main/boards/lichuang-dev/layout.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[
{
"name": "eye_anim",
"align": "GFX_ALIGN_LEFT_MID",
"x": 10,
"y": 30
},
{
"name": "status_icon",
"align": "GFX_ALIGN_TOP_MID",
"x": -120,
"y": 18
},
{
"name": "toast_label",
"align": "GFX_ALIGN_TOP_MID",
"x": 0,
"y": 20,
"width": 200,
"height": 40
},
{
"name": "clock_label",
"align": "GFX_ALIGN_TOP_MID",
"x": 0,
"y": 20,
"width": 200,
"height": 50
},
{
"name": "listen_anim",
"align": "GFX_ALIGN_TOP_MID",
"x": 0,
"y": 5
}
]

17 changes: 14 additions & 3 deletions main/boards/lichuang-dev/lichuang_dev_board.cc
Original file line number Diff line number Diff line change
@@ -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 "application.h"
#include "button.h"
#include "config.h"
Expand Down Expand Up @@ -68,7 +69,7 @@ class LichuangDevBoard : public WifiBoard {
i2c_master_bus_handle_t i2c_bus_;
i2c_master_dev_handle_t pca9557_handle_;
Button boot_button_;
LcdDisplay* display_;
Display* display_;
Pca9557* pca9557_;
Esp32Camera* camera_;

Expand Down Expand Up @@ -152,8 +153,14 @@ class LichuangDevBoard : public WifiBoard {
esp_lcd_panel_invert_color(panel, true);
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);
DISPLAY_WIDTH, DISPLAY_HEIGHT, DISPLAY_OFFSET_X, DISPLAY_OFFSET_Y, DISPLAY_MIRROR_X, DISPLAY_MIRROR_Y, DISPLAY_SWAP_XY);
#endif
}

void InitializeTouch()
Expand Down Expand Up @@ -188,7 +195,11 @@ class LichuangDevBoard : public WifiBoard {
.handle = tp,
};

lvgl_port_add_touch(&touch_cfg);
if(touch_cfg.disp) {
lvgl_port_add_touch(&touch_cfg);
} else {
ESP_LOGE(TAG, "Touch display is not initialized");
}
}

void InitializeCamera() {
Expand Down