From 554913e7a83c05d2b9934f0d254f43135bb2ce65 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: Sat, 6 Dec 2025 16:35:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=96=E7=BD=AE=E4=B8=80=E4=B8=AA=E5=85=A8?= =?UTF-8?q?=E5=B1=80UI=E5=AE=9A=E6=97=B6=E5=99=A8=EF=BC=8C=E5=AE=9A?= =?UTF-8?q?=E6=97=B6=E5=85=A8=E5=88=B7=E6=96=B0LCD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Power_Pico/User/GUI/screens/ui_mainPage.c | 8 -------- Power_Pico/User/GUI/ui.c | 3 ++- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/Power_Pico/User/GUI/screens/ui_mainPage.c b/Power_Pico/User/GUI/screens/ui_mainPage.c index 8f0282a..18892a1 100644 --- a/Power_Pico/User/GUI/screens/ui_mainPage.c +++ b/Power_Pico/User/GUI/screens/ui_mainPage.c @@ -21,8 +21,6 @@ static lv_obj_t * ui_ButTime = NULL; static lv_obj_t * ui_LabelTime = NULL; static lv_timer_t * _flush_timer = NULL; -static uint8_t timecount = 0; - // other funtions #include "key.h" @@ -130,11 +128,6 @@ static void set_val_cur_label(float voltage, float current) static void _flush_timer_cb() { - timecount++; - if(timecount >= 2) { // 1s - timecount = 0; - ui_full_screen_refresh(ui_HomeScreen); - } float voltage = 0.0; float current = 0.0; current = ui_get_current(); @@ -264,6 +257,5 @@ void ui_main_screen_init(void) void ui_main_screen_destroy(void) { - timecount = 0; lv_timer_delete(_flush_timer); } diff --git a/Power_Pico/User/GUI/ui.c b/Power_Pico/User/GUI/ui.c index 2618a53..123fb8f 100644 --- a/Power_Pico/User/GUI/ui.c +++ b/Power_Pico/User/GUI/ui.c @@ -54,7 +54,8 @@ Page_t pages[] = { */ static void main_timer_cb(lv_timer_t * timer) { - // do nothing + // 1s 刷新一次全屏,防止有时候不知什么原因的LCD刷新错误(需要后续找到问题从根本解决) + ui_full_screen_refresh(ui_HomeScreen); } ////////////////////////// Animation //////////////////////