Merge branch 'Branch_S530' of gitlab.sifar.tech:payton/S530 into Branch_S530
This commit is contained in:
commit
f6a3c14eb3
|
@ -264,10 +264,10 @@
|
||||||
#define SIFAR_FTP_USERNAME "cameraftp"
|
#define SIFAR_FTP_USERNAME "cameraftp"
|
||||||
#define SIFAR_FTP_PASSWORD "camera123456"
|
#define SIFAR_FTP_PASSWORD "camera123456"
|
||||||
|
|
||||||
#define SIFAR_FTPS_IP "49.51.247.68"
|
#define SIFAR_FTPS_IP "150.109.112.64"
|
||||||
#define SIFAR_FTPS_PORT "21"
|
#define SIFAR_FTPS_PORT "21"
|
||||||
#define SIFAR_FTPS_USERNAME "sifarftpsuser"
|
#define SIFAR_FTPS_USERNAME "ftp_user"
|
||||||
#define SIFAR_FTPS_PASSWORD "rsHkZJPg"
|
#define SIFAR_FTPS_PASSWORD "Sifar%%123456"
|
||||||
|
|
||||||
|
|
||||||
#define CUSTOM_FTP_IP "ZnRwLTE1YmVuYWpmZWIuaXNoYXJlaXQubmV0"
|
#define CUSTOM_FTP_IP "ZnRwLTE1YmVuYWpmZWIuaXNoYXJlaXQubmV0"
|
||||||
|
|
|
@ -1772,10 +1772,10 @@ void SysResetFlag(void)
|
||||||
snprintf((char *)puiPara->FtpPort, sizeof(puiPara->FtpPort), USER_FTP_PORT);
|
snprintf((char *)puiPara->FtpPort, sizeof(puiPara->FtpPort), USER_FTP_PORT);
|
||||||
snprintf((char *)puiPara->FtpUsr, sizeof(puiPara->FtpUsr), USER_FTP_USERNAME);
|
snprintf((char *)puiPara->FtpUsr, sizeof(puiPara->FtpUsr), USER_FTP_USERNAME);
|
||||||
snprintf((char *)puiPara->FtpPwd, sizeof(puiPara->FtpPwd), USER_FTP_PASSWORD);
|
snprintf((char *)puiPara->FtpPwd, sizeof(puiPara->FtpPwd), USER_FTP_PASSWORD);
|
||||||
snprintf((char *)puiPara->FtpsIp, sizeof(puiPara->FtpsIp), USER_FTP_IP);
|
snprintf((char *)puiPara->FtpsIp, sizeof(puiPara->FtpsIp), SIFAR_FTPS_IP);
|
||||||
snprintf((char *)puiPara->FtpsPort, sizeof(puiPara->FtpsPort), USER_FTP_PORT);
|
snprintf((char *)puiPara->FtpsPort, sizeof(puiPara->FtpsPort), SIFAR_FTPS_PORT);
|
||||||
snprintf((char *)puiPara->FtpsUsr, sizeof(puiPara->FtpsUsr), USER_FTP_USERNAME);
|
snprintf((char *)puiPara->FtpsUsr, sizeof(puiPara->FtpsUsr), SIFAR_FTPS_USERNAME);
|
||||||
snprintf((char *)puiPara->FtpsPwd, sizeof(puiPara->FtpsPwd), USER_FTP_PASSWORD);
|
snprintf((char *)puiPara->FtpsPwd, sizeof(puiPara->FtpsPwd), SIFAR_FTPS_PASSWORD);
|
||||||
//SF_STRCPY(puiPara ->APNGPRS, "3gnet");
|
//SF_STRCPY(puiPara ->APNGPRS, "3gnet");
|
||||||
#else
|
#else
|
||||||
sf_base64_decode(USER_FTP_IP, (char *)tmpStr);
|
sf_base64_decode(USER_FTP_IP, (char *)tmpStr);
|
||||||
|
|
|
@ -52,6 +52,8 @@ SINT32 app_t110(void);
|
||||||
SINT32 sf_app_to_cardv_capture(void);
|
SINT32 sf_app_to_cardv_capture(void);
|
||||||
SINT32 sf_module_reboot_reg_net(void);
|
SINT32 sf_module_reboot_reg_net(void);
|
||||||
SINT32 sf_app_to_cardv_hd_ture(void);
|
SINT32 sf_app_to_cardv_hd_ture(void);
|
||||||
|
int sf_check_eth0(void);
|
||||||
|
int sf_check_usb0(void);
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#if __cplusplus
|
#if __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -3335,7 +3335,7 @@ SINT32 sf_net_regist_manual(void)
|
||||||
sf_test_code_err(eNetRegLocation, "+CGREG: 0,2");
|
sf_test_code_err(eNetRegLocation, "+CGREG: 0,2");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if((strstr((const char *)gsmPara, "+CGREG: 0,1") != NULL) || (strstr((const char *)gsmPara, "+CGREG: 0,5") != NULL))
|
if((strstr((const char *)gsmPara, "+CGREG: 2,1") != NULL) || (strstr((const char *)gsmPara, "+CGREG: 0,1") != NULL) || (strstr((const char *)gsmPara, "+CGREG: 0,5") != NULL))
|
||||||
{
|
{
|
||||||
if(PWR_ON_TIME_SYNC == sf_poweron_type_get())
|
if(PWR_ON_TIME_SYNC == sf_poweron_type_get())
|
||||||
{
|
{
|
||||||
|
@ -3976,7 +3976,7 @@ SINT32 sf_auto_net_reg(void)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if((strstr((const char *)gsmPara, "+CGREG: 0,1") != NULL) || (strstr((const char *)gsmPara, "+CGREG: 0,5") != NULL))
|
if((strstr((const char *)gsmPara, "+CGREG: 2,1") != NULL) || (strstr((const char *)gsmPara, "+CGREG: 0,1") != NULL) || (strstr((const char *)gsmPara, "+CGREG: 0,5") != NULL))
|
||||||
{
|
{
|
||||||
eNetRegLocation = QUECTEL_NETREG_QNWINFO;
|
eNetRegLocation = QUECTEL_NETREG_QNWINFO;
|
||||||
strcpy((char *)gsmPara, "AT+QNWINFO\r");
|
strcpy((char *)gsmPara, "AT+QNWINFO\r");
|
||||||
|
|
|
@ -226,7 +226,7 @@ SINT32 sf_ftp_config(UINT8 ssl, UINT8 GprsMode, UINT8 timeout)
|
||||||
if(SF_SUCCESS != ret){
|
if(SF_SUCCESS != ret){
|
||||||
sf_sys_status_led_set(SF_LED_SYS_STATE_SEND_FAIL);
|
sf_sys_status_led_set(SF_LED_SYS_STATE_SEND_FAIL);
|
||||||
}
|
}
|
||||||
FtpOpenOk = ret;
|
//FtpOpenOk = ret;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
@ -908,8 +908,7 @@ SINT32 sf_pic_send_ftp(void)
|
||||||
timeout = 120;
|
timeout = 120;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("NetGeneration:%dG,tempPicSize=%d,piccount=%d,pic=%d\n", pPara->NetGeneration, tempPicSize, piccount, pic);
|
#if 0
|
||||||
|
|
||||||
if((0 == pPara->SendMulti) || (pPara->SendMultishotIndex1) || (SF_MANUAL == sf_get_mode_flag()))
|
if((0 == pPara->SendMulti) || (pPara->SendMultishotIndex1) || (SF_MANUAL == sf_get_mode_flag()))
|
||||||
{
|
{
|
||||||
if(SF_FILE_TYPE_PIC_VIDEO == pThumbFileCfg->stfileattr[piccount].enFileTye){
|
if(SF_FILE_TYPE_PIC_VIDEO == pThumbFileCfg->stfileattr[piccount].enFileTye){
|
||||||
|
@ -993,7 +992,8 @@ SINT32 sf_pic_send_ftp(void)
|
||||||
piccount++;
|
piccount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
piccount = pThumbFileCfg->filecnt;
|
||||||
if(4 == pPara->NetGeneration)
|
if(4 == pPara->NetGeneration)
|
||||||
{
|
{
|
||||||
if(piccount >= 2)
|
if(piccount >= 2)
|
||||||
|
@ -1008,17 +1008,26 @@ SINT32 sf_pic_send_ftp(void)
|
||||||
piccount = 1;
|
piccount = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
MLOGI("NetGeneration:%dG,tempPicSize=%d,piccount=%d,filecnt=%d\n", pPara->NetGeneration, tempPicSize, piccount, pThumbFileCfg->filecnt);
|
||||||
|
|
||||||
printf("[%s:%d]piccount=%d\n", __FUNCTION__, __LINE__, piccount);
|
//printf("[%s:%d]piccount=%d\n", __FUNCTION__, __LINE__, piccount);
|
||||||
|
|
||||||
/* dbg log */
|
/* dbg log */
|
||||||
for(pic = 0; pic < piccount; pic++)
|
/* for(pic = 0; pic < piccount; pic++)
|
||||||
{
|
{
|
||||||
printf("%s:%d pic:%d ftpFileName:%s filePath:%s fileStr:%s\n", __FUNCTION__, __LINE__, pic, ftpFileName[pic], filePath[pic], fileStr[pic]);
|
printf("%s:%d pic:%d ftpFileName:%s filePath:%s fileStr:%s\n", __FUNCTION__, __LINE__, pic, ftpFileName[pic], filePath[pic], fileStr[pic]);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
for(pic = 0; pic < piccount; pic++)
|
for(pic = 0; pic < piccount; pic++)
|
||||||
{
|
{
|
||||||
|
if(SF_FILE_TYPE_PIC_VIDEO == pThumbFileCfg->stfileattr[pic].enFileTye){
|
||||||
|
sprintf((char *)ftpFileName[pic], "%sV-%s", cameraID, pThumbFileCfg->stfileattr[pic].thumbfileName);
|
||||||
|
}else{
|
||||||
|
sprintf((char *)ftpFileName[pic], "%s%s", cameraID, pThumbFileCfg->stfileattr[pic].thumbfileName);
|
||||||
|
}
|
||||||
|
sprintf((char *)filePath[pic], "%s", pThumbFileCfg->stfileattr[pic].thumbfilePath);
|
||||||
|
printf("%s:%d pic:%d ftpFileName:%s filePath:%s fileStr:%s\n", __FUNCTION__, __LINE__, pic, ftpFileName[pic], filePath[pic], fileStr[pic]);
|
||||||
|
|
||||||
//ret = sf_simcom_upload_file_to_module(fileStr[pic],ftpFileName[pic]);
|
//ret = sf_simcom_upload_file_to_module(fileStr[pic],ftpFileName[pic]);
|
||||||
ret = SF_SUCCESS;
|
ret = SF_SUCCESS;
|
||||||
|
|
||||||
|
@ -1076,7 +1085,7 @@ SINT32 sf_video_send_ftp(void)
|
||||||
fileIndex = sf_check_file_video();
|
fileIndex = sf_check_file_video();
|
||||||
|
|
||||||
sprintf((char *)ftpFileName, "%s%s", cameraID, pThumbFileCfg->stfileattr[fileIndex].thumbfileName);
|
sprintf((char *)ftpFileName, "%s%s", cameraID, pThumbFileCfg->stfileattr[fileIndex].thumbfileName);
|
||||||
sprintf((char *)filePath, "UFS:/%s", pThumbFileCfg->stfileattr[fileIndex].thumbfileName);
|
sprintf((char *)filePath, "%s", pThumbFileCfg->stfileattr[fileIndex].thumbfilePath);
|
||||||
|
|
||||||
printf("%s:%d ftpFileName:%s filePath:%s videoDir:%s\n", __FUNCTION__, __LINE__, ftpFileName, filePath, videoDir);
|
printf("%s:%d ftpFileName:%s filePath:%s videoDir:%s\n", __FUNCTION__, __LINE__, ftpFileName, filePath, videoDir);
|
||||||
|
|
||||||
|
@ -1118,7 +1127,7 @@ SINT32 sf_ftp_dailyreport_send(void)
|
||||||
printf("%s:%d err create dailyreport file\n", __FUNCTION__, __LINE__);
|
printf("%s:%d err create dailyreport file\n", __FUNCTION__, __LINE__);
|
||||||
return SF_FAILURE;
|
return SF_FAILURE;
|
||||||
}
|
}
|
||||||
sprintf((char *)filePath, "UFS:/%s", SF_DAILYREPORT_TXT);
|
sprintf((char *)filePath, "%s", SF_DAILYREPORT_FILENAME);
|
||||||
//sprintf((char *)filePath, "UFS:/%s-dr.txt", pPara->ModuleImei);
|
//sprintf((char *)filePath, "UFS:/%s-dr.txt", pPara->ModuleImei);
|
||||||
|
|
||||||
printf("%s:%d filePath:%s\n", __FUNCTION__, __LINE__, filePath);
|
printf("%s:%d filePath:%s\n", __FUNCTION__, __LINE__, filePath);
|
||||||
|
@ -1126,7 +1135,7 @@ SINT32 sf_ftp_dailyreport_send(void)
|
||||||
sf_custom_str_get(customStr);
|
sf_custom_str_get(customStr);
|
||||||
sprintf((char *)uploadFname, "%s-%s-dr.txt",pPara->ModuleImei, customStr);
|
sprintf((char *)uploadFname, "%s-%s-dr.txt",pPara->ModuleImei, customStr);
|
||||||
|
|
||||||
ret = sf_quectel_upload_file_to_module((UINT8 *)SF_DAILYREPORT_FILENAME, (UINT8 *)SF_DAILYREPORT_TXT);
|
ret = SF_SUCCESS;//sf_quectel_upload_file_to_module((UINT8 *)SF_DAILYREPORT_FILENAME, (UINT8 *)SF_DAILYREPORT_TXT);
|
||||||
|
|
||||||
if(SF_SUCCESS != ret)
|
if(SF_SUCCESS != ret)
|
||||||
{
|
{
|
||||||
|
@ -1252,7 +1261,7 @@ SINT32 sf_send_file_to_ftp(UINT8 mode)
|
||||||
{
|
{
|
||||||
if(smtpUploadPicFlag == 0)
|
if(smtpUploadPicFlag == 0)
|
||||||
{
|
{
|
||||||
ret1 = sf_upload_send_files_to_module(1);
|
ret1 = SF_SUCCESS;//sf_upload_send_files_to_module(1);
|
||||||
|
|
||||||
if(SF_UPLOAD_ERROR_RETRY == ret1)
|
if(SF_UPLOAD_ERROR_RETRY == ret1)
|
||||||
{
|
{
|
||||||
|
@ -1261,7 +1270,7 @@ SINT32 sf_send_file_to_ftp(UINT8 mode)
|
||||||
|
|
||||||
if(ret1 == SF_SUCCESS)
|
if(ret1 == SF_SUCCESS)
|
||||||
{
|
{
|
||||||
ret1 = sf_upload_send_files_to_module(1);
|
ret1 = SF_SUCCESS;//sf_upload_send_files_to_module(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1278,7 +1287,7 @@ SINT32 sf_send_file_to_ftp(UINT8 mode)
|
||||||
{
|
{
|
||||||
if(smtpUploadVideoFlag == 0)
|
if(smtpUploadVideoFlag == 0)
|
||||||
{
|
{
|
||||||
ret1 = sf_upload_send_files_to_module(2);
|
ret1 = SF_SUCCESS;//sf_upload_send_files_to_module(2);
|
||||||
|
|
||||||
if(SF_UPLOAD_ERROR_RETRY == ret1)
|
if(SF_UPLOAD_ERROR_RETRY == ret1)
|
||||||
{
|
{
|
||||||
|
@ -1287,7 +1296,7 @@ SINT32 sf_send_file_to_ftp(UINT8 mode)
|
||||||
|
|
||||||
if(ret1 == SF_SUCCESS)
|
if(ret1 == SF_SUCCESS)
|
||||||
{
|
{
|
||||||
ret1 = sf_upload_send_files_to_module(2);
|
ret1 = SF_SUCCESS;//sf_upload_send_files_to_module(2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2264,7 +2273,11 @@ SINT32 sf_connect_ftps_server(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = sf_ftp_config(ssl, gprsMode, timeout);
|
ret = sf_ftp_config(ssl, gprsMode, timeout);
|
||||||
|
FtpManagerCode result = ftp_service_available();
|
||||||
|
if(FTP_MANAGER_SERVICE_AVAILABLE == result)
|
||||||
|
{
|
||||||
|
FtpOpenOk = SUCCESS;
|
||||||
|
}
|
||||||
ret = sf_ftp_stop(ssl, gprsMode);
|
ret = sf_ftp_stop(ssl, gprsMode);
|
||||||
|
|
||||||
//SF_FTP_CONNECT_END:
|
//SF_FTP_CONNECT_END:
|
||||||
|
@ -3296,7 +3309,7 @@ SINT32 sf_hd_ftp_send(void)
|
||||||
UINT8 ssl = 0;
|
UINT8 ssl = 0;
|
||||||
UINT8 gprsMode = 0;
|
UINT8 gprsMode = 0;
|
||||||
UINT8 timeout = 100;
|
UINT8 timeout = 100;
|
||||||
UINT8 piccount = 1;
|
UINT8 piccount = 0;
|
||||||
UINT8 SendFileTotal = 0;
|
UINT8 SendFileTotal = 0;
|
||||||
UINT8 battery = 0;
|
UINT8 battery = 0;
|
||||||
UIMenuStoreInfo *pPara = sf_app_ui_para_get();
|
UIMenuStoreInfo *pPara = sf_app_ui_para_get();
|
||||||
|
@ -3334,13 +3347,13 @@ SINT32 sf_hd_ftp_send(void)
|
||||||
|
|
||||||
if(SF_SUCCESS == ret1)
|
if(SF_SUCCESS == ret1)
|
||||||
{
|
{
|
||||||
while((sf_app_while_flag()) && (((piccount+1) <= SendFileTotal)) && ((pPara->GprsMode == 1) || ((pSifarPara->subscribeSendCnt < SUBSCRIBE_SEND_MAX_NUM) && (pPara->GprsMode != 1))))
|
while((sf_app_while_flag()) && (((piccount) < SendFileTotal)) && ((pPara->GprsMode == 1) || ((pSifarPara->subscribeSendCnt < SUBSCRIBE_SEND_MAX_NUM) && (pPara->GprsMode != 1))))
|
||||||
{
|
{
|
||||||
snprintf((char *)ftpFileName, sizeof(ftpFileName), "W%03d%04d.JPG", fileCfg->stfileattr[piccount].dirKey, fileCfg->stfileattr[piccount].fileKey);
|
snprintf((char *)ftpFileName, sizeof(ftpFileName), "W%03d%04d.JPG", fileCfg->stfileattr[piccount].dirKey, fileCfg->stfileattr[piccount].fileKey);
|
||||||
snprintf((char *)filePath, sizeof(filePath), "%s/%s", SF_HD_DIR, ftpFileName);
|
snprintf((char *)filePath, sizeof(filePath), "%s/%s", SF_HD_DIR, ftpFileName);
|
||||||
|
|
||||||
sf_set_del_flag(FALSE);
|
sf_set_del_flag(FALSE);
|
||||||
ret1 = sf_quectel_upload_file_to_module(filePath, ftpFileName);
|
ret1 = SF_SUCCESS;//sf_quectel_upload_file_to_module(filePath, ftpFileName);
|
||||||
|
|
||||||
if(SF_UPLOAD_ERROR_RETRY == ret1)
|
if(SF_UPLOAD_ERROR_RETRY == ret1)
|
||||||
{
|
{
|
||||||
|
@ -3349,18 +3362,18 @@ SINT32 sf_hd_ftp_send(void)
|
||||||
|
|
||||||
if(ret1 == SF_SUCCESS)
|
if(ret1 == SF_SUCCESS)
|
||||||
{
|
{
|
||||||
ret1 = sf_quectel_upload_file_to_module(filePath, ftpFileName);
|
ret1 = SF_SUCCESS;//sf_quectel_upload_file_to_module(filePath, ftpFileName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
battery = sf_app_get_battery();
|
battery = sf_app_get_battery();
|
||||||
memset(cameraID, '\0', sizeof(cameraID));
|
memset(cameraID, '\0', sizeof(cameraID));
|
||||||
memset(ftpFileName, '\0', sizeof(ftpFileName));
|
memset(ftpFileName, '\0', sizeof(ftpFileName));
|
||||||
memset(filePath, '\0', sizeof(filePath));
|
//memset(filePath, '\0', sizeof(filePath));
|
||||||
|
|
||||||
snprintf(cameraID, sizeof(cameraID), "%s-%d-%d-%s-", pPara->ModuleImei, battery, csqlevel, CamNameStr);
|
snprintf(cameraID, sizeof(cameraID), "%s-%d-%d-%s-", pPara->ModuleImei, battery, csqlevel, CamNameStr);
|
||||||
snprintf((char *)ftpFileName, sizeof(ftpFileName), "%sHD-W%03d%04d.JPG", cameraID, fileCfg->stfileattr[piccount].dirKey, fileCfg->stfileattr[piccount].fileKey);
|
snprintf((char *)ftpFileName, sizeof(ftpFileName), "%sHD-W%03d%04d.JPG", cameraID, fileCfg->stfileattr[piccount].dirKey, fileCfg->stfileattr[piccount].fileKey);
|
||||||
|
|
||||||
snprintf((char *)filePath, sizeof(filePath), "UFS:/W%03d%04d.JPG", fileCfg->stfileattr[piccount].dirKey, fileCfg->stfileattr[piccount].fileKey);
|
//snprintf((char *)filePath, sizeof(filePath), "UFS:/W%03d%04d.JPG", fileCfg->stfileattr[piccount].dirKey, fileCfg->stfileattr[piccount].fileKey);
|
||||||
|
|
||||||
printf("%s:%d ftpFileName:%s filePath:%s\n", __FUNCTION__, __LINE__, ftpFileName, filePath);
|
printf("%s:%d ftpFileName:%s filePath:%s\n", __FUNCTION__, __LINE__, ftpFileName, filePath);
|
||||||
|
|
||||||
|
@ -3424,7 +3437,7 @@ SF_HD_END:
|
||||||
//pSifarPara->sendThumbnailTimeCount += sendEndTime - sendStartTime;
|
//pSifarPara->sendThumbnailTimeCount += sendEndTime - sendStartTime;
|
||||||
printf("[%s:%d] : sendStartTime:%d sendEndTime:%d\n\n", __FUNCTION__, __LINE__, sendStartTime, sendEndTime);
|
printf("[%s:%d] : sendStartTime:%d sendEndTime:%d\n\n", __FUNCTION__, __LINE__, sendStartTime, sendEndTime);
|
||||||
|
|
||||||
if(!(((piccount+1) <= SendFileTotal) && ((pSifarPara->picSendMax < pPara->SendMaxNum) || (pPara->SendMaxNum == 0))))
|
if(!(((piccount) <= SendFileTotal) && ((pSifarPara->picSendMax < pPara->SendMaxNum) || (pPara->SendMaxNum == 0))))
|
||||||
{
|
{
|
||||||
sf_delete_send_flie_list();
|
sf_delete_send_flie_list();
|
||||||
}
|
}
|
||||||
|
@ -3511,7 +3524,7 @@ SINT32 sf_video_ftp_send(void)
|
||||||
UINT8 ssl = 0;
|
UINT8 ssl = 0;
|
||||||
UINT8 gprsMode = 0;
|
UINT8 gprsMode = 0;
|
||||||
UINT8 timeout = 100;
|
UINT8 timeout = 100;
|
||||||
UINT8 piccount = 1;
|
UINT8 piccount = 0;
|
||||||
UINT8 SendFileTotal = 0;
|
UINT8 SendFileTotal = 0;
|
||||||
UINT8 battery = 0;
|
UINT8 battery = 0;
|
||||||
UIMenuStoreInfo *pPara = sf_app_ui_para_get();
|
UIMenuStoreInfo *pPara = sf_app_ui_para_get();
|
||||||
|
@ -3550,7 +3563,7 @@ SINT32 sf_video_ftp_send(void)
|
||||||
|
|
||||||
if(SF_SUCCESS == ret1)
|
if(SF_SUCCESS == ret1)
|
||||||
{
|
{
|
||||||
while((sf_app_while_flag()) && (((piccount+1) <= SendFileTotal)) && ((pPara->GprsMode == 1) || ((pSifarPara->subscribeVideoSendCnt < SUBSCRIBE_VIDEO_SEND_MAX_NUM) && (pPara->GprsMode != 1))))
|
while((sf_app_while_flag()) && (((piccount) < SendFileTotal)) && ((pPara->GprsMode == 1) || ((pSifarPara->subscribeVideoSendCnt < SUBSCRIBE_VIDEO_SEND_MAX_NUM) && (pPara->GprsMode != 1))))
|
||||||
{
|
{
|
||||||
snprintf((char *)ftpFileName, sizeof(ftpFileName), "W%03d%04d.MP4", fileCfg->stfileattr[piccount].dirKey, fileCfg->stfileattr[piccount].fileKey);
|
snprintf((char *)ftpFileName, sizeof(ftpFileName), "W%03d%04d.MP4", fileCfg->stfileattr[piccount].dirKey, fileCfg->stfileattr[piccount].fileKey);
|
||||||
//snprintf((char *)filePath, sizeof(filePath), "%s/%s", SF_HD_DIR, ftpFileName);
|
//snprintf((char *)filePath, sizeof(filePath), "%s/%s", SF_HD_DIR, ftpFileName);
|
||||||
|
@ -3564,7 +3577,7 @@ SINT32 sf_video_ftp_send(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
sf_set_del_flag(FALSE);
|
sf_set_del_flag(FALSE);
|
||||||
ret1 = sf_quectel_upload_file_to_module(filePath, ftpFileName);
|
ret1 = SF_SUCCESS;//sf_quectel_upload_file_to_module(filePath, ftpFileName);
|
||||||
|
|
||||||
if(SF_UPLOAD_ERROR_RETRY == ret1)
|
if(SF_UPLOAD_ERROR_RETRY == ret1)
|
||||||
{
|
{
|
||||||
|
@ -3573,18 +3586,18 @@ SINT32 sf_video_ftp_send(void)
|
||||||
|
|
||||||
if(ret1 == SF_SUCCESS)
|
if(ret1 == SF_SUCCESS)
|
||||||
{
|
{
|
||||||
ret1 = sf_quectel_upload_file_to_module(filePath, ftpFileName);
|
ret1 = SF_SUCCESS;//sf_quectel_upload_file_to_module(filePath, ftpFileName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
battery = sf_app_get_battery();
|
battery = sf_app_get_battery();
|
||||||
memset(cameraID, '\0', sizeof(cameraID));
|
memset(cameraID, '\0', sizeof(cameraID));
|
||||||
memset(ftpFileName, '\0', sizeof(ftpFileName));
|
memset(ftpFileName, '\0', sizeof(ftpFileName));
|
||||||
memset(filePath, '\0', sizeof(filePath));
|
//memset(filePath, '\0', sizeof(filePath));
|
||||||
|
|
||||||
snprintf(cameraID, sizeof(cameraID), "%s-%d-%d-%s-", pPara->ModuleImei, battery, csqlevel, CamNameStr);
|
snprintf(cameraID, sizeof(cameraID), "%s-%d-%d-%s-", pPara->ModuleImei, battery, csqlevel, CamNameStr);
|
||||||
snprintf((char *)ftpFileName, sizeof(ftpFileName), "%s-W%03d%04d.MP4", cameraID, fileCfg->stfileattr[piccount].dirKey, fileCfg->stfileattr[piccount].fileKey);
|
snprintf((char *)ftpFileName, sizeof(ftpFileName), "%sW%03d%04d.MP4", cameraID, fileCfg->stfileattr[piccount].dirKey, fileCfg->stfileattr[piccount].fileKey);
|
||||||
|
|
||||||
snprintf((char *)filePath, sizeof(filePath), "UFS:/W%03d%04d.MP4", fileCfg->stfileattr[piccount].dirKey, fileCfg->stfileattr[piccount].fileKey);
|
//snprintf((char *)filePath, sizeof(filePath), "UFS:/W%03d%04d.MP4", fileCfg->stfileattr[piccount].dirKey, fileCfg->stfileattr[piccount].fileKey);
|
||||||
|
|
||||||
printf("%s:%d ftpFileName:%s filePath:%s\n", __FUNCTION__, __LINE__, ftpFileName, filePath);
|
printf("%s:%d ftpFileName:%s filePath:%s\n", __FUNCTION__, __LINE__, ftpFileName, filePath);
|
||||||
|
|
||||||
|
@ -3715,14 +3728,15 @@ SINT32 sf_log_send_ftp(void)
|
||||||
|
|
||||||
if(SF_SUCCESS == ret)
|
if(SF_SUCCESS == ret)
|
||||||
{
|
{
|
||||||
sprintf((char *)filePath, "UFS:/%s", SF_LOG_TXT);
|
//sprintf((char *)filePath, "UFS:/%s", SF_LOG_TXT);
|
||||||
|
sprintf((char *)filePath, "%s", LOG_AT_FILE_PATH);
|
||||||
|
|
||||||
printf("%s:%d filePath:%s\n", __FUNCTION__, __LINE__, filePath);
|
printf("%s:%d filePath:%s\n", __FUNCTION__, __LINE__, filePath);
|
||||||
|
|
||||||
sf_custom_str_get(customStr);
|
sf_custom_str_get(customStr);
|
||||||
sprintf((char *)uploadFname, "%s-%s-log.txt",pPara->ModuleImei, customStr);
|
sprintf((char *)uploadFname, "%s-%s-log.txt",pPara->ModuleImei, customStr);
|
||||||
|
|
||||||
ret = sf_quectel_upload_file_to_module((UINT8 *)LOG_AT_FILE_PATH, (UINT8 *)SF_LOG_TXT);
|
ret = SF_SUCCESS;//sf_quectel_upload_file_to_module((UINT8 *)LOG_AT_FILE_PATH, (UINT8 *)SF_LOG_TXT);
|
||||||
|
|
||||||
if(SF_SUCCESS != ret)
|
if(SF_SUCCESS != ret)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1455,7 +1455,8 @@ SINT32 sf_sms_read_message(void)
|
||||||
if(strstr((const char *)gsmPara, "$"))
|
if(strstr((const char *)gsmPara, "$"))
|
||||||
{
|
{
|
||||||
strtok((char *)gsmPara, "$");
|
strtok((char *)gsmPara, "$");
|
||||||
strcpy((char *)strok, strtok(NULL, "$"));
|
//strcpy((char *)strok, strtok(NULL, "$"));
|
||||||
|
snprintf((char *)strok, sizeof(strok), "%s", strtok(NULL, "$"));
|
||||||
//printf("strok:%s\n", strok);
|
//printf("strok:%s\n", strok);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1468,7 +1469,8 @@ SINT32 sf_sms_read_message(void)
|
||||||
|
|
||||||
while(temp != 0)
|
while(temp != 0)
|
||||||
{
|
{
|
||||||
strcpy((char *)strValue[mm], (const char *)temp);
|
//strcpy((char *)strValue[mm], (const char *)temp);
|
||||||
|
snprintf((char *)strValue[mm], sizeof(strValue[mm]), "%s", temp);
|
||||||
printf("strValue[%d]:%s\n", mm, strValue[mm]);
|
printf("strValue[%d]:%s\n", mm, strValue[mm]);
|
||||||
mm++;
|
mm++;
|
||||||
temp = (UINT8 *)strsep(&pStr, "#");
|
temp = (UINT8 *)strsep(&pStr, "#");
|
||||||
|
@ -1752,6 +1754,8 @@ SINT32 sf_check_message(void)
|
||||||
UINT8 location = MMS_ATCMGL1;
|
UINT8 location = MMS_ATCMGL1;
|
||||||
SF_PDT_PARAM_STATISTICS_S *pSifarPara = sf_statistics_param_get();
|
SF_PDT_PARAM_STATISTICS_S *pSifarPara = sf_statistics_param_get();
|
||||||
SINT32 ttyRet = 0;
|
SINT32 ttyRet = 0;
|
||||||
|
char strtmp[20] = {0};
|
||||||
|
UIMenuStoreInfo *puiPara = sf_app_ui_para_get();
|
||||||
|
|
||||||
printf("%s:%d s\n", __FUNCTION__, __LINE__);
|
printf("%s:%d s\n", __FUNCTION__, __LINE__);
|
||||||
|
|
||||||
|
@ -1766,6 +1770,12 @@ SINT32 sf_check_message(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(strncmp(puiPara->ModuleVer, GPRS_MODULE_TYPE_EG915Q, 6) == 0){
|
||||||
|
sprintf(strtmp, "sms/listmsgmap");
|
||||||
|
}else {
|
||||||
|
sprintf(strtmp, "SMS/ListMsgMap");
|
||||||
|
}
|
||||||
|
|
||||||
strcpy((char *)gsmPara, "AT+QCFG=\"sms/listmsgmap\",\"REC UNREAD\"\r");
|
strcpy((char *)gsmPara, "AT+QCFG=\"sms/listmsgmap\",\"REC UNREAD\"\r");
|
||||||
ttyRet = sf_hal_ttyusb2_write(gsmPara, strlen((const char *)gsmPara));
|
ttyRet = sf_hal_ttyusb2_write(gsmPara, strlen((const char *)gsmPara));
|
||||||
SF_CHECK_RETURN(ttyRet, SF_GPRS_MODULE_ERROR_WRITE);
|
SF_CHECK_RETURN(ttyRet, SF_GPRS_MODULE_ERROR_WRITE);
|
||||||
|
@ -1839,7 +1849,7 @@ SINT32 sf_check_message(void)
|
||||||
|
|
||||||
case MMS_ATCMGL1:
|
case MMS_ATCMGL1:
|
||||||
|
|
||||||
if(strstr((const char *)gsmPara, "SMS/ListMsgMap"))
|
if(strstr((const char *)gsmPara, strtmp))
|
||||||
{
|
{
|
||||||
char *temp = NULL;
|
char *temp = NULL;
|
||||||
char *delim;//
|
char *delim;//
|
||||||
|
@ -2118,7 +2128,7 @@ void sf_hd_pic_list_print(void)
|
||||||
struct stat st_buffer;
|
struct stat st_buffer;
|
||||||
char sendListName[64] = {0};
|
char sendListName[64] = {0};
|
||||||
char buff[SF_SEND_LIST_ITEM_LENGTH+1] = {0};
|
char buff[SF_SEND_LIST_ITEM_LENGTH+1] = {0};
|
||||||
SubImgList_t *pList = pSubImgListHead;
|
SubImgList_t *pList = pSubImgListHead->pNext;
|
||||||
printf("[%s:%d] print list:\n", __FUNCTION__, __LINE__);
|
printf("[%s:%d] print list:\n", __FUNCTION__, __LINE__);
|
||||||
SF_HDFILE_ATTR_S* fileCfg = sf_file_hd_cfg_get();
|
SF_HDFILE_ATTR_S* fileCfg = sf_file_hd_cfg_get();
|
||||||
|
|
||||||
|
@ -2225,17 +2235,17 @@ void sf_video_add_to_list(UINT8 *fileName)
|
||||||
*************************************************/
|
*************************************************/
|
||||||
void sf_video_list_print(void)
|
void sf_video_list_print(void)
|
||||||
{
|
{
|
||||||
UINT8 i = 0;
|
//UINT8 i = 0;
|
||||||
SF_HDFILE_ATTR_S* fileCfg = sf_file_video_cfg_get();
|
SF_HDFILE_ATTR_S* fileCfg = sf_file_video_cfg_get();
|
||||||
SubImgList_t *pList = pSubVideoListHead;
|
SubImgList_t *pList = pSubVideoListHead->pNext;
|
||||||
printf("[%s:%d] print list:\n", __FUNCTION__, __LINE__);
|
printf("[%s:%d] print list:\n", __FUNCTION__, __LINE__);
|
||||||
while(pList != NULL)
|
while(pList != NULL)
|
||||||
{
|
{
|
||||||
fileCfg->stfileattr[fileCfg->filecnt].dirKey = pList->dirKey;
|
fileCfg->stfileattr[fileCfg->filecnt].dirKey = pList->dirKey;
|
||||||
fileCfg->stfileattr[fileCfg->filecnt].fileKey = pList->fileKey;
|
fileCfg->stfileattr[fileCfg->filecnt].fileKey = pList->fileKey;
|
||||||
fileCfg->filecnt += 1;
|
fileCfg->filecnt += 1;
|
||||||
|
printf("filecnt:%d f:%d,%d\n", fileCfg->filecnt, pList->dirKey, pList->fileKey);
|
||||||
pList = pList->pNext;
|
pList = pList->pNext;
|
||||||
printf("ID:%d f:%d,%d\n", i++, pList->dirKey, pList->fileKey);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,7 @@
|
||||||
#include "sf_keymng.h"
|
#include "sf_keymng.h"
|
||||||
#include "sf_wifi_svr.h"
|
#include "sf_wifi_svr.h"
|
||||||
#include "sf_battery.h"
|
#include "sf_battery.h"
|
||||||
|
#include "ftp_manager.h"
|
||||||
//#include <libavcodec/avcodec.h>
|
//#include <libavcodec/avcodec.h>
|
||||||
//#include <libavformat/avformat.h>
|
//#include <libavformat/avformat.h>
|
||||||
//#include <libavutil/imgutils.h>
|
//#include <libavutil/imgutils.h>
|
||||||
|
@ -289,7 +290,7 @@ int main(int argc, char *argv[])
|
||||||
sf_com_message_send_to_cardv(&stMessageBuf);
|
sf_com_message_send_to_cardv(&stMessageBuf);
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
ftp_manager_uninit();
|
||||||
sf_share_mem_file_deinit();
|
sf_share_mem_file_deinit();
|
||||||
sf_share_mem_customer_deinit();
|
sf_share_mem_customer_deinit();
|
||||||
SF_MUTEX_DESTROY(Param_mutexLock);
|
SF_MUTEX_DESTROY(Param_mutexLock);
|
||||||
|
|
|
@ -955,7 +955,7 @@ SINT32 app_debug_signal(SINT32 argc, SF_CHAR **argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
SINT8 nValue = 0;
|
SINT8 nValue = 0;
|
||||||
SINT8 mValue = 0;
|
int mValue = 0;
|
||||||
if(strstr((SF_CHAR*)argv[1], "3g")) {
|
if(strstr((SF_CHAR*)argv[1], "3g")) {
|
||||||
nValue = 3;
|
nValue = 3;
|
||||||
mValue = atoi((SF_CHAR*)argv[2]);
|
mValue = atoi((SF_CHAR*)argv[2]);
|
||||||
|
|
|
@ -148,7 +148,7 @@ static SINT16 app_Qlog_procress(void) {
|
||||||
SINT32 sf_USB_net_init(void) {
|
SINT32 sf_USB_net_init(void) {
|
||||||
SF_CHAR cmdStr[128] = {0};
|
SF_CHAR cmdStr[128] = {0};
|
||||||
char cmdtmp[20] = {0};
|
char cmdtmp[20] = {0};
|
||||||
|
UINT8 i = 0;
|
||||||
int ret = SF_FAILURE;
|
int ret = SF_FAILURE;
|
||||||
UIMenuStoreInfo *puiPara = sf_app_ui_para_get();
|
UIMenuStoreInfo *puiPara = sf_app_ui_para_get();
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ SINT32 sf_USB_net_init(void) {
|
||||||
sprintf(cmdtmp, "/dev/qcqmi0");
|
sprintf(cmdtmp, "/dev/qcqmi0");
|
||||||
}
|
}
|
||||||
|
|
||||||
for (UINT8 i = 0; i < 40; i++) {
|
for (i = 0; i < 40; i++) {
|
||||||
if (access(cmdtmp, F_OK) == SF_SUCCESS) {
|
if (access(cmdtmp, F_OK) == SF_SUCCESS) {
|
||||||
ret = SF_SUCCESS;
|
ret = SF_SUCCESS;
|
||||||
printf("usb net ko exist!\r\n");
|
printf("usb net ko exist!\r\n");
|
||||||
|
@ -171,12 +171,30 @@ SINT32 sf_USB_net_init(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret == SF_SUCCESS) {
|
if (ret == SF_SUCCESS) {
|
||||||
system(cmdStr);
|
ret = system(cmdStr);
|
||||||
if (sf_poweron_type_get() == SF_MCU_STARTUP_RING) {
|
if(SUCCESS != ret){
|
||||||
|
MLOGE("usb net err %d\n",ret);
|
||||||
|
}else {
|
||||||
|
for (i = 0; i < 40; i++) {
|
||||||
|
if(strncmp(puiPara->ModuleVer, GPRS_MODULE_TYPE_EG915Q, 6) == 0){
|
||||||
|
ret = sf_check_usb0();
|
||||||
|
}else{
|
||||||
|
ret = sf_check_eth0();
|
||||||
|
}
|
||||||
|
if (SUCCESS == ret) {
|
||||||
|
ret = SF_SUCCESS;
|
||||||
|
MLOGI("usb net ip up\r\n");
|
||||||
|
break;
|
||||||
|
} else {
|
||||||
|
sleep(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*if (sf_poweron_type_get() == SF_MCU_STARTUP_RING) {
|
||||||
sleep(2);
|
sleep(2);
|
||||||
} else {
|
} else {
|
||||||
sleep(5);
|
sleep(5);
|
||||||
}
|
}*/
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1276,6 +1294,9 @@ static SINT32 app_Register_Net_startup_mode(SF_FN_PARAM_S *pfnParam) {
|
||||||
s32ret = sf_get_ntp(s32ret);
|
s32ret = sf_get_ntp(s32ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sf_4G_usb_net_apn_cfg(pfnParam);
|
||||||
|
sf_USB_net_init();
|
||||||
|
|
||||||
if(sf_get_signal_ready()){
|
if(sf_get_signal_ready()){
|
||||||
if(SUCCESS != sf_connect_ftps_server()){
|
if(SUCCESS != sf_connect_ftps_server()){
|
||||||
printf("[%s:%d]open ftps fail, reconnect\n", __FUNCTION__, __LINE__);
|
printf("[%s:%d]open ftps fail, reconnect\n", __FUNCTION__, __LINE__);
|
||||||
|
@ -1284,8 +1305,6 @@ static SINT32 app_Register_Net_startup_mode(SF_FN_PARAM_S *pfnParam) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sf_4G_usb_net_apn_cfg(pfnParam);
|
|
||||||
sf_USB_net_init();
|
|
||||||
SF_APPCOMM_CHECK_RETURN(s32ret, s32ret);
|
SF_APPCOMM_CHECK_RETURN(s32ret, s32ret);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -1624,6 +1643,93 @@ SINT32 sf_app_to_cardv_hd_ture(void) {
|
||||||
s32ret = sf_share_mem_hd_down(1);
|
s32ret = sf_share_mem_hd_down(1);
|
||||||
return s32ret;
|
return s32ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int sf_check_eth0(void)
|
||||||
|
{
|
||||||
|
FILE *fp;
|
||||||
|
int len = 256;
|
||||||
|
char *output = malloc(len);
|
||||||
|
|
||||||
|
if (output == NULL) {
|
||||||
|
MLOGE("%s:%d output malloc err\n", __FUNCTION__, __LINE__);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
fp = popen("ifconfig eth0", "r");
|
||||||
|
if (fp == NULL) {
|
||||||
|
perror("popen");
|
||||||
|
free(output);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
fgets(output, len, fp);
|
||||||
|
if (strstr(output, "eth0") == NULL) {
|
||||||
|
MLOGI("The network card does not exist\n");
|
||||||
|
pclose(fp);
|
||||||
|
free(output);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
fgets(output, len, fp);
|
||||||
|
if (strstr(output, "inet ") == NULL) {
|
||||||
|
MLOGI("The network card exists, but no IP address has been assigned\n");
|
||||||
|
pclose(fp);
|
||||||
|
free(output);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
char *ip_address_start = strstr(output, "inet ") + strlen("inet ");
|
||||||
|
char *ip_address_end = strchr(ip_address_start, ' ');
|
||||||
|
*ip_address_end = '\0';
|
||||||
|
|
||||||
|
MLOGI("IP address of network card eth0: %s\n", ip_address_start);
|
||||||
|
|
||||||
|
pclose(fp);
|
||||||
|
free(output);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
int sf_check_usb0(void)
|
||||||
|
{
|
||||||
|
FILE *fp;
|
||||||
|
int len = 256;
|
||||||
|
char *output = malloc(len);
|
||||||
|
|
||||||
|
if (output == NULL) {
|
||||||
|
MLOGE("%s:%d output malloc err\n", __FUNCTION__, __LINE__);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
fp = popen("ifconfig usb0", "r");
|
||||||
|
if (fp == NULL) {
|
||||||
|
perror("popen");
|
||||||
|
free(output);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
fgets(output, len, fp);
|
||||||
|
if (strstr(output, "usb0") == NULL) {
|
||||||
|
MLOGI("The network card does not exist\n");
|
||||||
|
pclose(fp);
|
||||||
|
free(output);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
fgets(output, len, fp);
|
||||||
|
if (strstr(output, "inet ") == NULL) {
|
||||||
|
MLOGI("The network card exists, but no IP address has been assigned\n");
|
||||||
|
pclose(fp);
|
||||||
|
free(output);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
char *ip_address_start = strstr(output, "inet ") + strlen("inet ");
|
||||||
|
char *ip_address_end = strchr(ip_address_start, ' ');
|
||||||
|
*ip_address_end = '\0';
|
||||||
|
|
||||||
|
MLOGI("IP address of network card usb0: %s\n", ip_address_start);
|
||||||
|
|
||||||
|
pclose(fp);
|
||||||
|
free(output);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#if __cplusplus
|
#if __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -2024,6 +2024,7 @@ void* sf_sys_do_upgrade(void *arg)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
SysResetFlag();
|
SysResetFlag();
|
||||||
|
Save_MenuInfo();
|
||||||
//sync();
|
//sync();
|
||||||
}
|
}
|
||||||
sf_mcu_reg_set(SF_MCU_SOFT_UPDATE, 1);
|
sf_mcu_reg_set(SF_MCU_SOFT_UPDATE, 1);
|
||||||
|
|
|
@ -1428,15 +1428,15 @@ THREAD_RETTYPE PhotoFast_FlowPreviewThread(void *arg)
|
||||||
|
|
||||||
UINT32 period = 0;
|
UINT32 period = 0;
|
||||||
#if HUNTING_CAMERA_MCU == ENABLE
|
#if HUNTING_CAMERA_MCU == ENABLE
|
||||||
if(1 == puiPara->MultiShotIntevel)
|
if(SF_MULTISHOT_INTEVEL_1S == puiPara->MultiShotIntevel)
|
||||||
{
|
{
|
||||||
period = 1000;//The interval between consecutive shots of each photo is 1 second
|
period = 1000;//The interval between consecutive shots of each photo is 1 second
|
||||||
}
|
}
|
||||||
else if(2 == puiPara->MultiShotIntevel) {
|
else if(SF_MULTISHOT_INTEVEL_2S == puiPara->MultiShotIntevel) {
|
||||||
period = 2000;//The interval between consecutive shots of each photo is 2 second
|
period = 2000;//The interval between consecutive shots of each photo is 2 second
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
period = 1000 / max_cnt;
|
period = 1000 / max_cnt;//SF_MULTISHOT_INTEVEL_0S
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
period = 1000 / max_cnt;
|
period = 1000 / max_cnt;
|
||||||
|
|
|
@ -2152,9 +2152,10 @@ void sf_file_thumb_cfg_sava(void)
|
||||||
if (pThumbFileCfg != NULL) {
|
if (pThumbFileCfg != NULL) {
|
||||||
for(fileIndex = 0; fileIndex < pThumbFileCfg->filecnt; fileIndex++)
|
for(fileIndex = 0; fileIndex < pThumbFileCfg->filecnt; fileIndex++)
|
||||||
{
|
{
|
||||||
if((fileIndex == 0) || (puiPara->SendMulti == 1))
|
if((0 == fileIndex) || ((1 == puiPara->SendMulti))){
|
||||||
sf_add_file_name_to_send_list(pThumbFileCfg->stfileattr[fileIndex].thumbfileName);
|
sf_add_file_name_to_send_list(pThumbFileCfg->stfileattr[fileIndex].thumbfileName);
|
||||||
printf("%s:%d thumbfileSize:%ld thumbfileName:%s thumbfilePath:%s\n", __FUNCTION__, __LINE__,pThumbFileCfg->stfileattr[fileIndex].thumbfileSize,pThumbFileCfg->stfileattr[fileIndex].thumbfileName,pThumbFileCfg->stfileattr[fileIndex].thumbfilePath);
|
printf("%s:%d thumbfileSize:%ld thumbfileName:%s thumbfilePath:%s\n", __FUNCTION__, __LINE__,pThumbFileCfg->stfileattr[fileIndex].thumbfileSize,pThumbFileCfg->stfileattr[fileIndex].thumbfileName,pThumbFileCfg->stfileattr[fileIndex].thumbfilePath);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//printf("%s:%d e Size:%ld\n", __FUNCTION__, __LINE__,pThumbFileCfg->stfileattr[fileIndex].thumbfileSize);
|
//printf("%s:%d e Size:%ld\n", __FUNCTION__, __LINE__,pThumbFileCfg->stfileattr[fileIndex].thumbfileSize);
|
||||||
free(pThumbFileCfg);
|
free(pThumbFileCfg);
|
||||||
|
@ -2174,6 +2175,7 @@ void sf_add_file_name_to_send_list(char *sendfname)
|
||||||
char sendListName[64] = {0};
|
char sendListName[64] = {0};
|
||||||
char buff[SF_SEND_LIST_ITEM_LENGTH+1] = {0};
|
char buff[SF_SEND_LIST_ITEM_LENGTH+1] = {0};
|
||||||
int fd = 0;
|
int fd = 0;
|
||||||
|
static int flag = 0;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
UIMenuStoreInfo *puiPara = sf_ui_para_get();
|
UIMenuStoreInfo *puiPara = sf_ui_para_get();
|
||||||
#if SF_IQ_TEST != ENABLE
|
#if SF_IQ_TEST != ENABLE
|
||||||
|
@ -2196,12 +2198,13 @@ void sf_add_file_name_to_send_list(char *sendfname)
|
||||||
//printf("Add %s to send.List\n", sendfname);
|
//printf("Add %s to send.List\n", sendfname);
|
||||||
if(0 == puiPara->SendType){
|
if(0 == puiPara->SendType){
|
||||||
snprintf(sendListName, sizeof(sendListName), "%s", SF_THUMB_SEND_AUTO);
|
snprintf(sendListName, sizeof(sendListName), "%s", SF_THUMB_SEND_AUTO);
|
||||||
if(access(sendListName, F_OK) == 0)
|
if((access(sendListName, F_OK) == 0) && (0 == flag))
|
||||||
{
|
{
|
||||||
if (FileSys_DeleteFile(sendListName) != FST_STA_OK) {
|
if (FileSys_DeleteFile(sendListName) != FST_STA_OK) {
|
||||||
DBG_IND("Ignore deleting file.\r\n");
|
DBG_IND("Ignore deleting file.\r\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
flag = 1;
|
||||||
|
|
||||||
}else {
|
}else {
|
||||||
snprintf(sendListName, sizeof(sendListName), "%s", SF_THUMB_SEND_LIST);
|
snprintf(sendListName, sizeof(sendListName), "%s", SF_THUMB_SEND_LIST);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user