From 89892c20122c0424112aff4911b7513077375128 Mon Sep 17 00:00:00 2001 From: payton Date: Tue, 31 Oct 2023 16:10:00 +0800 Subject: [PATCH] =?UTF-8?q?1.sd=E5=8D=A1=E5=92=8CUI=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E7=9A=84=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UIFlowMovie/UIFlowMovieEventCallback.c | 91 +++++++++----- .../UIFlowPhoto/UIFlowPhotoEventCallback.c | 117 +++++++++++------- 2 files changed, 132 insertions(+), 76 deletions(-) diff --git a/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowMovie/UIFlowMovieEventCallback.c b/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowMovie/UIFlowMovieEventCallback.c index 9a428d7a7..6f97d7386 100755 --- a/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowMovie/UIFlowMovieEventCallback.c +++ b/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowMovie/UIFlowMovieEventCallback.c @@ -285,45 +285,70 @@ static void update_camera_message(void) // if((puiPara->CamMode == SF_CAM_MODE_PHOTO) || (puiPara->CamMode == SF_CAM_MODE_PHOTO_VIDEO)) switch (puiPara->ImgSize) { - case PHOTO_SIZE_16M: - lv_label_set_text(label_5_scr_uiflowmovie, "16M"); - break; - case PHOTO_SIZE_12M: - lv_label_set_text(label_5_scr_uiflowmovie, "12M"); - break; - case PHOTO_SIZE_8M: - lv_label_set_text(label_5_scr_uiflowmovie, "8M"); - break; - - default: - break; + 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: + lv_label_set_text(label_5_scr_uiflowmovie, "16M"); + break; + case PHOTO_SIZE_12M: + lv_label_set_text(label_5_scr_uiflowmovie, "12M"); + break; + case PHOTO_SIZE_8M: + lv_label_set_text(label_5_scr_uiflowmovie, "8M"); + break; + case PHOTO_SIZE_5M: + lv_label_set_text(label_5_scr_uiflowmovie, "5M"); + break; + default: + break; } switch (puiPara->Multishot) { - case 1: - lv_label_set_text(label_4_scr_uiflowmovie, "1P"); - break; - case 2: - lv_label_set_text(label_4_scr_uiflowmovie, "2P"); - break; - case 3: - lv_label_set_text(label_4_scr_uiflowmovie, "3P"); - break; - - default: - break; + case CONTINUE_SHOT_OFF: + lv_label_set_text(label_4_scr_uiflowmovie, "1P"); + break; + case CONTINUE_SHOT_BURST_2: + lv_label_set_text(label_4_scr_uiflowmovie, "2P"); + break; + case CONTINUE_SHOT_BURST_3: + lv_label_set_text(label_4_scr_uiflowmovie, "3P"); + 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: + break; } UINT32 freePicNum = 0; // PhotoExe_GetTotalPicNum(); - if (UIStorageCheck(STORAGE_CHECK_ERROR, NULL) == TRUE) - { - lv_label_set_text(label_6_scr_uiflowmovie, "NO SD CARD"); - } - else - { - UIStorageCheck(STORAGE_CHECK_FULL, &freePicNum); - lv_label_set_text(label_6_scr_uiflowmovie, Get_FreePicNumString(freePicNum)); - } + UINT32 cardStatus = System_GetState(SYS_STATE_CARD); + + if (cardStatus != CARD_REMOVED) + { + if (UIStorageCheck(STORAGE_CHECK_ERROR, NULL) == TRUE) + { + lv_label_set_text(label_6_scr_uiflowmovie, "SD CARD ERROR"); + } + else + { + UIStorageCheck(STORAGE_CHECK_FULL, &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) diff --git a/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPhoto/UIFlowPhotoEventCallback.c b/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPhoto/UIFlowPhotoEventCallback.c index 1033383fd..54114d1ea 100755 --- a/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPhoto/UIFlowPhotoEventCallback.c +++ b/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPhoto/UIFlowPhotoEventCallback.c @@ -142,14 +142,19 @@ static void update_quality(void) static void update_free_pic_number(void) { - if(g_PhotoBgInitFileSys == TRUE){ -#if (FS_FUNC == ENABLE) - UIStorageCheck(STORAGE_CHECK_FULL, &g_uiFreePicNum); -#endif - lv_label_set_text(label_free_pic_scr_uiflowphoto, Get_FreePicNumString(g_uiFreePicNum)); - }else{ - lv_label_set_text_fmt(label_free_pic_scr_uiflowphoto, "Check free space ..."); - } + UINT32 cardStatus = System_GetState(SYS_STATE_CARD); + + if (cardStatus != CARD_REMOVED) + { + if(g_PhotoBgInitFileSys == TRUE){ + #if (FS_FUNC == ENABLE) + UIStorageCheck(STORAGE_CHECK_FULL, &g_uiFreePicNum); + #endif + lv_label_set_text(label_free_pic_scr_uiflowphoto, Get_FreePicNumString(g_uiFreePicNum)); + }else{ + lv_label_set_text_fmt(label_free_pic_scr_uiflowphoto, "Check free space ..."); + } + } } static void update_card(void) @@ -406,45 +411,71 @@ static void update_camera_message(void) { UIMenuStoreInfo *puiPara = sf_ui_para_get(); // if((puiPara->CamMode == SF_CAM_MODE_PHOTO) || (puiPara->CamMode == SF_CAM_MODE_PHOTO_VIDEO)) - switch (puiPara->ImgSize) - { - case PHOTO_SIZE_16M: - lv_label_set_text(label_5_scr_uiflowphoto, "16M"); - break; - case PHOTO_SIZE_12M: - lv_label_set_text(label_5_scr_uiflowphoto, "12M"); - break; - case PHOTO_SIZE_8M: - lv_label_set_text(label_5_scr_uiflowphoto, "8M"); - break; - - default: - break; + + 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: + lv_label_set_text(label_4_scr_uiflowphoto, "16M"); + break; + case PHOTO_SIZE_12M: + lv_label_set_text(label_4_scr_uiflowphoto, "12M"); + break; + case PHOTO_SIZE_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; + default: + break; } switch (puiPara->Multishot) { - case 1: - lv_label_set_text(label_4_scr_uiflowphoto, "1P"); - break; - case 2: - lv_label_set_text(label_4_scr_uiflowphoto, "2P"); - break; - case 3: - lv_label_set_text(label_4_scr_uiflowphoto, "3P"); - break; - - default: - break; - } - if (UIStorageCheck(STORAGE_CHECK_ERROR, NULL) == TRUE) - { - lv_label_set_text(label_6_scr_uiflowphoto, "NO SD CARD"); - } - else - { - UIStorageCheck(STORAGE_CHECK_FULL, &g_uiFreePicNum); - lv_label_set_text(label_6_scr_uiflowphoto, Get_FreePicNumString(g_uiFreePicNum)); + case CONTINUE_SHOT_OFF: + lv_label_set_text(label_4_scr_uiflowphoto, "1P"); + break; + case CONTINUE_SHOT_BURST_2: + lv_label_set_text(label_4_scr_uiflowphoto, "2P"); + break; + case CONTINUE_SHOT_BURST_3: + lv_label_set_text(label_4_scr_uiflowphoto, "3P"); + 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: + break; } + UINT32 cardStatus = System_GetState(SYS_STATE_CARD); + + if (cardStatus != CARD_REMOVED) + { + if (UIStorageCheck(STORAGE_CHECK_ERROR, NULL) == TRUE) + { + lv_label_set_text(label_6_scr_uiflowphoto, "SD CARD ERROR"); + } + else + { + UIStorageCheck(STORAGE_CHECK_FULL, &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)