From 775f1a59dfcf3db1c01dffebb77af967cbf3d20d Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 1 Sep 2020 09:35:32 +0200 Subject: [PATCH 01/12] lv_refr: take opa_scale into account in cover check --- src/lv_core/lv_refr.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/lv_core/lv_refr.c b/src/lv_core/lv_refr.c index 0765fba27..f3166ccd0 100644 --- a/src/lv_core/lv_refr.c +++ b/src/lv_core/lv_refr.c @@ -572,10 +572,15 @@ static lv_obj_t * lv_refr_get_top_obj(const lv_area_t * area_p, lv_obj_t * obj) /*If this object is fully cover the draw area check the children too */ if(_lv_area_is_in(area_p, &obj->coords, 0) && obj->hidden == 0) { - lv_design_res_t design_res = obj->design_cb ? obj->design_cb(obj, area_p, - LV_DESIGN_COVER_CHK) : LV_DESIGN_RES_NOT_COVER; + lv_design_res_t design_res = obj->design_cb(obj, area_p, LV_DESIGN_COVER_CHK); if(design_res == LV_DESIGN_RES_MASKED) return NULL; +#if LV_USE_OPA_SCALE + if(design_res == LV_DESIGN_RES_COVER && lv_obj_get_style_opa_scale(obj, LV_OBJ_PART_MAIN) != LV_OPA_COVER) { + design_res = LV_DESIGN_RES_NOT_COVER; + } +#endif + lv_obj_t * i; _LV_LL_READ(obj->child_ll, i) { found_p = lv_refr_get_top_obj(area_p, i); From 1102cfdf82af0151d1143f7993ff79c1d40c5374 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 1 Sep 2020 09:37:00 +0200 Subject: [PATCH 02/12] lv_arc_set_value: be sure the 'fixed' angle is corerct --- src/lv_widgets/lv_arc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lv_widgets/lv_arc.c b/src/lv_widgets/lv_arc.c index 4afc26609..67afe4b25 100644 --- a/src/lv_widgets/lv_arc.c +++ b/src/lv_widgets/lv_arc.c @@ -423,6 +423,7 @@ void lv_arc_set_value(lv_obj_t * arc, int16_t value) break; default: /** LV_ARC_TYPE_NORMAL*/ angle = _lv_map(ext->cur_value, ext->min_value, ext->max_value, ext->bg_angle_start, bg_end); + lv_arc_set_start_angle(arc, ext->bg_angle_start); lv_arc_set_end_angle(arc, angle); } ext->last_angle = angle; /*Cache angle for slew rate limiting*/ From f545a24bbd48094c930914531da30ec2a7242719 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 1 Sep 2020 09:37:53 +0200 Subject: [PATCH 03/12] gauge: allow not recoling the image needle --- src/lv_widgets/lv_gauge.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lv_widgets/lv_gauge.c b/src/lv_widgets/lv_gauge.c index f7f47dc40..97ccd54f3 100644 --- a/src/lv_widgets/lv_gauge.c +++ b/src/lv_widgets/lv_gauge.c @@ -619,7 +619,6 @@ static void lv_gauge_draw_needle(lv_obj_t * gauge, const lv_area_t * clip_area) lv_draw_img_dsc_t img_dsc; lv_draw_img_dsc_init(&img_dsc); lv_obj_init_draw_img_dsc(gauge, LV_GAUGE_PART_MAIN, &img_dsc); - img_dsc.recolor_opa = LV_OPA_COVER; img_dsc.pivot.x = ext->needle_img_pivot.x; img_dsc.pivot.y = ext->needle_img_pivot.y; From 612308f281a0885920bbe4b1a0ba20eda7ff5dfd Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 1 Sep 2020 09:38:15 +0200 Subject: [PATCH 04/12] lv_img: check blend modes in cover check --- src/lv_widgets/lv_img.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lv_widgets/lv_img.c b/src/lv_widgets/lv_img.c index dc95c4985..a9211ab25 100644 --- a/src/lv_widgets/lv_img.c +++ b/src/lv_widgets/lv_img.c @@ -605,6 +605,11 @@ static lv_design_res_t lv_img_design(lv_obj_t * img, const lv_area_t * clip_area if(_lv_area_is_in(clip_area, &a, 0) == false) return LV_DESIGN_RES_NOT_COVER; } +#if LV_USE_BLEND_MODES + if(lv_obj_get_style_bg_blend_mode(img, LV_IMG_PART_MAIN) != LV_BLEND_MODE_NORMAL) return LV_DESIGN_RES_NOT_COVER; + if(lv_obj_get_style_img_blend_mode(img, LV_IMG_PART_MAIN) != LV_BLEND_MODE_NORMAL) return LV_DESIGN_RES_NOT_COVER; +#endif + return LV_DESIGN_RES_COVER; } else if(mode == LV_DESIGN_DRAW_MAIN) { From de38ee4a2120109d0d66a761c2036681fce1d2ea Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 1 Sep 2020 09:40:16 +0200 Subject: [PATCH 05/12] fix typo --- src/lv_widgets/lv_img.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lv_widgets/lv_img.c b/src/lv_widgets/lv_img.c index a9211ab25..d7fb1a85d 100644 --- a/src/lv_widgets/lv_img.c +++ b/src/lv_widgets/lv_img.c @@ -607,7 +607,7 @@ static lv_design_res_t lv_img_design(lv_obj_t * img, const lv_area_t * clip_area #if LV_USE_BLEND_MODES if(lv_obj_get_style_bg_blend_mode(img, LV_IMG_PART_MAIN) != LV_BLEND_MODE_NORMAL) return LV_DESIGN_RES_NOT_COVER; - if(lv_obj_get_style_img_blend_mode(img, LV_IMG_PART_MAIN) != LV_BLEND_MODE_NORMAL) return LV_DESIGN_RES_NOT_COVER; + if(lv_obj_get_style_image_blend_mode(img, LV_IMG_PART_MAIN) != LV_BLEND_MODE_NORMAL) return LV_DESIGN_RES_NOT_COVER; #endif return LV_DESIGN_RES_COVER; From e42128e937ceec5eaf97f202dc4a236eb33a7456 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 1 Sep 2020 10:18:35 +0200 Subject: [PATCH 06/12] minor release related fixes --- lv_conf_template.h | 2 +- scripts/release.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lv_conf_template.h b/lv_conf_template.h index 6faeafad3..508d361fa 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -1,6 +1,6 @@ /** * @file lv_conf.h - * Configuration file for v7.6.0-dev-dev + * Configuration file for v7.4.0-dev */ /* diff --git a/scripts/release.py b/scripts/release.py index cef3f4afe..b4820c7de 100755 --- a/scripts/release.py +++ b/scripts/release.py @@ -348,7 +348,7 @@ def lvgl_update_master_version(): templ = fnmatch.filter(os.listdir('.'), '*templ*') if templ[0]: print("Updating version in " + templ[0]) - cmd("sed -i -r 's/v[0-9]+\.[0-9]+\.[0-9]+/"+ ver_str +"/' " + templ[0]) + cmd("sed -i -r 's/v[0-9]+\.[0-9]+\.[0-9]+.*/"+ ver_str +"/' " + templ[0]) cmd("git commit -am 'Update version'") @@ -381,7 +381,7 @@ def lvgl_update_dev_version(): templ = fnmatch.filter(os.listdir('.'), '*templ*') if templ[0]: print("Updating version in " + templ[0]) - cmd("sed -i -r 's/v[0-9]+\.[0-9]+\.[0-9]+/"+ dev_ver_str +"/' " + templ[0]) + cmd("sed -i -r 's/v[0-9]+\.[0-9]+\.[0-9]+.*/"+ dev_ver_str +"/' " + templ[0]) cmd("git commit -am 'Update dev version'") From 2f79133685449078d45697f9bd32febf88fbaee9 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 1 Sep 2020 10:42:32 +0200 Subject: [PATCH 07/12] release.py: remove debug statements --- scripts/release.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/release.py b/scripts/release.py index b4820c7de..4bb72c653 100755 --- a/scripts/release.py +++ b/scripts/release.py @@ -52,7 +52,7 @@ from os import path from datetime import date import sys -upstream_org_url = "https://github.com/kisvegabor/" +upstream_org_url = "https://github.com/lvgl/" workdir = "./release_tmp" proj_list = [ "lv_sim_eclipse_sdl"] @@ -105,10 +105,10 @@ def clone_repos(): os.chdir(workdir) #For debuging just copy the repos - cmd("cp -a ../repos/. .") - return + #cmd("cp -a ../repos/. .") + #return - cmd("git clone " + upstream("lvgl") + " lvgl; cd lvgl; git checkout master") + cmd("git clone " + upstream("lvgl") + "; cd lvgl; git checkout master") cmd("git clone " + upstream("lv_examples") + "; cd lv_examples; git checkout master") cmd("git clone " + upstream("lv_drivers") + "; cd lv_drivers; git checkout master") cmd("git clone --recurse-submodules " + upstream("docs") + "; cd docs; git checkout master") From 289fd95c3d0a1e269cc9790d7b08e6bdcefdf44d Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 1 Sep 2020 10:42:58 +0200 Subject: [PATCH 08/12] release.py: remove debug statements --- scripts/release.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/scripts/release.py b/scripts/release.py index 4bb72c653..0b494014c 100755 --- a/scripts/release.py +++ b/scripts/release.py @@ -462,11 +462,6 @@ if __name__ == '__main__': clone_repos() get_lvgl_version("master") - - projs_update() - - exit(1); - lvgl_prepare() lv_examples_prepare() lv_drivers_prepare() From 26b36dfea14caed8d82abf5b7fc129426f2e8aa7 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 1 Sep 2020 10:45:27 +0200 Subject: [PATCH 09/12] release.py minor update to run in debugger --- scripts/release.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/release.py b/scripts/release.py index 0b494014c..639363dd8 100755 --- a/scripts/release.py +++ b/scripts/release.py @@ -450,12 +450,13 @@ def cleanup(): cmd("rm -fr " + workdir) if __name__ == '__main__': - if(len(sys.argv) != 2): - print("Argument error. Usage ./release.py bugfix | minor | major") - #exit(1) - - #dev_prepare = sys.argv[1] dev_prepare = 'minor' + if(len(sys.argv) != 2): + print("Missing argument. Usage ./release.py bugfix | minor | major") + print("Use minor by deafult") + else: + dev_prepare = sys.argv[1] + if not (dev_prepare in prepare_type): print("Invalid argument. Usage ./release.py bugfix | minor | major") exit(1) From beec11565cf32ab0e2cc1052bbcc74f4fd462e93 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 1 Sep 2020 11:29:08 +0200 Subject: [PATCH 10/12] update changelog --- CHANGELOG.md | 8 +++++--- scripts/release.py | 11 +++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5141e6527..455c9634e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,13 +2,15 @@ ## v7.4.0 (planned on 01.09.2020) +The main new features of v7.4 are run-time font loading, style caching and arc knob with value setting by click. + ### New features -- arc: add set value by click feature -- arc: add `LV_ARC_PART_KNOB` similarly to slider -- send gestures even is the the obejct was dragged. User can check dragging with `lv_indev_is_dragging(lv_indev_act())` in the event function. - Add `lv_font_load()` function - Loads a `lv_font_t` object from a binary font file - Add `lv_font_free()` function - Frees the memory allocated by the `lv_font_load()` function - Add style caching to reduce acces time of properties with default value +- arc: add set value by click feature +- arc: add `LV_ARC_PART_KNOB` similarly to slider +- send gestures even is the the obejct was dragged. User can check dragging with `lv_indev_is_dragging(lv_indev_act())` in the event function. ### Bugfixes - Fix color bleeding on border drawing diff --git a/scripts/release.py b/scripts/release.py index 639363dd8..fbde8f8c5 100755 --- a/scripts/release.py +++ b/scripts/release.py @@ -305,6 +305,17 @@ def update_release_branches(): cmd("cd docs; " + merge_cmd) def publish_master(): + + #Merge LVGL master to dev first to avoid "merge-to-dev.yml" running asynchronous + os.chdir("./lvgl") + cmd("git checkout dev") + cmd("git merge master -X theirs") + cmd("git add .") + cmd("git commit -am 'Merge master'") + cmd("git push origin dev") + cmd("git checkout master") + os.chdir("../") + pub_cmd = "git push origin master; git push origin " + ver_str cmd("cd lvgl; " + pub_cmd) cmd("cd lv_examples; " + pub_cmd) From 343605ebac1c2a4c684a01cebc970d64aea5e747 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 1 Sep 2020 11:34:10 +0200 Subject: [PATCH 11/12] prepare to release v7.4.0 --- CHANGELOG.md | 2 +- library.json | 2 +- library.properties | 2 +- lvgl.h | 2 +- src/lv_conf_internal.h | 3 ++- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 455c9634e..bcdf6b855 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## v7.4.0 (planned on 01.09.2020) +## v7.4.0 (01.09.2020) The main new features of v7.4 are run-time font loading, style caching and arc knob with value setting by click. diff --git a/library.json b/library.json index a6eb48edf..5f6adb3ed 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "lvgl", - "version": "7.3.1", + "version": "7.4.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 44897bb54..4a160a47f 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=lvgl -version=7.3.1 +version=7.4.0 author=kisvegabor maintainer=kisvegabor,embeddedt,pete-pjb sentence=Full-featured Graphics Library for Embedded Systems diff --git a/lvgl.h b/lvgl.h index fb18d9ff2..ee54e2d80 100644 --- a/lvgl.h +++ b/lvgl.h @@ -17,7 +17,7 @@ extern "C" { #define LVGL_VERSION_MAJOR 7 #define LVGL_VERSION_MINOR 4 #define LVGL_VERSION_PATCH 0 -#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 8a031535f..0f5f28ac0 100644 --- a/src/lv_conf_internal.h +++ b/src/lv_conf_internal.h @@ -1049,8 +1049,9 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */ /*Rotary (dependencies: lv_arc, lv_btn)*/ #ifndef LV_USE_ROTARY -#define LV_USE_ROTARY 1 +#define LV_USE_ROTARY 1 #endif + /*Slider (dependencies: lv_bar)*/ #ifndef LV_USE_SLIDER #define LV_USE_SLIDER 1 From 6d7bd355ed268c1ba504ed7bdf3242aafdda8145 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 1 Sep 2020 11:39:54 +0200 Subject: [PATCH 12/12] fix version lv_conf_template.h --- lv_conf_template.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lv_conf_template.h b/lv_conf_template.h index 508d361fa..97e91762c 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -1,6 +1,6 @@ /** * @file lv_conf.h - * Configuration file for v7.4.0-dev + * Configuration file for v7.4.0 */ /*