diff --git a/README.md b/README.md index da9a7cfc3..5e3cac5cd 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ See the [example HAL](https://github.com/littlevgl/hal) repository! 4. Write your display, touch pad and system tick **drivers in hal** 5. Copy *lvgl/lv_conf_templ.h* as **lv_conf.h** and *misc/misc_conf_templ.h* as **misc_conf.h** to the projects root folder 6. In the *_conf.h files delete the first `#if 0` and its `#endif`. Let the default configurations at first. -7. In your *main.c* file include: +7. In your *main.c* include: * #include "misc/misc.h" * #include "misc/os/ptask.h" * #include "lvgl/lvgl.h" @@ -85,5 +85,5 @@ If you find an issue, please report it via GitHub! ## Donate If you are pleased with the graphics library and found it useful pleas support its further development: -[![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=LWHHAQYZMRQJS) +[![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=GJV3SC5EHDANS) diff --git a/lv_appx/lv_app_benchmark.c b/lv_appx/lv_app_benchmark.c index 0674ad353..f469c7375 100644 --- a/lv_appx/lv_app_benchmark.c +++ b/lv_appx/lv_app_benchmark.c @@ -16,7 +16,7 @@ /********************* * DEFINES *********************/ -#define SHADOW_WIDTH (LV_DPI / 4) +#define SHADOW_WIDTH (LV_DPI / 8) #define IMG_RECOLOR OPA_30 #define OPACITY OPA_60 @@ -31,7 +31,7 @@ typedef struct uint8_t wp :1; uint8_t recolor :1; uint8_t upscalse :1; - uint8_t shadow :1; + uint8_t shdw :1; uint8_t opa :1; }my_app_data_t; @@ -248,7 +248,7 @@ static void my_win_open(lv_app_inst_t * app, lv_obj_t * win) wdata->style_btn_ina.opa = OPACITY; } - if(adata->shadow == 0) { + if(adata->shdw == 0) { wdata->style_btn_rel.swidth = 0; wdata->style_btn_pr.swidth = 0; wdata->style_btn_trel.swidth = 0; @@ -277,6 +277,7 @@ static void my_win_open(lv_app_inst_t * app, lv_obj_t * win) lv_obj_set_size(wdata->wp, LV_HOR_RES, LV_VER_RES - lv_obj_get_height(lv_win_get_header(win))); lv_obj_set_pos(wdata->wp, 0, 0); lv_obj_set_style(wdata->wp, &wdata->style_wp); + lv_img_set_auto_size(wdata->wp, false); if(adata->wp == 0) lv_obj_set_hidden(wdata->wp, true); if(adata->upscalse != 0) lv_img_set_upscale(wdata->wp, true); @@ -337,7 +338,8 @@ static void my_win_open(lv_app_inst_t * app, lv_obj_t * win) btn = lv_btn_create(win, btn); - if(adata->shadow != 0) lv_btn_set_state(btn, LV_BTN_STATE_TREL); + if(adata->shdw != 0) lv_btn_set_state(btn, LV_BTN_STATE_TREL); + else lv_btn_set_state(btn, LV_BTN_STATE_REL); lv_btn_set_rel_action(btn, shadow_rel_action); btn_l = lv_label_create(btn, btn_l); lv_label_set_text(btn_l, "Shadow"); @@ -467,7 +469,7 @@ static lv_action_res_t shadow_rel_action(lv_obj_t * btn, lv_dispi_t * dispi) my_app_data_t * adata = app->app_data; if(lv_btn_get_state(btn) == LV_BTN_STATE_TREL) { - adata->shadow = 1; + adata->shdw = 1; wdata->style_btn_rel.swidth = SHADOW_WIDTH; wdata->style_btn_pr.swidth = SHADOW_WIDTH; wdata->style_btn_trel.swidth = SHADOW_WIDTH; @@ -525,7 +527,114 @@ static lv_action_res_t opa_rel_action(lv_obj_t * btn, lv_dispi_t * dispi) /*Exceptionally store the data because the big array would be bothering*/ +#if COLOR_DEPTH == 8 +const color_int_t img_bg[] = { +/*HEADER + Width = 40 + Height = 40 + Transp: 0 + Color depth: 8*/ +40, 128, 2, 2, +/*IMAGE DATA*/ +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0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 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 5, 5, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 0, 0, 0, 5, 5, 5, 5, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 0, 0, 0, 5, 5, 5, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +}; +#endif /*COLOR_DEPTH*/ + +#if COLOR_DEPTH == 16 +const color_int_t img_bg[] = { +/*HEADER + Width = 40 + Height = 40 + Transp: 0 + Color depth: 16*/ +32808, 1026, + +/*IMAGE DATA*/ +32, 32, 32, 2113, 2113, 4258, 6339, 4258, 4258, 4226, 4226, 2145, 4226, 2113, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 2145, 2145, 4226, 4226, 4226, 4226, 4226, 2145, 32, 32, 32, 32, +0, 32, 2113, 32, 6339, 10565, 8452, 4258, 4226, 4226, 2145, 4226, 6339, 4226, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 2145, 4226, 2145, 2145, 4226, 4226, 4226, 6371, 6339, 4226, 32, 32, 32, +32, 32, 2113, 4226, 8484, 8484, 8452, 6371, 4226, 2145, 4226, 4258, 4258, 4258, 2145, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 2145, 4226, 4226, 4226, 4226, 2145, 2145, 4226, 6339, 4258, 4258, 4226, 32, 32, +32, 32, 4258, 6371, 8452, 6371, 6371, 6339, 4226, 2145, 4226, 4226, 2145, 4226, 4226, 2113, 32, 0, 0, 0, 0, 32, 0, 0, 32, 2113, 2145, 2145, 2145, 4226, 4226, 4226, 2145, 4226, 6339, 4226, 6371, 6339, 2145, 32, +2113, 2145, 6371, 6339, 4226, 4226, 4226, 4226, 4258, 4258, 4226, 2145, 4226, 2145, 2145, 4226, 4258, 32, 0, 0, 0, 0, 0, 2113, 6339, 4226, 2113, 2145, 2145, 2145, 4226, 4226, 4258, 4226, 4258, 4258, 4258, 6339, 6339, 2145, +4226, 4258, 6339, 4226, 4226, 2145, 2145, 2145, 4226, 4226, 4226, 2145, 2145, 2145, 4226, 6339, 8452, 6339, 32, 0, 0, 0, 2113, 6339, 6371, 6339, 2145, 2113, 2145, 2145, 4226, 4226, 4226, 4226, 4226, 4226, 4226, 4258, 4258, 4226, +4226, 4226, 2145, 4226, 2145, 2145, 4226, 4226, 2145, 4226, 4226, 4226, 2145, 4226, 6371, 6371, 6371, 8452, 4258, 32, 0, 2113, 6371, 6371, 6371, 6339, 6339, 2145, 2145, 4226, 2145, 2145, 2145, 4226, 4258, 4226, 4226, 4226, 2145, 4226, +4226, 2145, 4226, 2145, 2145, 4226, 4226, 4226, 4226, 4226, 2145, 2145, 4258, 6371, 8452, 6371, 6371, 6371, 8452, 6339, 2145, 6339, 8452, 6371, 6339, 6371, 6371, 6339, 4226, 2145, 2145, 2145, 2145, 2145, 4258, 4258, 2145, 2145, 2145, 2145, +4226, 2145, 4226, 2113, 2145, 4226, 4258, 4226, 2145, 2145, 2145, 4258, 6371, 8452, 6371, 6339, 6371, 6371, 8452, 8452, 6339, 8452, 8452, 8452, 6371, 6371, 8452, 8452, 6339, 4226, 2145, 2145, 2145, 2145, 4226, 4258, 2145, 2113, 2145, 2145, +2145, 2145, 2113, 2145, 4226, 4226, 4226, 2145, 2145, 2113, 4226, 6339, 6371, 6371, 6371, 6371, 6371, 8452, 6371, 8452, 8452, 6371, 8452, 8452, 6339, 6371, 8452, 8452, 8452, 6371, 4226, 2145, 4226, 4226, 4226, 4226, 4226, 4226, 2145, 4226, +4226, 4226, 2145, 4226, 4226, 2145, 4226, 2145, 2113, 2145, 6339, 6371, 6371, 8452, 8452, 8452, 8484, 8452, 6371, 6371, 6371, 6371, 6371, 6371, 6371, 6371, 6371, 6371, 8452, 8452, 6339, 2145, 2145, 4226, 4226, 2145, 4226, 4226, 2145, 4226, +2145, 4226, 4258, 2145, 2145, 2145, 2113, 2145, 4226, 6339, 6371, 6371, 6371, 8452, 8484, 8484, 8452, 6371, 6371, 6371, 6371, 6371, 6371, 8452, 6371, 6339, 6371, 6371, 6371, 8452, 8452, 6339, 4226, 2145, 2145, 4226, 4226, 2145, 4226, 2145, +32, 2113, 4226, 4226, 2145, 2145, 2113, 2145, 8452, 8452, 6371, 6371, 6339, 8484, 8484, 8484, 8484, 8452, 6371, 6339, 6371, 6371, 6371, 6371, 6371, 6371, 6339, 6339, 6339, 6339, 8452, 8484, 6371, 2145, 2145, 4226, 2145, 4226, 4226, 2113, +0, 0, 2145, 4226, 4226, 4226, 4258, 6371, 6371, 8452, 6371, 6339, 6339, 8452, 8484, 8452, 8452, 8452, 6371, 6371, 8452, 8452, 8452, 6371, 6371, 6339, 6371, 6339, 6371, 6371, 8452, 8452, 8484, 8452, 4226, 4226, 4258, 4258, 2113, 32, +0, 0, 32, 2113, 2145, 6339, 8452, 8452, 6339, 6339, 8452, 6371, 6339, 6371, 10565, 8484, 8452, 8484, 8452, 6371, 6339, 8452, 8452, 6371, 6371, 6339, 6371, 6371, 6371, 8452, 8452, 8452, 8484, 10565, 6371, 4258, 4226, 2145, 32, 0, +0, 0, 0, 0, 2113, 6339, 8452, 6371, 6371, 6339, 6371, 8452, 6371, 6371, 8452, 8484, 8452, 8452, 8484, 8452, 4258, 8452, 8452, 6339, 6339, 6339, 6339, 6371, 6371, 6371, 6371, 8452, 8452, 8452, 8484, 8452, 2113, 0, 0, 32, +0, 0, 0, 0, 0, 4258, 6371, 6371, 6371, 6371, 6371, 6371, 6371, 6371, 8452, 8452, 8452, 8484, 8452, 2145, 32, 4226, 6371, 6371, 6371, 6339, 6371, 6371, 6371, 6371, 6371, 6371, 8452, 8452, 8452, 4226, 32, 0, 0, 32, +0, 0, 0, 0, 0, 0, 4226, 8452, 6371, 6371, 6371, 6339, 6371, 8452, 8452, 8452, 8484, 8452, 2145, 0, 0, 0, 4226, 8452, 6371, 6371, 6371, 6339, 6339, 6371, 6371, 6371, 8452, 8484, 4258, 0, 32, 32, 32, 0, +0, 0, 0, 0, 0, 0, 32, 4258, 6371, 6371, 6371, 6371, 6371, 8452, 8452, 8452, 8452, 2145, 0, 0, 32, 0, 0, 4226, 6371, 6371, 6339, 6339, 6371, 6371, 6371, 6371, 6371, 2145, 0, 0, 32, 32, 32, 0, +0, 0, 0, 0, 0, 0, 0, 32, 6339, 6371, 6371, 6371, 6371, 8452, 8484, 8452, 4226, 32, 0, 0, 0, 0, 0, 0, 4226, 6339, 6339, 6339, 6371, 6371, 6371, 6371, 4226, 0, 32, 32, 32, 32, 0, 0, +0, 0, 0, 0, 0, 0, 0, 2113, 6339, 6371, 6371, 6371, 6371, 8452, 8484, 8484, 4258, 32, 0, 0, 0, 0, 0, 32, 4258, 6339, 6339, 6371, 6371, 6371, 8452, 8452, 4258, 32, 32, 32, 32, 32, 0, 32, +0, 0, 0, 32, 0, 0, 2113, 6339, 8484, 8452, 6371, 6371, 8452, 8484, 8484, 8484, 8452, 4226, 0, 0, 0, 0, 32, 6339, 8452, 6371, 6371, 6371, 6371, 6371, 8452, 8452, 8484, 6371, 2113, 32, 32, 32, 32, 32, +0, 0, 0, 0, 0, 2113, 6339, 8452, 8484, 8484, 8452, 6371, 8452, 10597, 8452, 8452, 8452, 6371, 4226, 0, 0, 32, 4258, 8452, 8452, 8452, 8452, 6371, 6339, 6371, 6371, 6371, 8484, 8484, 6339, 2113, 0, 32, 32, 32, +0, 0, 0, 0, 2113, 6371, 8452, 8452, 8452, 8452, 8452, 8452, 8484, 10597, 8452, 8452, 6371, 8452, 8452, 4258, 2113, 6339, 8452, 8452, 8452, 6371, 8452, 8452, 8452, 8452, 6371, 6371, 8452, 8484, 8484, 6371, 2113, 32, 32, 32, +0, 0, 0, 32, 2145, 6339, 8484, 8452, 8452, 8452, 8452, 8452, 8484, 8484, 8452, 8452, 6371, 8452, 8452, 10565, 8484, 8452, 8484, 8452, 8452, 6371, 8452, 8484, 8452, 8484, 8452, 6371, 8484, 8484, 10597, 6371, 6339, 2145, 0, 32, +0, 0, 0, 2145, 4226, 2145, 6339, 8452, 8452, 8452, 8452, 8452, 8452, 8452, 8452, 8452, 8452, 8452, 8452, 8484, 8452, 8452, 8452, 8452, 8452, 6371, 8452, 8452, 8452, 8484, 8484, 8484, 8484, 12678, 6371, 4226, 6371, 4258, 32, 0, +0, 32, 2145, 4226, 4226, 2145, 2145, 6339, 8484, 10565, 8452, 8452, 8452, 8452, 8484, 8484, 8452, 8452, 6371, 6371, 6371, 6339, 8452, 8452, 8452, 8452, 6371, 8452, 8484, 8484, 8452, 8484, 10565, 8484, 4258, 4226, 6339, 6339, 2145, 32, +2113, 4226, 4258, 4226, 4226, 4226, 2145, 2145, 8452, 8484, 8452, 6371, 8452, 8452, 8484, 8452, 8452, 6371, 6339, 6339, 6339, 6371, 6371, 8452, 8452, 8452, 6371, 6371, 6339, 8452, 8484, 8484, 6371, 4226, 4258, 6339, 4226, 4258, 6339, 4226, +2145, 2145, 4226, 4226, 4226, 4226, 2145, 2145, 2145, 10565, 8452, 8452, 8452, 6371, 8452, 8452, 8452, 6371, 8452, 6371, 6339, 6371, 6371, 6371, 8452, 6371, 6371, 6339, 6339, 6371, 6371, 6339, 4226, 4258, 4226, 6339, 6339, 4258, 6339, 4226, +2145, 2145, 2113, 4226, 4226, 4226, 4226, 4226, 2145, 4226, 6339, 6371, 6371, 8452, 8452, 8452, 8452, 8452, 6371, 6371, 6371, 6339, 8452, 8452, 8452, 8452, 8452, 8452, 6371, 6371, 4258, 2145, 4226, 4258, 6339, 4258, 4258, 4226, 4226, 4258, +2145, 2145, 2145, 2145, 2145, 4226, 4226, 4226, 4226, 2145, 2145, 6371, 8484, 8452, 8452, 8452, 8452, 8452, 8452, 6371, 6371, 6371, 8452, 8484, 8452, 8452, 8452, 8484, 8484, 6339, 2145, 2145, 4226, 4226, 4258, 6339, 4226, 2145, 4226, 4226, +2145, 2145, 4226, 4226, 4226, 4258, 4226, 4258, 4258, 4226, 2145, 4226, 6371, 8452, 8452, 6371, 8452, 8452, 8452, 8452, 6339, 8452, 8452, 8452, 8484, 10565, 8452, 8484, 6371, 4226, 4226, 4258, 6339, 6339, 6339, 6339, 4226, 2145, 2145, 4226, +2145, 2145, 2145, 4226, 4226, 6339, 6339, 6339, 4226, 4226, 4226, 2145, 4258, 6339, 8452, 8452, 8452, 8452, 8484, 4258, 2113, 6339, 8452, 8452, 8452, 8484, 8452, 6339, 4258, 4226, 6339, 6339, 6339, 6339, 6339, 6339, 4226, 2145, 2145, 4258, +2145, 4226, 4226, 4226, 4258, 4226, 6371, 6339, 4226, 4226, 4226, 4226, 2145, 4226, 6339, 8452, 8452, 8452, 4258, 32, 0, 2113, 6339, 8484, 10565, 8484, 6339, 4226, 4258, 6339, 6339, 6339, 6339, 4258, 4226, 2145, 4258, 4226, 4226, 4258, +2145, 4226, 4258, 4258, 4226, 4226, 4226, 4258, 6339, 4258, 4226, 2145, 2145, 2145, 4226, 6371, 8452, 4226, 32, 0, 0, 0, 32, 6371, 10565, 8452, 4226, 4226, 4258, 4258, 6339, 6339, 6371, 4226, 2145, 4226, 4226, 4226, 4258, 4226, +32, 2113, 6339, 4258, 4258, 4226, 4226, 4226, 4258, 4258, 4226, 4226, 4226, 4226, 4226, 4226, 4226, 32, 0, 0, 0, 0, 0, 2113, 8452, 6339, 4258, 4226, 4226, 4226, 4258, 6339, 4258, 4258, 4226, 4258, 6339, 4258, 4226, 2113, +0, 0, 2113, 4258, 4258, 4258, 4258, 4226, 2145, 2145, 4226, 4226, 4226, 4258, 4258, 2113, 32, 32, 32, 32, 32, 0, 32, 2113, 2145, 4258, 6371, 6339, 4258, 6339, 4258, 4226, 4258, 8484, 6371, 8452, 8484, 6339, 2113, 0, +0, 0, 0, 2113, 6339, 6339, 4258, 4226, 2145, 2145, 2145, 4226, 6339, 4258, 2145, 32, 32, 32, 32, 32, 0, 0, 32, 32, 2113, 2145, 6339, 8452, 8452, 4258, 4226, 4258, 6339, 8484, 10565, 10597, 8452, 2145, 32, 0, +0, 0, 0, 0, 4258, 6371, 6339, 4226, 4226, 2145, 2145, 4226, 4258, 4226, 32, 0, 32, 32, 32, 32, 0, 32, 0, 32, 32, 32, 2145, 8452, 8452, 4258, 4226, 4226, 4258, 8484, 8452, 8484, 4226, 0, 0, 0, +0, 0, 0, 0, 32, 4226, 4258, 6339, 4226, 4226, 4226, 4226, 2145, 32, 32, 0, 0, 32, 32, 32, 0, 0, 0, 0, 32, 2113, 2113, 2145, 4226, 4226, 4226, 4226, 6339, 6371, 4226, 2145, 32, 0, 0, 0, +}; +#endif /*COLOR_DEPTH == 16*/ + +#if COLOR_DEPTH == 24 +>>>>>>> master const color_int_t img_bg[] = { /*HEADER Width = 40 @@ -535,7 +644,10 @@ const color_int_t img_bg[] = { 100827176, /*IMAGE DATA*/ +<<<<<<< HEAD +======= +>>>>>>> master 263172, 460551, 460551, 526344, 723723, 1447446, 1644825, 1447446, 1447446, 1052688, 1052688, 921102, 1052688, 723723, 263172, 197379, 131586, 65793, 65793, 0, 65793, 0, 65793, 65793, 65793, 65793, 65793, 328965, 789516, 855309, 1250067, 1052688, 1052688, 1184274, 1184274, 986895, 394758, 394758, 394758, 328965, 131586, 460551, 526344, 394758, 1776411, 2631720, 2105376, 1447446, 1250067, 1052688, 855309, 1052688, 1579032, 1250067, 460551, 65793, 65793, 65793, 65793, 65793, 0, 65793, 65793, 0, 0, 0, 328965, 986895, 1184274, 789516, 921102, 1250067, 1052688, 1052688, 1842204, 1644825, 1052688, 328965, 263172, 328965, 394758, 460551, 526344, 1052688, 2434341, 2434341, 2236962, 1907997, 1052688, 855309, 1052688, 1315860, 1381653, 1447446, 855309, 263172, 0, 0, 131586, 131586, 131586, 131586, 131586, 65793, 0, 263172, 855309, 1052688, 1052688, 1052688, 1118481, 921102, 986895, 1052688, 1579032, 1513239, 1513239, 1118481, 394758, 328965, @@ -577,4 +689,6 @@ const color_int_t img_bg[] = { 197379, 197379, 131586, 197379, 1381653, 1973790, 1579032, 1184274, 1052688, 921102, 855309, 1052688, 1447446, 1052688, 328965, 131586, 328965, 460551, 460551, 328965, 131586, 263172, 197379, 328965, 460551, 460551, 921102, 2236962, 2105376, 1447446, 1118481, 1250067, 1513239, 2434341, 2302755, 2565927, 1052688, 131586, 131586, 131586, 197379, 131586, 131586, 131586, 328965, 1052688, 1447446, 1644825, 1250067, 1052688, 1184274, 1052688, 855309, 394758, 263172, 197379, 131586, 263172, 328965, 263172, 197379, 131586, 197379, 197379, 263172, 592137, 657930, 921102, 1118481, 1250067, 1118481, 1118481, 1710618, 1973790, 1250067, 855309, 263172, 131586, 197379, 131586, }; +#endif /*COLOR_DEPTH == 24*/ + #endif /*LV_APP_ENABLE != 0 && USE_LV_APP_BENCHMARK != 0*/ diff --git a/lv_appx/lv_app_wifi.c b/lv_appx/lv_app_wifi.c index 51a91f048..4f61f9ac7 100644 --- a/lv_appx/lv_app_wifi.c +++ b/lv_appx/lv_app_wifi.c @@ -299,7 +299,6 @@ static void wifi_state_monitor_task(void * param) static wifimng_state_t state_prev = WIFIMNG_STATE_WAIT; wifimng_state_t state_act = wifimng_get_state(); - if(state_prev != state_act && state_act == WIFIMNG_STATE_READY) { lv_app_notice_add("WiFi connected to:\n%s\n%s:%s", wifimng_get_last_ssid(), wifimng_get_last_ip(), wifimng_get_last_port()); @@ -316,7 +315,6 @@ static void wifi_state_monitor_task(void * param) wifi_tcp_transf(adata->last_msg_dp, adata->last_msg_size, tcp_transf_cb); } } - state_prev = state_act; } @@ -485,7 +483,6 @@ static void tcp_transf_cb(wifi_state_t state, const char * txt) lv_app_notice_add("Reconnecting to WiFi..."); wifimng_reconnect(); } - } @@ -501,6 +498,7 @@ static void win_title_refr(void) lv_label_set_text(wdata->title, "Not connected"); } else if(wifimng_get_state() == WIFIMNG_STATE_READY) { + char buf[256]; sprintf(buf, "%s - %s:%s", wifimng_get_last_ssid(), wifimng_get_last_ip(), wifimng_get_last_port()); lv_label_set_text(wdata->title, buf); @@ -508,6 +506,7 @@ static void win_title_refr(void) else { lv_label_set_text(wdata->title, "Connecting ..."); } + lv_obj_set_width(wdata->title, lv_win_get_width(app->win)); } app = lv_app_get_next(app, &my_app_dsc);