Skip to content

Commit 1eac9e5

Browse files
committed
修复编译报错问题,初始化变量值
1 parent 36ac43d commit 1eac9e5

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

examples/ai_voice_display_oled/display.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Display::Display(esp_lcd_panel_io_handle_t panel_io, esp_lcd_panel_handle_t pane
3232
.mirror_x = mirror_x,
3333
.mirror_y = mirror_y,
3434
},
35+
.color_format=LV_COLOR_FORMAT_UNKNOWN,
3536
.flags =
3637
{
3738
.buff_dma = 1,
@@ -57,11 +58,11 @@ void Display::Start() {
5758

5859
// 自适应布局计算
5960
// 基于屏幕尺寸计算合适的布局参数
60-
int status_bar_height;
61-
int content_left_width;
62-
int emotion_top_padding;
63-
int chat_message_top_padding;
64-
const lv_font_t* emotion_font;
61+
int status_bar_height=1;
62+
int content_left_width=1;
63+
int emotion_top_padding=1;
64+
int chat_message_top_padding=1;
65+
const lv_font_t* emotion_font=&font_awesome_14_1;
6566

6667
// 根据屏幕高度自适应调整布局
6768
if (height_ <= 32) {

0 commit comments

Comments
 (0)