Merge branch 'Branch_S550_Fast_Emmc' of 192.168.6.216:linux-em-group/s530-ntk into Branch_S550_Emmc

This commit is contained in:
xiehongyan 2024-01-04 10:18:45 +08:00
commit 88728fa9f2
9 changed files with 41 additions and 16 deletions

View File

@ -981,6 +981,8 @@
#define SF_SD_LOG_INFO_FILENAME "/tmp/SD.txt"
#define SF_4G_MODE_TEST DISABLE
#define SF_DCIM_PATH ":\\DCIM\\"
//////////////////////sf end///////////////////////////////
/*******************************************************************************************

View File

@ -922,6 +922,9 @@ UINT32 BackgroundFormatEmmc(void)
{
LogFile_ReOpen();
}
char tmp[32] = {'\0'};
snprintf(tmp, sizeof(tmp), "B%s", SF_DCIM_PATH); /* DCF 8.3 naming rule */
FileSys_MakeDir(tmp);
#else
LogFile_ReOpen();
#endif
@ -1021,6 +1024,9 @@ UINT32 BackgroundFormatCard(void)
{
LogFile_ReOpen();
}
char tmp[32] = {'\0'};
snprintf(tmp, sizeof(tmp), "A%s", SF_DCIM_PATH); /* DCF 8.3 naming rule */
FileSys_MakeDir(tmp);
#else
LogFile_ReOpen();
#endif

View File

@ -1748,6 +1748,7 @@ void SysResetFlag(void)
/////////////
puiPara->StampSwitch = DEFAULT_DATE_STAMP;//DEFAULT_STAMP_SWITCH;
puiPara->BatteryType = DEFAULT_BATTERY_TYPE;
puiPara->LiBatteryType = DEFAULT_BATTERY_TYPE;
puiPara->SdLoopSwitch = DEFAULT_SD_LOOP_SWITCH;
puiPara->PwdSwitch = DEFAULT_PWD_SWITCH;
puiPara->SendPhotoSwitch = DEFAULT_SEND_PHOTO_SWITCH;

View File

@ -580,6 +580,7 @@ typedef struct _UIMenuUIMenuStoreInfo {
CHAR SimIccidV[21];
CHAR SimIccidA[21];
UINT32 SdFailCount;
CHAR LiBatteryType;/*Alkaline/NI-MH/LI*/
UINT32 x1;
UINT32 x2;
UINT32 x3;

View File

@ -814,7 +814,7 @@ static SINT32 sf_app_proccess_cmd_para_update(SF_MESSAGE_BUF_S *pMessageBuf)
{
MLOGD("ID = %#x\n",pMessageBuf->arg1);
SF_PDT_PARAM_STATISTICS_S *pSifarPara = sf_statistics_param_get();
switch(pMessageBuf->arg1)
{
case SF_PARA_CMD_UPDATE:
@ -822,6 +822,7 @@ static SINT32 sf_app_proccess_cmd_para_update(SF_MESSAGE_BUF_S *pMessageBuf)
break;
case SF_PARA_CMD_RESET:
sf_statistics_param_reset(pSifarPara);
sf_statistics_param_save(pSifarPara);
break;
case SF_PARA_CMD_FWUP:
FwUpdate = pMessageBuf->arg2;

View File

@ -1104,6 +1104,8 @@ SINT16 app_file_transfer_Error_return_server(SF_FN_PARAM_S *pfnParam) {
static SINT32 app_file_transfer(SF_FN_PARAM_S *pfnParam) {
SINT32 s32ret = 0;
static int DailyreportSendFlag = 0;
static int PicUpDailyReportFlag = 0;
// SF_MESSAGE_BUF_S stMessageBuf = {0};
// UIMenuStoreInfo *pCustomerParam = pfnParam->pstParam;
// SF_PDT_PARAM_STATISTICS_S *pStaticParam = pfnParam->pstaticParam;
@ -1189,8 +1191,22 @@ static SINT32 app_file_transfer(SF_FN_PARAM_S *pfnParam) {
if(sf_get_send_gps_txt()){
s32ret = sf_gps_send_ftp();
}
if((!PicUpDailyReportFlag) && (pCustomerParam->PicUpDailyReport))
{
PicUpDailyReportFlag = 1;
sf_sms_set_pic(1);
sf_sleep_ms(200);
SLOGD("GpsSendFlag:%d\n", pCustomerParam->GpsSendFlag);
break;
}
if (!DailyreportSendFlag)
{
if ((sf_get_pic()) && (pCustomerParam->PicUpDailyReport)) {
s32ret = sf_send_file_to_ftp(1);
sf_sms_set_pic(0);
}
DailyreportSendFlag = 1;
s32ret = sf_send_file_to_ftp(2);
if(pCustomerParam->SdFailCount)
@ -1200,12 +1216,6 @@ static SINT32 app_file_transfer(SF_FN_PARAM_S *pfnParam) {
sf_sleep_ms(200);
}
//pCustomerParam->GpsSendFlag = 0;
if(pCustomerParam->PicUpDailyReport){
sf_sms_set_pic(1);
sf_sleep_ms(200);
SLOGD("GpsSendFlag:%d\n", pCustomerParam->GpsSendFlag);
break;
}
}
if (sf_get_pic()) {

View File

@ -411,6 +411,7 @@ UINT32 sf_battery_adc_value_get_once(void)
printf("[sf_battery_level_polling]is lith battery\n");
if(SF_BATT_LI_PACK != puiPara->BatteryType)
{
puiPara->LiBatteryType = puiPara->BatteryType;
puiPara->BatteryType = SF_BATT_LI_PACK;
}
@ -420,7 +421,7 @@ UINT32 sf_battery_adc_value_get_once(void)
{ first_init--;
if (puiPara->BatteryType == SF_BATT_LI_PACK)
{
puiPara->BatteryType = SF_BATT_ALKALINE;
puiPara->BatteryType = puiPara->LiBatteryType == SF_BATT_LI_PACK ?SF_BATT_ALKALINE:puiPara->LiBatteryType;
}
}
@ -969,16 +970,17 @@ void sf_battery_level_polling(void)
printf("[sf_battery_level_polling]is lith battery\n");
if(SF_BATT_LI_PACK != puiPara->BatteryType)
{
puiPara->LiBatteryType = puiPara->BatteryType;
puiPara->BatteryType = SF_BATT_LI_PACK;
}
}
else{
if(puiPara->BatteryType == SF_BATT_LI_PACK)
{
puiPara->BatteryType = SF_BATT_ALKALINE;
}
}
else{
if(puiPara->BatteryType == SF_BATT_LI_PACK)
{
puiPara->BatteryType = puiPara->LiBatteryType == SF_BATT_LI_PACK ?SF_BATT_ALKALINE:puiPara->LiBatteryType;
}
}
//ret = sf_check_low_battery();

View File

@ -1304,7 +1304,8 @@ SINT32 sf_statistics_param_save(SF_PDT_PARAM_STATISTICS_S* pStatisticsParam)
MLOGE("save param failed!!!\n");
fsync(fd);
close(fd);
system("sync");
MLOGI("save e\n");
return SF_SUCCESS;
}

View File

@ -580,6 +580,7 @@ typedef struct _UIMenuUIMenuStoreInfo {
CHAR SimIccidV[21];
CHAR SimIccidA[21];
UINT32 SdFailCount;
CHAR LiBatteryType;/*Alkaline/NI-MH/LI*/
UINT32 x1;
UINT32 x2;