合入Branch_S550_Fast_Emmc代码
This commit is contained in:
		
						commit
						55e5373443
					
				|  | @ -984,6 +984,8 @@ | |||
| #define SF_SD_LOG_INFO_FILENAME        "/tmp/SD.txt" | ||||
| 
 | ||||
| #define SF_4G_MODE_TEST                 DISABLE | ||||
| 
 | ||||
| #define SF_DCIM_PATH 				":\\DCIM\\" | ||||
| //////////////////////sf end///////////////////////////////
 | ||||
| 
 | ||||
| /*******************************************************************************************
 | ||||
|  |  | |||
|  | @ -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 | ||||
|  |  | |||
|  | @ -364,12 +364,12 @@ static void LV_MenuCommonOption_UpdateContent(TM_MENU *pMenu) | |||
| 			printf("[LV_MenuCommonOption_UpdateContent]s_SelOption: %d\n", s_SelOption); | ||||
| 			if (IDM_FORMAT_SD == pItem->ItemId) { | ||||
| 				if (0 == SelOption && i == 0) { | ||||
| 					itemIconId = LV_PLUGIN_IMG_ID_SF_LIST_SELECTED;//√
 | ||||
| 					lv_obj_set_pos(image_option1_scr_uiflowmenucommonoption, 272, 0); | ||||
| 					itemIconId = LV_PLUGIN_IMG_ID_SF_NEXT2;//>
 | ||||
| 					lv_obj_set_pos(image_option1_scr_uiflowmenucommonoption, 288, 0); | ||||
| 					ui_hidden = false; | ||||
| 				} else if (1 == SelOption && i == 1) { | ||||
| 					itemIconId = LV_PLUGIN_IMG_ID_SF_LIST_SELECTED;//√
 | ||||
| 					lv_obj_set_pos(image_option2_scr_uiflowmenucommonoption, 272, 0); | ||||
| 					itemIconId = LV_PLUGIN_IMG_ID_SF_NEXT2;//>
 | ||||
| 					lv_obj_set_pos(image_option2_scr_uiflowmenucommonoption, 288, 0); | ||||
| 					ui_hidden = false; | ||||
| 				} else if (0 == SelOption && i == 1) { | ||||
| 					itemIconId = LV_PLUGIN_IMG_ID_SF_NEXT1;//>
 | ||||
|  |  | |||
|  | @ -2380,6 +2380,10 @@ static void UIFlowPlay_Key(lv_obj_t* obj, uint32_t key) | |||
|     case LV_USER_KEY_UP: | ||||
|     case LV_USER_KEY_PREV: | ||||
|     { | ||||
|         printf("[UIFlowPlay_Key]exit play handle change: %d. \n", FirstHandle); | ||||
|         ChangeHandle = FirstHandle; | ||||
|         FirstHandle = -1; | ||||
|          | ||||
|         UIFlowPlay_Exit(obj); | ||||
|         break; | ||||
|     UINT32 uiFileSeq; | ||||
|  |  | |||
|  | @ -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; | ||||
|  |  | |||
|  | @ -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; | ||||
|  |  | |||
|  | @ -794,7 +794,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: | ||||
|  | @ -802,6 +802,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; | ||||
|  |  | |||
|  | @ -1118,6 +1118,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;
 | ||||
|  | @ -1203,8 +1205,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) | ||||
|  | @ -1214,12 +1230,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()) { | ||||
|  |  | |||
|  | @ -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; | ||||
| 			} | ||||
| 			 | ||||
| 		} | ||||
|  | @ -901,15 +902,15 @@ void sf_battery_level_polling(void) | |||
| 			readBatCnt++; | ||||
|             if(puiPara->BatteryLogSwitch) | ||||
|             { | ||||
|                 printf("\nDC Adc:%d After Convert:(%d.%dV),Is Dc In=%s, TemperAdc:%d \n", sf_battery_convert_to_adc(24, 100, DcVoltageVal), DcVoltageVal / 10, DcVoltageVal % 10, IsPowerDcIn == 1? "Yes" : "No", TemperAdc); | ||||
|                 printf("\nDC Adc:%d After Convert:(%d.%dV),Is Dc In=%s, TemperAdc:%d \n", sf_battery_convert_to_adc(24, 100, _DcVoltageVal), _DcVoltageVal / 10, _DcVoltageVal % 10, IsPowerDcIn == 1? "Yes" : "No", TemperAdc); | ||||
| 
 | ||||
|                 if(LiPolymerVoltageVal) | ||||
|                 if(_LiPolymerVoltageVal) | ||||
|                 { | ||||
|                     printf("Li Battery Adc:%d After Convert:(%d.%dV)\n\n", sf_battery_convert_to_adc(24, 100, LiPolymerVoltageVal), LiPolymerVoltageVal / 10, LiPolymerVoltageVal % 10); | ||||
|                     printf("Li Battery Adc:%d After Convert:(%d.%dV)\n\n", sf_battery_convert_to_adc(24, 100, _LiPolymerVoltageVal), _LiPolymerVoltageVal / 10, _LiPolymerVoltageVal % 10); | ||||
|                 } | ||||
|                 else | ||||
|                 { | ||||
|                     printf("Other Battery Adc:%d After Convert:(%d.%dV)\n\n", sf_aa_battery_convert_to_adc(24, 100, BatVoltageVal),BatVoltageVal / 10, BatVoltageVal % 10); | ||||
|                     printf("Other Battery Adc:%d After Convert:(%d.%dV)\n\n", sf_aa_battery_convert_to_adc(24, 100, _BatVoltageVal),_BatVoltageVal / 10, _BatVoltageVal % 10); | ||||
|                 } | ||||
|             } | ||||
| 			if(readBatCnt >= 10) | ||||
|  | @ -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();
 | ||||
| 
 | ||||
|  |  | |||
|  | @ -1311,7 +1311,10 @@ SINT32 sf_statistics_param_save(SF_PDT_PARAM_STATISTICS_S* pStatisticsParam) | |||
| 		MLOGE("save param failed!!!\n"); | ||||
| 	fsync(fd); | ||||
| 	close(fd); | ||||
| 
 | ||||
| 	free(file_path); | ||||
|     system("sync"); | ||||
| 	MLOGI("save e\n"); | ||||
| 	return SF_SUCCESS; | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -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; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 sober.song
						sober.song