From 67369eed223cdf697bae80e1f3b74bbe632f6daf Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 15 Dec 2020 20:13:53 +0100 Subject: [PATCH 1/6] Update dev version --- library.json | 2 +- library.properties | 2 +- lv_conf_template.h | 2 +- lvgl.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/library.json b/library.json index d962711d9..ff0c61aac 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "lvgl", - "version": "7.8.1", + "version": "7.10.0", "keywords": "graphics, gui, embedded, tft, lvgl", "description": "Graphics library to create embedded GUI with easy-to-use graphical elements, beautiful visual effects and low memory footprint. It offers anti-aliasing, opacity, and animations using only one frame buffer.", "repository": { diff --git a/library.properties b/library.properties index afe11b4cd..f737d9f4e 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=lvgl -version=7.8.1 +version=7.10.0 author=kisvegabor maintainer=kisvegabor,embeddedt,pete-pjb sentence=Full-featured Graphics Library for Embedded Systems diff --git a/lv_conf_template.h b/lv_conf_template.h index fddd29882..d1095f1ef 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -1,6 +1,6 @@ /** * @file lv_conf.h - * Configuration file for v7.8.1-dev + * Configuration file for v7.10.0-dev */ /* diff --git a/lvgl.h b/lvgl.h index 8aa6b1bc7..86a335c03 100644 --- a/lvgl.h +++ b/lvgl.h @@ -15,7 +15,7 @@ extern "C" { * CURRENT VERSION OF LVGL ***************************/ #define LVGL_VERSION_MAJOR 7 -#define LVGL_VERSION_MINOR 9 +#define LVGL_VERSION_MINOR 10 #define LVGL_VERSION_PATCH 0 #define LVGL_VERSION_INFO "dev" From 2ea03e3745e74dd78d2c31c3f6d01145beec511e Mon Sep 17 00:00:00 2001 From: Ashraf Kamel <38524812+ashrafkamel5@users.noreply.github.com> Date: Sun, 20 Dec 2020 14:25:25 +0200 Subject: [PATCH 2/6] add arabic keyboard (#1964) * add arabic keyboard * add arabic keyboard --- src/lv_widgets/lv_keyboard.c | 70 +++++++++++++++++++++++++++++++----- src/lv_widgets/lv_keyboard.h | 5 ++- 2 files changed, 66 insertions(+), 9 deletions(-) diff --git a/src/lv_widgets/lv_keyboard.c b/src/lv_widgets/lv_keyboard.c index ae40b4deb..bd84e48d5 100644 --- a/src/lv_widgets/lv_keyboard.c +++ b/src/lv_widgets/lv_keyboard.c @@ -37,40 +37,80 @@ static lv_signal_cb_t ancestor_signal; static const char * const default_kb_map_lc[] = {"1#", "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", LV_SYMBOL_BACKSPACE, "\n", "ABC", "a", "s", "d", "f", "g", "h", "j", "k", "l", LV_SYMBOL_NEW_LINE, "\n", "_", "-", "z", "x", "c", "v", "b", "n", "m", ".", ",", ":", "\n", - LV_SYMBOL_CLOSE, LV_SYMBOL_LEFT, " ", LV_SYMBOL_RIGHT, LV_SYMBOL_OK, "" + LV_SYMBOL_CLOSE, +#if LV_USE_ARABIC_PERSIAN_CHARS == 1 + "أب", +#endif + LV_SYMBOL_LEFT," ", LV_SYMBOL_RIGHT, LV_SYMBOL_OK, "" }; static const lv_btnmatrix_ctrl_t default_kb_ctrl_lc_map[] = { LV_KEYBOARD_CTRL_BTN_FLAGS | 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, LV_KEYBOARD_CTRL_BTN_FLAGS | 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - LV_KEYBOARD_CTRL_BTN_FLAGS | 2, 2, 6, 2, LV_KEYBOARD_CTRL_BTN_FLAGS | 2 + LV_KEYBOARD_CTRL_BTN_FLAGS | 2, +#if LV_USE_ARABIC_PERSIAN_CHARS == 1 + LV_KEYBOARD_CTRL_BTN_FLAGS | 2, +#endif + 2, 6, 2, LV_KEYBOARD_CTRL_BTN_FLAGS | 2 }; static const char * const default_kb_map_uc[] = {"1#", "Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", LV_SYMBOL_BACKSPACE, "\n", "abc", "A", "S", "D", "F", "G", "H", "J", "K", "L", LV_SYMBOL_NEW_LINE, "\n", "_", "-", "Z", "X", "C", "V", "B", "N", "M", ".", ",", ":", "\n", - LV_SYMBOL_CLOSE, LV_SYMBOL_LEFT, " ", LV_SYMBOL_RIGHT, LV_SYMBOL_OK, "" + LV_SYMBOL_CLOSE, +#if LV_USE_ARABIC_PERSIAN_CHARS == 1 + "أب", +#endif + LV_SYMBOL_LEFT, " ", LV_SYMBOL_RIGHT, LV_SYMBOL_OK, "" }; static const lv_btnmatrix_ctrl_t default_kb_ctrl_uc_map[] = { LV_KEYBOARD_CTRL_BTN_FLAGS | 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, LV_KEYBOARD_CTRL_BTN_FLAGS | 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - LV_KEYBOARD_CTRL_BTN_FLAGS | 2, 2, 6, 2, LV_KEYBOARD_CTRL_BTN_FLAGS | 2 + LV_KEYBOARD_CTRL_BTN_FLAGS | 2, +#if LV_USE_ARABIC_PERSIAN_CHARS == 1 + LV_KEYBOARD_CTRL_BTN_FLAGS | 2, +#endif + 2, 6, 2, LV_KEYBOARD_CTRL_BTN_FLAGS | 2 }; +#if LV_USE_ARABIC_PERSIAN_CHARS == 1 +static const char * const default_kb_map_ar[] = +{ + "1#", "ض", "ص", "ث", "ق", "ف", "غ", "ع", "ه","خ", "ح","ج", "\n", + "ش", "س", "ي", "ب", "ل", "ا", "ت", "ن", "م", "ك", "ط", LV_SYMBOL_BACKSPACE, "\n", + "ذ", "ء", "ؤ", "ر", "ى", "ة", "و", "ز", "ظ", "د", "ز", "ظ", "د","\n", + LV_SYMBOL_CLOSE,"abc", LV_SYMBOL_LEFT, " ", LV_SYMBOL_RIGHT,LV_SYMBOL_NEW_LINE,LV_SYMBOL_OK, "" +}; + +static const lv_btnmatrix_ctrl_t default_kb_ctrl_ar_map[] = { + LV_KEYBOARD_CTRL_BTN_FLAGS | 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + LV_KEYBOARD_CTRL_BTN_FLAGS | 2,LV_KEYBOARD_CTRL_BTN_FLAGS | 2,2, 6, 2, 3, LV_KEYBOARD_CTRL_BTN_FLAGS | 2 +}; +#endif static const char * const default_kb_map_spec[] = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "0", LV_SYMBOL_BACKSPACE, "\n", "abc", "+", "-", "/", "*", "=", "%", "!", "?", "#", "<", ">", "\n", "\\", "@", "$", "(", ")", "{", "}", "[", "]", ";", "\"", "'", "\n", - LV_SYMBOL_CLOSE, LV_SYMBOL_LEFT, " ", LV_SYMBOL_RIGHT, LV_SYMBOL_OK, "" + LV_SYMBOL_CLOSE, +#if LV_USE_ARABIC_PERSIAN_CHARS == 1 + "أب", +#endif + LV_SYMBOL_LEFT, " ", LV_SYMBOL_RIGHT, LV_SYMBOL_OK, "" }; static const lv_btnmatrix_ctrl_t default_kb_ctrl_spec_map[] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, LV_KEYBOARD_CTRL_BTN_FLAGS | 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - LV_KEYBOARD_CTRL_BTN_FLAGS | 2, 2, 6, 2, LV_KEYBOARD_CTRL_BTN_FLAGS | 2 + LV_KEYBOARD_CTRL_BTN_FLAGS | 2, +#if LV_USE_ARABIC_PERSIAN_CHARS == 1 + LV_KEYBOARD_CTRL_BTN_FLAGS | 2, +#endif + 2, 6, 2, LV_KEYBOARD_CTRL_BTN_FLAGS | 2 }; static const char * const default_kb_map_num[] = {"1", "2", "3", LV_SYMBOL_CLOSE, "\n", @@ -87,17 +127,23 @@ static const lv_btnmatrix_ctrl_t default_kb_ctrl_num_map[] = { }; /* clang-format on */ -static const char * * kb_map[4] = { +static const char * * kb_map[] = { (const char * *)default_kb_map_lc, (const char * *)default_kb_map_uc, (const char * *)default_kb_map_spec, (const char * *)default_kb_map_num +#if LV_USE_ARABIC_PERSIAN_CHARS == 1 + ,(const char * *)default_kb_map_ar +#endif }; -static const lv_btnmatrix_ctrl_t * kb_ctrl[4] = { +static const lv_btnmatrix_ctrl_t * kb_ctrl[] = { default_kb_ctrl_lc_map, default_kb_ctrl_uc_map, default_kb_ctrl_spec_map, default_kb_ctrl_num_map +#if LV_USE_ARABIC_PERSIAN_CHARS == 1 + ,default_kb_ctrl_ar_map +#endif }; /********************** @@ -354,6 +400,14 @@ void lv_keyboard_def_event_cb(lv_obj_t * kb, lv_event_t event) lv_btnmatrix_set_ctrl_map(kb, kb_ctrl[LV_KEYBOARD_MODE_TEXT_LOWER]); return; } +#if LV_USE_ARABIC_PERSIAN_CHARS == 1 + else if(strcmp(txt, "أب") == 0) { + ext->mode = LV_KEYBOARD_MODE_TEXT_ARABIC; + lv_btnmatrix_set_map(kb, kb_map[LV_KEYBOARD_MODE_TEXT_ARABIC]); + lv_btnmatrix_set_ctrl_map(kb, kb_ctrl[LV_KEYBOARD_MODE_TEXT_ARABIC]); + return; + } +#endif else if(strcmp(txt, "ABC") == 0) { ext->mode = LV_KEYBOARD_MODE_TEXT_UPPER; lv_btnmatrix_set_map(kb, kb_map[LV_KEYBOARD_MODE_TEXT_UPPER]); diff --git a/src/lv_widgets/lv_keyboard.h b/src/lv_widgets/lv_keyboard.h index 3edd344b0..3c3b4a429 100644 --- a/src/lv_widgets/lv_keyboard.h +++ b/src/lv_widgets/lv_keyboard.h @@ -43,7 +43,10 @@ enum { LV_KEYBOARD_MODE_TEXT_LOWER, LV_KEYBOARD_MODE_TEXT_UPPER, LV_KEYBOARD_MODE_SPECIAL, - LV_KEYBOARD_MODE_NUM, + LV_KEYBOARD_MODE_NUM +#if LV_USE_ARABIC_PERSIAN_CHARS == 1 + ,LV_KEYBOARD_MODE_TEXT_ARABIC +#endif }; typedef uint8_t lv_keyboard_mode_t; From f532be905118c6051b1612380a2ebe783461f628 Mon Sep 17 00:00:00 2001 From: Amir Gonnen Date: Wed, 23 Dec 2020 16:25:06 +0200 Subject: [PATCH 3/6] lvgl.h: Add lv_version functions (#1973) These static inline functions return the values of the VERSION macros, making them available for Micropython See also https://github.com/lvgl/lv_examples/pull/85#issuecomment-749506978 --- lvgl.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/lvgl.h b/lvgl.h index 86a335c03..c56378100 100644 --- a/lvgl.h +++ b/lvgl.h @@ -121,6 +121,29 @@ extern "C" { * */ #define LV_VERSION_CHECK(x,y,z) (x == LVGL_VERSION_MAJOR && (y < LVGL_VERSION_MINOR || (y == LVGL_VERSION_MINOR && z <= LVGL_VERSION_PATCH))) +/** + * Wrapper functions for VERSION macros + */ + +static inline int lv_version_major() +{ + return LVGL_VERSION_MAJOR; +} + +static inline int lv_version_minor() +{ + return LVGL_VERSION_MINOR; +} + +static inline int lv_version_patch() +{ + return LVGL_VERSION_PATCH; +} + +static inline const char *lv_version_info() +{ + return LVGL_VERSION_INFO; +} #ifdef __cplusplus } From c03ffd7c3cbcc77622c89bcb6582b872f434b622 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 19 Jan 2021 14:31:47 +0100 Subject: [PATCH 4/6] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index edd6f8f64..50b21a225 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ - fix(indev) don't leave edit mode if there is only one object in the group -## v7.9.0 (Plann1d at 05.01.2020 +## v7.9.0 ### New features - feat(chart) add lv_chart_remove_series and lv_chart_hide_series From b639ddc3bc55aeaa963caa54c396c37b762c7b6a Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 19 Jan 2021 14:32:22 +0100 Subject: [PATCH 5/6] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 50b21a225..80ff8525a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## v7.9.1 (Planned at 19.01.2020 +## v7.9.1 (Planned at 19.01.2020) ### Bugfixes - fix(cpicker) fix division by zero From 0aefab358b1c43f1dbb03cb65160f395032dc00d Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 19 Jan 2021 14:36:38 +0100 Subject: [PATCH 6/6] Release v7.9.1 --- lvgl.h | 2 +- src/lv_conf_internal.h | 7 +++++-- src/lv_core/lv_indev.c | 2 +- src/lv_misc/lv_area.c | 2 +- src/lv_misc/lv_fs.c | 4 ++-- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/lvgl.h b/lvgl.h index 283013150..ff2ee801f 100644 --- a/lvgl.h +++ b/lvgl.h @@ -16,7 +16,7 @@ extern "C" { #define LVGL_VERSION_MAJOR 7 #define LVGL_VERSION_MINOR 9 #define LVGL_VERSION_PATCH 1 -#define LVGL_VERSION_INFO "dev" +#define LVGL_VERSION_INFO "" /********************* * INCLUDES diff --git a/src/lv_conf_internal.h b/src/lv_conf_internal.h index fb75f7031..ae3805c05 100644 --- a/src/lv_conf_internal.h +++ b/src/lv_conf_internal.h @@ -748,6 +748,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */ #endif #endif /*LV_TICK_CUSTOM*/ + /*================ * Log settings *===============*/ @@ -795,7 +796,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */ * If an invalid parameter is found an error log message is printed and * the MCU halts at the error. (`LV_USE_LOG` should be enabled) * If you are debugging the MCU you can pause - * the debugger to see exactly where the issue is. + * the debugger to see exactly where the issue is. * * The behavior of asserts can be overwritten by redefining them here. * E.g. #define LV_ASSERT_MEM(p) @@ -872,7 +873,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */ * FONT USAGE *===================*/ -/* The built-in fonts contains the ASCII range and some Symbols with 4 bit-per-pixel. +/* The built-in fonts contains the ASCII range and some Symbols with 4 bit-per-pixel. * The symbols are available via `LV_SYMBOL_...` defines * More info about fonts: https://docs.lvgl.io/v7/en/html/overview/font.html * To create a new font go to: https://lvgl.com/ttf-font-to-c-array @@ -1987,6 +1988,8 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */ #endif #endif + + /*If running without lv_conf.h add typdesf with default value*/ #if defined(LV_CONF_SKIP) diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index ed0d3a152..bf39ccdeb 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -669,7 +669,7 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) /*On enter long press toggle edit mode.*/ if(editable) { /*Don't leave edit mode if there is only one object (nowhere to navigate)*/ - if (_lv_ll_get_len(&g->obj_ll) > 1 ) { + if(_lv_ll_get_len(&g->obj_ll) > 1) { lv_group_set_editing(g, lv_group_get_editing(g) ? false : true); /*Toggle edit mode on long press*/ } } diff --git a/src/lv_misc/lv_area.c b/src/lv_misc/lv_area.c index 868af4531..0fea68328 100644 --- a/src/lv_misc/lv_area.c +++ b/src/lv_misc/lv_area.c @@ -239,7 +239,7 @@ bool _lv_area_is_in(const lv_area_t * ain_p, const lv_area_t * aholder_p, lv_coo is_in = true; } - if (!is_in) return false; + if(!is_in) return false; if(radius == 0) return true; /*Check if the corner points are inside the radius or not*/ diff --git a/src/lv_misc/lv_fs.c b/src/lv_misc/lv_fs.c index 8be49028e..6f66c765d 100644 --- a/src/lv_misc/lv_fs.c +++ b/src/lv_misc/lv_fs.c @@ -108,7 +108,7 @@ lv_fs_res_t lv_fs_open(lv_fs_file_t * file_p, const char * path, lv_fs_mode_t mo const char * real_path = lv_fs_get_real_path(path); - if (file_p->drv->file_size == 0) { /*Is file_d zero size?*/ + if(file_p->drv->file_size == 0) { /*Is file_d zero size?*/ /*Pass file_d's address to open_cb, so the implementor can allocate memory byself*/ return file_p->drv->open_cb(file_p->drv, &file_p->file_d, real_path, mode); } @@ -382,7 +382,7 @@ lv_fs_res_t lv_fs_dir_open(lv_fs_dir_t * rddir_p, const char * path) const char * real_path = lv_fs_get_real_path(path); - if (rddir_p->drv->rddir_size == 0) { /*Is dir_d zero size?*/ + if(rddir_p->drv->rddir_size == 0) { /*Is dir_d zero size?*/ /*Pass dir_d's address to dir_open_cb, so the implementor can allocate memory byself*/ return rddir_p->drv->dir_open_cb(rddir_p->drv, &rddir_p->dir_d, real_path); }