From f9572ed303b27194579b28189ae71b7cc976962d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Sun, 22 Oct 2023 06:39:43 +0200 Subject: [PATCH] chore: remove BOM and fix typos (#4685) --- .github/ISSUE_TEMPLATE/config.yml | 2 +- .github/pull_request_template.md | 2 +- .github/workflows/platformio_publish.yaml | 2 +- ...font_benchmark_montserrat_12_compr_az.c.c} | 4 +- ...font_benchmark_montserrat_16_compr_az.c.c} | 4 +- ...font_benchmark_montserrat_28_compr_az.c.c} | 4 +- demos/benchmark/lv_demo_benchmark.c | 8 ++-- demos/scroll/lv_demo_scroll.c | 6 +-- docs/CHANGELOG.rst | 2 +- docs/Doxyfile | 2 +- docs/get-started/os/zephyr.rst | 2 +- docs/layouts/grid.rst | 4 +- docs/others/obj_id.rst | 4 +- docs/porting/disp.rst | 2 +- docs/widgets/btnmatrix.rst | 2 +- docs/widgets/checkbox.rst | 2 +- env_support/cmsis-pack/LVGL.lvgl.pdsc | 8 ++-- ...0001-changes-to-compile-with-esp-idf.patch | 4 +- env_support/pikascript/pika_lv_timer_t.c | 2 +- env_support/pikascript/pika_lv_wegit.c | 2 +- env_support/pikascript/pika_lvgl.pyi | 4 +- env_support/pikascript/pika_lvgl_lv_obj.c | 6 +-- env_support/rt-thread/SConscript | 10 ++--- env_support/rt-thread/squareline/SConscript | 6 +-- scripts/changelog_gen.sh | 2 +- src/core/lv_obj_scroll.c | 12 +++--- src/draw/lv_draw_buf.h | 4 +- src/draw/lv_draw_label.c | 6 +-- src/draw/lv_draw_label.h | 6 +-- src/draw/nxp/vglite/lv_draw_vglite_arc.c | 2 +- src/draw/nxp/vglite/lv_draw_vglite_label.c | 2 +- src/draw/sw/lv_draw_sw_letter.c | 2 +- src/draw/sw/lv_draw_sw_transform.c | 37 ++++++++++--------- src/font/lv_font_fmt_txt.h | 4 +- src/lv_init.c | 6 +-- src/misc/lv_event.h | 2 +- src/misc/lv_text_ap.c | 6 +-- src/others/ime/lv_ime_pinyin.c | 8 ++-- src/widgets/scale/lv_scale.h | 2 +- tests/main.py | 4 +- tests/src/lv_test_conf.h | 2 +- tests/src/test_assets/font_1.c | 4 +- tests/src/test_assets/font_2.c | 4 +- tests/src/test_assets/font_3.c | 4 +- tests/src/test_cases/test_obj_flags.c | 4 +- tests/src/test_cases/widgets/test_arc.c | 4 +- tests/src/test_cases/widgets/test_calendar.c | 4 +- tests/src/test_cases/widgets/test_chart.c | 14 +++---- tests/src/test_cases/widgets/test_checkbox.c | 8 ++-- tests/src/test_cases/widgets/test_msgbox.c | 12 +++--- tests/src/test_cases/widgets/test_textarea.c | 2 +- tests/src/test_cases/widgets/test_win.c | 2 +- 52 files changed, 132 insertions(+), 131 deletions(-) rename demos/benchmark/assets/{lv_font_bechmark_montserrat_12_compr_az.c.c => lv_font_benchmark_montserrat_12_compr_az.c.c} (99%) rename demos/benchmark/assets/{lv_font_bechmark_montserrat_16_compr_az.c.c => lv_font_benchmark_montserrat_16_compr_az.c.c} (99%) rename demos/benchmark/assets/{lv_font_bechmark_montserrat_28_compr_az.c.c => lv_font_benchmark_montserrat_28_compr_az.c.c} (99%) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 2228ff12d..0e8cb678f 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -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 diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 30f160a76..f5dc413ca 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -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__create(lv_obj_t * parent)` pattern. -- [ ] Widget members function must start with `lv_` and should receive `lv_obj_t *` as first argument which is a pointer to widget object itself. +- [ ] Widget members function must start with `lv_` 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". diff --git a/.github/workflows/platformio_publish.yaml b/.github/workflows/platformio_publish.yaml index de093f9a0..3845f727f 100644 --- a/.github/workflows/platformio_publish.yaml +++ b/.github/workflows/platformio_publish.yaml @@ -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' diff --git a/demos/benchmark/assets/lv_font_bechmark_montserrat_12_compr_az.c.c b/demos/benchmark/assets/lv_font_benchmark_montserrat_12_compr_az.c.c similarity index 99% rename from demos/benchmark/assets/lv_font_bechmark_montserrat_12_compr_az.c.c rename to demos/benchmark/assets/lv_font_benchmark_montserrat_12_compr_az.c.c index 88720faf7..3843ea4b6 100644 --- a/demos/benchmark/assets/lv_font_bechmark_montserrat_12_compr_az.c.c +++ b/demos/benchmark/assets/lv_font_benchmark_montserrat_12_compr_az.c.c @@ -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, diff --git a/demos/benchmark/assets/lv_font_bechmark_montserrat_16_compr_az.c.c b/demos/benchmark/assets/lv_font_benchmark_montserrat_16_compr_az.c.c similarity index 99% rename from demos/benchmark/assets/lv_font_bechmark_montserrat_16_compr_az.c.c rename to demos/benchmark/assets/lv_font_benchmark_montserrat_16_compr_az.c.c index db93e46a6..313b40c51 100644 --- a/demos/benchmark/assets/lv_font_bechmark_montserrat_16_compr_az.c.c +++ b/demos/benchmark/assets/lv_font_benchmark_montserrat_16_compr_az.c.c @@ -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, diff --git a/demos/benchmark/assets/lv_font_bechmark_montserrat_28_compr_az.c.c b/demos/benchmark/assets/lv_font_benchmark_montserrat_28_compr_az.c.c similarity index 99% rename from demos/benchmark/assets/lv_font_bechmark_montserrat_28_compr_az.c.c rename to demos/benchmark/assets/lv_font_benchmark_montserrat_28_compr_az.c.c index 37ab61d7e..14fcae429 100644 --- a/demos/benchmark/assets/lv_font_bechmark_montserrat_28_compr_az.c.c +++ b/demos/benchmark/assets/lv_font_benchmark_montserrat_28_compr_az.c.c @@ -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, diff --git a/demos/benchmark/lv_demo_benchmark.c b/demos/benchmark/lv_demo_benchmark.c index 9e7ec74a1..58d0e7599 100644 --- a/demos/benchmark/lv_demo_benchmark.c +++ b/demos/benchmark/lv_demo_benchmark.c @@ -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(); diff --git a/demos/scroll/lv_demo_scroll.c b/demos/scroll/lv_demo_scroll.c index 706754a0d..ac1f58586 100644 --- a/demos/scroll/lv_demo_scroll.c +++ b/demos/scroll/lv_demo_scroll.c @@ -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)); diff --git a/docs/CHANGELOG.rst b/docs/CHANGELOG.rst index 6df73a998..f374e197d 100644 --- a/docs/CHANGELOG.rst +++ b/docs/CHANGELOG.rst @@ -53,7 +53,7 @@ Examples Docs ~~~~ -- docs(arduino): add note to not use lv_examles library `2f294aa `__ +- docs(arduino): add note to not use lv_examples library `2f294aa `__ - docs: use a fixed commit of lv_web_emscripten `501230e `__ CI and tests diff --git a/docs/Doxyfile b/docs/Doxyfile index 5ebc96640..1dc470d64 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -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. # diff --git a/docs/get-started/os/zephyr.rst b/docs/get-started/os/zephyr.rst index fef6ed7a3..cdc3c7f47 100644 --- a/docs/get-started/os/zephyr.rst +++ b/docs/get-started/os/zephyr.rst @@ -88,7 +88,7 @@ The shell offers enabling/disabling of LVGL monkeys: uart$ lvgl monkey set 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 diff --git a/docs/layouts/grid.rst b/docs/layouts/grid.rst index da53338a9..bc2953c0d 100644 --- a/docs/layouts/grid.rst +++ b/docs/layouts/grid.rst @@ -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 diff --git a/docs/others/obj_id.rst b/docs/others/obj_id.rst index 4b31ef5d6..c932eac33 100644 --- a/docs/others/obj_id.rst +++ b/docs/others/obj_id.rst @@ -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``. diff --git a/docs/porting/disp.rst b/docs/porting/disp.rst index 8f74d9a06..0a57d730c 100644 --- a/docs/porting/disp.rst +++ b/docs/porting/disp.rst @@ -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)`. diff --git a/docs/widgets/btnmatrix.rst b/docs/widgets/btnmatrix.rst index 28f3e8e1b..660631e5b 100644 --- a/docs/widgets/btnmatrix.rst +++ b/docs/widgets/btnmatrix.rst @@ -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 diff --git a/docs/widgets/checkbox.rst b/docs/widgets/checkbox.rst index 720e01f2f..a2d524a99 100644 --- a/docs/widgets/checkbox.rst +++ b/docs/widgets/checkbox.rst @@ -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: diff --git a/env_support/cmsis-pack/LVGL.lvgl.pdsc b/env_support/cmsis-pack/LVGL.lvgl.pdsc index 742751339..230049572 100644 --- a/env_support/cmsis-pack/LVGL.lvgl.pdsc +++ b/env_support/cmsis-pack/LVGL.lvgl.pdsc @@ -696,7 +696,7 @@ -/*! \brief enable PikaScrit Binding */ +/*! \brief enable PikaScript Binding */ #define LV_USE_PIKASCRIPT_BINDING 1 @@ -918,9 +918,9 @@ - - - + + + diff --git a/env_support/esp/rlottie/0001-changes-to-compile-with-esp-idf.patch b/env_support/esp/rlottie/0001-changes-to-compile-with-esp-idf.patch index d5b59b7f4..324d5f1e2 100644 --- a/env_support/esp/rlottie/0001-changes-to-compile-with-esp-idf.patch +++ b/env_support/esp/rlottie/0001-changes-to-compile-with-esp-idf.patch @@ -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() diff --git a/env_support/pikascript/pika_lv_timer_t.c b/env_support/pikascript/pika_lv_timer_t.c index f27de4543..b0b50ebac 100644 --- a/env_support/pikascript/pika_lv_timer_t.c +++ b/env_support/pikascript/pika_lv_timer_t.c @@ -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); } diff --git a/env_support/pikascript/pika_lv_wegit.c b/env_support/pikascript/pika_lv_wegit.c index 0f98c0b41..17b6b9847 100644 --- a/env_support/pikascript/pika_lv_wegit.c +++ b/env_support/pikascript/pika_lv_wegit.c @@ -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); } diff --git a/env_support/pikascript/pika_lvgl.pyi b/env_support/pikascript/pika_lvgl.pyi index e83316a9c..7ca54f84b 100644 --- a/env_support/pikascript/pika_lvgl.pyi +++ b/env_support/pikascript/pika_lvgl.pyi @@ -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: ... diff --git a/env_support/pikascript/pika_lvgl_lv_obj.c b/env_support/pikascript/pika_lvgl_lv_obj.c index 92103b067..12ecd8150 100644 --- a/env_support/pikascript/pika_lvgl_lv_obj.c +++ b/env_support/pikascript/pika_lvgl_lv_obj.c @@ -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){ diff --git a/env_support/rt-thread/SConscript b/env_support/rt-thread/SConscript index 378c36f3b..396dc7591 100644 --- a/env_support/rt-thread/SConscript +++ b/env_support/rt-thread/SConscript @@ -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 = '' diff --git a/env_support/rt-thread/squareline/SConscript b/env_support/rt-thread/squareline/SConscript index 2818830b5..08220b451 100644 --- a/env_support/rt-thread/squareline/SConscript +++ b/env_support/rt-thread/squareline/SConscript @@ -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) diff --git a/scripts/changelog_gen.sh b/scripts/changelog_gen.sh index 839fa35d2..0dd73cd3b 100755 --- a/scripts/changelog_gen.sh +++ b/scripts/changelog_gen.sh @@ -7,7 +7,7 @@ # Usage: # changelog-gen # -# 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 diff --git a/src/core/lv_obj_scroll.c b/src/core/lv_obj_scroll.c index bf46d4b9f..0b495c257 100644 --- a/src/core/lv_obj_scroll.c +++ b/src/core/lv_obj_scroll.c @@ -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; diff --git a/src/draw/lv_draw_buf.h b/src/draw/lv_draw_buf.h index a99d0280d..6e520d6f0 100644 --- a/src/draw/lv_draw_buf.h +++ b/src/draw/lv_draw_buf.h @@ -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 diff --git a/src/draw/lv_draw_label.c b/src/draw/lv_draw_label.c index 032d9f769..2e2153d5d 100644 --- a/src/draw/lv_draw_label.c +++ b/src/draw/lv_draw_label.c @@ -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; diff --git a/src/draw/lv_draw_label.h b/src/draw/lv_draw_label.h index e79130d33..41c6fd9f0 100644 --- a/src/draw/lv_draw_label.h +++ b/src/draw/lv_draw_label.h @@ -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 diff --git a/src/draw/nxp/vglite/lv_draw_vglite_arc.c b/src/draw/nxp/vglite/lv_draw_vglite_arc.c index 12e09c2d7..4f45ce963 100644 --- a/src/draw/nxp/vglite/lv_draw_vglite_arc.c +++ b/src/draw/nxp/vglite/lv_draw_vglite_arc.c @@ -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: diff --git a/src/draw/nxp/vglite/lv_draw_vglite_label.c b/src/draw/nxp/vglite/lv_draw_vglite_label.c index f19438518..73557b07d 100644 --- a/src/draw/nxp/vglite/lv_draw_vglite_label.c +++ b/src/draw/nxp/vglite/lv_draw_vglite_label.c @@ -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); } /********************** diff --git a/src/draw/sw/lv_draw_sw_letter.c b/src/draw/sw/lv_draw_sw_letter.c index dd4962837..d34a97af1 100644 --- a/src/draw/sw/lv_draw_sw_letter.c +++ b/src/draw/sw/lv_draw_sw_letter.c @@ -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); } /********************** diff --git a/src/draw/sw/lv_draw_sw_transform.c b/src/draw/sw/lv_draw_sw_transform.c index 4c0eaebc5..c3ad2b08a 100644 --- a/src/draw/sw/lv_draw_sw_transform.c +++ b/src/draw/sw/lv_draw_sw_transform.c @@ -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; diff --git a/src/font/lv_font_fmt_txt.h b/src/font/lv_font_fmt_txt.h index b7c92e089..58905f449 100644 --- a/src/font/lv_font_fmt_txt.h +++ b/src/font/lv_font_fmt_txt.h @@ -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; diff --git a/src/lv_init.c b/src/lv_init.c index 983a0057f..f4488c87d 100644 --- a/src/lv_init.c +++ b/src/lv_init.c @@ -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, diff --git a/src/misc/lv_event.h b/src/misc/lv_event.h index cdbf1e142..b1a05dfa6 100644 --- a/src/misc/lv_event.h +++ b/src/misc/lv_event.h @@ -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 *`.*/ diff --git a/src/misc/lv_text_ap.c b/src/misc/lv_text_ap.c index c38e03734..8fbfef665 100644 --- a/src/misc/lv_text_ap.c +++ b/src/misc/lv_text_ap.c @@ -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; diff --git a/src/others/ime/lv_ime_pinyin.c b/src/others/ime/lv_ime_pinyin.c index 53f313782..ce54bda53 100644 --- a/src/others/ime/lv_ime_pinyin.c +++ b/src/others/ime/lv_ime_pinyin.c @@ -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++) { diff --git a/src/widgets/scale/lv_scale.h b/src/widgets/scale/lv_scale.h index 9e54d2315..6c72753a5 100644 --- a/src/widgets/scale/lv_scale.h +++ b/src/widgets/scale/lv_scale.h @@ -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); diff --git a/tests/main.py b/tests/main.py index fc26f971e..6b61a9384 100755 --- a/tests/main.py +++ b/tests/main.py @@ -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): diff --git a/tests/src/lv_test_conf.h b/tests/src/lv_test_conf.h index 1a0b06a33..8587eacd8 100644 --- a/tests/src/lv_test_conf.h +++ b/tests/src/lv_test_conf.h @@ -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 diff --git a/tests/src/test_assets/font_1.c b/tests/src/test_assets/font_1.c index e3da3637e..b6df735a0 100644 --- a/tests/src/test_assets/font_1.c +++ b/tests/src/test_assets/font_1.c @@ -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, diff --git a/tests/src/test_assets/font_2.c b/tests/src/test_assets/font_2.c index 529392b8f..c64946b55 100644 --- a/tests/src/test_assets/font_2.c +++ b/tests/src/test_assets/font_2.c @@ -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, diff --git a/tests/src/test_assets/font_3.c b/tests/src/test_assets/font_3.c index a04842c88..765182785 100644 --- a/tests/src/test_assets/font_3.c +++ b/tests/src/test_assets/font_3.c @@ -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, diff --git a/tests/src/test_cases/test_obj_flags.c b/tests/src/test_cases/test_obj_flags.c index 48bb7d18b..bc41320c0 100644 --- a/tests/src/test_cases/test_obj_flags.c +++ b/tests/src/test_cases/test_obj_flags.c @@ -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)*/ diff --git a/tests/src/test_cases/widgets/test_arc.c b/tests/src/test_cases/widgets/test_arc.c index 47ca99272..d2b6f1f5c 100644 --- a/tests/src/test_cases/widgets/test_arc.c +++ b/tests/src/test_cases/widgets/test_arc.c @@ -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); diff --git a/tests/src/test_cases/widgets/test_calendar.c b/tests/src/test_cases/widgets/test_calendar.c index 8059ff38e..c51583009 100644 --- a/tests/src/test_cases/widgets/test_calendar.c +++ b/tests/src/test_cases/widgets/test_calendar.c @@ -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); } diff --git a/tests/src/test_cases/widgets/test_chart.c b/tests/src/test_cases/widgets/test_chart.c index 94e5824aa..de8e94bca 100644 --- a/tests/src/test_cases/widgets/test_chart.c +++ b/tests/src/test_cases/widgets/test_chart.c @@ -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); diff --git a/tests/src/test_cases/widgets/test_checkbox.c b/tests/src/test_cases/widgets/test_checkbox.c index f85acf948..5ed1f56e8 100644 --- a/tests/src/test_cases/widgets/test_checkbox.c +++ b/tests/src/test_cases/widgets/test_checkbox.c @@ -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!"; diff --git a/tests/src/test_cases/widgets/test_msgbox.c b/tests/src/test_cases/widgets/test_msgbox.c index 64d2c7baa..9ccaacd2e 100644 --- a/tests/src/test_cases/widgets/test_msgbox.c +++ b/tests/src/test_cases/widgets/test_msgbox.c @@ -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); diff --git a/tests/src/test_cases/widgets/test_textarea.c b/tests/src/test_cases/widgets/test_textarea.c index 448eb2f40..b5972c087 100644 --- a/tests/src/test_cases/widgets/test_textarea.c +++ b/tests/src/test_cases/widgets/test_textarea.c @@ -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)); diff --git a/tests/src/test_cases/widgets/test_win.c b/tests/src/test_cases/widgets/test_win.c index 2de33f836..f5ddda1ec 100644 --- a/tests/src/test_cases/widgets/test_win.c +++ b/tests/src/test_cases/widgets/test_win.c @@ -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);