From 245d81ee923b8006e17a26271169ff4eaa64a9ae Mon Sep 17 00:00:00 2001 From: embeddedt <42941056+embeddedt@users.noreply.github.com> Date: Mon, 18 Feb 2019 13:05:58 -0500 Subject: [PATCH 1/6] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index cb9a00527..48a7a6a25 100644 --- a/README.md +++ b/README.md @@ -62,15 +62,15 @@ The easiest way to get started with LittlevGL is to run it in a simulator on you Choose a project with your favourite IDE: -| Eclipse | CodeBlock | Visual Studio | PlatformIO | Qt Creator | -|-------------|----------- |---------------|-----------|------------| +| Eclipse | CodeBlocks | Visual Studio | PlatformIO | Qt Creator | +|-------------|-------------|---------------|-----------|------------| | [![Eclipse](https://littlevgl.com/logo/ide/eclipse.jpg)](https://github.com/littlevgl/pc_simulator_sdl_eclipse) | [![CodeBlocks](https://littlevgl.com/logo/ide/codeblocks.jpg)](https://github.com/littlevgl/pc_simulator_win_codeblocks) | [![VisualStudio](https://littlevgl.com/logo/ide/visualstudio.jpg)](https://github.com/littlevgl/visual_studio_2017_sdl_x64) | [![PlatformIO](https://littlevgl.com/logo/ide/platformio.jpg)](https://github.com/littlevgl/pc_simulator_sdl_platformio) | [![QtCreator](https://littlevgl.com/logo/ide/qtcreator.jpg)](https://blog.littlevgl.com/2019-01-03/qt-creator) | | Cross-platform
with SDL | Native Windows | Cross-platform
with SDL | Cross-platform
with SDL | Cross-platform
with SDL | ### Porting to an embedded hardware In the most simple case you need to do these steps: 1. Copy `lv_conf_templ.h` as `lv_conf.h` next to `lvgl` and set at least `LV_HOR_RES`, `LV_VER_RES` and `LV_COLOR_DEPTH`. -2. Call `lv_tick_inc(x)` every `x` milliseconds in a Timer or Task (`x` should be between 1 and 10) +2. Call `lv_tick_inc(x)` every `x` milliseconds **in a Timer or Task** (`x` should be between 1 and 10) 3. Call `lv_init()` 4. Register a function which can **copy a pixel array** to an area of the screen: ```c From f4498fd0a4a295b2ac40ef99f65566f3e248aa36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mazurkiewicz?= Date: Wed, 20 Feb 2019 22:36:56 +0100 Subject: [PATCH 2/6] removed unnecessary semicolons --- lv_core/lv_style.h | 2 +- lv_misc/lv_font.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lv_core/lv_style.h b/lv_core/lv_style.h index ae50d93f4..62cea3615 100644 --- a/lv_core/lv_style.h +++ b/lv_core/lv_style.h @@ -184,7 +184,7 @@ extern lv_style_t lv_style_pretty_color; extern lv_style_t lv_style_btn_rel; extern lv_style_t lv_style_btn_pr; extern lv_style_t lv_style_btn_tgl_rel; -extern lv_style_t lv_style_btn_tgl_pr;; +extern lv_style_t lv_style_btn_tgl_pr; extern lv_style_t lv_style_btn_ina; /********************** diff --git a/lv_misc/lv_font.h b/lv_misc/lv_font.h index d1d24f3fe..39023d22a 100644 --- a/lv_misc/lv_font.h +++ b/lv_misc/lv_font.h @@ -171,7 +171,7 @@ int16_t lv_font_get_width_sparse(const lv_font_t * font, uint32_t unicode_letter * MACROS **********************/ -#define LV_FONT_DECLARE(font_name) extern lv_font_t font_name; +#define LV_FONT_DECLARE(font_name) extern lv_font_t font_name /********************** From a39d617ac95a5c4cf2e0cebad385f413ef94e6a8 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 21 Feb 2019 07:35:14 +0100 Subject: [PATCH 3/6] Update stale.yml --- .github/stale.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/stale.yml b/.github/stale.yml index 914189811..ea1179b76 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -7,7 +7,7 @@ exemptLabels: - architecture - pinned # Label to use when marking an issue as stale - staleLabel: stale +staleLabel: stale # Comment to post when marking an issue as stale. Set to `false` to disable markComment: > This issue or pull request has been automatically marked as stale because it has not had From 457f667cab6d4b1588cf4b93d6575a832e54d7c8 Mon Sep 17 00:00:00 2001 From: embeddedt <42941056+embeddedt@users.noreply.github.com> Date: Thu, 21 Feb 2019 10:39:39 -0500 Subject: [PATCH 4/6] Revert "[#809] Added x axis scrolling feature into lv_page_focus function." --- lv_objx/lv_page.c | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/lv_objx/lv_page.c b/lv_objx/lv_page.c index 3df65be26..4058c494a 100644 --- a/lv_objx/lv_page.c +++ b/lv_objx/lv_page.c @@ -456,10 +456,8 @@ void lv_page_focus(lv_obj_t * page, const lv_obj_t * obj, uint16_t anim_time) /* Be sure there is no position changing animation in progress * because it can overide the current changes*/ lv_anim_del(page, (lv_anim_fp_t)lv_obj_set_y); - lv_anim_del(page, (lv_anim_fp_t)lv_obj_set_x); lv_anim_del(page, (lv_anim_fp_t)lv_obj_set_pos); lv_anim_del(ext->scrl, (lv_anim_fp_t)lv_obj_set_y); - lv_anim_del(ext->scrl, (lv_anim_fp_t)lv_obj_set_x); lv_anim_del(ext->scrl, (lv_anim_fp_t)lv_obj_set_pos); #endif @@ -471,15 +469,8 @@ void lv_page_focus(lv_obj_t * page, const lv_obj_t * obj, uint16_t anim_time) lv_coord_t scrlable_y = lv_obj_get_y(ext->scrl); lv_coord_t page_h = lv_obj_get_height(page); - lv_coord_t obj_x = obj->coords.x1 - ext->scrl->coords.x1; - lv_coord_t obj_w = lv_obj_get_width(obj); - lv_coord_t scrlable_x = lv_obj_get_x(ext->scrl); - lv_coord_t page_w = lv_obj_get_width(page); - lv_coord_t top_err = -(scrlable_y + obj_y); lv_coord_t bot_err = scrlable_y + obj_y + obj_h - page_h; - lv_coord_t left_err = -(scrlable_x + obj_x); - lv_coord_t right_err = scrlable_x + obj_x + obj_w - page_w; /*If obj is higher then the page focus where the "error" is smaller*/ @@ -497,21 +488,6 @@ void lv_page_focus(lv_obj_t * page, const lv_obj_t * obj, uint16_t anim_time) scrlable_y = -(obj_y + style_scrl->body.padding.ver + style->body.padding.ver); scrlable_y -= style_scrl->body.padding.ver; scrlable_y += page_h - obj_h; - } - /*Out of the page on the left*/ - if((obj_w <= page_w && left_err > 0) || - (obj_w > page_w && left_err < right_err)) { - /*Calculate a new position and let some space above*/ - scrlable_x = -(obj_x - style_scrl->body.padding.ver - style->body.padding.ver); - scrlable_x += style_scrl->body.padding.ver; - } - /*Out of the page on the right*/ - else if((obj_w <= page_w && right_err > 0) || - (obj_w > page_w && left_err >= right_err)) { - /*Calculate a new position and let some space below*/ - scrlable_x = -(obj_x + style_scrl->body.padding.ver + style->body.padding.ver); - scrlable_x -= style_scrl->body.padding.ver; - scrlable_x += page_w - obj_w; } else { /*Already in focus*/ return; @@ -519,7 +495,6 @@ void lv_page_focus(lv_obj_t * page, const lv_obj_t * obj, uint16_t anim_time) if(anim_time == 0) { lv_obj_set_y(ext->scrl, scrlable_y); - lv_obj_set_x(ext->scrl, scrlable_x); #if USE_LV_ANIMATION } else { lv_anim_t a; @@ -534,12 +509,6 @@ void lv_page_focus(lv_obj_t * page, const lv_obj_t * obj, uint16_t anim_time) a.path = lv_anim_path_linear; a.fp = (lv_anim_fp_t) lv_obj_set_y; lv_anim_create(&a); - - a.start = lv_obj_get_x(ext->scrl); - a.end = scrlable_x; - a.var = ext->scrl; - a.fp = (lv_anim_fp_t) lv_obj_set_x; - lv_anim_create(&a); #endif } } From a7260bbfa9baf8ba75cd01ed4682bc38ebc63751 Mon Sep 17 00:00:00 2001 From: Brian Pugh Date: Thu, 21 Feb 2019 21:02:18 -0800 Subject: [PATCH 5/6] Revert semicolon removal from f4498fd0. This semicolon is necessary for more natural, less error prone custom font declaration in lv_conf.h --- lv_misc/lv_font.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lv_misc/lv_font.h b/lv_misc/lv_font.h index 39023d22a..d1d24f3fe 100644 --- a/lv_misc/lv_font.h +++ b/lv_misc/lv_font.h @@ -171,7 +171,7 @@ int16_t lv_font_get_width_sparse(const lv_font_t * font, uint32_t unicode_letter * MACROS **********************/ -#define LV_FONT_DECLARE(font_name) extern lv_font_t font_name +#define LV_FONT_DECLARE(font_name) extern lv_font_t font_name; /********************** From 465f8fa96a42d46589ab6977d000e933c13cfb33 Mon Sep 17 00:00:00 2001 From: Brian Pugh Date: Thu, 21 Feb 2019 21:40:00 -0800 Subject: [PATCH 6/6] lv_list: lv_list_set_btn_selected: only write ext->last_sel if btn is non-NULL. --- lv_objx/lv_list.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lv_objx/lv_list.c b/lv_objx/lv_list.c index 48763d663..6eb5aa1bd 100644 --- a/lv_objx/lv_list.c +++ b/lv_objx/lv_list.c @@ -300,7 +300,9 @@ void lv_list_set_btn_selected(lv_obj_t * list, lv_obj_t * btn) } ext->selected_btn = btn; - ext->last_sel = btn; + if( btn != NULL ) { + ext->last_sel = btn; + } if(ext->selected_btn) { lv_btn_state_t s = lv_btn_get_state(ext->selected_btn);