1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

7589 Commits

Author SHA1 Message Date
Kenji Mouri
bbad478ce6
feat(fsdrv) add driver based on Win32 API (#2701) 2021-10-20 11:35:11 +02:00
guoweilkd
91a0d3b5e4
feat(span) indent supports percent for fix and break mode (#2693)
* span:indent supports percent for fix and break mode

* Update docs/widgets/extra/span.md

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2021-10-20 11:13:42 +02:00
Amir Gonnen
eaf25348a7
fix add MP support for LVGL 3rd party libraries (#2666)
* Fixes for MP support for LVGL 3rd party libraries

Add missing lv_qrcode_class

Remove 'struct JDEC' from public API. This struct is needed intenally on tjpgd.c and lv_sjpg.c, but doesn't need to be exposed in the public API. When exposed, it increases Micropython binding program size and some fields are not supported today (uint8_t* huffbits[2][2]). To overcome this, moved it to a new H file which is not included in public API, only in sjpg C files

Related: https://github.com/lvgl/lv_binding_micropython/issues/180

* lv_qrcode: add lv_class_qrcode

Must define a distinct class for every widget, to allow Micropython bindings convert lv_obj_t into the specific class

* gifdec.c: fix uninitialized

ESP32 reports some potentially uninitialized variables. Initialize them to prevent the errors

* src/extra/libs/sjpg: smaller public header

Only keep lv_split_jpeg_init in public header, since JPEG is used with image decoder

* Remove tjdec.h
2021-10-20 10:46:22 +02:00
Gabor Kiss-Vamosi
64527a5a1b fix(docs) add fsdrv back 2021-10-20 10:42:38 +02:00
woody
c5900e36fa
fix(png) memory leak for sjpg and use lv_mem_... in lv_png (#2704)
* Unified format

* fix memory leak for lv_sjpg.c

* unified format for lib_png
2021-10-20 10:40:40 +02:00
Tomasz Jastrzębski
3a4ade1e1f
lv_obj_draw_part_dsc_t.text_length added (#2694) 2021-10-19 21:33:30 +02:00
woody
5413e0c4ce
fix(gif) unified whence and remove off_t (#2690) 2021-10-19 18:13:21 +02:00
Gabor Kiss-Vamosi
80f0b09e34 test fix LV_USE_LOG_LEVEL -> LV_LOG_LEVEL typo
Related to #2673
2021-10-19 17:40:41 +02:00
Gabor Kiss-Vamosi
e83df6f14d test(arc): add test case for adv_hittest 2021-10-19 17:36:37 +02:00
Gabor Kiss-Vamosi
79ab3d29b0 chore(indev) minor formatting 2021-10-19 16:40:00 +02:00
Gabor Kiss-Vamosi
747b6a2a9a fix(flex) remove unused variable
fixes #2672
2021-10-19 13:52:47 +02:00
Gabor Kiss-Vamosi
b3b3ffc2b3 feat(canvas) add lv_canvas_set_px_opa
fixes #2665
2021-10-19 13:44:40 +02:00
Gabor Kiss-Vamosi
dfa4f5cff5 feat(arc) add support to LV_OBJ_FLAG_ADV_HITTEST 2021-10-19 12:52:35 +02:00
Jianting (Meco) Man
c61c371ee9
fix(rt-thread): include the rt-thread configuration header file (#2692) 2021-10-18 18:41:00 +02:00
Jianting (Meco) Man
5d8ab8d5af
fix(rt-thread): fix the ci error (#2691) 2021-10-18 10:58:02 -04:00
Gabor Kiss-Vamosi
2efa6dce78 fix(label) fix clipped italic letters
fixes: #2559
2021-10-18 15:41:41 +02:00
Jianting (Meco) Man
9ece84de16
feat(rt-thread): implement rt-thread sconscirpt (#2674) 2021-10-18 14:55:20 +02:00
eudoxos
58ea2787b4
expose LV_COLOR_DEPTH and LV_COLOR_16_SWAP in micropython (#2679) 2021-10-18 13:39:04 +02:00
Xiang Xiao
608d06e47a
fix(fsdrv) minor fs issue (#2682)
* fix(fs): replace all tab to space and other minor style fix

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>

* fix(extra/fs): rename lv_fs_libs.h to lv_fsdrv.h

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>

* fix(extra/fs/stdio): fix the wrong directory path in fs_dir_open

and remove the duplicated or platform specific code

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>

* fix(extra/fs/posix): implement in fs_dir_read

and fix the wrong directory path in fs_dir_open

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>

* fix(extra/fs/posix): return file handle directly to avoid malloc

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-10-18 13:00:47 +02:00
NeroBurner
1babc37156
fix(hal) fix typos and wording in docs for lv_hal_indev.h (#2685)
Fix some minor typos and clarify some wording in the documentation for `lv_hal_indev.h`
2021-10-18 12:19:18 +02:00
woody
bd19083aed
sync lvgl/lv_fs_if (#2676)
* sync lvgl/lv_fs_if

* fix copy paste issues

* Update src/extra/libs/fs/lv_fs_fatfs.c

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2021-10-16 09:11:22 +02:00
Jianting (Meco) Man
dc384a328a
fix(hal tick): add precompile !LV_TICK_CUSTOM for global variables and lv_tick_inc() (#2675) 2021-10-16 07:57:05 +02:00
_VIFEXTech
6d15cb9698
fix(anim_timeline) avoid calling lv_anim_del(NULL, NULL) (#2628)
* add anim_timeline

Signed-off-by: FASTSHIFT <vifextech@foxmail.com>

* add anim_timeline

Signed-off-by: FASTSHIFT <vifextech@foxmail.com>

* add lv_anim_timeline.c to lv_misc.mk

Signed-off-by: FASTSHIFT <vifextech@foxmail.com>

* LV_ANIM_TIMELINE_END uses global variables to replace macros, lv_anim_timeline_set_progress() adds user_data, act_time uses int32_t type

* solve the problem of uninitialized variable and act_time comparison

* add LV_ANIM_TIMELINE_CUSTOM_EXEC option

Signed-off-by: FASTSHIFT <vifextech@foxmail.com>

* add LV_ANIM_TIMELINE_CUSTOM_EXEC in lv_conf_internal.h

* redesign lv_anim_timeline

Signed-off-by: FASTSHIFT <vifextech@foxmail.com>

* add missing LV_USE_USER_DATA

* remove set_progress, update doc

* update workflow files

* Remove lv_example_anim_timeline_2.c and LV_ANIM_TIMELINE_CUSTOM_EXEC, update lv_anim_timeline_1.c example

Signed-off-by: FASTSHIFT <vifextech@foxmail.com>

* fix warning

* fix(anim_timeline) heap use after free

Signed-off-by: FASTSHIFT <vifextech@foxmail.com>

* fix(docs) wrong spelling of words in pictures

* perf(anim_timeline) add lv_anim_timeline_stop()

Signed-off-by: FASTSHIFT <vifextech@foxmail.com>

* fix(anim_timeline) avoid calling lv_anim_del(NULL, NULL)

Signed-off-by: _VIFEXTech <1290176185@qq.com>

* lv_anim_del replaces lv_anim_custom_del

* fix(anim_timeline) avoid calling when a->exec_cb is NULL

* fix(anim_timeline) add default var and virtual exec_cb

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2021-10-15 14:17:27 +02:00
Carlos Diaz
42989d4e9a
test(txt) initial unit tests and general code cleanup/fixes (#2623)
* test(txt): Add test for identifying empty text when trying to get next line

* test(txt): Rename next line empty string handling test

* test(txt): Add tests for _lv_txt_is_cmd

* test(txt): Add initial tests for _lv_txt_ins

* fix(txt): Check for NULL before using strlen

Passing NULL to strlen is not defined, so we should avoid it

* txt: Update docs

Remove docs from source file and add comment about pointers to NULL terminated arrays where necessary

* txt: Misc update in encoded_size

* test(txt): first tests for _lv_txt_cut

* tests: Remove -Wmissing-prototype flag from compilation

This will allow us to have cleaner test cases files.

* test(txt): Remove test (funtion) prototypes as they're no longer necessary

* Update src/misc/lv_txt.h

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>

* Update src/misc/lv_txt.h

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>

* Revert "tests: Remove -Wmissing-prototype flag from compilation"

This reverts commit 8b3217de8d9210eb2e6da5e94c0735beb2735be7.

* test(txt): Use pragma to disable missing-prototype warning

* test: use extended set of compile options for test cases

* Revert "test(txt): Use pragma to disable missing-prototype warning"

This reverts commit 64909e30ed124ca1e8ca390ca0639479c3e34f44.

* test(txt): Add assert to test_txt_cut_len_longer_than_string test

* test(txt): Add test for _lv_txt_encoded_next on valid ascii input

* test(txt): Add tests for _lv_txt_encoded_next with 2 byte long inputs

* test(txt): Add tests for _lv_txt_encoded_next with 3 byte long inputs

* test(txt): Add tests for _lv_txt_encoded_next with 4 byte long inputs

* cleanup(txt): Add helper macros to identify ASCII and UTF8 codes

* cleanup(txt): Add missing LV_ prefix to helper macros

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
Co-authored-by: embeddedt <42941056+embeddedt@users.noreply.github.com>
2021-10-15 11:37:53 +02:00
Xiang Xiao
4baaa6fe07
fix(kconfig) sync Kconfig with the latest lv_conf_template.h (#2662)
* fix(conf): correct LV_USE_EXTERNAL_RENDERER and LV_USE_GPU_SDL related setting

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>

* fix(Kconfig): typo error in the font and theme related setting

and correct the default value and sequence

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>

* fix(Kconfig): Add the missing misc config

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>

* fix(Kconfig): sync widget and theme in Kconfig with lv_conf_template.h

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>

* fix(Kconfig): add the option for 3rd party library and examples

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-10-15 11:34:16 +02:00
Gabor Kiss-Vamosi
a5793c70a9 Revert "feat(conf) add better check for Kconfig default"
This reverts commit f8fe5366bb051cd5090e4a06658eb0d32decc0b3.
2021-10-14 16:23:12 +02:00
Gabor Kiss-Vamosi
f8fe5366bb feat(conf) add better check for Kconfig default
If a bool config is False Kconfig it won't add CONFIG_ define and it confused lv_conf_internal.h

Fixes: #2555
2021-10-14 16:20:20 +02:00
Xiang Xiao
b1416369ae
fix(log) reduce the stack usage in log function (#2649)
* fix(log): change fwrite to puts since not all platform support fwrite

This reverts commit 539388a66f5aca4e46869fca8da41634e8c5366e.

* fix(log): don't call printf and custom_print_cb at the same time

* fix(log): remove 768B temp buffer if LV_LOG_PRINTF == 1

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>

* feat(printf): support %pV format specifier

to support the recursive print:
https://www.kernel.org/doc/html/latest/core-api/printk-formats.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>

* fix(log): save 256B temp buffer if LV_LOG_PRINTF == 0

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-10-14 16:02:41 +02:00
gesture1968
2a701eeaa7
feat(lv_spinbox) support both right-to-left and left-to-right digit steps when clicking encoder button (#2644)
* Update lv_spinbox.c

* Added support for moving the Spinbox digit position from right-to-left when clicking the button on an encoder. The default behaviour is when clicking the encoder button, the digit is moved from left-to-right (MSB to LSB). 
* Added a check to see if the spinbox digit-count is just one. In that case it is pointless to check the buttonclick
* See also the spinbox.h file

* Update lv_spinbox.c

* Forgot the implementation of the setter function
* forgot a ;

* Update lv_spinbox.h

Adding Spinbox support for moving the digitposition both from left-to-right and right-to-left when editing a spinbox and clicking the encoder button. The current behaviour is clicking the encoder button only moves the digitposition from right to left (from MSB to LSB)

* Update lv_spinbox.c

Added brief / comment to new function

* Update lv_spinbox.h

More clear Brief / Comment

* Update lv_spinbox.c

nested function replaced by lv_pow fiunction

* Update lv_spinbox.h

removed spaces

* Update lv_spinbox.h

Replaced type used for direction of digit step when clicking an encoder with existing LVGL lv_dir_t

* Update lv_spinbox.c

Replaced type used for direction of digit step when clicking an encoder with existing LVGL lv_dir_t

* Update spinbox.md

Added comment for the new function 'lv_spinbox_set_digit_step_direction'

* Update src/extra/widgets/spinbox/lv_spinbox.h

Co-authored-by: embeddedt <42941056+embeddedt@users.noreply.github.com>

* Update src/extra/widgets/spinbox/lv_spinbox.h

Co-authored-by: embeddedt <42941056+embeddedt@users.noreply.github.com>

* Update lv_spinbox.c

bug: old definition LV_SPINBOX_DIGIT_DIR_TO_RIGHT changed to LV_DIR_RIGHT

* Update lv_spinbox.h

Extra linefeed removed

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
Co-authored-by: embeddedt <42941056+embeddedt@users.noreply.github.com>
2021-10-14 13:42:25 +02:00
Gabor Kiss-Vamosi
bdce0bc60c fix(group) fix infinite loop 2021-10-13 15:18:41 +02:00
Gabor Kiss-Vamosi
5799c10843 fix(group) skip object if an of the parents is hidden
Previously only the object itself was checked for hidden.
2021-10-13 13:25:25 +02:00
Gabor Kiss-Vamosi
ee5369e2d2 feat(event) add LV_EVENT_SCREEN_LOADED/UNLOADED events 2021-10-13 12:36:03 +02:00
Xiang Xiao
7124ef7761
fix(conf) make a better style alignment in lv_conf_internal.h (#2652)
and reorder Kconfig and src/lv_conf_kconfig.h as lv_conf_template.h

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-10-12 18:15:05 +02:00
Jianting (Meco) Man
8debe10cd2
feat add support for rt-thread RTOS (#2660) 2021-10-12 17:35:37 +02:00
Gabor Kiss-Vamosi
7a95fa9e2d test add 3rd party libs to all tests and also fix them
Fixes: #2661
2021-10-12 17:03:50 +02:00
Gabor Kiss-Vamosi
273a0eb32f fix(textarea) various cursor darwing fixes 2021-10-12 16:36:52 +02:00
guoweilkd
d58cae5551
fix(span) eliminate warning in lv_get_snippet_cnt() (#2659) 2021-10-12 08:34:24 -04:00
Johannes Marbach
d09f6bdea3
feat(disp): Enable rendering to display subsection (#2583)
This change introduces new fields on `lv_disp_drv_t` that allow to
specify the size of the full display and the offset of the display
subsection that is being rendered to. The values are used to transform
the drawing area before calling `flush_cb` so that only the desired part
of the full display is being rendered to.

Relates to: lvgl/lv_drivers#166
2021-10-11 08:48:15 -04:00
Johannes Marbach
7658f98e86
feat(keyboard): add user-defined modes (#2651)
As discussed in https://forum.lvgl.io/t/localized-keyboard-layouts/6734,
this adds further `..._USER_N` keyboard modes that can be used to
implemented more keyboard layouts for locales that need more than 4
layers.
2021-10-11 14:46:07 +02:00
Carlos Diaz
3b6a05e253
test add setUp and tearDown to test template (#2648) 2021-10-11 14:22:55 +02:00
Xiang Xiao
c9e3760464
fix(config): remove the nonexistent Kconfig (#2654)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-10-11 14:02:59 +02:00
Xiang Xiao
6694d9d019
fix(Kconfig): add LV_MEM_ADDR config (#2653)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-10-11 13:58:47 +02:00
Xiang Xiao
539388a66f
fix(log): replace printf with fwrite to save the stack size (#2655)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-10-11 12:49:47 +02:00
embeddedt
ab316a07bc
ci(micropython) add GCC problem matcher 2021-10-09 08:11:54 -04:00
Gabor Kiss-Vamosi
038b78122e fix(align) avoid circular references with LV_SIZE_CONTENT
If a child has pct width and the parent has LV_SIZE_CONTENT width, it results in a circular reference.
With fix zero content width is assumed for children in such case.

Besides if a child is center or right aligned the calculation of LV_SIZE_CONTENT might give in conter intuitive result.
To solve this center and right aligned children are not considered in LV_SIZE_CONTENT calculations.

The same applies for height.
2021-10-08 21:38:40 +02:00
Carlos Diaz
acf915b896
test(arc) add initial unit tests (#2617)
* test(arc): Add test for valid creation

* test(arc): Add test for max value truncation

* test(arc): Add test for min value truncation

* test(arc): Add test for value adjustment after updating range

* test(arc): Update test for min value truncation

* test(arc): Add test for angle updating after changing to symmetrical mode

* test(arc): Add test for angle updating after changing to symmetrical mode and value is greater than middle range

* test(arc): Use unity setUp function

* remove API comments from lv_arc.c

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2021-10-07 19:01:02 +02:00
Philippe Coval
d0f08563a5
build: always enable CMake install rule in default configuration (#2636)
This will simplify packaging recipes, it's not mandatory,
but there is no reason to have it as an option if it does
not imply any regressions.

Relate-to: https://github.com/lvgl/lvgl/issues/2534
Signed-off-by: Philippe Coval <philippe.coval@huawei.com>
2021-10-06 15:31:37 -04:00
Jose Commins
07688e6543
docs(colorwheel) fix old API names (#2643)
`lv_colorwheel_set_color_mode` is now `lv_colorwheel_set_mode`
2021-10-06 12:55:09 -04:00
Amir Gonnen
a625dc2206
ci(micropython) add ESP32 and STM32 tests (#2629)
Co-authored-by: embeddedt <42941056+embeddedt@users.noreply.github.com>
2021-10-06 12:03:03 -04:00
Philippe Coval
7b7bed37d3
build: fix lib name in CMakeLists (#2641)
Fixup for #2640
2021-10-06 08:54:14 -04:00