Merge remote-tracking branch 'origin/master'

This commit is contained in:
PeterB
2023-07-10 12:11:22 +01:00
683 changed files with 37128 additions and 36667 deletions
+3
View File
@@ -760,6 +760,9 @@
#define LV_LINUX_FBDEV_BSD 0
#endif
/*Driver for /dev/dri/card*/
#define LV_USE_LINUX_DRM 0
/*Interface for TFT_eSPI*/
#define LV_USE_TFT_ESPI 0
+7 -6
View File
@@ -23,13 +23,12 @@ jobs:
- name: Clone lv_micropython
run: |
git clone https://github.com/lvgl/lv_micropython.git .
git checkout master
git checkout feat/parallel-rendering
- name: Initialize lv_bindings submodule
run: git submodule update --init --recursive lib/lv_bindings
- name: Update ${{ matrix.port }} port submodules
if: matrix.port != 'esp32'
# VARIANT needed for unix
run: make -C ports/${{ matrix.port }} VARIANT=dev DEBUG=1 USER_C_MODULES=../../lib/lv_bindings/bindings.cmake submodules
if: matrix.port != 'esp32' && matrix.port != 'rp2'
run: make -C ports/${{ matrix.port }} DEBUG=1 USER_C_MODULES=../../lib/lv_bindings/bindings.cmake submodules
- name: Checkout LVGL submodule
working-directory: ./lib/lv_bindings/lvgl
run: |
@@ -61,11 +60,13 @@ jobs:
run: make -j $(nproc) -C ports/stm32 BOARD=STM32F7DISC
- name: Build Raspberry Pi PICO port
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
- name: Build Unix port
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
if: success() && matrix.port == 'unix'
run: |
+1 -2
View File
@@ -14,8 +14,7 @@ jobs:
matrix:
# A valid option parameter to the cmake file.
# See BUILD_OPTIONS in tests/CMakeLists.txt.
build_option: ['OPTIONS_NORMAL_8BIT',
'OPTIONS_16BIT',
build_option: ['OPTIONS_16BIT',
'OPTIONS_24BIT',
'OPTIONS_FULL_32BIT']
name: Build ${{ matrix.build_option }}
+83 -35
View File
@@ -21,6 +21,8 @@ menu "LVGL configuration"
config LV_COLOR_DEPTH_32
bool "32: ARGB8888"
config LV_COLOR_DEPTH_24
bool "24: RGB888"
config LV_COLOR_DEPTH_16
bool "16: RGB565"
config LV_COLOR_DEPTH_8
@@ -34,6 +36,7 @@ menu "LVGL configuration"
default 1 if LV_COLOR_DEPTH_1
default 8 if LV_COLOR_DEPTH_8
default 16 if LV_COLOR_DEPTH_16
default 24 if LV_COLOR_DEPTH_24
default 32 if LV_COLOR_DEPTH_32
config LV_COLOR_MIX_ROUND_OFS
@@ -57,28 +60,65 @@ menu "LVGL configuration"
endmenu
menu "Memory settings"
config LV_MEM_CUSTOM
bool "If true use custom malloc/free, otherwise use the built-in `lv_malloc()` and `lv_free()`"
choice
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
int "Size of the memory used by `lv_malloc()` in kilobytes (>= 2kB)"
default 32
depends on !LV_MEM_CUSTOM
depends on LV_USE_BUILTIN_MALLOC
config LV_MEM_POOL_EXPAND_SIZE_KILOBYTES
int "Size of the memory expand for `lv_malloc()` in kilobytes"
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"
default 0x0
depends on !LV_MEM_CUSTOM
config LV_MEM_CUSTOM_INCLUDE
string "Header to include for the custom memory function"
default "stdlib.h"
depends on LV_MEM_CUSTOM
depends on LV_USE_BUILTIN_MALLOC
config LV_MEM_BUF_MAX_NUM
int "Number of the memory buffer"
@@ -88,8 +128,6 @@ menu "LVGL configuration"
internal processing mechanisms. You will see an error log message if
there wasn't enough buffers.
config LV_MEMCPY_MEMSET_STD
bool "Use the standard memcpy and memset instead of LVGL's own functions"
endmenu
menu "HAL Settings"
@@ -112,25 +150,32 @@ menu "LVGL configuration"
menu "Feature configuration"
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"
default y
depends on LV_USE_DRAW_SW
help
Required to draw shadow, gradient, rounded corners, circles, arc, skew lines,
image transformations or any masks.
config LV_SHADOW_CACHE_SIZE
config LV_DRAW_SW_SHADOW_CACHE_SIZE
int "Allow buffering some shadow calculation"
depends on LV_DRAW_COMPLEX
depends on LV_DRAW_SW_COMPLEX
default 0
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`.
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"
depends on LV_DRAW_COMPLEX
depends on LV_DRAW_SW_COMPLEX
default 4
help
The circumference of 1/4 circle are saved for anti-aliasing
@@ -138,9 +183,10 @@ menu "LVGL configuration"
radiuses are saved).
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"
default 24576
depends on LV_USE_DRAW_SW
help
"Simple layers" are used when a widget has `style_opa < 255`
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
int "Default image cache size. 0 to disable caching."
default 0
depends on LV_USE_DRAW_SW
help
If only the built-in image formats are used there is no real advantage of caching.
(I.e. no new image decoder is added).
@@ -161,6 +208,7 @@ menu "LVGL configuration"
config LV_GRADIENT_MAX_STOPS
int "Number of stops allowed per gradient."
default 2
depends on LV_USE_DRAW_SW
help
Increase this to allow more stops.
This adds (sizeof(lv_color_t) + 1) bytes per additional stop
@@ -168,6 +216,7 @@ menu "LVGL configuration"
config LV_GRAD_CACHE_DEF_SIZE
int "Default gradient buffer size."
default 0
depends on LV_USE_DRAW_SW
help
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.
@@ -176,6 +225,7 @@ menu "LVGL configuration"
config LV_DITHER_GRADIENT
bool "Allow dithering the gradients"
depends on LV_USE_DRAW_SW
help
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
@@ -191,6 +241,7 @@ menu "LVGL configuration"
config LV_DISP_ROT_MAX_BUF
int "Maximum buffer size to allocate for rotation"
default 10240
depends on LV_USE_DRAW_SW
help
Only used if software rotation is enabled in the display driver.
endmenu
@@ -338,7 +389,7 @@ menu "LVGL configuration"
bool "Enable/Disable LV_LOG_TRACE in anim module"
default y
depends on LV_USE_LOG
config LV_LOG_TRACE_MSG
bool "Enable/Disable LV_LOG_TRACE in msg module"
default y
@@ -436,17 +487,13 @@ menu "LVGL configuration"
config LV_USE_REFR_DEBUG
bool "Draw random colored rectangles over the redrawn areas."
config LV_SPRINTF_CUSTOM
bool "Change the built-in (v)snprintf functions"
config LV_SPRINTF_INCLUDE
string "Header to include for the custom sprintf function"
depends on LV_SPRINTF_CUSTOM
default "stdio.h"
config LV_USE_BUILTIN_SNPRINTF
bool "Use the built-in (v)snprintf functions"
default y
config LV_SPRINTF_USE_FLOAT
bool "Enable float in built-in (v)snprintf functions"
depends on !LV_SPRINTF_CUSTOM
depends on LV_USE_BUILTIN_SNPRINTF
config LV_ENABLE_GC
bool "Enable garbage collector"
@@ -811,9 +858,6 @@ menu "LVGL configuration"
config LV_USE_CHART
bool "Chart."
default y if !LV_CONF_MINIMAL
config LV_USE_COLORWHEEL
bool "Colorwheel."
default y if !LV_CONF_MINIMAL
config LV_USE_IMGBTN
bool "Imgbtn."
default y if !LV_CONF_MINIMAL
@@ -1011,10 +1055,14 @@ menu "LVGL configuration"
config LV_USE_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
string "Header to include for the profiler"
depends on LV_USE_PROFILER
default "profiler.h"
default "lvgl/src/misc/lv_profiler_builtin.h"
config LV_USE_GRIDNAV
bool "Enable grid navigation"
@@ -1064,7 +1112,7 @@ menu "LVGL configuration"
help
Set the maximum number of candidate panels that can be displayed.
This needs to be adjusted according to the size of the screen.
config LV_USE_FILE_EXPLORER
bool "Enable file explorer"
default n
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+6 -24
View File
@@ -9,6 +9,7 @@
#include "lv_demo_benchmark.h"
#if LV_USE_DEMO_BENCHMARK
#include "../../src/disp/lv_disp_private.h"
/*********************
* DEFINES
@@ -73,7 +74,7 @@ static lv_style_t style_common;
static bool scene_with_opa = true;
static uint32_t last_flush_cb_call;
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 anim_ori_timer_period;
@@ -102,7 +103,7 @@ static void calc_scene_statistics(void);
static lv_res_t load_next_scene(void);
static void next_scene_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 rect_create(lv_style_t * style);
@@ -284,14 +285,6 @@ static void img_argb_cb(void)
#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)
{
lv_style_reset(&style_common);
@@ -329,14 +322,6 @@ static void img_argb_recolor_cb(void)
#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)
{
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 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 alpha only", .weight = 5, .create_cb = img_alpha_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 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 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());
}
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(colors);
if(mode == LV_DEMO_BENCHMARK_MODE_RENDER_AND_DRIVER) {
/*Measure the time since render start after flushing*/
bool last = lv_disp_flush_is_last(drv);
flush_cb_ori(drv, area, colors);
flush_cb_ori(drv, area, pxmap);
if(last) {
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) {
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)*/
if(last) {
+1 -1
View File
@@ -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)
{
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_layout(style, LV_LAYOUT_FLEX);
lv_style_set_radius(style, 0);
@@ -3,12 +3,11 @@ class KeyboardEncoder:
self.g = lv.group_create()
self.g.set_default()
cur_drv = lv.indev_t.__cast__(None)
while True:
cur_drv = cur_drv.get_next()
cur_drv = lv.indev_t()
cur_drv = cur_drv.get_next()
while cur_drv != None:
if not cur_drv :
break
if cur_drv.get_type() == lv.INDEV_TYPE.KEYPAD:
print("Found keypad")
cur_drv.set_group(self.g)
@@ -16,6 +15,8 @@ class KeyboardEncoder:
print("Found encoder")
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.t1 = self.tv.add_tab("Selectors")
+4
View File
@@ -39,6 +39,10 @@ extern "C" {
#include "flex_layout/lv_demo_flex_layout.h"
#endif
#if LV_USE_DEMO_TRANSFORM
#include "transform/lv_demo_transform.h"
#endif
/*********************
* DEFINES
*********************/
+13
View File
@@ -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).
![Keypad and encoder navigation in LVGL embedded GUI library](screenshot1.gif)
## 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()`
File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Some files were not shown because too many files have changed in this diff Show More