Rdzleo c24a9bc162 feat: 集成 dzbj LVGL 显示模块 + 配网模式内存优化
阶段1: 将 dzbj 项目的 LVGL 8.3.11 LCD 显示集成到 AI小智 主项目,
开机显示 ScreenHome 界面,同时优化配网模式下的内存使用,
确保 WiFi+BLE+LVGL 三者共存运行。

## 新增功能

### dzbj 显示模块集成
- 新增 main/dzbj/ 目录,移植 LCD 驱动(ST77916 QSPI)、触摸驱动(CST816S)、
  LVGL 初始化和 SquareLine Studio UI 界面
- I2C 总线共享:dzbj 触摸控制器复用主项目的 I2C_NUM_1 总线
- GPIO 冲突解决:LED(GPIO21)、Touch1(GPIO1)、Touch4(GPIO7) 改为 NC,
  电池 ADC 从 GPIO6 改为 GPIO3
- 添加 LVGL、esp_lcd_st77916、esp_lcd_touch_cst816s 等组件依赖
- managed_components 纳入版本管理

### 配网模式轻量化启动
- BoxAudioCodec: 新增 output_only 模式,仅创建 I2S TX 通道(省 ~13KB DMA)
  跳过 ES7210 ADC 初始化(省 ~2-4KB)
- AudioCodec: 新增 StartOutputOnly() 方法,仅启用扬声器输出
- Application: 配网模式跳过 Opus 编码器、输入重采样器、协议初始化、
  天气位置检测等网络业务
- 板级构造函数: 配网模式跳过电池检测、IMU传感器、PowerSaveTimer

### WifiBoard 配网流程修复
- NeedsProvisioning() 静态方法: 读取 NVS force_ap 和 SSID 列表,
  用于提前判断配网模式
- force_ap 竞态修复: 构造函数不再清零 force_ap,改在 StartNetwork() 清零,
  确保 NeedsProvisioning() 能正确读到 force_ap=1
- Application 缓存 provisioning_mode_ 成员变量,避免重复读 NVS

### BLE 配网重启修复
- 配网成功后用 esp_timer 延迟重启替代 xTaskCreate,
  避免内存紧张时任务创建失败导致设备不重启
- 注释掉 WiFi 连接成功后的 MAC 地址发送步骤

### sdkconfig 内存优化
- BT_ALLOCATION_FROM_SPIRAM_FIRST=y (BLE 动态分配优先 PSRAM)
- SPIRAM_MALLOC_RESERVE_INTERNAL=32768
- NVS_ALLOCATE_CACHE_IN_SPIRAM=y
- WiFi 静态缓冲区数量优化 (RX=10, TX=8)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 17:07:51 +08:00

47 KiB

Style properties

Size and position

Properties related to size, position, alignment and layout of the objects.

width

Sets the width of object. Pixel, percentage and LV_SIZE_CONTENT values can be used. Percentage values are relative to the width of the parent's content area.

  • Default Widget dependent
  • Inherited No
  • Layout Yes
  • Ext. draw No

min_width

Sets a minimal width. Pixel and percentage values can be used. Percentage values are relative to the width of the parent's content area.

  • Default 0
  • Inherited No
  • Layout Yes
  • Ext. draw No

max_width

Sets a maximal width. Pixel and percentage values can be used. Percentage values are relative to the width of the parent's content area.

  • Default LV_COORD_MAX
  • Inherited No
  • Layout Yes
  • Ext. draw No

height

Sets the height of object. Pixel, percentage and LV_SIZE_CONTENT can be used. Percentage values are relative to the height of the parent's content area.

  • Default Widget dependent
  • Inherited No
  • Layout Yes
  • Ext. draw No

min_height

Sets a minimal height. Pixel and percentage values can be used. Percentage values are relative to the width of the parent's content area.

  • Default 0
  • Inherited No
  • Layout Yes
  • Ext. draw No

max_height

Sets a maximal height. Pixel and percentage values can be used. Percentage values are relative to the height of the parent's content area.

  • Default LV_COORD_MAX
  • Inherited No
  • Layout Yes
  • Ext. draw No

x

Set the X coordinate of the object considering the set align. Pixel and percentage values can be used. Percentage values are relative to the width of the parent's content area.

  • Default 0
  • Inherited No
  • Layout Yes
  • Ext. draw No

y

Set the Y coordinate of the object considering the set align. Pixel and percentage values can be used. Percentage values are relative to the height of the parent's content area.

  • Default 0
  • Inherited No
  • Layout Yes
  • Ext. draw No

align

