去掉预览界面长按下键生成二维码功能, 添加emmc满显示

This commit is contained in:
xiehongyan 2024-01-11 16:23:24 +08:00
parent ad2f09213a
commit 1521f59107

View File

@ -74,6 +74,7 @@ static BOOL g_SysStrg_Chg = true;
//#NT#2023/11/21#Eric - end
static int cnt = 0;
static int first_check_storage = 1;
#define FREE_SIZE_MB 30
@ -694,49 +695,51 @@ static void update_storage_sd_card(void)
{
const int storageType = get_storage_type();
const UINT32 cardStatus = System_GetState(SYS_STATE_CARD);
if (MMC_DEV_SD == storageType && cardStatus == CARD_REMOVED)
UINT64 diskSize = 0;
UINT64 diskFree = 0;
if (MMC_DEV_NO == storageType)
{
return;
}
// if (cardStatus != CARD_REMOVED)
else if (MMC_DEV_SD == storageType)
{
if (UIStorageCheck(STORAGE_CHECK_ERROR, NULL) == TRUE)
if (cardStatus == CARD_REMOVED)
{
// if(UIStorageCheck_DCIMWritable() == FALSE){
// set_warning_label_text(label_6_scr_uiflowphoto);
// lv_label_set_text(label_6_scr_uiflowphoto, "SD Card Error");
// }
}
else if (UIStorageCheck(STORAGE_CHECK_FULL, NULL) == TRUE)
{
//set_warning_label_text(label_6_scr_uiflowphoto);
//lv_label_set_text(label_6_scr_uiflowphoto, "SD Card FULL");
return;
}
else
{
UIStorageCheck(STORAGE_CHECK_FULL, &g_uiFreePicNum);
set_normal_label_text(label_6_scr_uiflowphoto);
lv_label_set_text(label_6_scr_uiflowphoto, Get_FreePicNumString(g_uiFreePicNum));
lv_label_set_text(label_6_scr_uiflowphoto, Get_FreePicNumString(g_uiFreePicNum));
set_normal_label_text(label_6_scr_uiflowphoto);
lv_label_set_text(label_6_scr_uiflowphoto, Get_FreePicNumString(g_uiFreePicNum));
set_normal_label_text(label_6_scr_uiflowphoto);
diskSize = FileSys_GetDiskInfoEx('A', FST_INFO_DISK_SIZE);
diskFree = FileSys_GetDiskInfoEx('A', FST_INFO_FREE_SPACE);
if (0 == diskSize)
{
return;/*sd card error*/
}
if (diskFree < (FREE_SIZE_MB*1024*1024))
{
return;/*sd card full*/
}
}
}
else if (MMC_DEV_EMMC == storageType)
{
diskSize = FileSys_GetDiskInfoEx('B', FST_INFO_DISK_SIZE);
diskFree = FileSys_GetDiskInfoEx('B', FST_INFO_FREE_SPACE);
if (0 == diskSize)
{
return;/*emmc error*/
}
if (diskFree < (FREE_SIZE_MB*1024*1024))
{
return;/*emmc full*/
}
}
// else
// {
// set_warning_label_text(label_6_scr_uiflowphoto);
// lv_label_set_text(label_6_scr_uiflowphoto, "No SD Card");
// }
// else
// {
// set_warning_label_text(label_6_scr_uiflowphoto);
// lv_label_set_text(label_6_scr_uiflowphoto, "No SD Card");
// }
UIStorageCheck(STORAGE_CHECK_FULL, &g_uiFreePicNum);
set_normal_label_text(label_6_scr_uiflowphoto);
lv_label_set_text(label_6_scr_uiflowphoto, Get_FreePicNumString(g_uiFreePicNum));
}
unsigned int check_sd_size(UINT64 diskSize)
{
// printf("========================================= %llu\n", diskSize);
@ -862,11 +865,23 @@ static void update_emmc_status(lv_obj_t* obj)
static void update_storage_message(void)
{
if (1 == first_check_storage)
{
first_check_storage = 0;
}
else
{
if (0 == cnt)
{
cnt = 2;
}
}
if (g_SysStrg_Chg)
{
set_normal_label_text(label_6_scr_uiflowphoto);
if(cnt<3){
if (cnt < 3){
printf("[================%d================]\n", cnt);
cnt++;
set_normal_label_text(label_6_scr_uiflowphoto);
//lv_label_set_text(label_6_scr_uiflowphoto, "");
@ -875,9 +890,12 @@ static void update_storage_message(void)
{
g_SysStrg_Chg = false;
cnt = 0;
first_check_storage = 0;
}
return;
}
if (MMC_DEV_SD == get_storage_type())
{
//printf("[%s]SD storage\n", __FUNCTION__);
@ -888,15 +906,28 @@ static void update_storage_message(void)
else if (MMC_DEV_EMMC == get_storage_type())
{
//printf("[%s]EMMC storage\n", __FUNCTION__);
update_emmc_status(image_8_scr_uiflowphoto);
update_sd_card_status(image_9_scr_uiflowphoto);
update_emmc_status(image_8_scr_uiflowphoto);
update_storage_sd_card();
}
else
{
//printf("[%s]NO EMMC NO SD\n", __FUNCTION__);
lv_plugin_img_set_src(image_8_scr_uiflowphoto, LV_PLUGIN_IMG_ID_SF_SD_EMMC_DIS);
const UINT32 cardStatus = System_GetState(SYS_STATE_CARD);
UINT64 diskSize = FileSys_GetDiskInfoEx('B', FST_INFO_DISK_SIZE);
if(0 == diskSize)
{
lv_plugin_img_set_src(image_8_scr_uiflowphoto, LV_PLUGIN_IMG_ID_SF_SD_EMMC_DIS);
set_warning_label_text(label_6_scr_uiflowphoto);
lv_label_set_text(label_6_scr_uiflowphoto, "EMMC Error");
}
else
{
lv_plugin_img_set_src(image_8_scr_uiflowphoto, LV_PLUGIN_IMG_ID_SF_EMMC_FULL);
set_warning_label_text(label_6_scr_uiflowphoto);
lv_label_set_text(label_6_scr_uiflowphoto, "EMMC FULL");
}
if (CARD_REMOVED == cardStatus)
{
lv_plugin_img_set_src(image_9_scr_uiflowphoto, LV_PLUGIN_IMG_ID_SF_SD_NO);
@ -905,8 +936,7 @@ static void update_storage_message(void)
{
lv_plugin_img_set_src(image_9_scr_uiflowphoto, LV_PLUGIN_IMG_ID_SF_SD_DIS);
}
set_warning_label_text(label_6_scr_uiflowphoto);
lv_label_set_text(label_6_scr_uiflowphoto, "EMMC Error");
}
@ -2023,7 +2053,7 @@ static void UIFlowPhoto_NVTMSG(lv_obj_t* obj, const LV_USER_EVENT_NVTMSG_DATA* m
case NVTEVT_STORAGE_CHANGE:
//#NT#2023/11/21#Eric - begin
//#NT#Support IVOT_N12144_CO-148_1120_4
//g_SysStrg_Chg = true;
g_SysStrg_Chg = true;
//#NT#2023/11/21#Eric - end
UIFlowPhoto_OnStorageChange(obj, msg);
break;
@ -2241,12 +2271,12 @@ void UIFlowPhtot_KeyLongPress(lv_obj_t* obj, uint32_t key)
{
// g_preview_info_ishidden = false;
KeyDownPressingTimeMs += LONG_PRESS_INTERVAL;
if (5 * 1000 <= KeyDownPressingTimeMs)
{
sf_send_message_to_create_qrcode();
sf_save_camera_info();
KeyDownPressingTimeMs = 0;
}
// if (5 * 1000 <= KeyDownPressingTimeMs)
// {
// sf_send_message_to_create_qrcode();
// sf_save_camera_info();
// KeyDownPressingTimeMs = 0;
// }
break;
}
default: