Fixed bugs.

This commit is contained in:
xiaojiazhu 2023-11-23 11:48:12 +08:00
parent a5205f8f17
commit 9b5295f7be
2 changed files with 6 additions and 5 deletions

View File

@ -47,7 +47,7 @@ static CHAR g_cSelftimerCntStr[8] = {0};
static lv_group_t* gp = NULL;
static lv_task_t* task_selftimer = NULL;
static lv_task_t* update_icons_timer = NULL;
#define GO_TO_WORK_MODE_TIME 160
#define GO_TO_WORK_MODE_TIME 157
#define PASSWORD_GO_TO_WORK_MODE_TIME_S 62
static unsigned int ShutDownTime = GO_TO_WORK_MODE_TIME;
static lv_task_t* task_qview = NULL;

View File

@ -1,5 +1,6 @@
#include "PrjInc.h"
#include "UIFlowLVGL/UIFlowWrnMsg/UIFlowWrnMsgAPI.h"
#include "UIFlowLVGL/UIFlowClose/UIFlowCloseEventCallback.h"
#include "UIFlowLVGL/UIFlowLVGL.h"
#include <kwrap/debug.h>
#include "sf_sd_common.h"
@ -49,10 +50,11 @@ static void task_msgbox_timer_cb(lv_task_t* task)
{
lv_msgbox_start_auto_close(msgbox, 0);
}
OpenClosingScreen();
return;
}
if(string){
snprintf(buf, BUF_LENGTH, "%s (%ds)\r\n", string->ptr, autoClose/1000);
snprintf(buf, BUF_LENGTH, "%s\n\n(%ds)\r\n", string->ptr, autoClose/1000);
// lv_msgbox_set_text(msgbox, buf);
lv_label_set_text_fmt(label_msg_scr_uiflowwrnmsg, "%s", buf);
}
@ -121,7 +123,7 @@ void UIFlowWrnMsgAPI_Open_StringID(lv_plugin_res_id id, uint16_t auto_close_time
{
#define BUF_LENGTH 256
char buf[BUF_LENGTH] = {0};
snprintf(buf, BUF_LENGTH, "%s (%ds)\r\n", tmpstr1->ptr, autoClose/1000);
snprintf(buf, BUF_LENGTH, "%s\n\n(%ds)\r\n", tmpstr1->ptr, autoClose/1000);
lv_label_set_text_fmt(label_msg_scr_uiflowwrnmsg, "%s", buf);
}
else
@ -129,8 +131,7 @@ void UIFlowWrnMsgAPI_Open_StringID(lv_plugin_res_id id, uint16_t auto_close_time
lv_label_set_text_fmt(label_msg_scr_uiflowwrnmsg, "%s", tmpstr1->ptr);
}
lv_obj_align(label_msg_scr_uiflowwrnmsg, button_msg_bg_scr_uiflowwrnmsg, 0, 0, 0);
if((msgID == LV_PLUGIN_STRING_ID_STRID_MEMORYERROR)|| \
(msgID == LV_PLUGIN_STRING_ID_STRID_NO_IMAGE))
// if((msgID == LV_PLUGIN_STRING_ID_STRID_MEMORYERROR)|| (msgID == LV_PLUGIN_STRING_ID_STRID_NO_IMAGE))
{//* short font need change align*/
lv_label_set_align(label_msg_scr_uiflowwrnmsg, LV_LABEL_ALIGN_CENTER);
}