Set the alignment which tells from which point of the parent the X and Y coordinates should be interpreted. The possible values are: LV_ALIGN_DEFAULT, LV_ALIGN_TOP_LEFT/MID/RIGHT, LV_ALIGN_BOTTOM_LEFT/MID/RIGHT, LV_ALIGN_LEFT/RIGHT_MID, LV_ALIGN_CENTER. LV_ALIGN_DEFAULT means LV_ALIGN_TOP_LEFT with LTR base direction and LV_ALIGN_TOP_RIGHT with RTL base direction.

  • Default `LV_ALIGN_DEFAULT`
  • Inherited No
  • Layout Yes
  • Ext. draw No

transform_width

Make the object wider on both sides with this value. Pixel and percentage (with lv_pct(x)) values can be used. Percentage values are relative to the object's width.

  • Default 0
  • Inherited No
  • Layout No
  • Ext. draw Yes

transform_height

Make the object higher on both sides with this value. Pixel and percentage (with lv_pct(x)) values can be used. Percentage values are relative to the object's height.

  • Default 0
  • Inherited No
  • Layout No
  • Ext. draw Yes

translate_x

Move the object with this value in X direction. Applied after layouts, aligns and other positioning. Pixel and percentage (with lv_pct(x)) values can be used. Percentage values are relative to the object's width.

  • Default 0
  • Inherited No
  • Layout Yes
  • Ext. draw No

translate_y

Move the object with this value in Y direction. Applied after layouts, aligns and other positioning. Pixel and percentage (with lv_pct(x)) values can be used. Percentage values are relative to the object's height.

  • Default 0
  • Inherited No
  • Layout Yes
  • Ext. draw No

transform_zoom

Zoom an objects. The value 256 (or LV_IMG_ZOOM_NONE) means normal size, 128 half size, 512 double size, and so on

  • Default 0
  • Inherited No
  • Layout Yes
  • Ext. draw Yes

transform_angle

Rotate an objects. The value is interpreted in 0.1 degree units. E.g. 450 means 45 deg.

  • Default 0
  • Inherited No
  • Layout Yes
  • Ext. draw Yes

transform_pivot_x

Set the pivot point's X coordinate for transformations. Relative to the object's top left corner'

  • Default 0
  • Inherited No
  • Layout No
  • Ext. draw No

transform_pivot_y

Set the pivot point's Y coordinate for transformations. Relative to the object's top left corner'

  • Default 0
  • Inherited No
  • Layout No
  • Ext. draw No

Padding

Properties to describe spacing between the parent's sides and the children and among the children. Very similar to the padding properties in HTML.

pad_top

Sets the padding on the top. It makes the content area smaller in this direction.

  • Default 0
  • Inherited No
  • Layout Yes
  • Ext. draw No

pad_bottom

Sets the padding on the bottom. It makes the content area smaller in this direction.

  • Default 0
  • Inherited No
  • Layout Yes
  • Ext. draw No

pad_left

Sets the padding on the left. It makes the content area smaller in this direction.

  • Default 0
  • Inherited No
  • Layout Yes
  • Ext. draw No

pad_right

Sets the padding on the right. It makes the content area smaller in this direction.

  • Default 0
  • Inherited No
  • Layout Yes
  • Ext. draw No

pad_row

Sets the padding between the rows. Used by the layouts.

  • Default 0
  • Inherited No
  • Layout Yes
  • Ext. draw No

pad_column

Sets the padding between the columns. Used by the layouts.

  • Default 0
  • Inherited No
  • Layout Yes
  • Ext. draw No

Background

Properties to describe the background color and image of the objects.

bg_color

Set the background color of the object.

  • Default `0xffffff`
  • Inherited No
  • Layout No
  • Ext. draw No

bg_opa

Set the opacity of the background. Value 0, LV_OPA_0 or LV_OPA_TRANSP means fully transparent, 255, LV_OPA_100 or LV_OPA_COVER means fully covering, other values or LV_OPA_10, LV_OPA_20, etc means semi transparency.

  • Default `LV_OPA_TRANSP`
  • Inherited No
  • Layout No
  • Ext. draw No

bg_grad_color

Set the gradient color of the background. Used only if grad_dir is not LV_GRAD_DIR_NONE

  • Default `0x000000`
  • Inherited No
  • Layout No
  • Ext. draw No

bg_grad_dir

Set the direction of the gradient of the background. The possible values are LV_GRAD_DIR_NONE/HOR/VER.

  • Default `LV_GRAD_DIR_NONE`
  • Inherited No
  • Layout No
  • Ext. draw No

