去掉预览界面长按下键生成二维码功能, 添加emmc满显示
This commit is contained in:
parent
ad2f09213a
commit
1521f59107
|
@ -74,6 +74,7 @@ static BOOL g_SysStrg_Chg = true;
|
||||||
//#NT#2023/11/21#Eric - end
|
//#NT#2023/11/21#Eric - end
|
||||||
|
|
||||||
static int cnt = 0;
|
static int cnt = 0;
|
||||||
|
static int first_check_storage = 1;
|
||||||
|
|
||||||
#define FREE_SIZE_MB 30
|
#define FREE_SIZE_MB 30
|
||||||
|
|
||||||
|
@ -694,49 +695,51 @@ static void update_storage_sd_card(void)
|
||||||
{
|
{
|
||||||
const int storageType = get_storage_type();
|
const int storageType = get_storage_type();
|
||||||
const UINT32 cardStatus = System_GetState(SYS_STATE_CARD);
|
const UINT32 cardStatus = System_GetState(SYS_STATE_CARD);
|
||||||
|
UINT64 diskSize = 0;
|
||||||
if (MMC_DEV_SD == storageType && cardStatus == CARD_REMOVED)
|
UINT64 diskFree = 0;
|
||||||
|
if (MMC_DEV_NO == storageType)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// if (cardStatus != CARD_REMOVED)
|
else if (MMC_DEV_SD == storageType)
|
||||||
{
|
{
|
||||||
|
if (cardStatus == CARD_REMOVED)
|
||||||
if (UIStorageCheck(STORAGE_CHECK_ERROR, NULL) == TRUE)
|
|
||||||
{
|
{
|
||||||
// if(UIStorageCheck_DCIMWritable() == FALSE){
|
return;
|
||||||
// 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");
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UIStorageCheck(STORAGE_CHECK_FULL, &g_uiFreePicNum);
|
diskSize = FileSys_GetDiskInfoEx('A', FST_INFO_DISK_SIZE);
|
||||||
set_normal_label_text(label_6_scr_uiflowphoto);
|
diskFree = FileSys_GetDiskInfoEx('A', FST_INFO_FREE_SPACE);
|
||||||
lv_label_set_text(label_6_scr_uiflowphoto, Get_FreePicNumString(g_uiFreePicNum));
|
if (0 == diskSize)
|
||||||
lv_label_set_text(label_6_scr_uiflowphoto, Get_FreePicNumString(g_uiFreePicNum));
|
{
|
||||||
set_normal_label_text(label_6_scr_uiflowphoto);
|
return;/*sd card error*/
|
||||||
lv_label_set_text(label_6_scr_uiflowphoto, Get_FreePicNumString(g_uiFreePicNum));
|
}
|
||||||
set_normal_label_text(label_6_scr_uiflowphoto);
|
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
|
UIStorageCheck(STORAGE_CHECK_FULL, &g_uiFreePicNum);
|
||||||
// {
|
set_normal_label_text(label_6_scr_uiflowphoto);
|
||||||
// set_warning_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, "No SD Card");
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int check_sd_size(UINT64 diskSize)
|
unsigned int check_sd_size(UINT64 diskSize)
|
||||||
{
|
{
|
||||||
// printf("========================================= %llu\n", diskSize);
|
// printf("========================================= %llu\n", diskSize);
|
||||||
|
@ -862,11 +865,23 @@ static void update_emmc_status(lv_obj_t* obj)
|
||||||
|
|
||||||
static void update_storage_message(void)
|
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)
|
if (g_SysStrg_Chg)
|
||||||
{
|
{
|
||||||
set_normal_label_text(label_6_scr_uiflowphoto);
|
set_normal_label_text(label_6_scr_uiflowphoto);
|
||||||
|
if (cnt < 3){
|
||||||
if(cnt<3){
|
printf("[================%d================]\n", cnt);
|
||||||
cnt++;
|
cnt++;
|
||||||
set_normal_label_text(label_6_scr_uiflowphoto);
|
set_normal_label_text(label_6_scr_uiflowphoto);
|
||||||
//lv_label_set_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;
|
g_SysStrg_Chg = false;
|
||||||
cnt = 0;
|
cnt = 0;
|
||||||
|
first_check_storage = 0;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (MMC_DEV_SD == get_storage_type())
|
if (MMC_DEV_SD == get_storage_type())
|
||||||
{
|
{
|
||||||
//printf("[%s]SD storage\n", __FUNCTION__);
|
//printf("[%s]SD storage\n", __FUNCTION__);
|
||||||
|
@ -888,15 +906,28 @@ static void update_storage_message(void)
|
||||||
else if (MMC_DEV_EMMC == get_storage_type())
|
else if (MMC_DEV_EMMC == get_storage_type())
|
||||||
{
|
{
|
||||||
//printf("[%s]EMMC storage\n", __FUNCTION__);
|
//printf("[%s]EMMC storage\n", __FUNCTION__);
|
||||||
update_emmc_status(image_8_scr_uiflowphoto);
|
|
||||||
update_sd_card_status(image_9_scr_uiflowphoto);
|
update_sd_card_status(image_9_scr_uiflowphoto);
|
||||||
|
update_emmc_status(image_8_scr_uiflowphoto);
|
||||||
update_storage_sd_card();
|
update_storage_sd_card();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//printf("[%s]NO EMMC NO SD\n", __FUNCTION__);
|
//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);
|
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)
|
if (CARD_REMOVED == cardStatus)
|
||||||
{
|
{
|
||||||
lv_plugin_img_set_src(image_9_scr_uiflowphoto, LV_PLUGIN_IMG_ID_SF_SD_NO);
|
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);
|
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:
|
case NVTEVT_STORAGE_CHANGE:
|
||||||
//#NT#2023/11/21#Eric - begin
|
//#NT#2023/11/21#Eric - begin
|
||||||
//#NT#Support IVOT_N12144_CO-148_1120_4
|
//#NT#Support IVOT_N12144_CO-148_1120_4
|
||||||
//g_SysStrg_Chg = true;
|
g_SysStrg_Chg = true;
|
||||||
//#NT#2023/11/21#Eric - end
|
//#NT#2023/11/21#Eric - end
|
||||||
UIFlowPhoto_OnStorageChange(obj, msg);
|
UIFlowPhoto_OnStorageChange(obj, msg);
|
||||||
break;
|
break;
|
||||||
|
@ -2241,12 +2271,12 @@ void UIFlowPhtot_KeyLongPress(lv_obj_t* obj, uint32_t key)
|
||||||
{
|
{
|
||||||
// g_preview_info_ishidden = false;
|
// g_preview_info_ishidden = false;
|
||||||
KeyDownPressingTimeMs += LONG_PRESS_INTERVAL;
|
KeyDownPressingTimeMs += LONG_PRESS_INTERVAL;
|
||||||
if (5 * 1000 <= KeyDownPressingTimeMs)
|
// if (5 * 1000 <= KeyDownPressingTimeMs)
|
||||||
{
|
// {
|
||||||
sf_send_message_to_create_qrcode();
|
// sf_send_message_to_create_qrcode();
|
||||||
sf_save_camera_info();
|
// sf_save_camera_info();
|
||||||
KeyDownPressingTimeMs = 0;
|
// KeyDownPressingTimeMs = 0;
|
||||||
}
|
// }
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user