Merge remote-tracking branch 'origin/master' into dev-7.0

This commit is contained in:
Themba Dube
2020-04-06 19:37:38 -04:00
14 changed files with 253 additions and 18 deletions

View File

@@ -1,7 +1,7 @@
<h1 align="center"> LittlevGL - Open-source Embedded GUI Library</h1>
<p align="center">
<a href="https://github.com/littlevgl/lvgl/blob/master/LICENCE.txt"><img src="https://img.shields.io/badge/licence-MIT-blue.svg"></a>
<a href="https://github.com/littlevgl/lvgl/releases/tag/v6.0"><img src="https://img.shields.io/badge/version-6.0-blue.svg"></a>
<a href="https://github.com/littlevgl/lvgl/releases/tag/v6.1.2"><img src="https://img.shields.io/badge/version-6.1.2-blue.svg"></a>
</p>
<p align="center">
@@ -71,7 +71,7 @@ Just to mention some **platforms**:
- NXP Kinetis, LPC, iMX
- [Linux frame buffer](https://blog.littlevgl.com/2018-01-03/linux_fb) (/dev/fb)
- [Raspberry PI](http://www.vk3erw.com/index.php/16-software/63-raspberry-pi-official-7-touchscreen-and-littlevgl)
- [Espressif ESP32](https://github.com/littlevgl/esp32_ili9431)
- [Espressif ESP32](https://github.com/littlevgl/lv_port_esp32)
- Nordic nrf52
- Quectell M66

View File

@@ -19,7 +19,7 @@ But first, start with the most Frequently Asked Questions.
We use the [Forum](https://forum.littlevgl.com/) to ask and answer questions and [GitHub's issue tracker](https://github.com/littlevgl/lvgl/issues) for development-related discussion.
But there are some simple rules:
We have some simple rules:
- Be kind and friendly.
- Speak about one thing in one issue/topic.
- Give feedback and close the issue or mark the topic as solved if your question is answered.

View File

@@ -1,6 +1,6 @@
{
"name": "lvgl",
"version": "6.1.1",
"version": "v6.1.2",
"keywords": "graphics, gui, embedded, littlevgl",
"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

@@ -179,8 +179,8 @@ static void gpu_fill(lv_disp_drv_t * disp_drv, lv_color_t * dest_buf, lv_coord_t
int32_t x, y;
dest_buf += dest_width * fill_area->y1; /*Go to the first line*/
for(y = fill_area->y1; y < fill_area->y2; y++) {
for(x = fill_area->x1; x < fill_area->x2; x++) {
for(y = fill_area->y1; y <= fill_area->y2; y++) {
for(x = fill_area->x1; x <= fill_area->x2; x++) {
dest_buf[x] = color;
}
dest_buf+=dest_width; /*Go to the next line*/

View File

@@ -724,7 +724,7 @@ CITE_BIB_FILES =
# messages are off.
# The default value is: NO.
QUIET = NO
QUIET = YES
# The WARNINGS tag can be used to turn on/off the warning messages that are
# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES
@@ -733,14 +733,14 @@ QUIET = NO
# Tip: Turn warnings on while writing the documentation.
# The default value is: YES.
WARNINGS = YES
WARNINGS = NO
# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate
# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
# will automatically be disabled.
# The default value is: YES.
WARN_IF_UNDOCUMENTED = YES
WARN_IF_UNDOCUMENTED = NO
# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
# potential errors in the documentation, such as not documenting some parameters
@@ -748,7 +748,7 @@ WARN_IF_UNDOCUMENTED = YES
# markup commands wrongly.
# The default value is: YES.
WARN_IF_DOC_ERROR = YES
WARN_IF_DOC_ERROR = NO
# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
# are documented, but have no documentation for their parameters or return

189
scripts/release_patch.py Normal file
View File

@@ -0,0 +1,189 @@
import re
import os
lastNum = re.compile(r'(?:[^\d]*(\d+)[^\d]*)+')
def title(t):
print("\n---------------------------------")
print(t)
print("---------------------------------")
def cmd(c):
print("\n" + c)
os.system(c)
def increment(s):
""" look for the last sequence of number(s) in a string and increment """
m = lastNum.search(s)
if m:
next = str(int(m.group(1))+1)
start, end = m.span(1)
s = s[:max(end-len(next), start)] + next + s[end:]
return s, str(next)
def lvgl_clone():
title("lvgl: Clone")
cmd("git clone https://github.com/littlevgl/lvgl.git")
os.chdir("./lvgl")
cmd("git co master")
def lvgl_update_version():
title("lvgl: Update version number")
f = open("./src/lv_version.h", "r")
outbuf = ""
major_ver = -1
minor_ver = -1
patch_ver = -1
for i in f.read().splitlines():
r = re.search(r'^#define LVGL_VERSION_MAJOR ', i)
if r:
m = lastNum.search(i)
if m: major_ver = m.group(1)
r = re.search(r'^#define LVGL_VERSION_MINOR ', i)
if r:
m = lastNum.search(i)
if m: minor_ver = m.group(1)
r = re.search(r'^#define LVGL_VERSION_PATCH ', i)
if r:
i, patch_ver = increment(i)
r = re.search(r'^#define LVGL_VERSION_INFO ', i)
if r:
i = "#define LVGL_VERSION_INFO \"\""
outbuf += i + '\n'
f.close()
f = open("./src/lv_version.h", "w")
f.write(outbuf)
f.close()
s = "v" + str(major_ver) + "." + str(minor_ver) + "." + str(patch_ver)
print("New version:" + s)
return s
def lvgl_update_library_json(v):
title("lvgl: Update version number in library.json")
f = open("./library.json", "r")
outbuf = ""
for i in f.read().splitlines():
r = re.search(r'"version": ', i)
if r:
i = ' "version": "' + v + '",'
outbuf += i + '\n'
f.close()
f = open("./library.json", "w")
f.write(outbuf)
f.close()
def lvgl_commit_push(v):
title("lvgl: commit and push release")
cmd('git ci -am "Release ' + v + '"')
cmd('git tag -a ' + v + ' -m "Release ' + v +'"')
cmd('git push origin master')
cmd('git push origin ' + v)
def lvgl_update_api_docs():
title("lvgl: Update API with Doxygen")
cmd("cd scripts; doxygen");
def docs_clone():
title("docs: Clone")
os.chdir("../")
cmd("git clone --recursive https://github.com/littlevgl/docs.git")
os.chdir("./docs")
cmd("git co master")
def docs_get_api():
title("docs: Get API files")
cmd("rm -rf xml");
cmd("cp -r ../lvgl/docs/api_doc/xml .");
def docs_update_version(v):
title("docs: Update version number")
f = open("./conf.py", "r")
outbuf = ""
for i in f.read().splitlines():
r = re.search(r'^version = ', i)
if r:
i = "version = '" + v + "'"
r = re.search(r'^release = ', i)
if r:
i = "version = '" + v + "'"
outbuf += i + '\n'
f.close()
f = open("./conf.py", "w")
f.write(outbuf)
f.close()
def docs_update_trans():
title("docs: Update translations")
cmd("cd en && ./trans_push.py && ./trans_pull.py")
def docs_build():
title("docs: Build")
cmd("./build.py clean")
def docs_commit_push(v):
title("docs: Commit release")
cmd('git add .')
cmd('git ci -am "Release ' + v + '"')
cmd('git tag -a ' + v + ' -m "Release ' + v +'"')
cmd('git push origin master')
cmd('git push origin ' + v)
def clean_up():
title("Clean up repos")
os.chdir("..")
cmd("rm -rf lvgl docs")
lvgl_clone()
lvgl_update_api_docs()
ver_str = lvgl_update_version()
lvgl_update_library_json(ver_str)
lvgl_commit_push(ver_str)
docs_clone()
docs_get_api()
docs_update_version(ver_str)
docs_update_trans()
docs_build()
docs_commit_push(ver_str)
clean_up()

View File

@@ -358,6 +358,7 @@ lv_res_t lv_indev_finish_drag(lv_indev_t * indev)
*/
void lv_indev_wait_release(lv_indev_t * indev)
{
if(indev == NULL)return;
indev->proc.wait_until_release = 1;
}

View File

@@ -198,9 +198,9 @@ void lv_disp_refr_task(lv_task_t * task)
/*If refresh happened ...*/
if(disp_refr->inv_p != 0) {
/*In true double buffered mode copy the refreshed areas to the new VDB to keep it up to
* date*/
if(lv_disp_is_true_double_buf(disp_refr)) {
/* In true double buffered mode copy the refreshed areas to the new VDB to keep it up to date.
* With set_px_cb we don't know anything about the buffer (even it's size) so skip copying.*/
if(lv_disp_is_true_double_buf(disp_refr) && disp_refr->driver.set_px_cb == NULL) {
lv_disp_buf_t * vdb = lv_disp_get_buf(disp_refr);
/*Flush the content of the VDB*/

View File

@@ -409,8 +409,12 @@ void lv_mem_monitor(lv_mem_monitor_t * mon_p)
}
mon_p->total_size = LV_MEM_SIZE;
mon_p->used_pct = 100 - (100U * mon_p->free_size) / mon_p->total_size;
if(mon_p->free_size > 0) {
mon_p->frag_pct = (uint32_t)mon_p->free_biggest_size * 100U / mon_p->free_size;
mon_p->frag_pct = 100 - mon_p->frag_pct;
} else {
mon_p->frag_pct = 0; /*no fragmentation if all the RAM is used*/
}
#endif
}

View File

@@ -71,7 +71,7 @@ static lv_signal_cb_t ancestor_signal;
/**
* Create a label objects
* @param par pointer to an object, it will be the parent of the new label
* @param copy pointer to a button object, if not NULL then the new object will be copied from it
* @param copy pointer to a label object, if not NULL then the new object will be copied from it
* @return pointer to the created button
*/
lv_obj_t * lv_label_create(lv_obj_t * par, const lv_obj_t * copy)

View File

@@ -185,6 +185,20 @@ void lv_linemeter_set_angle_offset(lv_obj_t * lmeter, uint16_t angle)
lv_obj_invalidate(lmeter);
}
/**
* Set the orientation of the meter growth, clockwise or counterclockwise (mirrored)
* @param lmeter pointer to a line meter object
* @param mirror mirror setting
*/
void lv_linemeter_set_mirror(lv_obj_t *lmeter, bool mirror) {
lv_linemeter_ext_t * ext = lv_obj_get_ext_attr(lmeter);
if(ext->mirrored == mirror) return;
ext->mirrored = mirror;
lv_obj_invalidate(lmeter);
}
/*=====================
* Getter functions
*====================*/
@@ -266,6 +280,18 @@ uint16_t lv_linemeter_get_angle_offset(lv_obj_t * lmeter)
return ext->angle_ofs;
}
/**
* get the mirror setting for the line meter
* @param lmeter pointer to a line meter object
* @return mirror (true or false)
*/
bool lv_linemeter_get_mirror(lv_obj_t * lmeter)
{
lv_linemeter_ext_t * ext = lv_obj_get_ext_attr(lmeter);
return ext->mirrored;
}
void lv_linemeter_draw_scale(lv_obj_t * lmeter, const lv_area_t * clip_area, uint8_t part)
{
lv_linemeter_ext_t * ext = lv_obj_get_ext_attr(lmeter);

View File

@@ -36,6 +36,7 @@ typedef struct {
int32_t cur_value;
int32_t min_value;
int32_t max_value;
uint8_t mirrored :1;
} lv_linemeter_ext_t;
/*Styles*/
@@ -93,6 +94,13 @@ void lv_linemeter_set_scale(lv_obj_t * lmeter, uint16_t angle, uint16_t line_cnt
*/
void lv_linemeter_set_angle_offset(lv_obj_t * lmeter, uint16_t angle);
/**
* Set the orientation of the meter growth, clockwise or counterclockwise (mirrored)
* @param lmeter pointer to a line meter object
* @param mirror mirror setting
*/
void lv_linemeter_set_mirror(lv_obj_t *lmeter, bool mirror);
/*=====================
* Getter functions
*====================*/
@@ -142,6 +150,13 @@ uint16_t lv_linemeter_get_angle_offset(lv_obj_t * lmeter);
void lv_linemeter_draw_scale(lv_obj_t * lmeter, const lv_area_t * clip_area, uint8_t part);
/**
* get the mirror setting for the line meter
* @param lmeter pointer to a line meter object
* @return mirror (true or false)
*/
bool lv_linemeter_get_mirror(lv_obj_t * lmeter);
/**********************
* MACROS
**********************/

View File

@@ -267,7 +267,7 @@ bool lv_list_remove(const lv_obj_t * list, uint16_t index)
void lv_list_focus_btn(lv_obj_t * list, lv_obj_t * btn)
{
LV_ASSERT_OBJ(list, LV_OBJX_NAME);
if(btn) LV_ASSERT_OBJ(list, "lv_btn");
if(btn) LV_ASSERT_OBJ(btn, "lv_btn");
lv_list_ext_t * ext = lv_obj_get_ext_attr(list);

View File

@@ -62,7 +62,7 @@ lv_obj_t * lv_templ_create(lv_obj_t * par, const lv_obj_t * copy)
/*Create the ancestor of template*/
/*TODO modify it to the ancestor create function */
lv_obj_t * new_templ = lv_ANCESTOR_create(par, copy);
lv_mem_assert(new_templ);
LV_ASSERT_MEM(new_templ);
if(new_templ == NULL) return NULL;
/*Allocate the template type specific extended data*/