From ff8afc8b0c0ebc815753febca08fd06087c8ce7e Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 6 Apr 2020 12:15:51 +0200 Subject: [PATCH] makefile and test fixes --- lv_conf_template.h | 1 + src/lv_conf_internal.h | 3 ++ src/lv_font/lv_font.mk | 17 +++++++--- src/lv_misc/lv_math.c | 2 -- tests/build.py | 72 +++++++++++++++++++++--------------------- 5 files changed, 53 insertions(+), 42 deletions(-) diff --git a/lv_conf_template.h b/lv_conf_template.h index fbdde59bf..a3b43f9b6 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -367,6 +367,7 @@ typedef void * lv_font_user_data_t; #define LV_USE_THEME_EMPTY 0 /*No theme, you can apply your styles as you need*/ #define LV_USE_THEME_TEMPLATE 0 /*Simple to the create your theme based on it*/ #define LV_USE_THEME_MATERIAL 1 /*A fast and impressive theme*/ +#define LV_USE_THEME_MONO 0 /*Mono-color theme for monochrome displays*/ #define LV_THEME_DEFAULT_INIT lv_theme_material_init #define LV_THEME_DEFAULT_COLOR_PRIMARY LV_COLOR_RED diff --git a/src/lv_conf_internal.h b/src/lv_conf_internal.h index d102e7ac1..05612d657 100644 --- a/src/lv_conf_internal.h +++ b/src/lv_conf_internal.h @@ -532,6 +532,9 @@ #ifndef LV_USE_THEME_MATERIAL #define LV_USE_THEME_MATERIAL 1 /*A fast and impressive theme*/ #endif +#ifndef LV_USE_THEME_MONO +#define LV_USE_THEME_MONO 0 /*Mono-color theme for monochrome displays*/ +#endif #ifndef LV_THEME_DEFAULT_INIT #define LV_THEME_DEFAULT_INIT lv_theme_material_init diff --git a/src/lv_font/lv_font.mk b/src/lv_font/lv_font.mk index 20dc27225..1a5d45e14 100644 --- a/src/lv_font/lv_font.mk +++ b/src/lv_font/lv_font.mk @@ -1,9 +1,18 @@ CSRCS += lv_font.c CSRCS += lv_font_fmt_txt.c -CSRCS += lv_font_roboto_12.c -CSRCS += lv_font_roboto_16.c -CSRCS += lv_font_roboto_22.c -CSRCS += lv_font_roboto_28.c +CSRCS += lv_font_montserrat_12.c +CSRCS += lv_font_montserrat_14.c +CSRCS += lv_font_montserrat_16.c +CSRCS += lv_font_montserrat_18.c +CSRCS += lv_font_montserrat_20.c +CSRCS += lv_font_montserrat_22.c +CSRCS += lv_font_montserrat_14.c +CSRCS += lv_font_montserrat_26.c +CSRCS += lv_font_montserrat_28.c +CSRCS += lv_font_montserrat_30.c +CSRCS += lv_font_montserrat_32.c +CSRCS += lv_font_montserrat_12_subpx.c +CSRCS += lv_font_montserrat_28_compressed.c CSRCS += lv_font_unscii_8.c DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_font diff --git a/src/lv_misc/lv_math.c b/src/lv_misc/lv_math.c index 6be5f7546..039e41e84 100644 --- a/src/lv_misc/lv_math.c +++ b/src/lv_misc/lv_math.c @@ -113,8 +113,6 @@ int32_t lv_bezier3(uint32_t t, int32_t u0, int32_t u1, int32_t u2, int32_t u3) */ void lv_sqrt(uint32_t x, lv_sqrt_res_t * q, uint32_t mask) { - static volatile cnt = 0; - cnt++; x = x << 8; /*To get 4 bit precision. (sqrt(256) = 16 = 4 bit)*/ uint32_t root = 0; diff --git a/tests/build.py b/tests/build.py index 297e59c4a..908a8d833 100755 --- a/tests/build.py +++ b/tests/build.py @@ -81,12 +81,12 @@ minimal_monochrome = { "LV_USE_ASSERT_STR":0, "LV_USE_ASSERT_OBJ":0, "LV_USE_ASSERT_STYLE":0, - "LV_FONT_ROBOTO_12":0, - "LV_FONT_ROBOTO_16":0, - "LV_FONT_ROBOTO_22":0, - "LV_FONT_ROBOTO_28":0, - "LV_FONT_ROBOTO_12_SUBPX":0, - "LV_FONT_ROBOTO_28_COMPRESSED":0, + "LV_FONT_MONTSERRAT_12":0, + "LV_FONT_MONTSERRAT_16":0, + "LV_FONT_MONTSERRAT_22":0, + "LV_FONT_MONTSERRAT_28":0, + "LV_FONT_MONTSERRAT_12_SUBPX":0, + "LV_FONT_MONTSERRAT_28_COMPRESSED":0, "LV_FONT_UNSCII_8":1, "LV_USE_BIDI": 0, "LV_USE_OBJ_REALIGN": 0, @@ -144,22 +144,22 @@ all_obj_minimal_features = { "LV_THEME_DEFAULT_COLOR_PRIMARY": "\\\"LV_COLOR_RED\\\"", "LV_THEME_DEFAULT_COLOR_SECONDARY": "\\\"LV_COLOR_BLUE\\\"", "LV_THEME_DEFAULT_FLAGS" : "\\\"LV_THEME_MATERIAL_FLAG_NONE\\\"", - "LV_THEME_DEFAULT_FONT_SMALL" : "\\\"&lv_font_roboto_16\\\"", - "LV_THEME_DEFAULT_FONT_NORMAL" : "\\\"&lv_font_roboto_16\\\"", - "LV_THEME_DEFAULT_FONT_SUBTITLE" : "\\\"&lv_font_roboto_16\\\"", - "LV_THEME_DEFAULT_FONT_TITLE" : "\\\"&lv_font_roboto_16\\\"", + "LV_THEME_DEFAULT_FONT_SMALL" : "\\\"&lv_font_montserrat_16\\\"", + "LV_THEME_DEFAULT_FONT_NORMAL" : "\\\"&lv_font_montserrat_16\\\"", + "LV_THEME_DEFAULT_FONT_SUBTITLE" : "\\\"&lv_font_montserrat_16\\\"", + "LV_THEME_DEFAULT_FONT_TITLE" : "\\\"&lv_font_montserrat_16\\\"", "LV_USE_DEBUG":0, "LV_USE_ASSERT_NULL":0, "LV_USE_ASSERT_MEM":0, "LV_USE_ASSERT_STR":0, "LV_USE_ASSERT_OBJ":0, "LV_USE_ASSERT_STYLE":0, - "LV_FONT_ROBOTO_12":0, - "LV_FONT_ROBOTO_16":1, - "LV_FONT_ROBOTO_22":0, - "LV_FONT_ROBOTO_28":0, - "LV_FONT_ROBOTO_12_SUBPX":0, - "LV_FONT_ROBOTO_28_COMPRESSED":0, + "LV_FONT_MONTSERRAT_12":0, + "LV_FONT_MONTSERRAT_16":1, + "LV_FONT_MONTSERRAT_22":0, + "LV_FONT_MONTSERRAT_28":0, + "LV_FONT_MONTSERRAT_12_SUBPX":0, + "LV_FONT_MONTSERRAT_28_COMPRESSED":0, "LV_FONT_UNSCII_8":0, "LV_USE_BIDI": 0, "LV_USE_OBJ_REALIGN": 0, @@ -220,10 +220,10 @@ all_obj_all_features = { "LV_THEME_DEFAULT_COLOR_PRIMARY": "\\\"LV_COLOR_RED\\\"", "LV_THEME_DEFAULT_COLOR_SECONDARY": "\\\"LV_COLOR_BLUE\\\"", "LV_THEME_DEFAULT_FLAGS" : "\\\"LV_THEME_MATERIAL_FLAG_NONE\\\"", - "LV_THEME_DEFAULT_FONT_SMALL" : "\\\"&lv_font_roboto_12\\\"", - "LV_THEME_DEFAULT_FONT_NORMAL" : "\\\"&lv_font_roboto_16\\\"", - "LV_THEME_DEFAULT_FONT_SUBTITLE" : "\\\"&lv_font_roboto_22\\\"", - "LV_THEME_DEFAULT_FONT_TITLE" : "\\\"&lv_font_roboto_28\\\"", + "LV_THEME_DEFAULT_FONT_SMALL" : "\\\"&lv_font_montserrat_12\\\"", + "LV_THEME_DEFAULT_FONT_NORMAL" : "\\\"&lv_font_montserrat_16\\\"", + "LV_THEME_DEFAULT_FONT_SUBTITLE" : "\\\"&lv_font_montserrat_22\\\"", + "LV_THEME_DEFAULT_FONT_TITLE" : "\\\"&lv_font_montserrat_28\\\"", "LV_LOG_PRINTF":0, "LV_USE_DEBUG":0, "LV_USE_ASSERT_NULL":0, @@ -231,12 +231,12 @@ all_obj_all_features = { "LV_USE_ASSERT_STR":0, "LV_USE_ASSERT_OBJ":0, "LV_USE_ASSERT_STYLE":0, - "LV_FONT_ROBOTO_12":1, - "LV_FONT_ROBOTO_16":1, - "LV_FONT_ROBOTO_22":1, - "LV_FONT_ROBOTO_28":1, - "LV_FONT_ROBOTO_12_SUBPX":1, - "LV_FONT_ROBOTO_28_COMPRESSED":1, + "LV_FONT_MONTSERRAT_12":1, + "LV_FONT_MONTSERRAT_16":1, + "LV_FONT_MONTSERRAT_22":1, + "LV_FONT_MONTSERRAT_28":1, + "LV_FONT_MONTSERRAT_12_SUBPX":1, + "LV_FONT_MONTSERRAT_28_COMPRESSED":1, "LV_FONT_UNSCII_8":1, "LV_USE_ARC":1, "LV_USE_BAR":1, @@ -300,10 +300,10 @@ advanced_features = { "LV_THEME_DEFAULT_COLOR_PRIMARY": "\\\"LV_COLOR_RED\\\"", "LV_THEME_DEFAULT_COLOR_SECONDARY": "\\\"LV_COLOR_BLUE\\\"", "LV_THEME_DEFAULT_FLAGS" : "\\\"LV_THEME_MATERIAL_FLAG_NONE\\\"", - "LV_THEME_DEFAULT_FONT_SMALL" : "\\\"&lv_font_roboto_12\\\"", - "LV_THEME_DEFAULT_FONT_NORMAL" : "\\\"&lv_font_roboto_16\\\"", - "LV_THEME_DEFAULT_FONT_SUBTITLE" : "\\\"&lv_font_roboto_22\\\"", - "LV_THEME_DEFAULT_FONT_TITLE" : "\\\"&lv_font_roboto_28\\\"", + "LV_THEME_DEFAULT_FONT_SMALL" : "\\\"&lv_font_montserrat_12\\\"", + "LV_THEME_DEFAULT_FONT_NORMAL" : "\\\"&lv_font_montserrat_16\\\"", + "LV_THEME_DEFAULT_FONT_SUBTITLE" : "\\\"&lv_font_montserrat_22\\\"", + "LV_THEME_DEFAULT_FONT_TITLE" : "\\\"&lv_font_montserrat_28\\\"", "LV_LOG_PRINTF":1, "LV_USE_DEBUG":1, "LV_USE_ASSERT_NULL":1, @@ -311,12 +311,12 @@ advanced_features = { "LV_USE_ASSERT_STR":1, "LV_USE_ASSERT_OBJ":1, "LV_USE_ASSERT_STYLE":1, - "LV_FONT_ROBOTO_12":1, - "LV_FONT_ROBOTO_16":1, - "LV_FONT_ROBOTO_22":1, - "LV_FONT_ROBOTO_28":1, - "LV_FONT_ROBOTO_12_SUBPX":1, - "LV_FONT_ROBOTO_28_COMPRESSED":1, + "LV_FONT_MONTSERRAT_12":1, + "LV_FONT_MONTSERRAT_16":1, + "LV_FONT_MONTSERRAT_22":1, + "LV_FONT_MONTSERRAT_28":1, + "LV_FONT_MONTSERRAT_12_SUBPX":1, + "LV_FONT_MONTSERRAT_28_COMPRESSED":1, "LV_FONT_UNSCII_8":1, "LV_USE_BIDI": 1, "LV_USE_OBJ_REALIGN": 1,