Fixed bug about images message.

This commit is contained in:
xiaojiazhu 2023-11-17 15:41:47 +08:00
parent 16a0071368
commit 2ebbd47d4b
2 changed files with 9 additions and 3 deletions

View File

@ -495,11 +495,14 @@ static void update_camera_message(void)
lv_label_set_text(label_6_scr_uiflowphoto, "SD FULL"); lv_label_set_text(label_6_scr_uiflowphoto, "SD FULL");
} }
else else
{
if (FALSE == sf_get_cap_statu())
{ {
UIStorageCheck(STORAGE_CHECK_FULL, &g_uiFreePicNum); UIStorageCheck(STORAGE_CHECK_FULL, &g_uiFreePicNum);
lv_label_set_text(label_6_scr_uiflowphoto, Get_FreePicNumString(g_uiFreePicNum)); lv_label_set_text(label_6_scr_uiflowphoto, Get_FreePicNumString(g_uiFreePicNum));
} }
} }
}
else else
{ {
lv_label_set_text(label_6_scr_uiflowphoto, "NO SD CARD"); lv_label_set_text(label_6_scr_uiflowphoto, "NO SD CARD");

View File

@ -6,6 +6,7 @@
#include "UIFlowLVGL/UIFlowWrnMsg/UIFlowWrnMsgAPI.h" #include "UIFlowLVGL/UIFlowWrnMsg/UIFlowWrnMsgAPI.h"
#include "ImageApp/ImageApp_Photo.h" #include "ImageApp/ImageApp_Photo.h"
#include "DCF.h"
#define THIS_DBGLVL 2 // 0=FATAL, 1=ERR, 2=WRN, 3=UNIT, 4=FUNC, 5=IND, 6=MSG, 7=VALUE, 8=USER #define THIS_DBGLVL 2 // 0=FATAL, 1=ERR, 2=WRN, 3=UNIT, 4=FUNC, 5=IND, 6=MSG, 7=VALUE, 8=USER
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#define __MODULE__ UIFlowPhotoFunc #define __MODULE__ UIFlowPhotoFunc
@ -22,7 +23,9 @@ extern void UIFlowPhoto_update_selftimer_cnt(UINT32 time);
CHAR *Get_FreePicNumString(UINT32 uiValue) CHAR *Get_FreePicNumString(UINT32 uiValue)
{ {
snprintf(g_cFreePicNumStr, sizeof(g_cFreePicNumStr), "%05ld/%05ld", uiValue, PhotoExe_GetTotalPicNum()); unsigned long fileCount = 0;
fileCount = DCF_GetDBInfo(DCF_INFO_TOL_FILE_COUNT);
snprintf(g_cFreePicNumStr, sizeof(g_cFreePicNumStr), "%05ld/%05ld", fileCount, uiValue);
return g_cFreePicNumStr; return g_cFreePicNumStr;
} }