mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
refactor(lcd): use LZ4-compressed binary images in i80_controller example
- Remove the EXAMPLE_LCD_IMAGE_SOURCE Kconfig option (embedded binary vs
file system) and always load images from LittleFS.
- Convert the PNG images into LZ4-compressed LVGL binary images (.bin)
at
build time using LVGLImage.py, and flash them to a LittleFS partition.
- Upgrade lvgl to 9.6.0 and add the espressif/lz4 component; link the
external LZ4 library into lvgl.
- Split the example: main.c focuses on the esp_lcd i80 API, while the
LVGL
porting (lvgl_port.c) and the UI (lvgl_demo_ui.c) live in separate
files.
- Rework the demo animation to use the LVGL animation engine (lv_anim)
with
easing paths instead of a manual software timer for smoother
rendering.
- Remove the embedded C image arrays (esp_logo.c, esp_text.c) and the
obsolete sdkconfig.ci.image_in_{bin,fs} variants.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
dependencies:
|
||||
lvgl/lvgl: 9.3.0
|
||||
lvgl/lvgl: "9.6.0"
|
||||
esp_lcd_touch_stmpe610: ^1.0.0
|
||||
atanisoft/esp_lcd_touch_xpt2046: 1.0.6
|
||||
|
||||
@@ -9,16 +9,16 @@
|
||||
#include "lvgl.h"
|
||||
|
||||
static lv_obj_t * btn;
|
||||
static lv_display_rotation_t rotation = LV_DISP_ROTATION_0;
|
||||
static lv_display_rotation_t rotation = LV_DISPLAY_ROTATION_0;
|
||||
|
||||
static void btn_cb(lv_event_t * e)
|
||||
{
|
||||
lv_display_t *disp = lv_event_get_user_data(e);
|
||||
rotation++;
|
||||
if (rotation > LV_DISP_ROTATION_270) {
|
||||
rotation = LV_DISP_ROTATION_0;
|
||||
if (rotation > LV_DISPLAY_ROTATION_270) {
|
||||
rotation = LV_DISPLAY_ROTATION_0;
|
||||
}
|
||||
lv_disp_set_rotation(disp, rotation);
|
||||
lv_display_set_rotation(disp, rotation);
|
||||
}
|
||||
static void set_angle(void * obj, int32_t v)
|
||||
{
|
||||
@@ -41,7 +41,7 @@ void example_lvgl_demo_ui(lv_display_t *disp)
|
||||
lv_arc_set_rotation(arc, 270);
|
||||
lv_arc_set_bg_angles(arc, 0, 360);
|
||||
lv_obj_remove_style(arc, NULL, LV_PART_KNOB); /*Be sure the knob is not displayed*/
|
||||
lv_obj_remove_flag(arc, LV_OBJ_FLAG_CLICKABLE); /*To not allow adjusting by click*/
|
||||
lv_obj_set_clickable(arc, false); /*To not allow adjusting by click*/
|
||||
lv_obj_center(arc);
|
||||
|
||||
lv_anim_t a;
|
||||
|
||||
Reference in New Issue
Block a user