bg_main_stop

Set the point from which the background color should start for gradients. 0 means to top/left side, 255 the bottom/right side, 128 the center, and so on

  • Default 0
  • Inherited No
  • Layout No
  • Ext. draw No

bg_grad_stop

Set the point from which the background's gradient color should start. 0 means to top/left side, 255 the bottom/right side, 128 the center, and so on

  • Default 255
  • Inherited No
  • Layout No
  • Ext. draw No

bg_grad

Set the gradient definition. The pointed instance must exist while the object is alive. NULL to disable. It wraps BG_GRAD_COLOR, BG_GRAD_DIR, BG_MAIN_STOP and BG_GRAD_STOP into one descriptor and allows creating gradients with more colors too.

  • Default `NULL`
  • Inherited No
  • Layout No
  • Ext. draw No

bg_dither_mode

Set the dithering mode of the gradient of the background. The possible values are LV_DITHER_NONE/ORDERED/ERR_DIFF.

  • Default `LV_DITHER_NONE`
  • Inherited No
  • Layout No
  • Ext. draw No

bg_img_src

Set a background image. Can be a pointer to lv_img_dsc_t, a path to a file or an LV_SYMBOL_...

  • Default `NULL`
  • Inherited No
  • Layout No
  • Ext. draw Yes

bg_img_opa

Set the opacity of the background image. Value 0, LV_OPA_0 or LV_OPA_TRANSP means fully transparent, 255, LV_OPA_100 or LV_OPA_COVER means fully covering, other values or LV_OPA_10, LV_OPA_20, etc means semi transparency.

  • Default `LV_OPA_COVER`
  • Inherited No
  • Layout No
  • Ext. draw No

bg_img_recolor

Set a color to mix to the background image.

  • Default `0x000000`
  • Inherited No
  • Layout No
  • Ext. draw No

bg_img_recolor_opa

Set the intensity of background image recoloring. Value 0, LV_OPA_0 or LV_OPA_TRANSP means no mixing, 255, LV_OPA_100 or LV_OPA_COVER means full recoloring, other values or LV_OPA_10, LV_OPA_20, etc are interpreted proportionally.

  • Default `LV_OPA_TRANSP`
  • Inherited No
  • Layout No
  • Ext. draw No

bg_img_tiled

If enabled the background image will be tiled. The possible values are true or false.

  • Default 0
  • Inherited No
  • Layout No
  • Ext. draw No

Border

Properties to describe the borders

border_color

Set the color of the border

  • Default `0x000000`
  • Inherited No
  • Layout No
  • Ext. draw No

border_opa

Set the opacity of the border. Value 0, LV_OPA_0 or LV_OPA_TRANSP means fully transparent, 255, LV_OPA_100 or LV_OPA_COVER means fully covering, other values or LV_OPA_10, LV_OPA_20, etc means semi transparency.

  • Default `LV_OPA_COVER`
  • Inherited No
  • Layout No
  • Ext. draw No

border_width

Set the width of the border. Only pixel values can be used.

  • Default 0
  • Inherited No
  • Layout Yes
  • Ext. draw No

border_side

Set only which side(s) the border should be drawn. The possible values are LV_BORDER_SIDE_NONE/TOP/BOTTOM/LEFT/RIGHT/INTERNAL. OR-ed values can be used as well, e.g. LV_BORDER_SIDE_TOP | LV_BORDER_SIDE_LEFT.

  • Default `LV_BORDER_SIDE_NONE`
  • Inherited No
  • Layout No
  • Ext. draw No

border_post

Sets whether the border should be drawn before or after the children are drawn. true: after children, false: before children

  • Default 0
  • Inherited No
  • Layout No
  • Ext. draw No

Outline

Properties to describe the outline. It's like a border but drawn outside of the rectangles.

outline_width

Set the width of the outline in pixels.

  • Default 0
  • Inherited No
  • Layout No
  • Ext. draw Yes

outline_color

Set the color of the outline.

  • Default `0x000000`
  • Inherited No
  • Layout No
  • Ext. draw No

outline_opa

Set the opacity of the outline. Value 0, LV_OPA_0 or LV_OPA_TRANSP means fully transparent, 255, LV_OPA_100 or LV_OPA_COVER means fully covering, other values or LV_OPA_10, LV_OPA_20, etc means semi transparency.

  • Default `LV_OPA_COVER`
  • Inherited No
  • Layout No
  • Ext. draw Yes

outline_pad

Set the padding of the outline, i.e. the gap between object and the outline.

  • Default 0
  • Inherited No
  • Layout No
  • Ext. draw Yes

