1.sd卡和UI显示的代码优化
This commit is contained in:
parent
3791d1bf87
commit
89892c2012
|
@ -285,6 +285,15 @@ static void update_camera_message(void)
|
||||||
// if((puiPara->CamMode == SF_CAM_MODE_PHOTO) || (puiPara->CamMode == SF_CAM_MODE_PHOTO_VIDEO))
|
// if((puiPara->CamMode == SF_CAM_MODE_PHOTO) || (puiPara->CamMode == SF_CAM_MODE_PHOTO_VIDEO))
|
||||||
switch (puiPara->ImgSize)
|
switch (puiPara->ImgSize)
|
||||||
{
|
{
|
||||||
|
case PHOTO_SIZE_40M:
|
||||||
|
lv_label_set_text(label_5_scr_uiflowmovie, "40M");
|
||||||
|
break;
|
||||||
|
case PHOTO_SIZE_32M:
|
||||||
|
lv_label_set_text(label_5_scr_uiflowmovie, "32M");
|
||||||
|
break;
|
||||||
|
case PHOTO_SIZE_24M:
|
||||||
|
lv_label_set_text(label_5_scr_uiflowmovie, "24M");
|
||||||
|
break;
|
||||||
case PHOTO_SIZE_16M:
|
case PHOTO_SIZE_16M:
|
||||||
lv_label_set_text(label_5_scr_uiflowmovie, "16M");
|
lv_label_set_text(label_5_scr_uiflowmovie, "16M");
|
||||||
break;
|
break;
|
||||||
|
@ -294,30 +303,41 @@ static void update_camera_message(void)
|
||||||
case PHOTO_SIZE_8M:
|
case PHOTO_SIZE_8M:
|
||||||
lv_label_set_text(label_5_scr_uiflowmovie, "8M");
|
lv_label_set_text(label_5_scr_uiflowmovie, "8M");
|
||||||
break;
|
break;
|
||||||
|
case PHOTO_SIZE_5M:
|
||||||
|
lv_label_set_text(label_5_scr_uiflowmovie, "5M");
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
switch (puiPara->Multishot)
|
switch (puiPara->Multishot)
|
||||||
{
|
{
|
||||||
case 1:
|
case CONTINUE_SHOT_OFF:
|
||||||
lv_label_set_text(label_4_scr_uiflowmovie, "1P");
|
lv_label_set_text(label_4_scr_uiflowmovie, "1P");
|
||||||
break;
|
break;
|
||||||
case 2:
|
case CONTINUE_SHOT_BURST_2:
|
||||||
lv_label_set_text(label_4_scr_uiflowmovie, "2P");
|
lv_label_set_text(label_4_scr_uiflowmovie, "2P");
|
||||||
break;
|
break;
|
||||||
case 3:
|
case CONTINUE_SHOT_BURST_3:
|
||||||
lv_label_set_text(label_4_scr_uiflowmovie, "3P");
|
lv_label_set_text(label_4_scr_uiflowmovie, "3P");
|
||||||
break;
|
break;
|
||||||
|
case CONTINUE_SHOT_BURST_4:
|
||||||
|
lv_label_set_text(label_4_scr_uiflowmovie, "4P");
|
||||||
|
break;
|
||||||
|
case CONTINUE_SHOT_BURST_5:
|
||||||
|
lv_label_set_text(label_4_scr_uiflowmovie, "5P");
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
UINT32 freePicNum = 0;
|
UINT32 freePicNum = 0;
|
||||||
// PhotoExe_GetTotalPicNum();
|
// PhotoExe_GetTotalPicNum();
|
||||||
|
UINT32 cardStatus = System_GetState(SYS_STATE_CARD);
|
||||||
|
|
||||||
|
if (cardStatus != CARD_REMOVED)
|
||||||
|
{
|
||||||
if (UIStorageCheck(STORAGE_CHECK_ERROR, NULL) == TRUE)
|
if (UIStorageCheck(STORAGE_CHECK_ERROR, NULL) == TRUE)
|
||||||
{
|
{
|
||||||
lv_label_set_text(label_6_scr_uiflowmovie, "NO SD CARD");
|
lv_label_set_text(label_6_scr_uiflowmovie, "SD CARD ERROR");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -325,6 +345,11 @@ static void update_camera_message(void)
|
||||||
lv_label_set_text(label_6_scr_uiflowmovie, Get_FreePicNumString(freePicNum));
|
lv_label_set_text(label_6_scr_uiflowmovie, Get_FreePicNumString(freePicNum));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lv_label_set_text(label_6_scr_uiflowmovie, "NO SD CARD");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void update_rec_time(void)
|
static void update_rec_time(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -141,6 +141,10 @@ static void update_quality(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void update_free_pic_number(void)
|
static void update_free_pic_number(void)
|
||||||
|
{
|
||||||
|
UINT32 cardStatus = System_GetState(SYS_STATE_CARD);
|
||||||
|
|
||||||
|
if (cardStatus != CARD_REMOVED)
|
||||||
{
|
{
|
||||||
if(g_PhotoBgInitFileSys == TRUE){
|
if(g_PhotoBgInitFileSys == TRUE){
|
||||||
#if (FS_FUNC == ENABLE)
|
#if (FS_FUNC == ENABLE)
|
||||||
|
@ -151,6 +155,7 @@ static void update_free_pic_number(void)
|
||||||
lv_label_set_text_fmt(label_free_pic_scr_uiflowphoto, "Check free space ...");
|
lv_label_set_text_fmt(label_free_pic_scr_uiflowphoto, "Check free space ...");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void update_card(void)
|
static void update_card(void)
|
||||||
{
|
{
|
||||||
|
@ -406,39 +411,60 @@ static void update_camera_message(void)
|
||||||
{
|
{
|
||||||
UIMenuStoreInfo *puiPara = sf_ui_para_get();
|
UIMenuStoreInfo *puiPara = sf_ui_para_get();
|
||||||
// if((puiPara->CamMode == SF_CAM_MODE_PHOTO) || (puiPara->CamMode == SF_CAM_MODE_PHOTO_VIDEO))
|
// if((puiPara->CamMode == SF_CAM_MODE_PHOTO) || (puiPara->CamMode == SF_CAM_MODE_PHOTO_VIDEO))
|
||||||
|
|
||||||
switch (puiPara->ImgSize)
|
switch (puiPara->ImgSize)
|
||||||
{
|
{
|
||||||
|
case PHOTO_SIZE_40M:
|
||||||
|
lv_label_set_text(label_4_scr_uiflowphoto, "40M");
|
||||||
|
break;
|
||||||
|
case PHOTO_SIZE_32M:
|
||||||
|
lv_label_set_text(label_4_scr_uiflowphoto, "32M");
|
||||||
|
break;
|
||||||
|
case PHOTO_SIZE_24M:
|
||||||
|
lv_label_set_text(label_4_scr_uiflowphoto, "24M");
|
||||||
|
break;
|
||||||
case PHOTO_SIZE_16M:
|
case PHOTO_SIZE_16M:
|
||||||
lv_label_set_text(label_5_scr_uiflowphoto, "16M");
|
lv_label_set_text(label_4_scr_uiflowphoto, "16M");
|
||||||
break;
|
break;
|
||||||
case PHOTO_SIZE_12M:
|
case PHOTO_SIZE_12M:
|
||||||
lv_label_set_text(label_5_scr_uiflowphoto, "12M");
|
lv_label_set_text(label_4_scr_uiflowphoto, "12M");
|
||||||
break;
|
break;
|
||||||
case PHOTO_SIZE_8M:
|
case PHOTO_SIZE_8M:
|
||||||
lv_label_set_text(label_5_scr_uiflowphoto, "8M");
|
lv_label_set_text(label_4_scr_uiflowphoto, "8M");
|
||||||
|
break;
|
||||||
|
case PHOTO_SIZE_5M:
|
||||||
|
lv_label_set_text(label_4_scr_uiflowphoto, "5M");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
switch (puiPara->Multishot)
|
switch (puiPara->Multishot)
|
||||||
{
|
{
|
||||||
case 1:
|
case CONTINUE_SHOT_OFF:
|
||||||
lv_label_set_text(label_4_scr_uiflowphoto, "1P");
|
lv_label_set_text(label_4_scr_uiflowphoto, "1P");
|
||||||
break;
|
break;
|
||||||
case 2:
|
case CONTINUE_SHOT_BURST_2:
|
||||||
lv_label_set_text(label_4_scr_uiflowphoto, "2P");
|
lv_label_set_text(label_4_scr_uiflowphoto, "2P");
|
||||||
break;
|
break;
|
||||||
case 3:
|
case CONTINUE_SHOT_BURST_3:
|
||||||
lv_label_set_text(label_4_scr_uiflowphoto, "3P");
|
lv_label_set_text(label_4_scr_uiflowphoto, "3P");
|
||||||
break;
|
break;
|
||||||
|
case CONTINUE_SHOT_BURST_4:
|
||||||
|
lv_label_set_text(label_4_scr_uiflowphoto, "4P");
|
||||||
|
break;
|
||||||
|
case CONTINUE_SHOT_BURST_5:
|
||||||
|
lv_label_set_text(label_4_scr_uiflowphoto, "5P");
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
UINT32 cardStatus = System_GetState(SYS_STATE_CARD);
|
||||||
|
|
||||||
|
if (cardStatus != CARD_REMOVED)
|
||||||
|
{
|
||||||
if (UIStorageCheck(STORAGE_CHECK_ERROR, NULL) == TRUE)
|
if (UIStorageCheck(STORAGE_CHECK_ERROR, NULL) == TRUE)
|
||||||
{
|
{
|
||||||
lv_label_set_text(label_6_scr_uiflowphoto, "NO SD CARD");
|
lv_label_set_text(label_6_scr_uiflowphoto, "SD CARD ERROR");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -446,6 +472,11 @@ static void update_camera_message(void)
|
||||||
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
|
||||||
|
{
|
||||||
|
lv_label_set_text(label_6_scr_uiflowphoto, "NO SD CARD");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void update_wifi(void)
|
static void update_wifi(void)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user