chore: remove BOM and fix typos (#4685)

This commit is contained in:
Viktor Szépe 2023-10-22 06:39:43 +02:00 committed by GitHub
parent 89dd481747
commit f9572ed303
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
52 changed files with 132 additions and 131 deletions

View File

@ -6,7 +6,7 @@ contact_links:
- name: Forum
url: https://forum.lvgl.io
about: For topics like How-to, Getting started, Feature request
- name: CONTIBUTING.md
- name: CONTRIBUTING.md
url: https://github.com/lvgl/lvgl/blob/master/docs/CONTRIBUTING.md#faq-about-contributing
about: The basic rules of contributing
- name: CODING_STYLE.md

View File

@ -16,7 +16,7 @@ Be sure the following conventions are followed:
- [ ] Use typed pointers instead of `void *` pointers
- [ ] Do not `malloc` into a static or global variables. Instead declare the variable in `lv_global_t` structure in [`lv_global.h`](https://github.com/lvgl/lvgl/blob/master/src/core/lv_global.h) and mark the variable with `(LV_GLOBAL_DEFAULT()->variable)` when it's used. See a detailed description [here](https://docs.lvgl.io/master/get-started/bindings/micropython.html#memory-management).
- [ ] Widget constructor must follow the `lv_<widget_name>_create(lv_obj_t * parent)` pattern.
- [ ] Widget members function must start with `lv_<modul_name>` and should receive `lv_obj_t *` as first argument which is a pointer to widget object itself.
- [ ] Widget members function must start with `lv_<module_name>` and should receive `lv_obj_t *` as first argument which is a pointer to widget object itself.
- [ ] `struct`s should be used via an API and not modified directly via their elements.
- [ ] `struct` APIs should follow the widgets' conventions. That is to receive a pointer to the `struct` as the first argument, and the prefix of the `struct` name should be used as the prefix of the function name too (e.g. `lv_disp_set_default(lv_disp_t * disp)`)
- [ ] Functions and `struct`s which are not part of the public API must begin with underscore in order to mark them as "private".

View File

@ -10,7 +10,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Intsall Python
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.9'

View File

@ -19,7 +19,7 @@
*----------------*/
/*Store the image of the glyphs*/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = {
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
/* U+20 " " */
/* U+61 "a" */
@ -285,7 +285,7 @@ static const lv_font_fmt_txt_kern_classes_t kern_classes =
/*Store all the custom data of the font*/
static lv_font_fmt_txt_dsc_t font_dsc = {
.glyph_bitmap = gylph_bitmap,
.glyph_bitmap = glyph_bitmap,
.glyph_dsc = glyph_dsc,
.cmaps = cmaps,
.kern_dsc = &kern_classes,

View File

@ -19,7 +19,7 @@
*----------------*/
/*Store the image of the glyphs*/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = {
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
/* U+20 " " */
/* U+61 "a" */
@ -323,7 +323,7 @@ static const lv_font_fmt_txt_kern_classes_t kern_classes =
/*Store all the custom data of the font*/
static lv_font_fmt_txt_dsc_t font_dsc = {
.glyph_bitmap = gylph_bitmap,
.glyph_bitmap = glyph_bitmap,
.glyph_dsc = glyph_dsc,
.cmaps = cmaps,
.kern_dsc = &kern_classes,

View File

@ -20,7 +20,7 @@
*----------------*/
/*Store the image of the glyphs*/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = {
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
/* U+20 " " */
/* U+61 "a" */
@ -474,7 +474,7 @@ static const lv_font_fmt_txt_kern_classes_t kern_classes =
/*Store all the custom data of the font*/
static lv_font_fmt_txt_dsc_t font_dsc = {
.glyph_bitmap = gylph_bitmap,
.glyph_bitmap = glyph_bitmap,
.glyph_dsc = glyph_dsc,
.cmaps = cmaps,
.kern_dsc = &kern_classes,

View File

@ -101,7 +101,7 @@ static void show_scene_report(void);
static void calc_scene_statistics(void);
static lv_result_t load_next_scene(void);
static void next_scene_timer_cb(lv_timer_t * timer);
static void single_scene_finsih_timer_cb(lv_timer_t * timer);
static void single_scene_finish_timer_cb(lv_timer_t * timer);
static void dummy_flush_cb(lv_display_t * drv, const lv_area_t * area, uint8_t * pxmap);
static void generate_report(void);
@ -717,10 +717,10 @@ void lv_demo_benchmark_run_scene(lv_demo_benchmark_mode_t _mode, uint16_t scene_
lv_refr_now(NULL);
}
single_scene_finsih_timer_cb(NULL);
single_scene_finish_timer_cb(NULL);
}
else {
lv_timer_t * t = lv_timer_create(single_scene_finsih_timer_cb, SCENE_TIME, NULL);
lv_timer_t * t = lv_timer_create(single_scene_finish_timer_cb, SCENE_TIME, NULL);
lv_timer_set_repeat_count(t, 1);
}
}
@ -864,7 +864,7 @@ static void next_scene_timer_cb(lv_timer_t * timer)
}
}
static void single_scene_finsih_timer_cb(lv_timer_t * timer)
static void single_scene_finish_timer_cb(lv_timer_t * timer)
{
LV_UNUSED(timer);
calc_scene_statistics();

View File

@ -21,7 +21,7 @@
* STATIC PROTOTYPES
**********************/
static lv_obj_t * switch_create(lv_obj_t * parent, const char * title, lv_obj_flag_t flag, bool en);
static void generic_swicth_event_cb(lv_event_t * e);
static void generic_switch_event_cb(lv_event_t * e);
/**********************
* STATIC VARIABLES
@ -88,7 +88,7 @@ static lv_obj_t * switch_create(lv_obj_t * parent, const char * title, lv_obj_fl
lv_obj_set_flex_grow(label, 1);
lv_obj_t * sw = lv_switch_create(cont);
lv_obj_add_event(sw, generic_swicth_event_cb, LV_EVENT_VALUE_CHANGED, (void *)((lv_uintptr_t) flag));
lv_obj_add_event(sw, generic_switch_event_cb, LV_EVENT_VALUE_CHANGED, (void *)((lv_uintptr_t) flag));
if(en) {
lv_obj_add_state(sw, LV_STATE_CHECKED);
lv_obj_add_flag(list, flag);
@ -101,7 +101,7 @@ static lv_obj_t * switch_create(lv_obj_t * parent, const char * title, lv_obj_fl
return cont;
}
static void generic_swicth_event_cb(lv_event_t * e)
static void generic_switch_event_cb(lv_event_t * e)
{
lv_obj_t * sw = lv_event_get_target(e);
lv_obj_flag_t flag = (lv_obj_flag_t)((lv_uintptr_t)lv_event_get_user_data(e));

View File

@ -53,7 +53,7 @@ Examples
Docs
~~~~
- docs(arduino): add note to not use lv_examles library `2f294aa <https://github.com/lvgl/lvgl/commit/2f294aa76c8fece98a4fa72304bc6f267ed2a228>`__
- docs(arduino): add note to not use lv_examples library `2f294aa <https://github.com/lvgl/lvgl/commit/2f294aa76c8fece98a4fa72304bc6f267ed2a228>`__
- docs: use a fixed commit of lv_web_emscripten `501230e <https://github.com/lvgl/lvgl/commit/501230e0fc95936199b3187d350873c3bb4a94e4>`__
CI and tests

View File

@ -1474,7 +1474,7 @@ EXT_LINKS_IN_WINDOW = NO
FORMULA_FONTSIZE = 10
# Use the FORMULA_TRANPARENT tag to determine whether or not the images
# Use the FORMULA_TRANSPARENT tag to determine whether or not the images
# generated for formulas are transparent PNGs. Transparent PNGs are not
# supported properly for IE 6.0, but are supported on all modern browsers.
#

View File

@ -88,7 +88,7 @@ The shell offers enabling/disabling of LVGL monkeys:
uart$ lvgl monkey set <index> <inactive/active>
This is useful for checking your application for memory leaks and other bugs.
Speaking of memory leaks, you can also aquire stats of the memory used by LVGL
Speaking of memory leaks, you can also acquire stats of the memory used by LVGL
.. code:: shell

View File

@ -70,10 +70,10 @@ in its cell. The possible values are:
- :c:enumerator:`LV_GRID_ALIGN_START`: means left on a horizontally and top vertically. (default)
- :c:enumerator:`LV_GRID_ALIGN_END`: means right on a horizontally and bottom vertically
- :c:enumerator:`LV_GRID_ALIGN_CENTER`: simply center ``colum_pos`` and ``row_pos``
- :c:enumerator:`LV_GRID_ALIGN_CENTER`: simply center ``column_pos`` and ``row_pos``
means the zero based index of the cell into the item should be placed.
``colum_span`` and ``row_span`` means how many tracks should the item
``column_span`` and ``row_span`` means how many tracks should the item
involve from the start cell. Must be >= 1.
Grid align

View File

@ -22,7 +22,7 @@ to get a string representation of the ID.
Use custom ID generator
~~~~~~~~~~~~~~~~~~~~~~~
Set `LV_USE_OBJ_ID_BUILTIN` to 0 in `lv_conf.h`. Below APIs needed to be impemented and
Set `LV_USE_OBJ_ID_BUILTIN` to 0 in `lv_conf.h`. Below APIs needed to be implemented and
linked to lvgl.
.. code:: c
@ -36,7 +36,7 @@ linked to lvgl.
parameter ``class_p``. Note it may be different than ``obj->class_p`` which is the class
currently being constructed.
:c:func:``lv_obj_free_id`` is called when object is deconstructed. Free any resource alloced in ``lv_obj_assign_id``.
:c:func:``lv_obj_free_id`` is called when object is deconstructed. Free any resource allocated in ``lv_obj_assign_id``.
:c:func:``lv_obj_stringify_id`` converts id to a string representation. The string is stored in ``buf``.

View File

@ -236,7 +236,7 @@ You can do this in the following way:
/*Call this anywhere you want to refresh the dirty areas*/
_lv_disp_refr_timer(NULL);
If you have multiple displays call :cpp:expr:`lv_disp_set_deafult(disp1)` to
If you have multiple displays call :cpp:expr:`lv_disp_set_default(disp1)` to
select the display to refresh before :cpp:expr:`_lv_disp_refr_timer(NULL)`.

View File

@ -61,7 +61,7 @@ following parameters:
- :cpp:enumerator:`LV_BTNMATRIX_CTRL_HIDDEN`: Makes a button hidden (hidden buttons still take up space in the layout, they are just not visible or clickable)
- :cpp:enumerator:`LV_BTNMATRIX_CTRL_NO_REPEAT`: Disable repeating when the button is long pressed
- :cpp:enumerator:`LV_BTNMATRIX_CTRL_DISABLED`: Makes a button disabled Like :cpp:enumerator:`LV_STATE_DISABLED` on normal objects
- :cpp:enumerator:`LV_BTNMATRIX_CTRL_CHECKABLE`: Enable toggling of a button. I.e. :cpp:enumerator:`LV_STATE_CHECHED` will be added/removed as the button is clicked
- :cpp:enumerator:`LV_BTNMATRIX_CTRL_CHECKABLE`: Enable toggling of a button. I.e. :cpp:enumerator:`LV_STATE_CHECKED` will be added/removed as the button is clicked
- :cpp:enumerator:`LV_BTNMATRIX_CTRL_CHECKED`: Make the button checked. It will use the :cpp:enumerator:`LV_STATE_CHECHKED` styles.
- :cpp:enumerator:`LV_BTNMATRIX_CTRL_CLICK_TRIG`: Enabled: send LV_EVENT_VALUE_CHANGE on CLICK, Disabled: send :cpp:enumerator:`LV_EVENT_VALUE_CHANGE` on PRESS
- :cpp:enumerator:`LV_BTNMATRIX_CTRL_POPOVER`: Show the button label in a popover when pressing this key

View File

@ -43,7 +43,7 @@ common state add/clear function:
.. code:: c
lv_obj_add_state(cb, LV_STATE_CHECKED); /*Make the checkbox checked*/
lv_obj_remove_state(cb, LV_STATE_CHECKED); /*MAke the checkbox unchecked*/
lv_obj_remove_state(cb, LV_STATE_CHECKED); /*Make the checkbox unchecked*/
lv_obj_add_state(cb, LV_STATE_CHECKED | LV_STATE_DISABLED); /*Make the checkbox checked and disabled*/
To get whether the checkbox is checked or not use:

View File

@ -696,7 +696,7 @@
</Pre_Include_Local_Component_h>
<RTE_Components_h>
/*! \brief enable PikaScrit Binding */
/*! \brief enable PikaScript Binding */
#define LV_USE_PIKASCRIPT_BINDING 1
</RTE_Components_h>
@ -918,9 +918,9 @@
<file category="sourceC" name="demos/benchmark/assets/img_benchmark_cogwheel_rgb.c" />
<file category="sourceC" name="demos/benchmark/assets/img_benchmark_cogwheel_rgb565a8.c" />
<file category="sourceC" name="demos/benchmark/assets/lv_font_bechmark_montserrat_12_compr_az.c.c" />
<file category="sourceC" name="demos/benchmark/assets/lv_font_bechmark_montserrat_16_compr_az.c.c" />
<file category="sourceC" name="demos/benchmark/assets/lv_font_bechmark_montserrat_28_compr_az.c.c" />
<file category="sourceC" name="demos/benchmark/assets/lv_font_benchmark_montserrat_12_compr_az.c.c" />
<file category="sourceC" name="demos/benchmark/assets/lv_font_benchmark_montserrat_16_compr_az.c.c" />
<file category="sourceC" name="demos/benchmark/assets/lv_font_benchmark_montserrat_28_compr_az.c.c" />
<file category="doc" name="demos/benchmark/README.md" />
</files>

View File

@ -17,12 +17,12 @@ index 38a9862..ee6d2cd 100644
endif()
-if (LOTTIE_MODULE)
- # for dlopen, dlsym and dlclose dependancy
- # for dlopen, dlsym and dlclose dependency
- target_link_libraries(rlottie PRIVATE ${CMAKE_DL_LIBS})
-endif()
+# No Sym links in ESP-IDF
+# if (LOTTIE_MODULE)
+# # for dlopen, dlsym and dlclose dependancy
+# # for dlopen, dlsym and dlclose dependency
+# target_link_libraries(rlottie PRIVATE ${CMAKE_DL_LIBS})
+# endif()

View File

@ -32,7 +32,7 @@ void pika_lvgl_lv_timer_t_set_cb(PikaObj* self, Arg* cb) {
if (NULL == g_pika_lv_timer_event_listener) {
pks_eventLisener_init(&g_pika_lv_timer_event_listener);
}
pks_eventLicener_registEvent(g_pika_lv_timer_event_listener,
pks_eventLicener_registerEvent(g_pika_lv_timer_event_listener,
(uint32_t)lv_timer, self);
}

View File

@ -268,7 +268,7 @@ void pika_lvgl_dropdown_set_selected(PikaObj *self, int sel_opt){
lv_obj_t* lv_obj = obj_getPtr(self, "lv_obj");
lv_dropdown_set_selected(lv_obj, sel_opt);
}
void pika_lvgl_dropdown_set_selected_hightlight(PikaObj *self, int en){
void pika_lvgl_dropdown_set_selected_highlight(PikaObj *self, int en){
lv_obj_t* lv_obj = obj_getPtr(self, "lv_obj");
lv_dropdown_set_selected_highlight(lv_obj, en);
}

View File

@ -143,7 +143,7 @@ class lv_obj:
def center(self): ...
def set_size(self, size_x: int, size_y: int): ...
def align(self, align: int, x_ofs: int, y_ofs: int): ...
def set_hight(self, h: int): ...
def set_height(self, h: int): ...
def update_layout(self): ...
def set_width(self, w: int): ...
def add_state(self, state: int): ...
@ -218,7 +218,7 @@ class dropdown(lv_obj):
def set_selected(self, sel_opt: int): ...
def set_dir(self, dir: int): ...
def set_symbol(self, symbol: str): ...
def set_selected_hightlight(self, en: int): ...
def set_selected_highlight(self, en: int): ...
# def get_list(self) -> lv_obj: ...
def get_text(self) -> str: ...
def get_options(self) -> str: ...

View File

@ -30,7 +30,7 @@ void pika_lvgl_lv_obj_align(PikaObj* self, int align, int x_ofs, int y_ofs) {
lv_obj_align(lv_obj, align, x_ofs, y_ofs);
}
void pika_lvgl_lv_obj_set_hight(PikaObj* self, int h) {
void pika_lvgl_lv_obj_set_height(PikaObj* self, int h) {
lv_obj_t* lv_obj = obj_getPtr(self, "lv_obj");
lv_obj_set_height(lv_obj, h);
}
@ -69,7 +69,7 @@ static void __pika_event_cb(lv_event_t* e) {
obj_run(event_handler, "_event_cb(_event_evt)");
}
void eventLicener_registEvent(PikaObj* self,
void eventLicener_registerEvent(PikaObj* self,
uintptr_t event_id,
PikaObj* event_handler) {
Args buffs = {0};
@ -90,7 +90,7 @@ void pika_lvgl_lv_obj_add_event(PikaObj* self,
obj_setArg(self, "_event_cb", event_cb);
obj_setPtr(self, "_event_user_data", user_data);
obj_newDirectObj(self, "_event_evt", New_pika_lvgl_lv_event);
eventLicener_registEvent(pika_lv_event_listener_g, (uintptr_t)lv_obj, self);
eventLicener_registerEvent(pika_lv_event_listener_g, (uintptr_t)lv_obj, self);
}
void pika_lvgl_lv_obj_add_style(PikaObj *self, PikaObj* style, int selector){

View File

@ -12,8 +12,8 @@ port_src = Glob('*.c')
port_inc = [cwd]
group = group + DefineGroup('LVGL-port', port_src, depend = ['PKG_USING_LVGL'], CPPPATH = port_inc)
# check if .h or .hpp files exsit
def check_h_hpp_exsit(path):
# check if .h or .hpp files exists
def check_h_hpp_exists(path):
file_dirs = os.listdir(path)
for file_dir in file_dirs:
if os.path.splitext(file_dir)[1] in ['.h', '.hpp']:
@ -28,7 +28,7 @@ for root, dirs, files in os.walk(lvgl_src_cwd):
for dir in dirs:
current_path = os.path.join(root, dir)
src = src + Glob(os.path.join(current_path,'*.c')) # add all .c files
if check_h_hpp_exsit(current_path): # add .h and .hpp path
if check_h_hpp_exists(current_path): # add .h and .hpp path
inc = inc + [current_path]
@ -39,7 +39,7 @@ if GetDepend('PKG_LVGL_USING_EXAMPLES'):
for dir in dirs:
current_path = os.path.join(root, dir)
src = src + Glob(os.path.join(current_path,'*.c'))
if check_h_hpp_exsit(current_path):
if check_h_hpp_exists(current_path):
inc = inc + [current_path]
if GetDepend('PKG_LVGL_USING_DEMOS'):
@ -49,7 +49,7 @@ if GetDepend('PKG_LVGL_USING_DEMOS'):
for dir in dirs:
current_path = os.path.join(root, dir)
src = src + Glob(os.path.join(current_path,'*.c'))
if check_h_hpp_exsit(current_path):
if check_h_hpp_exists(current_path):
inc = inc + [current_path]
LOCAL_CFLAGS = ''

View File

@ -4,8 +4,8 @@ cwd = GetCurrentDir()
src = Glob('*.c')
inc = [cwd]
# check if .h or .hpp files exsit
def check_h_hpp_exsit(path):
# check if .h or .hpp files exists
def check_h_hpp_exists(path):
file_dirs = os.listdir(path)
for file_dir in file_dirs:
if os.path.splitext(file_dir)[1] in ['.h', '.hpp']:
@ -17,7 +17,7 @@ for root, dirs, files in os.walk(sls_src_cwd):
for dir in dirs:
current_path = os.path.join(root, dir)
src = src + Glob(os.path.join(current_path,'*.c')) # add all .c files
if check_h_hpp_exsit(current_path): # add .h and .hpp path
if check_h_hpp_exists(current_path): # add .h and .hpp path
inc = inc + [current_path]
group = DefineGroup('LVGL-SquareLine', src, depend = ['PKG_USING_LVGL_SQUARELINE'], CPPPATH = inc)

View File

@ -7,7 +7,7 @@
# Usage:
# changelog-gen <next-version>
#
# Example: if the latest verision is v5.6.7 the following can be used for bugfix, minor or major versions:
# Example: if the latest version is v5.6.7 the following can be used for bugfix, minor or major versions:
# changelog-gen v5.6.8
# changelog-gen v5.7.0
# changelog-gen v6.0.0

View File

@ -499,14 +499,14 @@ void lv_obj_get_scrollbar_area(lv_obj_t * obj, lv_area_t * hor_area, lv_area_t *
lv_coord_t bottom_space = lv_obj_get_style_pad_bottom(obj, LV_PART_SCROLLBAR);
lv_coord_t left_space = lv_obj_get_style_pad_left(obj, LV_PART_SCROLLBAR);
lv_coord_t right_space = lv_obj_get_style_pad_right(obj, LV_PART_SCROLLBAR);
lv_coord_t tickness = lv_obj_get_style_width(obj, LV_PART_SCROLLBAR);
lv_coord_t thickness = lv_obj_get_style_width(obj, LV_PART_SCROLLBAR);
lv_coord_t obj_h = lv_obj_get_height(obj);
lv_coord_t obj_w = lv_obj_get_width(obj);
/*Space required for the vertical and horizontal scrollbars*/
lv_coord_t ver_reg_space = ver_draw ? tickness : 0;
lv_coord_t hor_req_space = hor_draw ? tickness : 0;
lv_coord_t ver_reg_space = ver_draw ? thickness : 0;
lv_coord_t hor_req_space = hor_draw ? thickness : 0;
lv_coord_t rem;
if(lv_obj_get_style_bg_opa(obj, LV_PART_SCROLLBAR) < LV_OPA_MIN &&
@ -521,11 +521,11 @@ void lv_obj_get_scrollbar_area(lv_obj_t * obj, lv_area_t * hor_area, lv_area_t *
ver_area->y2 = obj->coords.y2;
if(rtl) {
ver_area->x1 = obj->coords.x1 + left_space;
ver_area->x2 = ver_area->x1 + tickness - 1;
ver_area->x2 = ver_area->x1 + thickness - 1;
}
else {
ver_area->x2 = obj->coords.x2 - right_space;
ver_area->x1 = ver_area->x2 - tickness + 1;
ver_area->x1 = ver_area->x2 - thickness + 1;
}
lv_coord_t sb_h = ((obj_h - top_space - bottom_space - hor_req_space) * obj_h) / content_h;
@ -562,7 +562,7 @@ void lv_obj_get_scrollbar_area(lv_obj_t * obj, lv_area_t * hor_area, lv_area_t *
lv_coord_t content_w = obj_w + sl + sr;
if(hor_draw && content_w) {
hor_area->y2 = obj->coords.y2 - bottom_space;
hor_area->y1 = hor_area->y2 - tickness + 1;
hor_area->y1 = hor_area->y2 - thickness + 1;
hor_area->x1 = obj->coords.x1;
hor_area->x2 = obj->coords.x2;

View File

@ -76,7 +76,7 @@ lv_draw_buf_handlers_t * lv_draw_buf_get_handlers(void);
/**
* Allocate a buffer with the given size. It might allocate slightly larger buffer to fulfill the alignment requirements.
* @param size the size to allocate in bytes
* @param color_format the color format of the buffer to allcoate
* @param color_format the color format of the buffer to allocate
* @return the allocated buffer.
* @note The returned value can be saved in draw_buf->buf
* @note lv_draw_buf_align can be sued the align the returned pointer
@ -90,7 +90,7 @@ void * lv_draw_buf_malloc(size_t size_bytes, lv_color_format_t color_format);
void lv_draw_buf_free(void * buf);
/**
* Align the address of a buffer. The buffer needs to be large enough for the real data after alignement
* Align the address of a buffer. The buffer needs to be large enough for the real data after alignment
* @param buf the data to align
* @param color_format the color format of the buffer
* @return the aligned buffer

View File

@ -128,9 +128,9 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_letter(lv_layer_t * layer, lv_draw_label_dsc_
lv_draw_label(layer, dsc, &a);
}
void lv_draw_label_interate_letters(lv_draw_unit_t * draw_unit, const lv_draw_label_dsc_t * dsc,
const lv_area_t * coords,
lv_draw_letter_cb_t cb)
void lv_draw_label_iterate_letters(lv_draw_unit_t * draw_unit, const lv_draw_label_dsc_t * dsc,
const lv_area_t * coords,
lv_draw_letter_cb_t cb)
{
const lv_font_t * font = dsc->font;
int32_t w;

View File

@ -93,9 +93,9 @@ typedef struct {
typedef void(*lv_draw_letter_cb_t)(lv_draw_unit_t * draw_unit, lv_draw_glyph_dsc_t * dsc, lv_draw_fill_dsc_t * fill_dsc,
const lv_area_t * fill_area);
void lv_draw_label_interate_letters(lv_draw_unit_t * draw_unit, const lv_draw_label_dsc_t * dsc,
const lv_area_t * coords,
lv_draw_letter_cb_t cb);
void lv_draw_label_iterate_letters(lv_draw_unit_t * draw_unit, const lv_draw_label_dsc_t * dsc,
const lv_area_t * coords,
lv_draw_letter_cb_t cb);
/**********************
* GLOBAL PROTOTYPES

View File

@ -160,7 +160,7 @@ static void _rotate_point(int32_t angle, int32_t * x, int32_t * y)
*/
static void _set_full_arc(vg_arc * fullarc)
{
/* the tangent lenght for the bezier circle approx */
/* the tangent length for the bezier circle approx */
float tang = ((float)fullarc->rad) * BEZIER_OPTIM_CIRCLE;
switch(fullarc->quarter) {
case 0:

View File

@ -75,7 +75,7 @@ void lv_draw_vglite_label(lv_draw_unit_t * draw_unit, const lv_draw_label_dsc_t
{
if(dsc->opa <= LV_OPA_MIN) return;
lv_draw_label_interate_letters(draw_unit, dsc, coords, _draw_vglite_letter);
lv_draw_label_iterate_letters(draw_unit, dsc, coords, _draw_vglite_letter);
}
/**********************

View File

@ -53,7 +53,7 @@ void lv_draw_sw_label(lv_draw_unit_t * draw_unit, const lv_draw_label_dsc_t * ds
{
if(dsc->opa <= LV_OPA_MIN) return;
lv_draw_label_interate_letters(draw_unit, dsc, coords, draw_letter_cb);
lv_draw_label_iterate_letters(draw_unit, dsc, coords, draw_letter_cb);
}
/**********************

View File

@ -1,5 +1,5 @@
/**
* @file lv_draw_sw_tranform.c
* @file lv_draw_sw_transform.c
*
*/
@ -50,14 +50,14 @@ typedef struct {
static void transform_point_upscaled(point_transform_dsc_t * t, int32_t xin, int32_t yin, int32_t * xout,
int32_t * yout);
static void tranform_rgb888(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride,
int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step,
int32_t x_end, uint8_t * dest_buf, bool aa, uint32_t px_size);
static void transform_rgb888(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride,
int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step,
int32_t x_end, uint8_t * dest_buf, bool aa, uint32_t px_size);
static void tranform_argb8888(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride,
int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step,
int32_t x_end, uint8_t * dest_buf, bool aa);
static void transform_argb8888(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride,
int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step,
int32_t x_end, uint8_t * dest_buf, bool aa);
static void transform_rgb565a8(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride,
int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step,
@ -161,18 +161,19 @@ void lv_draw_sw_transform(lv_draw_unit_t * draw_unit, const lv_area_t * dest_are
switch(src_cf) {
case LV_COLOR_FORMAT_XRGB8888:
tranform_rgb888(src_buf, src_w, src_h, src_stride_px, xs_ups, ys_ups, xs_step_256, ys_step_256, dest_w, dest_buf, aa,
4);
transform_rgb888(src_buf, src_w, src_h, src_stride_px, xs_ups, ys_ups, xs_step_256, ys_step_256, dest_w, dest_buf, aa,
4);
break;
case LV_COLOR_FORMAT_RGB888:
tranform_rgb888(src_buf, src_w, src_h, src_stride_px, xs_ups, ys_ups, xs_step_256, ys_step_256, dest_w, dest_buf, aa,
3);
transform_rgb888(src_buf, src_w, src_h, src_stride_px, xs_ups, ys_ups, xs_step_256, ys_step_256, dest_w, dest_buf, aa,
3);
break;
case LV_COLOR_FORMAT_A8:
transform_a8(src_buf, src_w, src_h, src_stride_px, xs_ups, ys_ups, xs_step_256, ys_step_256, dest_w, dest_buf, aa);
break;
case LV_COLOR_FORMAT_ARGB8888:
tranform_argb8888(src_buf, src_w, src_h, src_stride_px, xs_ups, ys_ups, xs_step_256, ys_step_256, dest_w, dest_buf, aa);
transform_argb8888(src_buf, src_w, src_h, src_stride_px, xs_ups, ys_ups, xs_step_256, ys_step_256, dest_w, dest_buf,
aa);
break;
case LV_COLOR_FORMAT_RGB565:
transform_rgb565a8(src_buf, src_w, src_h, src_stride_px, xs_ups, ys_ups, xs_step_256, ys_step_256, dest_w, dest_buf,
@ -196,9 +197,9 @@ void lv_draw_sw_transform(lv_draw_unit_t * draw_unit, const lv_area_t * dest_are
* STATIC FUNCTIONS
**********************/
static void tranform_rgb888(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride,
int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step,
int32_t x_end, uint8_t * dest_buf, bool aa, uint32_t px_size)
static void transform_rgb888(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride,
int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step,
int32_t x_end, uint8_t * dest_buf, bool aa, uint32_t px_size)
{
int32_t xs_ups_start = xs_ups;
int32_t ys_ups_start = ys_ups;
@ -297,9 +298,9 @@ static void tranform_rgb888(const uint8_t * src, lv_coord_t src_w, lv_coord_t sr
#include "../../stdlib/lv_string.h"
static void tranform_argb8888(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride,
int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step,
int32_t x_end, uint8_t * dest_buf, bool aa)
static void transform_argb8888(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride,
int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step,
int32_t x_end, uint8_t * dest_buf, bool aa)
{
// lv_memzero(dest_buf, x_end * 4);
int32_t xs_ups_start = xs_ups;

View File

@ -122,8 +122,8 @@ typedef struct {
/*To get a kern value of two code points:
1. Get the `glyph_id_left` and `glyph_id_right` from `lv_font_fmt_txt_cmap_t
2. for(i = 0; i < pair_cnt * 2; i += 2)
if(gylph_ids[i] == glyph_id_left &&
gylph_ids[i+1] == glyph_id_right)
if(glyph_ids[i] == glyph_id_left &&
glyph_ids[i+1] == glyph_id_right)
return values[i / 2];
*/
const void * glyph_ids;

View File

@ -178,9 +178,9 @@ void lv_init(void)
LV_LOG_WARN("The strings have no UTF-8 encoding. Non-ASCII characters won't be displayed.");
}
uint32_t endianess_test = 0x11223344;
uint8_t * endianess_test_p = (uint8_t *) &endianess_test;
bool big_endian = endianess_test_p[0] == 0x11;
uint32_t endianness_test = 0x11223344;
uint8_t * endianness_test_p = (uint8_t *) &endianness_test;
bool big_endian = endianness_test_p[0] == 0x11;
if(big_endian) {
LV_ASSERT_MSG(LV_BIG_ENDIAN_SYSTEM == 1,

View File

@ -62,7 +62,7 @@ typedef enum {
LV_EVENT_DEFOCUSED, /**< The object is defocused*/
LV_EVENT_LEAVE, /**< The object is defocused but still selected*/
LV_EVENT_HIT_TEST, /**< Perform advanced hit-testing*/
LV_EVENT_INDEV_RESET, /**< Indev has been reseted*/
LV_EVENT_INDEV_RESET, /**< Indev has been reset*/
/** Drawing events*/
LV_EVENT_COVER_CHECK, /**< Check if the object fully covers an area. The event parameter is `lv_cover_check_info_t *`.*/

View File

@ -23,7 +23,7 @@
typedef struct {
uint8_t char_offset;
uint16_t char_end_form;
int8_t char_begining_form_offset;
int8_t char_beginning_form_offset;
int8_t char_middle_form_offset;
int8_t char_isolated_form_offset;
struct {
@ -205,7 +205,7 @@ void _lv_text_ap_proc(const char * txt, char * txt_out)
if(conjunction_to_previuse && conjunction_to_next)
ch_fin[j] = ap_chars_map[index_current].char_end_form + ap_chars_map[index_current].char_middle_form_offset;
else if(!conjunction_to_previuse && conjunction_to_next)
ch_fin[j] = ap_chars_map[index_current].char_end_form + ap_chars_map[index_current].char_begining_form_offset;
ch_fin[j] = ap_chars_map[index_current].char_end_form + ap_chars_map[index_current].char_beginning_form_offset;
else if(conjunction_to_previuse && !conjunction_to_next)
ch_fin[j] = ap_chars_map[index_current].char_end_form;
else
@ -259,7 +259,7 @@ static uint32_t lv_ap_get_char_index(uint16_t c)
if(c == (ap_chars_map[i].char_offset + LV_AP_ALPHABET_BASE_CODE))
return i;
else if(c == ap_chars_map[i].char_end_form //is it an End form
|| c == (ap_chars_map[i].char_end_form + ap_chars_map[i].char_begining_form_offset) //is it a Beginning form
|| c == (ap_chars_map[i].char_end_form + ap_chars_map[i].char_beginning_form_offset) //is it a Beginning form
|| c == (ap_chars_map[i].char_end_form + ap_chars_map[i].char_middle_form_offset) //is it a middle form
|| c == (ap_chars_map[i].char_end_form + ap_chars_map[i].char_isolated_form_offset)) { //is it an isolated form
return i;

View File

@ -833,7 +833,7 @@ static void pinyin_page_proc(lv_obj_t * obj, uint16_t dir)
{
lv_ime_pinyin_t * pinyin_ime = (lv_ime_pinyin_t *)obj;
uint16_t page_num = pinyin_ime->cand_num / LV_IME_PINYIN_CAND_TEXT_NUM;
uint16_t sur = pinyin_ime->cand_num % LV_IME_PINYIN_CAND_TEXT_NUM;
uint16_t remainder = pinyin_ime->cand_num % LV_IME_PINYIN_CAND_TEXT_NUM;
if(dir == 0) {
if(pinyin_ime->py_page) {
@ -841,7 +841,7 @@ static void pinyin_page_proc(lv_obj_t * obj, uint16_t dir)
}
}
else {
if(sur == 0) {
if(remainder == 0) {
page_num -= 1;
}
if(pinyin_ime->py_page < page_num) {
@ -858,8 +858,8 @@ static void pinyin_page_proc(lv_obj_t * obj, uint16_t dir)
// fill buf
uint16_t offset = pinyin_ime->py_page * (3 * LV_IME_PINYIN_CAND_TEXT_NUM);
for(uint8_t i = 0; (i < pinyin_ime->cand_num && i < LV_IME_PINYIN_CAND_TEXT_NUM); i++) {
if((sur > 0) && (pinyin_ime->py_page == page_num)) {
if(i > sur)
if((remainder > 0) && (pinyin_ime->py_page == page_num)) {
if(i > remainder)
break;
}
for(uint8_t j = 0; j < 3; j++) {

View File

@ -179,7 +179,7 @@ void lv_scale_set_text_src(lv_obj_t * obj, const char * txt_src[]);
/**
* Draw the scale after all the children are drawn
* @param obj pointer to a scale object
* @param en true: eanble post draw
* @param en true: enable post draw
*/
void lv_scale_set_post_draw(lv_obj_t * obj, bool en);

View File

@ -45,7 +45,7 @@ def options_abbrev(options_name):
return options_name[len(prefix):].lower()
def get_base_buid_dir(options_name):
def get_base_build_dir(options_name):
'''Given the build options name, return the build directory name.
Does not return the full path to the directory - just the base name.'''
@ -57,7 +57,7 @@ def get_build_dir(options_name):
Returns absolute path to the build directory.'''
global lvgl_test_dir
return os.path.join(lvgl_test_dir, get_base_buid_dir(options_name))
return os.path.join(lvgl_test_dir, get_base_build_dir(options_name))
def build_tests(options_name, build_type, clean):

View File

@ -89,7 +89,7 @@ typedef void * lv_user_data_t;
#undef LV_LOG_PRINTF
//#define LV_DRAW_BUF_STRIDE_ALIGN 64
//#define LV_DRAW_BUF_ALIGN 40 /*Use non power of 2 to avoid the case when `malloc` returns aligned ponter by default*/
//#define LV_DRAW_BUF_ALIGN 40 /*Use non power of 2 to avoid the case when `malloc` returns aligned pointer by default*/
/*For screenshots*/
#undef LV_USE_PERF_MONITOR

View File

@ -18,7 +18,7 @@
*----------------*/
/*Store the image of the glyphs*/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = {
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
/* U+20 " " */
/* U+21 "!" */
@ -1344,7 +1344,7 @@ static const lv_font_fmt_txt_kern_classes_t kern_classes = {
/*Store all the custom data of the font*/
static lv_font_fmt_txt_dsc_t font_dsc = {
.glyph_bitmap = gylph_bitmap,
.glyph_bitmap = glyph_bitmap,
.glyph_dsc = glyph_dsc,
.cmaps = cmaps,
.kern_dsc = &kern_classes,

View File

@ -18,7 +18,7 @@
*----------------*/
/*Store the image of the glyphs*/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = {
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
/* U+20 " " */
/* U+21 "!" */
@ -1374,7 +1374,7 @@ static const lv_font_fmt_txt_kern_classes_t kern_classes = {
/*Store all the custom data of the font*/
static lv_font_fmt_txt_dsc_t font_dsc = {
.glyph_bitmap = gylph_bitmap,
.glyph_bitmap = glyph_bitmap,
.glyph_dsc = glyph_dsc,
.cmaps = cmaps,
.kern_dsc = &kern_classes,

View File

@ -18,7 +18,7 @@
*----------------*/
/*Store the image of the glyphs*/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = {
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
/* U+20 " " */
/* U+21 "!" */
@ -916,7 +916,7 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = {
/*Store all the custom data of the font*/
static lv_font_fmt_txt_dsc_t font_dsc = {
.glyph_bitmap = gylph_bitmap,
.glyph_bitmap = glyph_bitmap,
.glyph_dsc = glyph_dsc,
.cmaps = cmaps,
.kern_dsc = NULL,

View File

@ -82,7 +82,7 @@ void test_obj_flag_overflow_visible_1(void)
/*The left part of the right button (should trigger click event)*/
lv_test_mouse_click_at(650, 220);
/*The outter part of the right button (should trigger click event as obj_child_2 has LV_OBJ_FLAG_OVERFLOW_VISIBLE)*/
/*The outer part of the right button (should trigger click event as obj_child_2 has LV_OBJ_FLAG_OVERFLOW_VISIBLE)*/
lv_test_mouse_click_at(690, 220);
TEST_ASSERT_EQUAL_UINT32(1, cnt_1);
@ -130,7 +130,7 @@ void test_obj_flag_overflow_visible_1(void)
/*The left part of the right button (should trigger click event)*/
lv_test_mouse_click_at(590, 370);
/*The outter part of the right button (should trigger click event as obj_child_2 has LV_OBJ_FLAG_OVERFLOW_VISIBLE)*/
/*The outer part of the right button (should trigger click event as obj_child_2 has LV_OBJ_FLAG_OVERFLOW_VISIBLE)*/
lv_test_mouse_click_at(600, 430);
/*The clipped part of the right button (clipped because it's out of the red panel's ext draw size, shouldn't trigger click event)*/

View File

@ -7,7 +7,7 @@
/* This function runs before each test */
void setUp(void);
void test_arc_creation_successfull(void);
void test_arc_creation_successful(void);
void test_arc_should_truncate_to_max_range_when_new_value_exceeds_it(void);
void test_arc_should_truncate_to_min_range_when_new_value_is_inferior(void);
void test_arc_should_update_value_after_updating_range(void);
@ -31,7 +31,7 @@ void tearDown(void)
lv_obj_clean(lv_screen_active());
}
void test_arc_creation_successfull(void)
void test_arc_creation_successful(void)
{
arc = lv_arc_create(active_screen);

View File

@ -8,7 +8,7 @@ void setUp(void);
/* This function runs after every test */
void tearDown(void);
void test_calendar_creation_successfull(void);
void test_calendar_creation_successful(void);
void test_calendar_set_today_date(void);
void test_calendar_set_today_date_gui(void);
void test_calendar_set_showed_date_gui(void);
@ -36,7 +36,7 @@ void tearDown(void)
lv_obj_clean(active_screen);
}
void test_calendar_creation_successfull(void)
void test_calendar_creation_successful(void)
{
TEST_ASSERT_NOT_NULL(calendar);
}

View File

@ -39,8 +39,8 @@ void test_chart_set_point_count_increments(void)
lv_chart_series_t * red_series;
red_series = lv_chart_add_series(chart, red_color, LV_CHART_AXIS_SECONDARY_Y);
uint16_t points_in_serie = lv_chart_get_point_count(chart);
uint16_t new_point_count = points_in_serie * 2;
uint16_t points_in_series = lv_chart_get_point_count(chart);
uint16_t new_point_count = points_in_series * 2;
lv_chart_set_point_count(chart, new_point_count);
TEST_ASSERT_EQUAL_MESSAGE(new_point_count, lv_chart_get_point_count(chart),
@ -52,8 +52,8 @@ void test_chart_set_point_count_decrements(void)
{
lv_chart_series_t * red_series;
red_series = lv_chart_add_series(chart, red_color, LV_CHART_AXIS_SECONDARY_Y);
uint16_t points_in_serie = lv_chart_get_point_count(chart);
uint16_t new_point_count = points_in_serie / 2;
uint16_t points_in_series = lv_chart_get_point_count(chart);
uint16_t new_point_count = points_in_series / 2;
lv_chart_set_point_count(chart, new_point_count);
@ -66,8 +66,8 @@ void test_chart_set_point_count_as_same(void)
{
lv_chart_series_t * red_series;
red_series = lv_chart_add_series(chart, red_color, LV_CHART_AXIS_SECONDARY_Y);
uint16_t points_in_serie = lv_chart_get_point_count(chart);
uint16_t new_point_count = points_in_serie;
uint16_t points_in_series = lv_chart_get_point_count(chart);
uint16_t new_point_count = points_in_series;
lv_chart_set_point_count(chart, new_point_count);
@ -87,7 +87,7 @@ void test_chart_set_new_point_count_as_zero(void)
lv_chart_remove_series(chart, red_series);
}
void test_chart_point_is_added_at_the_end_of_a_serie(void)
void test_chart_point_is_added_at_the_end_of_a_series(void)
{
lv_chart_series_t * red_series;
red_series = lv_chart_add_series(chart, red_color, LV_CHART_AXIS_SECONDARY_Y);

View File

@ -6,10 +6,10 @@
#include "lv_test_helpers.h"
#include "lv_test_indev.h"
void test_checkbox_creation_successfull(void);
void test_checkbox_creation_successful(void);
void test_checkbox_should_call_event_handler_on_click_when_enabled(void);
void test_checkbox_should_have_default_text_when_created(void);
void test_checkbox_should_return_dinamically_allocated_text(void);
void test_checkbox_should_return_dynamically_allocated_text(void);
void test_checkbox_should_allocate_memory_for_static_text(void);
static lv_obj_t * active_screen = NULL;
@ -26,7 +26,7 @@ static void event_handler(lv_event_t * e)
}
}
void test_checkbox_creation_successfull(void)
void test_checkbox_creation_successful(void)
{
active_screen = lv_screen_active();
checkbox = lv_checkbox_create(active_screen);
@ -60,7 +60,7 @@ void test_checkbox_should_have_default_text_when_created(void)
TEST_ASSERT_NOT_NULL(lv_checkbox_get_text(checkbox));
}
void test_checkbox_should_return_dinamically_allocated_text(void)
void test_checkbox_should_return_dynamically_allocated_text(void)
{
const char * message = "Hello World!";

View File

@ -9,9 +9,9 @@ void setUp(void);
/* This function runs after every test */
void tearDown(void);
void test_msgbox_creation_successfull_with_close_button(void);
void test_msgbox_creation_successfull_no_close_button(void);
void test_msgbox_creation_successfull_modal(void);
void test_msgbox_creation_successful_with_close_button(void);
void test_msgbox_creation_successful_no_close_button(void);
void test_msgbox_creation_successful_modal(void);
void test_msgbox_get_title(void);
void test_msgbox_get_close_button(void);
void test_msgbox_get_text(void);
@ -39,7 +39,7 @@ void tearDown(void)
lv_obj_clean(active_screen);
}
void test_msgbox_creation_successfull_with_close_button(void)
void test_msgbox_creation_successful_with_close_button(void)
{
bool add_close_btn = true;
@ -50,7 +50,7 @@ void test_msgbox_creation_successfull_with_close_button(void)
TEST_ASSERT_EQUAL_SCREENSHOT("msgbox_ok_with_close_btn.png");
}
void test_msgbox_creation_successfull_no_close_button(void)
void test_msgbox_creation_successful_no_close_button(void)
{
bool add_close_btn = false;
@ -61,7 +61,7 @@ void test_msgbox_creation_successfull_no_close_button(void)
TEST_ASSERT_EQUAL_SCREENSHOT("msgbox_ok_no_close_btn.png");
}
void test_msgbox_creation_successfull_modal(void)
void test_msgbox_creation_successful_modal(void)
{
// If parent is NULL the message box will be modal
msgbox = lv_msgbox_create(NULL, "The title", "The text", buttons_txts, true);

View File

@ -19,7 +19,7 @@ void tearDown(void)
/* Function run after every test */
}
void test_textarea_should_have_valid_documented_defualt_values(void)
void test_textarea_should_have_valid_documented_default_values(void)
{
TEST_ASSERT(lv_textarea_get_cursor_click_pos(textarea));
TEST_ASSERT_EQUAL(0U, lv_textarea_get_one_line(textarea));

View File

@ -20,7 +20,7 @@ void tearDown(void)
}
void test_win_should_have_valid_documented_defualt_values(void)
void test_win_should_have_valid_documented_default_values(void)
{
// Create the win object and update layout
win = lv_win_create(active_screen);