Shadow

Properties to describe the shadow drawn under the rectangles.

shadow_width

Set the width of the shadow in pixels. The value should be >= 0.

  • Default 0
  • Inherited No
  • Layout No
  • Ext. draw Yes

shadow_ofs_x

Set an offset on the shadow in pixels in X direction.

  • Default 0
  • Inherited No
  • Layout No
  • Ext. draw Yes

shadow_ofs_y

Set an offset on the shadow in pixels in Y direction.

  • Default 0
  • Inherited No
  • Layout No
  • Ext. draw Yes

shadow_spread

Make the shadow calculation to use a larger or smaller rectangle as base. The value can be in pixel to make the area larger/smaller

  • Default 0
  • Inherited No
  • Layout No
  • Ext. draw Yes

shadow_color

Set the color of the shadow

  • Default `0x000000`
  • Inherited No
  • Layout No
  • Ext. draw No

shadow_opa

Set the opacity of the shadow. Value 0, LV_OPA_0 or LV_OPA_TRANSP means fully transparent, 255, LV_OPA_100 or LV_OPA_COVER means fully covering, other values or LV_OPA_10, LV_OPA_20, etc means semi transparency.

  • Default `LV_OPA_COVER`
  • Inherited No
  • Layout No
  • Ext. draw Yes

Image

Properties to describe the images

img_opa

Set the opacity of an image. Value 0, LV_OPA_0 or LV_OPA_TRANSP means fully transparent, 255, LV_OPA_100 or LV_OPA_COVER means fully covering, other values or LV_OPA_10, LV_OPA_20, etc means semi transparency.

  • Default `LV_OPA_COVER`
  • Inherited No
  • Layout No
  • Ext. draw No

img_recolor

Set color to mixt to the image.

  • Default `0x000000`
  • Inherited No
  • Layout No
  • Ext. draw No

img_recolor_opa

Set the intensity of the color mixing. Value 0, LV_OPA_0 or LV_OPA_TRANSP means fully transparent, 255, LV_OPA_100 or LV_OPA_COVER means fully covering, other values or LV_OPA_10, LV_OPA_20, etc means semi transparency.

  • Default 0
  • Inherited No
  • Layout No
  • Ext. draw No

Line

Properties to describe line-like objects

line_width

Set the width of the lines in pixel.

  • Default 0
  • Inherited No
  • Layout No
  • Ext. draw Yes

line_dash_width

Set the width of dashes in pixel. Note that dash works only on horizontal and vertical lines

  • Default 0
  • Inherited No
  • Layout No
  • Ext. draw No

line_dash_gap

Set the gap between dashes in pixel. Note that dash works only on horizontal and vertical lines

  • Default 0
  • Inherited No
  • Layout No
  • Ext. draw No

line_rounded

Make the end points of the lines rounded. true: rounded, false: perpendicular line ending

  • Default 0
  • Inherited No
  • Layout No
  • Ext. draw No

line_color

Set the color fo the lines.

  • Default `0x000000`
  • Inherited No
  • Layout No
  • Ext. draw No

line_opa

Set the opacity of the lines.

  • Default `LV_OPA_COVER`
  • Inherited No
  • Layout No
  • Ext. draw No

Arc

TODO

arc_width

Set the width (thickness) of the arcs in pixel.

  • Default 0
  • Inherited No
  • Layout No
  • Ext. draw Yes

arc_rounded

Make the end points of the arcs rounded. true: rounded, false: perpendicular line ending

  • Default 0
  • Inherited No
  • Layout No
  • Ext. draw No

arc_color

Set the color of the arc.

  • Default `0x000000`
  • Inherited No
  • Layout No
  • Ext. draw No

arc_opa

Set the opacity of the arcs.

  • Default `LV_OPA_COVER`
  • Inherited No
  • Layout No
  • Ext. draw No

arc_img_src

Set an image from which the arc will be masked out. It's useful to display complex effects on the arcs. Can be a pointer to lv_img_dsc_t or a path to a file

  • Default `NULL`
  • Inherited No
  • Layout No
  • Ext. draw No

Text

Properties to describe the properties of text. All these properties are inherited.

text_color

Sets the color of the text.

  • Default `0x000000`
  • Inherited Yes
  • Layout No
  • Ext. draw No

text_opa

Set the opacity of the text. Value 0, LV_OPA_0 or LV_OPA_TRANSP means fully transparent, 255, LV_OPA_100 or LV_OPA_COVER means fully covering, other values or LV_OPA_10, LV_OPA_20, etc means semi transparency.

  • Default `LV_OPA_COVER`
  • Inherited Yes
  • Layout No
  • Ext. draw No

