1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

Merge branch 'master' into dev

This commit is contained in:
Gabor Kiss-Vamosi 2020-09-15 11:19:33 +02:00
commit dc0f9253d4
11 changed files with 30 additions and 33 deletions

View File

@ -1,6 +1,6 @@
{
"name": "lvgl",
"version": "7.4.0",
"version": "7.5.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": {

View File

@ -1,5 +1,5 @@
name=lvgl
version=7.4.0
version=7.5.0
author=kisvegabor
maintainer=kisvegabor,embeddedt,pete-pjb
sentence=Full-featured Graphics Library for Embedded Systems

8
lvgl.h
View File

@ -14,10 +14,10 @@ extern "C" {
/***************************
* CURRENT VERSION OF LVGL
***************************/
#define LVGL_VERSION_MAJOR 7
#define LVGL_VERSION_MINOR 6
#define LVGL_VERSION_PATCH 0
#define LVGL_VERSION_INFO "dev"
#define LVGL_VERSION_MAJOR 7
#define LVGL_VERSION_MINOR 5
#define LVGL_VERSION_PATCH 0
#define LVGL_VERSION_INFO ""
/*********************
* INCLUDES

View File

@ -1675,11 +1675,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */
* 2: Best precision
*/
#ifndef LV_LINEMETER_PRECISE
# ifdef CONFIG_LV_LINEMETER_PRECISE
# define LV_LINEMETER_PRECISE CONFIG_LV_LINEMETER_PRECISE
# else
# define LV_LINEMETER_PRECISE 1
# endif
# define LV_LINEMETER_PRECISE 1
#endif
#endif
@ -1778,7 +1774,6 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h" */
# define LV_ROLLER_INF_PAGES 7
# endif
#endif
#endif
/*Slider (dependencies: lv_bar)*/
#ifndef LV_USE_SLIDER

View File

@ -360,12 +360,12 @@ void lv_disp_clean_dcache(lv_disp_t * disp)
{
if(!disp) disp = lv_disp_get_default();
if(!disp) {
LV_LOG_WARN("lv_disp_clean_dcache: no display registered");
return;
LV_LOG_WARN("lv_disp_clean_dcache: no display registered");
return;
}
if(disp->driver.clean_dcache_cb)
disp->driver.clean_dcache_cb(&disp->driver);
disp->driver.clean_dcache_cb(&disp->driver);
}
/**

View File

@ -746,7 +746,7 @@ static void lv_refr_vdb_flush(void)
/*Flush the rendered content to the display*/
lv_disp_t * disp = _lv_refr_get_disp_refreshing();
if (disp->driver.gpu_wait_cb) disp->driver.gpu_wait_cb(&disp->driver);
if(disp->driver.gpu_wait_cb) disp->driver.gpu_wait_cb(&disp->driver);
if(disp->driver.flush_cb) disp->driver.flush_cb(&disp->driver, &vdb->area, vdb->buf_act);

View File

@ -138,8 +138,8 @@ LV_ATTRIBUTE_FAST_MEM void _lv_blend_fill(const lv_area_t * clip_area, const lv_
const lv_area_t * disp_area = &vdb->area;
lv_color_t * disp_buf = vdb->buf_act;
if (disp->driver.gpu_wait_cb) disp->driver.gpu_wait_cb(&disp->driver);
if(disp->driver.gpu_wait_cb) disp->driver.gpu_wait_cb(&disp->driver);
/* Get clipped fill area which is the real draw area.
* It is always the same or inside `fill_area` */
lv_area_t draw_area;
@ -213,8 +213,8 @@ LV_ATTRIBUTE_FAST_MEM void _lv_blend_map(const lv_area_t * clip_area, const lv_a
const lv_area_t * disp_area = &vdb->area;
lv_color_t * disp_buf = vdb->buf_act;
if (disp->driver.gpu_wait_cb) disp->driver.gpu_wait_cb(&disp->driver);
if(disp->driver.gpu_wait_cb) disp->driver.gpu_wait_cb(&disp->driver);
/* Now `draw_area` has absolute coordinates.
* Make it relative to `disp_area` to simplify draw to `disp_buf`*/
draw_area.x1 -= disp_area->x1;

View File

@ -120,7 +120,8 @@ const uint8_t * lv_font_get_bitmap_fmt_txt(const lv_font_t * font, uint32_t unic
}
bool prefilter = fdsc->bitmap_format == LV_FONT_FMT_TXT_COMPRESSED ? true : false;
decompress(&fdsc->glyph_bitmap[gdsc->bitmap_index], LV_GC_ROOT(_lv_font_decompr_buf), gdsc->box_w, gdsc->box_h, (uint8_t)fdsc->bpp,
decompress(&fdsc->glyph_bitmap[gdsc->bitmap_index], LV_GC_ROOT(_lv_font_decompr_buf), gdsc->box_w, gdsc->box_h,
(uint8_t)fdsc->bpp,
prefilter);
return LV_GC_ROOT(_lv_font_decompr_buf);
#else /* !LV_USE_FONT_COMPRESSED */

View File

@ -452,7 +452,7 @@ void lv_arc_set_adjustable(lv_obj_t * arc, bool adjustable)
{
LV_ASSERT_OBJ(arc, LV_OBJX_NAME);
lv_arc_ext_t *ext = (lv_arc_ext_t *)lv_obj_get_ext_attr(arc);
lv_arc_ext_t * ext = (lv_arc_ext_t *)lv_obj_get_ext_attr(arc);
if(ext->adjustable == adjustable)
return;
@ -597,7 +597,7 @@ bool lv_arc_get_adjustable(lv_obj_t * arc)
{
LV_ASSERT_OBJ(arc, LV_OBJX_NAME);
lv_arc_ext_t *ext = (lv_arc_ext_t *)lv_obj_get_ext_attr(arc);
lv_arc_ext_t * ext = (lv_arc_ext_t *)lv_obj_get_ext_attr(arc);
return ext->adjustable;
}
@ -1053,10 +1053,10 @@ static void get_knob_area(lv_obj_t * arc, const lv_point_t * center, lv_coord_t
*/
static void value_update(lv_obj_t * arc)
{
lv_arc_ext_t *ext = (lv_arc_ext_t *)lv_obj_get_ext_attr(arc);
lv_arc_ext_t * ext = (lv_arc_ext_t *)lv_obj_get_ext_attr(arc);
int16_t bg_midpoint, range_midpoint, bg_end = ext->bg_angle_end;
if (ext->bg_angle_end < ext->bg_angle_start) bg_end = ext->bg_angle_end + 360;
if(ext->bg_angle_end < ext->bg_angle_start) bg_end = ext->bg_angle_end + 360;
int16_t angle;
switch(ext->type) {
@ -1064,11 +1064,12 @@ static void value_update(lv_obj_t * arc)
bg_midpoint = (ext->bg_angle_start + bg_end) / 2;
range_midpoint = (int32_t)(ext->min_value + ext->max_value) / 2;
if (ext->cur_value < range_midpoint) {
if(ext->cur_value < range_midpoint) {
angle = _lv_map(ext->cur_value, ext->min_value, range_midpoint, ext->bg_angle_start, bg_midpoint);
lv_arc_set_start_angle(arc, angle);
lv_arc_set_end_angle(arc, bg_midpoint);
} else {
}
else {
angle = _lv_map(ext->cur_value, range_midpoint, ext->max_value, bg_midpoint, bg_end);
lv_arc_set_start_angle(arc, bg_midpoint);
lv_arc_set_end_angle(arc, angle);

View File

@ -48,9 +48,9 @@ typedef struct {
int16_t cur_value; /*Current value of the arc*/
int16_t min_value; /*Minimum value of the arc*/
int16_t max_value; /*Maximum value of the arc*/
uint16_t dragging :1;
uint16_t type :2;
uint16_t adjustable :1;
uint16_t dragging : 1;
uint16_t type : 2;
uint16_t adjustable : 1;
uint16_t chg_rate; /*Drag angle rate of change of the arc (degrees/sec)*/
uint32_t last_tick; /*Last dragging event timestamp of the arc*/
int16_t last_angle; /*Last dragging angle of the arc*/

View File

@ -303,7 +303,7 @@ void lv_textarea_add_char(lv_obj_t * ta, uint32_t c)
lv_anim_set_path(&a, &path);
lv_anim_set_ready_cb(&a, pwd_char_hider_anim_ready);
lv_anim_start(&a);
}
}
#else
pwd_char_hider(ta);
@ -386,7 +386,7 @@ void lv_textarea_add_text(lv_obj_t * ta, const char * txt)
lv_anim_set_path(&a, &path);
lv_anim_set_ready_cb(&a, pwd_char_hider_anim_ready);
lv_anim_start(&a);
}
}
#else
pwd_char_hider(ta);
#endif
@ -544,7 +544,7 @@ void lv_textarea_set_text(lv_obj_t * ta, const char * txt)
lv_anim_set_path(&a, &path);
lv_anim_set_ready_cb(&a, pwd_char_hider_anim_ready);
lv_anim_start(&a);
}
}
#else
pwd_char_hider(ta);
#endif