Merge remote-tracking branch 'origin/master'
@@ -760,6 +760,9 @@
|
|||||||
#define LV_LINUX_FBDEV_BSD 0
|
#define LV_LINUX_FBDEV_BSD 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*Driver for /dev/dri/card*/
|
||||||
|
#define LV_USE_LINUX_DRM 0
|
||||||
|
|
||||||
/*Interface for TFT_eSPI*/
|
/*Interface for TFT_eSPI*/
|
||||||
#define LV_USE_TFT_ESPI 0
|
#define LV_USE_TFT_ESPI 0
|
||||||
|
|
||||||
|
|||||||
@@ -23,13 +23,12 @@ jobs:
|
|||||||
- name: Clone lv_micropython
|
- name: Clone lv_micropython
|
||||||
run: |
|
run: |
|
||||||
git clone https://github.com/lvgl/lv_micropython.git .
|
git clone https://github.com/lvgl/lv_micropython.git .
|
||||||
git checkout master
|
git checkout feat/parallel-rendering
|
||||||
- name: Initialize lv_bindings submodule
|
- name: Initialize lv_bindings submodule
|
||||||
run: git submodule update --init --recursive lib/lv_bindings
|
run: git submodule update --init --recursive lib/lv_bindings
|
||||||
- name: Update ${{ matrix.port }} port submodules
|
- name: Update ${{ matrix.port }} port submodules
|
||||||
if: matrix.port != 'esp32'
|
if: matrix.port != 'esp32' && matrix.port != 'rp2'
|
||||||
# VARIANT needed for unix
|
run: make -C ports/${{ matrix.port }} DEBUG=1 USER_C_MODULES=../../lib/lv_bindings/bindings.cmake submodules
|
||||||
run: make -C ports/${{ matrix.port }} VARIANT=dev DEBUG=1 USER_C_MODULES=../../lib/lv_bindings/bindings.cmake submodules
|
|
||||||
- name: Checkout LVGL submodule
|
- name: Checkout LVGL submodule
|
||||||
working-directory: ./lib/lv_bindings/lvgl
|
working-directory: ./lib/lv_bindings/lvgl
|
||||||
run: |
|
run: |
|
||||||
@@ -61,11 +60,13 @@ jobs:
|
|||||||
run: make -j $(nproc) -C ports/stm32 BOARD=STM32F7DISC
|
run: make -j $(nproc) -C ports/stm32 BOARD=STM32F7DISC
|
||||||
- name: Build Raspberry Pi PICO port
|
- name: Build Raspberry Pi PICO port
|
||||||
if: matrix.port == 'rp2'
|
if: matrix.port == 'rp2'
|
||||||
run: make -j $(nproc) -C ports/rp2 BOARD=PICO USER_C_MODULES=../../lib/lv_bindings/bindings.cmake
|
run: |
|
||||||
|
make -C ports/rp2 BOARD=PICO submodules
|
||||||
|
make -j $(nproc) -C ports/rp2 BOARD=PICO USER_C_MODULES=../../lib/lv_bindings/bindings.cmake
|
||||||
# Unix port
|
# Unix port
|
||||||
- name: Build Unix port
|
- name: Build Unix port
|
||||||
if: matrix.port == 'unix'
|
if: matrix.port == 'unix'
|
||||||
run: make -j $(nproc) -C ports/unix VARIANT=dev DEBUG=1
|
run: make -j $(nproc) -C ports/unix DEBUG=1
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
if: success() && matrix.port == 'unix'
|
if: success() && matrix.port == 'unix'
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -14,8 +14,7 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
# A valid option parameter to the cmake file.
|
# A valid option parameter to the cmake file.
|
||||||
# See BUILD_OPTIONS in tests/CMakeLists.txt.
|
# See BUILD_OPTIONS in tests/CMakeLists.txt.
|
||||||
build_option: ['OPTIONS_NORMAL_8BIT',
|
build_option: ['OPTIONS_16BIT',
|
||||||
'OPTIONS_16BIT',
|
|
||||||
'OPTIONS_24BIT',
|
'OPTIONS_24BIT',
|
||||||
'OPTIONS_FULL_32BIT']
|
'OPTIONS_FULL_32BIT']
|
||||||
name: Build ${{ matrix.build_option }}
|
name: Build ${{ matrix.build_option }}
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ menu "LVGL configuration"
|
|||||||
|
|
||||||
config LV_COLOR_DEPTH_32
|
config LV_COLOR_DEPTH_32
|
||||||
bool "32: ARGB8888"
|
bool "32: ARGB8888"
|
||||||
|
config LV_COLOR_DEPTH_24
|
||||||
|
bool "24: RGB888"
|
||||||
config LV_COLOR_DEPTH_16
|
config LV_COLOR_DEPTH_16
|
||||||
bool "16: RGB565"
|
bool "16: RGB565"
|
||||||
config LV_COLOR_DEPTH_8
|
config LV_COLOR_DEPTH_8
|
||||||
@@ -34,6 +36,7 @@ menu "LVGL configuration"
|
|||||||
default 1 if LV_COLOR_DEPTH_1
|
default 1 if LV_COLOR_DEPTH_1
|
||||||
default 8 if LV_COLOR_DEPTH_8
|
default 8 if LV_COLOR_DEPTH_8
|
||||||
default 16 if LV_COLOR_DEPTH_16
|
default 16 if LV_COLOR_DEPTH_16
|
||||||
|
default 24 if LV_COLOR_DEPTH_24
|
||||||
default 32 if LV_COLOR_DEPTH_32
|
default 32 if LV_COLOR_DEPTH_32
|
||||||
|
|
||||||
config LV_COLOR_MIX_ROUND_OFS
|
config LV_COLOR_MIX_ROUND_OFS
|
||||||
@@ -57,28 +60,65 @@ menu "LVGL configuration"
|
|||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
menu "Memory settings"
|
menu "Memory settings"
|
||||||
config LV_MEM_CUSTOM
|
choice
|
||||||
bool "If true use custom malloc/free, otherwise use the built-in `lv_malloc()` and `lv_free()`"
|
prompt "Malloc functions source"
|
||||||
|
default LV_USE_BUILTIN_MALLOC
|
||||||
|
|
||||||
|
config LV_USE_BUILTIN_MALLOC
|
||||||
|
bool "LVGL's built in implementation"
|
||||||
|
|
||||||
|
config LV_USE_CLIB_MALLOC
|
||||||
|
bool "Standard C functions malloc/realloc/free"
|
||||||
|
|
||||||
|
config LV_USE_CUSTOM_MALLOC
|
||||||
|
bool "Implement the functions externally"
|
||||||
|
|
||||||
|
endchoice # "Malloc functions"
|
||||||
|
|
||||||
|
choice
|
||||||
|
prompt "String functions source"
|
||||||
|
default LV_USE_BUILTIN_STRING
|
||||||
|
|
||||||
|
config LV_USE_BUILTIN_STRING
|
||||||
|
bool "LVGL's built in implementation"
|
||||||
|
|
||||||
|
config LV_USE_CLIB_STRING
|
||||||
|
bool "Standard C functions memcpy/memset/strlen/strcpy"
|
||||||
|
|
||||||
|
config LV_USE_CUSTOM_STRING
|
||||||
|
bool "Implement the functions externally"
|
||||||
|
|
||||||
|
endchoice # "String functions"
|
||||||
|
|
||||||
|
choice
|
||||||
|
prompt "Sprintf functions source"
|
||||||
|
default LV_USE_BUILTIN_SPRINTF
|
||||||
|
|
||||||
|
config LV_USE_BUILTIN_SPRINTF
|
||||||
|
bool "LVGL's built in implementation"
|
||||||
|
|
||||||
|
config LV_USE_CLIB_SPRINTF
|
||||||
|
bool "Standard C functions vsnprintf"
|
||||||
|
|
||||||
|
config LV_USE_CUSTOM_SPRINTF
|
||||||
|
bool "Implement the functions externally"
|
||||||
|
|
||||||
|
endchoice # "Sprintf functions"
|
||||||
|
|
||||||
config LV_MEM_SIZE_KILOBYTES
|
config LV_MEM_SIZE_KILOBYTES
|
||||||
int "Size of the memory used by `lv_malloc()` in kilobytes (>= 2kB)"
|
int "Size of the memory used by `lv_malloc()` in kilobytes (>= 2kB)"
|
||||||
default 32
|
default 32
|
||||||
depends on !LV_MEM_CUSTOM
|
depends on LV_USE_BUILTIN_MALLOC
|
||||||
|
|
||||||
config LV_MEM_POOL_EXPAND_SIZE_KILOBYTES
|
config LV_MEM_POOL_EXPAND_SIZE_KILOBYTES
|
||||||
int "Size of the memory expand for `lv_malloc()` in kilobytes"
|
int "Size of the memory expand for `lv_malloc()` in kilobytes"
|
||||||
default 0
|
default 0
|
||||||
depends on !LV_MEM_CUSTOM
|
depends on LV_USE_BUILTIN_MALLOC
|
||||||
|
|
||||||
config LV_MEM_ADDR
|
config LV_MEM_ADR
|
||||||
hex "Address for the memory pool instead of allocating it as a normal array"
|
hex "Address for the memory pool instead of allocating it as a normal array"
|
||||||
default 0x0
|
default 0x0
|
||||||
depends on !LV_MEM_CUSTOM
|
depends on LV_USE_BUILTIN_MALLOC
|
||||||
|
|
||||||
config LV_MEM_CUSTOM_INCLUDE
|
|
||||||
string "Header to include for the custom memory function"
|
|
||||||
default "stdlib.h"
|
|
||||||
depends on LV_MEM_CUSTOM
|
|
||||||
|
|
||||||
config LV_MEM_BUF_MAX_NUM
|
config LV_MEM_BUF_MAX_NUM
|
||||||
int "Number of the memory buffer"
|
int "Number of the memory buffer"
|
||||||
@@ -88,8 +128,6 @@ menu "LVGL configuration"
|
|||||||
internal processing mechanisms. You will see an error log message if
|
internal processing mechanisms. You will see an error log message if
|
||||||
there wasn't enough buffers.
|
there wasn't enough buffers.
|
||||||
|
|
||||||
config LV_MEMCPY_MEMSET_STD
|
|
||||||
bool "Use the standard memcpy and memset instead of LVGL's own functions"
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
menu "HAL Settings"
|
menu "HAL Settings"
|
||||||
@@ -112,25 +150,32 @@ menu "LVGL configuration"
|
|||||||
menu "Feature configuration"
|
menu "Feature configuration"
|
||||||
|
|
||||||
menu "Drawing"
|
menu "Drawing"
|
||||||
config LV_DRAW_COMPLEX
|
config LV_USE_DRAW_SW
|
||||||
|
bool "Enable software rendering"
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Required to draw anything on the screen.
|
||||||
|
|
||||||
|
config LV_DRAW_SW_COMPLEX
|
||||||
bool "Enable complex draw engine"
|
bool "Enable complex draw engine"
|
||||||
default y
|
default y
|
||||||
|
depends on LV_USE_DRAW_SW
|
||||||
help
|
help
|
||||||
Required to draw shadow, gradient, rounded corners, circles, arc, skew lines,
|
Required to draw shadow, gradient, rounded corners, circles, arc, skew lines,
|
||||||
image transformations or any masks.
|
image transformations or any masks.
|
||||||
|
|
||||||
config LV_SHADOW_CACHE_SIZE
|
config LV_DRAW_SW_SHADOW_CACHE_SIZE
|
||||||
int "Allow buffering some shadow calculation"
|
int "Allow buffering some shadow calculation"
|
||||||
depends on LV_DRAW_COMPLEX
|
depends on LV_DRAW_SW_COMPLEX
|
||||||
default 0
|
default 0
|
||||||
help
|
help
|
||||||
LV_SHADOW_CACHE_SIZE is the max shadow size to buffer, where
|
LV_DRAW_SW_SHADOW_CACHE_SIZE is the max shadow size to buffer, where
|
||||||
shadow size is `shadow_width + radius`.
|
shadow size is `shadow_width + radius`.
|
||||||
Caching has LV_SHADOW_CACHE_SIZE^2 RAM cost.
|
Caching has LV_DRAW_SW_SHADOW_CACHE_SIZE^2 RAM cost.
|
||||||
|
|
||||||
config LV_CIRCLE_CACHE_SIZE
|
config LV_DRAW_SW_CIRCLE_CACHE_SIZE
|
||||||
int "Set number of maximally cached circle data"
|
int "Set number of maximally cached circle data"
|
||||||
depends on LV_DRAW_COMPLEX
|
depends on LV_DRAW_SW_COMPLEX
|
||||||
default 4
|
default 4
|
||||||
help
|
help
|
||||||
The circumference of 1/4 circle are saved for anti-aliasing
|
The circumference of 1/4 circle are saved for anti-aliasing
|
||||||
@@ -138,9 +183,10 @@ menu "LVGL configuration"
|
|||||||
radiuses are saved).
|
radiuses are saved).
|
||||||
Set to 0 to disable caching.
|
Set to 0 to disable caching.
|
||||||
|
|
||||||
config LV_LAYER_SIMPLE_BUF_SIZE
|
config LV_DRAW_SW_LAYER_SIMPLE_BUF_SIZE
|
||||||
int "Optimal size to buffer the widget with opacity"
|
int "Optimal size to buffer the widget with opacity"
|
||||||
default 24576
|
default 24576
|
||||||
|
depends on LV_USE_DRAW_SW
|
||||||
help
|
help
|
||||||
"Simple layers" are used when a widget has `style_opa < 255`
|
"Simple layers" are used when a widget has `style_opa < 255`
|
||||||
to buffer the widget into a layer and blend it as an image
|
to buffer the widget into a layer and blend it as an image
|
||||||
@@ -150,6 +196,7 @@ menu "LVGL configuration"
|
|||||||
config LV_IMG_CACHE_DEF_SIZE
|
config LV_IMG_CACHE_DEF_SIZE
|
||||||
int "Default image cache size. 0 to disable caching."
|
int "Default image cache size. 0 to disable caching."
|
||||||
default 0
|
default 0
|
||||||
|
depends on LV_USE_DRAW_SW
|
||||||
help
|
help
|
||||||
If only the built-in image formats are used there is no real advantage of caching.
|
If only the built-in image formats are used there is no real advantage of caching.
|
||||||
(I.e. no new image decoder is added).
|
(I.e. no new image decoder is added).
|
||||||
@@ -161,6 +208,7 @@ menu "LVGL configuration"
|
|||||||
config LV_GRADIENT_MAX_STOPS
|
config LV_GRADIENT_MAX_STOPS
|
||||||
int "Number of stops allowed per gradient."
|
int "Number of stops allowed per gradient."
|
||||||
default 2
|
default 2
|
||||||
|
depends on LV_USE_DRAW_SW
|
||||||
help
|
help
|
||||||
Increase this to allow more stops.
|
Increase this to allow more stops.
|
||||||
This adds (sizeof(lv_color_t) + 1) bytes per additional stop
|
This adds (sizeof(lv_color_t) + 1) bytes per additional stop
|
||||||
@@ -168,6 +216,7 @@ menu "LVGL configuration"
|
|||||||
config LV_GRAD_CACHE_DEF_SIZE
|
config LV_GRAD_CACHE_DEF_SIZE
|
||||||
int "Default gradient buffer size."
|
int "Default gradient buffer size."
|
||||||
default 0
|
default 0
|
||||||
|
depends on LV_USE_DRAW_SW
|
||||||
help
|
help
|
||||||
When LVGL calculates the gradient "maps" it can save them into a cache to avoid calculating them again.
|
When LVGL calculates the gradient "maps" it can save them into a cache to avoid calculating them again.
|
||||||
LV_GRAD_CACHE_DEF_SIZE sets the size of this cache in bytes.
|
LV_GRAD_CACHE_DEF_SIZE sets the size of this cache in bytes.
|
||||||
@@ -176,6 +225,7 @@ menu "LVGL configuration"
|
|||||||
|
|
||||||
config LV_DITHER_GRADIENT
|
config LV_DITHER_GRADIENT
|
||||||
bool "Allow dithering the gradients"
|
bool "Allow dithering the gradients"
|
||||||
|
depends on LV_USE_DRAW_SW
|
||||||
help
|
help
|
||||||
Allow dithering the gradients (to achieve visual smooth color gradients on limited color depth display)
|
Allow dithering the gradients (to achieve visual smooth color gradients on limited color depth display)
|
||||||
LV_DITHER_GRADIENT implies allocating one or two more lines of the object's rendering surface
|
LV_DITHER_GRADIENT implies allocating one or two more lines of the object's rendering surface
|
||||||
@@ -191,6 +241,7 @@ menu "LVGL configuration"
|
|||||||
config LV_DISP_ROT_MAX_BUF
|
config LV_DISP_ROT_MAX_BUF
|
||||||
int "Maximum buffer size to allocate for rotation"
|
int "Maximum buffer size to allocate for rotation"
|
||||||
default 10240
|
default 10240
|
||||||
|
depends on LV_USE_DRAW_SW
|
||||||
help
|
help
|
||||||
Only used if software rotation is enabled in the display driver.
|
Only used if software rotation is enabled in the display driver.
|
||||||
endmenu
|
endmenu
|
||||||
@@ -436,17 +487,13 @@ menu "LVGL configuration"
|
|||||||
config LV_USE_REFR_DEBUG
|
config LV_USE_REFR_DEBUG
|
||||||
bool "Draw random colored rectangles over the redrawn areas."
|
bool "Draw random colored rectangles over the redrawn areas."
|
||||||
|
|
||||||
config LV_SPRINTF_CUSTOM
|
config LV_USE_BUILTIN_SNPRINTF
|
||||||
bool "Change the built-in (v)snprintf functions"
|
bool "Use the built-in (v)snprintf functions"
|
||||||
|
default y
|
||||||
config LV_SPRINTF_INCLUDE
|
|
||||||
string "Header to include for the custom sprintf function"
|
|
||||||
depends on LV_SPRINTF_CUSTOM
|
|
||||||
default "stdio.h"
|
|
||||||
|
|
||||||
config LV_SPRINTF_USE_FLOAT
|
config LV_SPRINTF_USE_FLOAT
|
||||||
bool "Enable float in built-in (v)snprintf functions"
|
bool "Enable float in built-in (v)snprintf functions"
|
||||||
depends on !LV_SPRINTF_CUSTOM
|
depends on LV_USE_BUILTIN_SNPRINTF
|
||||||
|
|
||||||
config LV_ENABLE_GC
|
config LV_ENABLE_GC
|
||||||
bool "Enable garbage collector"
|
bool "Enable garbage collector"
|
||||||
@@ -811,9 +858,6 @@ menu "LVGL configuration"
|
|||||||
config LV_USE_CHART
|
config LV_USE_CHART
|
||||||
bool "Chart."
|
bool "Chart."
|
||||||
default y if !LV_CONF_MINIMAL
|
default y if !LV_CONF_MINIMAL
|
||||||
config LV_USE_COLORWHEEL
|
|
||||||
bool "Colorwheel."
|
|
||||||
default y if !LV_CONF_MINIMAL
|
|
||||||
config LV_USE_IMGBTN
|
config LV_USE_IMGBTN
|
||||||
bool "Imgbtn."
|
bool "Imgbtn."
|
||||||
default y if !LV_CONF_MINIMAL
|
default y if !LV_CONF_MINIMAL
|
||||||
@@ -1011,10 +1055,14 @@ menu "LVGL configuration"
|
|||||||
|
|
||||||
config LV_USE_PROFILER
|
config LV_USE_PROFILER
|
||||||
bool "Runtime performance profiler."
|
bool "Runtime performance profiler."
|
||||||
|
config LV_USE_PROFILER_BUILTIN
|
||||||
|
bool "Enable the built-in profiler"
|
||||||
|
depends on LV_USE_PROFILER
|
||||||
|
default y
|
||||||
config LV_PROFILER_INCLUDE
|
config LV_PROFILER_INCLUDE
|
||||||
string "Header to include for the profiler"
|
string "Header to include for the profiler"
|
||||||
depends on LV_USE_PROFILER
|
depends on LV_USE_PROFILER
|
||||||
default "profiler.h"
|
default "lvgl/src/misc/lv_profiler_builtin.h"
|
||||||
|
|
||||||
config LV_USE_GRIDNAV
|
config LV_USE_GRIDNAV
|
||||||
bool "Enable grid navigation"
|
bool "Enable grid navigation"
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
#include "lv_demo_benchmark.h"
|
#include "lv_demo_benchmark.h"
|
||||||
|
|
||||||
#if LV_USE_DEMO_BENCHMARK
|
#if LV_USE_DEMO_BENCHMARK
|
||||||
|
#include "../../src/disp/lv_disp_private.h"
|
||||||
|
|
||||||
/*********************
|
/*********************
|
||||||
* DEFINES
|
* DEFINES
|
||||||
@@ -73,7 +74,7 @@ static lv_style_t style_common;
|
|||||||
static bool scene_with_opa = true;
|
static bool scene_with_opa = true;
|
||||||
static uint32_t last_flush_cb_call;
|
static uint32_t last_flush_cb_call;
|
||||||
static uint32_t render_start_time;
|
static uint32_t render_start_time;
|
||||||
static void (*flush_cb_ori)(lv_disp_t *, const lv_area_t *, lv_color_t *);
|
static void (*flush_cb_ori)(lv_disp_t *, const lv_area_t *, uint8_t *);
|
||||||
static uint32_t disp_ori_timer_period;
|
static uint32_t disp_ori_timer_period;
|
||||||
static uint32_t anim_ori_timer_period;
|
static uint32_t anim_ori_timer_period;
|
||||||
|
|
||||||
@@ -102,7 +103,7 @@ static void calc_scene_statistics(void);
|
|||||||
static lv_res_t load_next_scene(void);
|
static lv_res_t load_next_scene(void);
|
||||||
static void next_scene_timer_cb(lv_timer_t * timer);
|
static void next_scene_timer_cb(lv_timer_t * timer);
|
||||||
static void single_scene_finsih_timer_cb(lv_timer_t * timer);
|
static void single_scene_finsih_timer_cb(lv_timer_t * timer);
|
||||||
static void dummy_flush_cb(lv_disp_t * drv, const lv_area_t * area, lv_color_t * colors);
|
static void dummy_flush_cb(lv_disp_t * drv, const lv_area_t * area, uint8_t * pxmap);
|
||||||
static void generate_report(void);
|
static void generate_report(void);
|
||||||
|
|
||||||
static void rect_create(lv_style_t * style);
|
static void rect_create(lv_style_t * style);
|
||||||
@@ -284,14 +285,6 @@ static void img_argb_cb(void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void img_ckey_cb(void)
|
|
||||||
{
|
|
||||||
lv_style_reset(&style_common);
|
|
||||||
lv_style_set_img_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER);
|
|
||||||
img_create(&style_common, &img_benchmark_cogwheel_chroma_keyed, false, false, false);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
static void img_index_cb(void)
|
static void img_index_cb(void)
|
||||||
{
|
{
|
||||||
lv_style_reset(&style_common);
|
lv_style_reset(&style_common);
|
||||||
@@ -329,14 +322,6 @@ static void img_argb_recolor_cb(void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void img_ckey_recolor_cb(void)
|
|
||||||
{
|
|
||||||
lv_style_reset(&style_common);
|
|
||||||
lv_style_set_img_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER);
|
|
||||||
lv_style_set_img_recolor_opa(&style_common, LV_OPA_50);
|
|
||||||
img_create(&style_common, &img_benchmark_cogwheel_chroma_keyed, false, false, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void img_index_recolor_cb(void)
|
static void img_index_recolor_cb(void)
|
||||||
{
|
{
|
||||||
lv_style_reset(&style_common);
|
lv_style_reset(&style_common);
|
||||||
@@ -600,13 +585,11 @@ static scene_dsc_t scenes[] = {
|
|||||||
|
|
||||||
{.name = "Image RGB", .weight = 20, .create_cb = img_rgb_cb},
|
{.name = "Image RGB", .weight = 20, .create_cb = img_rgb_cb},
|
||||||
{.name = "Image ARGB", .weight = 20, .create_cb = img_argb_cb},
|
{.name = "Image ARGB", .weight = 20, .create_cb = img_argb_cb},
|
||||||
{.name = "Image chorma keyed", .weight = 5, .create_cb = img_ckey_cb},
|
|
||||||
{.name = "Image indexed", .weight = 5, .create_cb = img_index_cb},
|
{.name = "Image indexed", .weight = 5, .create_cb = img_index_cb},
|
||||||
{.name = "Image alpha only", .weight = 5, .create_cb = img_alpha_cb},
|
{.name = "Image alpha only", .weight = 5, .create_cb = img_alpha_cb},
|
||||||
|
|
||||||
{.name = "Image RGB recolor", .weight = 5, .create_cb = img_rgb_recolor_cb},
|
{.name = "Image RGB recolor", .weight = 5, .create_cb = img_rgb_recolor_cb},
|
||||||
{.name = "Image ARGB recolor", .weight = 20, .create_cb = img_argb_recolor_cb},
|
{.name = "Image ARGB recolor", .weight = 20, .create_cb = img_argb_recolor_cb},
|
||||||
{.name = "Image chorma keyed recolor", .weight = 3, .create_cb = img_ckey_recolor_cb},
|
|
||||||
{.name = "Image indexed recolor", .weight = 3, .create_cb = img_index_recolor_cb},
|
{.name = "Image indexed recolor", .weight = 3, .create_cb = img_index_recolor_cb},
|
||||||
|
|
||||||
{.name = "Image RGB rotate", .weight = 3, .create_cb = img_rgb_rot_cb},
|
{.name = "Image RGB rotate", .weight = 3, .create_cb = img_rgb_rot_cb},
|
||||||
@@ -901,15 +884,14 @@ static void single_scene_finsih_timer_cb(lv_timer_t * timer)
|
|||||||
lv_obj_invalidate(lv_scr_act());
|
lv_obj_invalidate(lv_scr_act());
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dummy_flush_cb(lv_disp_t * drv, const lv_area_t * area, lv_color_t * colors)
|
static void dummy_flush_cb(lv_disp_t * drv, const lv_area_t * area, uint8_t * pxmap)
|
||||||
{
|
{
|
||||||
LV_UNUSED(area);
|
LV_UNUSED(area);
|
||||||
LV_UNUSED(colors);
|
|
||||||
|
|
||||||
if(mode == LV_DEMO_BENCHMARK_MODE_RENDER_AND_DRIVER) {
|
if(mode == LV_DEMO_BENCHMARK_MODE_RENDER_AND_DRIVER) {
|
||||||
/*Measure the time since render start after flushing*/
|
/*Measure the time since render start after flushing*/
|
||||||
bool last = lv_disp_flush_is_last(drv);
|
bool last = lv_disp_flush_is_last(drv);
|
||||||
flush_cb_ori(drv, area, colors);
|
flush_cb_ori(drv, area, pxmap);
|
||||||
|
|
||||||
if(last) {
|
if(last) {
|
||||||
uint32_t t = lv_tick_elaps(render_start_time);
|
uint32_t t = lv_tick_elaps(render_start_time);
|
||||||
@@ -925,7 +907,7 @@ static void dummy_flush_cb(lv_disp_t * drv, const lv_area_t * area, lv_color_t *
|
|||||||
}
|
}
|
||||||
else if(mode == LV_DEMO_BENCHMARK_MODE_REAL) {
|
else if(mode == LV_DEMO_BENCHMARK_MODE_REAL) {
|
||||||
bool last = lv_disp_flush_is_last(drv);
|
bool last = lv_disp_flush_is_last(drv);
|
||||||
flush_cb_ori(drv, area, colors);
|
flush_cb_ori(drv, area, pxmap);
|
||||||
|
|
||||||
/*Measure the time since the previous last flush (full render)*/
|
/*Measure the time since the previous last flush (full render)*/
|
||||||
if(last) {
|
if(last) {
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ static lv_obj_t * btn_create(lv_obj_t * par, const char * str, lv_color_t color)
|
|||||||
static void obj_child_node_def_style_init(lv_style_t * style)
|
static void obj_child_node_def_style_init(lv_style_t * style)
|
||||||
{
|
{
|
||||||
lv_style_init(style);
|
lv_style_init(style);
|
||||||
lv_style_set_size(style, LV_PCT(30), LV_PCT(30));
|
lv_style_set_size(style, LV_PCT(45), LV_PCT(45));
|
||||||
lv_style_set_flex_flow(style, LV_FLEX_FLOW_ROW);
|
lv_style_set_flex_flow(style, LV_FLEX_FLOW_ROW);
|
||||||
lv_style_set_layout(style, LV_LAYOUT_FLEX);
|
lv_style_set_layout(style, LV_LAYOUT_FLEX);
|
||||||
lv_style_set_radius(style, 0);
|
lv_style_set_radius(style, 0);
|
||||||
|
|||||||
@@ -3,12 +3,11 @@ class KeyboardEncoder:
|
|||||||
self.g = lv.group_create()
|
self.g = lv.group_create()
|
||||||
self.g.set_default()
|
self.g.set_default()
|
||||||
|
|
||||||
cur_drv = lv.indev_t.__cast__(None)
|
cur_drv = lv.indev_t()
|
||||||
while True:
|
|
||||||
cur_drv = cur_drv.get_next()
|
cur_drv = cur_drv.get_next()
|
||||||
|
|
||||||
if not cur_drv :
|
while cur_drv != None:
|
||||||
break
|
|
||||||
if cur_drv.get_type() == lv.INDEV_TYPE.KEYPAD:
|
if cur_drv.get_type() == lv.INDEV_TYPE.KEYPAD:
|
||||||
print("Found keypad")
|
print("Found keypad")
|
||||||
cur_drv.set_group(self.g)
|
cur_drv.set_group(self.g)
|
||||||
@@ -16,6 +15,8 @@ class KeyboardEncoder:
|
|||||||
print("Found encoder")
|
print("Found encoder")
|
||||||
cur_drv.set_group(self.g)
|
cur_drv.set_group(self.g)
|
||||||
|
|
||||||
|
cur_drv = cur_drv.get_next()
|
||||||
|
|
||||||
self.tv = lv.tabview(lv.scr_act(), lv.DIR.TOP, lv.DPI_DEF // 3)
|
self.tv = lv.tabview(lv.scr_act(), lv.DIR.TOP, lv.DPI_DEF // 3)
|
||||||
|
|
||||||
self.t1 = self.tv.add_tab("Selectors")
|
self.t1 = self.tv.add_tab("Selectors")
|
||||||
|
|||||||
@@ -39,6 +39,10 @@ extern "C" {
|
|||||||
#include "flex_layout/lv_demo_flex_layout.h"
|
#include "flex_layout/lv_demo_flex_layout.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if LV_USE_DEMO_TRANSFORM
|
||||||
|
#include "transform/lv_demo_transform.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/*********************
|
/*********************
|
||||||
* DEFINES
|
* DEFINES
|
||||||
*********************/
|
*********************/
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Keypad and Encoder demo
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
LVGL allows you to control the widgets with keypad and/or encoder without touchpad.
|
||||||
|
This demo shows how to handle buttons, drop-down lists, rollers, sliders, switches and text inputs without touchpad.
|
||||||
|
Learn more about the touchpad-less usage of LVGL [here](https://docs.lvgl.io/master/overview/indev.html#keypad-and-encoder).
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Run the demo
|
||||||
|
- In `lv_conf.h` or equivalent places set `LV_USE_DEMO_KEYPAD_AND_ENCODER 1`
|
||||||
|
- After `lv_init()` and initializing the drivers call `lv_demo_keypad_encoder()`
|
||||||
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 33 KiB |