text_font

Set the font of the text (a pointer lv_font_t *).

  • Default `LV_FONT_DEFAULT`
  • Inherited Yes
  • Layout Yes
  • Ext. draw No

text_letter_space

Set the letter space in pixels

  • Default 0
  • Inherited Yes
  • Layout Yes
  • Ext. draw No

text_line_space

Set the line space in pixels.

  • Default 0
  • Inherited Yes
  • Layout Yes
  • Ext. draw No

text_decor

Set decoration for the text. The possible values are LV_TEXT_DECOR_NONE/UNDERLINE/STRIKETHROUGH. OR-ed values can be used as well.

  • Default `LV_TEXT_DECOR_NONE`
  • Inherited Yes
  • Layout No
  • Ext. draw No

text_align

Set how to align the lines of the text. Note that it doesn't align the object itself, only the lines inside the object. The possible values are LV_TEXT_ALIGN_LEFT/CENTER/RIGHT/AUTO. LV_TEXT_ALIGN_AUTO detect the text base direction and uses left or right alignment accordingly

  • Default `LV_TEXT_ALIGN_AUTO`
  • Inherited Yes
  • Layout Yes
  • Ext. draw No

Miscellaneous

Mixed properties for various purposes.

radius

Set the radius on every corner. The value is interpreted in pixel (>= 0) or LV_RADIUS_CIRCLE for max. radius

  • Default 0
  • Inherited No
  • Layout No
  • Ext. draw No

clip_corner

Enable to clip the overflowed content on the rounded corner. Can be true or false.

  • Default 0
  • Inherited No
  • Layout No
  • Ext. draw No

opa

Scale down all opacity values of the object by this factor. Value 0, LV_OPA_0 or LV_OPA_TRANSP means fully transparent, 255, LV_OPA_100 or LV_OPA_COVER means fully covering, other values or LV_OPA_10, LV_OPA_20, etc means semi transparency.

  • Default `LV_OPA_COVER`
  • Inherited Yes
  • Layout No
  • Ext. draw No

opa_layered

First draw the object on the layer, then scale down layer opacity factor. Value 0, LV_OPA_0 or LV_OPA_TRANSP means fully transparent, 255, LV_OPA_100 or LV_OPA_COVER means fully covering, other values or LV_OPA_10, LV_OPA_20, etc means semi transparency.

  • Default `LV_OPA_COVER`
  • Inherited Yes
  • Layout No
  • Ext. draw No

color_filter_dsc

Mix a color to all colors of the object.

  • Default `NULL`
  • Inherited No
  • Layout No
  • Ext. draw No

color_filter_opa

The intensity of mixing of color filter.

  • Default `LV_OPA_TRANSP`
  • Inherited No
  • Layout No
  • Ext. draw No

anim

The animation template for the object's animation. Should be a pointer to lv_anim_t. The animation parameters are widget specific, e.g. animation time could be the E.g. blink time of the cursor on the text area or scroll time of a roller. See the widgets' documentation to learn more.

  • Default `NULL`
  • Inherited No
  • Layout No
  • Ext. draw No

anim_time

The animation time in milliseconds. Its meaning is widget specific. E.g. blink time of the cursor on the text area or scroll time of a roller. See the widgets' documentation to learn more.

  • Default 0
  • Inherited No
  • Layout No
  • Ext. draw No

anim_speed

The animation speed in pixel/sec. Its meaning is widget specific. E.g. scroll speed of label. See the widgets' documentation to learn more.

  • Default 0
  • Inherited No
  • Layout No
  • Ext. draw No

transition

An initialized lv_style_transition_dsc_t to describe a transition.

  • Default `NULL`
  • Inherited No
  • Layout No
  • Ext. draw No

blend_mode

Describes how to blend the colors to the background. The possible values are LV_BLEND_MODE_NORMAL/ADDITIVE/SUBTRACTIVE/MULTIPLY

  • Default `LV_BLEND_MODE_NORMAL`
  • Inherited No
  • Layout No
  • Ext. draw No

layout

Set the layout of the object. The children will be repositioned and resized according to the policies set for the layout. For the possible values see the documentation of the layouts.

  • Default 0
  • Inherited No
  • Layout Yes
  • Ext. draw No

base_dir

Set the base direction of the object. The possible values are LV_BIDI_DIR_LTR/RTL/AUTO.

  • Default `LV_BASE_DIR_AUTO`
  • Inherited Yes
  • Layout Yes
  • Ext. draw No