From faa2014ac81a4b9d962211245b8c935de50c3282 Mon Sep 17 00:00:00 2001 From: payton Date: Sat, 20 Jan 2024 00:58:24 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E5=A4=8D=E9=A2=84=E7=BA=A6=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../source/sf_app/code/source/4gMng/sf_eg91_sim.c | 2 +- .../source/sf_app/code/source/4gMng/sf_ftp.c | 2 +- .../source/sf_app/code/source/4gMng/sf_sms.c | 15 ++++++++++++++- .../source/sf_app/code/source/app/sf_system.c | 6 +++--- .../source/sifar/code/source/common/sf_common.c | 3 ++- 5 files changed, 21 insertions(+), 7 deletions(-) diff --git a/code/application/source/sf_app/code/source/4gMng/sf_eg91_sim.c b/code/application/source/sf_app/code/source/4gMng/sf_eg91_sim.c index e3a35d9af..5fa9c6ad1 100755 --- a/code/application/source/sf_app/code/source/4gMng/sf_eg91_sim.c +++ b/code/application/source/sf_app/code/source/4gMng/sf_eg91_sim.c @@ -4857,7 +4857,7 @@ SINT32 sf_auto_net_reg(void) SF_MODULE_END: // sendStartTime = clock(); sf_time(&sendStartTime); - printf("[%s:%d]ret:[0x%08X] sendStartTime:%d\n\n", __FUNCTION__, __LINE__, ret, sendStartTime); + printf("[%s:%d]ret:[0x%08X] sendStartTime:%s\n\n", __FUNCTION__, __LINE__, ret, ctime(&sendStartTime)); return ret; } diff --git a/code/application/source/sf_app/code/source/4gMng/sf_ftp.c b/code/application/source/sf_app/code/source/4gMng/sf_ftp.c index 843c4e3ef..bdbded11a 100755 --- a/code/application/source/sf_app/code/source/4gMng/sf_ftp.c +++ b/code/application/source/sf_app/code/source/4gMng/sf_ftp.c @@ -2019,7 +2019,7 @@ SF_HD_END: pSifarPara->picSendFailCount += ((SendFileTotal + 1) - (sendAlreadyFlag + 1)); //pSifarPara->sendThumbnailFailCount += ((piccount + 1) - sendAlreadyFlag); pSifarPara->picSendTimeoutCount += timeoutCnt; - MLOGD("[%s:%d]TotalPicsSent:%d\n\n", pSifarPara->TotalPicsSent); + MLOGD("TotalPicsSent:%d\n\n", pSifarPara->TotalPicsSent); } //printf("[%s:%d]ret1:[0x%08X],ret2:[0x%08X]\n\n", __FUNCTION__, __LINE__, ret1, ret2); MLOGD(" end ret1:[0x%08X],ret2:[0x%08X]\n", ret1, ret2); diff --git a/code/application/source/sf_app/code/source/4gMng/sf_sms.c b/code/application/source/sf_app/code/source/4gMng/sf_sms.c index c7969c24a..f62b3c378 100755 --- a/code/application/source/sf_app/code/source/4gMng/sf_sms.c +++ b/code/application/source/sf_app/code/source/4gMng/sf_sms.c @@ -2159,6 +2159,13 @@ void sf_hd_pic_add_to_list(UINT8 *fileName) SF_SPRINTF(fname, "%s%s/%03dMEDIA/%s%04d.JPG", SF_EMMC_ROOT, SF_DCIM_DIR, dirKey, SF_EMMC_DCF_FILE_NAME, fileKey); storage = 0; } + + if(SF_FAILURE == sf_check_sd()) + { + MLOGE("%s\n", fname); + return; + } + if(sf_file_IsExsit(fname) != SF_TRUE) { MLOGE("%s\n", fname); @@ -2234,7 +2241,7 @@ void sf_hd_pic_list_print(void) } else{ if (mkdir(hd_dir, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) != 0) { - printf("Failed to create directory"); + printf("Failed to create directory\n"); } } //snprintf(sendListName, sizeof(sendListName), "%s", SF_HD_DIR_LIST); @@ -2301,6 +2308,12 @@ void sf_video_add_to_list(UINT8 *fileName) fileIndex = dirKey * 10000 + fileKey + 1; + if(SF_FAILURE == sf_check_sd()) + { + MLOGE("%s\n", fileName); + return; + } + for(i = 0; i < 3; i++) { dirKeytmp = fileIndex / 10000; diff --git a/code/application/source/sf_app/code/source/app/sf_system.c b/code/application/source/sf_app/code/source/app/sf_system.c index 5f3fa1ef7..88d9862c0 100755 --- a/code/application/source/sf_app/code/source/app/sf_system.c +++ b/code/application/source/sf_app/code/source/app/sf_system.c @@ -923,6 +923,9 @@ void sf_power_off(void) sf_power_off_statistics(); + sf_power_off_check_sd(); + sf_power_off_check_sd_fail(); + sf_poweroff_check_lpa_excute_cmd(); sf_poweroff_check_lpa_enable_profile(); @@ -939,9 +942,6 @@ void sf_power_off(void) sf_power_off_check_format_sd(); - sf_power_off_check_sd(); - sf_power_off_check_sd_fail(); - sf_power_off_check_gprs(); sf_power_off_check_fw_update(); diff --git a/code/lib/source/sifar/code/source/common/sf_common.c b/code/lib/source/sifar/code/source/common/sf_common.c index 6fbba0dbe..a4831ccd5 100755 --- a/code/lib/source/sifar/code/source/common/sf_common.c +++ b/code/lib/source/sifar/code/source/common/sf_common.c @@ -2958,7 +2958,7 @@ void* sf_cardv_hd_cap_thread(void *arg) snprintf(HdflieName, sizeof(HdflieName), "%s%c%03d%04d.JPG", SF_HD_DIR_EMMC , (SF_EMMC_DCF_HANDLE), fileCfg->stfileattr[fileIndex].dirKey, fileCfg->stfileattr[fileIndex].fileKey); snprintf(str, 64, "B:\\DCIM\\%03d%s\\%s%04d.JPG", fileCfg->stfileattr[fileIndex].dirKey, DCF_DIR_NAME, SF_EMMC_DCF_FILE_NAME, fileCfg->stfileattr[fileIndex].fileKey); } - printf("flie:%s HdflieName:%s\n", str, HdflieName); + printf("flie:%s HdflieName:%s fileIndex:%d\n", str, HdflieName,fileIndex); arg[0] = str; sf_cmd_transcode_start(arg); if(sf_hd_flag_wait_done_timeout(HD_FLAG_INITT_OK, 5000)) @@ -2971,6 +2971,7 @@ void* sf_cardv_hd_cap_thread(void *arg) free(str); } sf_share_mem_hd_down(0); + sf_mem_free(); } } MLOGD(" HD end\n");