* 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
* 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>
* 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>
* 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>
* 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>
* 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>
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
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.
* 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>
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>