From 219af3079fd83dcbbf568d60c22c72fb0e08c9f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E5=90=83=E6=B2=B9=E7=82=B8=E9=B8=A1?= <1425962791@qq.com> Date: Wed, 26 Nov 2025 20:06:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=BC=80=E6=9C=BA=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E5=8A=A8=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Power_Pico/User/GUI/screens/ui_StartPage.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/Power_Pico/User/GUI/screens/ui_StartPage.c b/Power_Pico/User/GUI/screens/ui_StartPage.c index 2ba996a..66f1d0f 100644 --- a/Power_Pico/User/GUI/screens/ui_StartPage.c +++ b/Power_Pico/User/GUI/screens/ui_StartPage.c @@ -14,18 +14,24 @@ static lv_obj_t * ui_Button1 = NULL; static lv_obj_t * ui_Button2 = NULL; static lv_obj_t * ui_Button3 = NULL; static lv_obj_t * ui_Button4 = NULL; + +static lv_timer_t * _flush_timer = NULL; + // event funtions +static void ui_startpage_timer_cb(lv_timer_t * timer) +{ + ui_full_screen_refresh(ui_StartPage); +} + // build funtions -static void _ui_StartPage_btn_animation(void) { - +static void _ui_StartPage_btn_animation(void) +{ lv_lib_anim_user_animation(ui_Button1, 0, 600, 50, 20, 0, 600, 0, LV_ANIM_REPEAT_INFINITE, lv_anim_path_ease_in_out, lv_lib_anim_callback_set_hight, NULL); lv_lib_anim_user_animation(ui_Button2, 200, 600, 50, 20, 0, 600, 0, LV_ANIM_REPEAT_INFINITE, lv_anim_path_ease_in_out, lv_lib_anim_callback_set_hight, NULL); lv_lib_anim_user_animation(ui_Button3, 400, 600, 50, 20, 0, 600, 0, LV_ANIM_REPEAT_INFINITE, lv_anim_path_ease_in_out, lv_lib_anim_callback_set_hight, NULL); lv_lib_anim_user_animation(ui_Button4, 600, 600, 50, 20, 0, 600, 0, LV_ANIM_REPEAT_INFINITE, lv_anim_path_ease_in_out, lv_lib_anim_callback_set_hight, NULL); - - } void ui_StartPage_screen_init(void) @@ -121,6 +127,7 @@ void ui_StartPage_screen_init(void) lv_obj_set_style_bg_opa(ui_Button4, 255, LV_PART_MAIN | LV_STATE_DEFAULT); _ui_StartPage_btn_animation(); + _flush_timer = lv_timer_create(ui_startpage_timer_cb, 500, NULL); } @@ -128,6 +135,8 @@ void ui_StartPage_screen_destroy(void) { if(ui_StartPage) lv_obj_del(ui_StartPage); + lv_timer_del(_flush_timer); + // NULL screen variables ui_StartPage = NULL; ui_Panel1 = NULL;