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

7409 Commits

Author SHA1 Message Date
Xiang Xiao
0c10453f17
fix(fs): fix the off-by-one error in the path function (#2725)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-10-25 12:28:37 +02:00
Xiang Xiao
dd5199f279
Improve LV_FORMAT_ATTRIBUTE usage (#2673)
* fix(format): remove LV_FORMAT_ATTRIBUTE from the function body

since it's enough to append LV_FORMAT_ATTRIBUTE to function declaration

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

* fix(format): add LV_FORMAT_ATTRIBUTE to lv_snprintf and lv_log

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

* fix(format): fix the format specifier warning

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-10-25 12:18:45 +02:00
Xiang Xiao
dedf822930
Merge pull request #2723 from ajsb85/master
Fix typo in commands to build rlottie
2021-10-24 04:45:21 -05:00
Alexander Salas Bastidas
ed9169c56d
docs(rlottie): fix typo in commands 2021-10-24 01:47:24 +02:00
embeddedt
93c1303ee7
chore(stale) disable on forks 2021-10-23 08:20:19 -04:00
Gabor Kiss-Vamosi
ce0b564588 docs(rlottie) fix build error 2021-10-22 16:09:15 +02:00
Gabor Kiss-Vamosi
03fff13f62
feat(rlottie) add LVGL-Rlottie interface as 3rd party lib (#2700) 2021-10-22 15:44:43 +02:00
Jianting (Meco) Man
49c069fe89
del(.gitmodules): delete .gitmodules (#2718) 2021-10-22 12:43:48 +02:00
Gabor Kiss-Vamosi
f6d7dc7f00 fix(lv_printf.h): to eliminate the errors in Keil and IAR
Originally added here but stragely disappeared: https://github.com/lvgl/lvgl/pull/2695
2021-10-22 12:42:38 +02:00
Jianting (Meco) Man
9d7f53012c
feat(rtthread): prepare for porting the device-driver of rt-thread (#2719) 2021-10-22 11:13:39 +02:00
Gabor Kiss-Vamosi
00e5597d69 Merge branch 'master' of https://github.com/lvgl/lvgl 2021-10-21 19:05:20 +02:00
Gabor Kiss-Vamosi
5b27ebb409 fix(obj_pos) consider all alignements in contnt size calculation but only if x and y = 0 2021-10-21 12:20:00 +02:00
Gabor Kiss-Vamosi
76c8ee6b7e fix(freetype) fix underline calculation
Fixes: #2711
Based on: aa85d97474
2021-10-21 11:45:25 +02:00
Gabor Kiss-Vamosi
c2d93f78b9 fix(sjpg) remove unnecessary typedefs
stdio.h should be always available, adding custom typedefs resulted in conflicting types on Windows
2021-10-21 11:13:07 +02:00
Xiang Xiao
7339cff139
fix(timer): remove the code duplication in lv_timer_exec (#2708)
and fix some minor comment issue

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-10-21 10:50:30 +02:00
Xiang Xiao
0d48396f25
fix(async): remove the wrong comment from lv_async_call (#2707)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-10-21 10:30:16 +02:00
embeddedt
5d8285e2d3
ci create check for lv_conf_internal.h 2021-10-20 20:06:34 -04:00
embeddedt
56f62b8d73
fix(gif) replace printf statement with LVGL logging 2021-10-20 18:00:27 -04:00
Xiang Xiao
13b7fd8dae
fix(kconfig): change CONFIG_LV_THEME_DEFAULT_FONT to CONFIG_LV_FONT_DEFAULT (#2703)
so the user can overwrite LV_FONT_DEFAULT

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-10-20 15:47:02 +02:00
Gabor Kiss-Vamosi
a9b660c278 fix(obj_pos) save x,y even if the object is on a layout
The set values will be ignored later, but they needs to be saved
in case the layout is removed from the parent
2021-10-20 11:55:26 +02:00
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