修改camera升级固件路径
This commit is contained in:
		
							parent
							
								
									1efad71d96
								
							
						
					
					
						commit
						ac2348feba
					
				|  | @ -34,7 +34,7 @@ | |||
| 
 | ||||
| //..............................................................................
 | ||||
| // FW version and name
 | ||||
| #define FW_UPDATE_NAME                  "A:\\FW98565A.bin" | ||||
| #define FW_UPDATE_NAME                  ":\\FW98565A.bin" | ||||
| #define FW_VERSION_RELEASE              DISABLE //DISABLE
 | ||||
| #define FW_VERSION_NUM                  "REGULAR_0402_001" | ||||
| 
 | ||||
|  |  | |||
|  | @ -799,7 +799,7 @@ CHAR System_Get_DCF_Disk_Drive(DCF_HANDLE handle) | |||
| 	if(drive == '\0'){ | ||||
| 		DBG_ERR("invalid act handle(%d)\n", handle); | ||||
| 	} | ||||
| 
 | ||||
| 	DBG_WRN("get disk driver, %c\n", drive); | ||||
| 	return drive; | ||||
| } | ||||
| 
 | ||||
|  | @ -1694,14 +1694,18 @@ UINT32 System_OnStrg_UploadFW(UINT32 DevID) | |||
|     DBG_FUNC_BEGIN("\r\n"); | ||||
| 
 | ||||
| 	//m_bUpdRename = FALSE;
 | ||||
| 	UINT32 dcf_handle = (UINT32)System_Get_DCF_Handle(); /* 0:emmc 1:sd */ | ||||
| 	char font = System_Get_DCF_Disk_Drive(dcf_handle) == 'B' ? 'B' : 'A'; | ||||
| 	char fw_file[64] = {'\0'}; | ||||
| 	sprintf((char *)fw_file, "%c%s", font, FW_UPDATE_NAME); | ||||
| 
 | ||||
| 	uiFwSize = FileSys_GetFileLen(FW_UPDATE_NAME); | ||||
| 	uiFwSize = FileSys_GetFileLen(fw_file); | ||||
| 	uiFwSize += _EMBMEM_BLK_SIZE_; /* IMPOARTANT!! */ | ||||
| 
 | ||||
| 	hFile = FileSys_OpenFile(FW_UPDATE_NAME, FST_OPEN_READ); | ||||
| 	hFile = FileSys_OpenFile(fw_file, FST_OPEN_READ); | ||||
| 
 | ||||
| 	if (hFile == 0) { | ||||
| 		DBG_ERR("cannot find %s\r\n", FW_UPDATE_NAME); | ||||
| 		DBG_ERR("cannot find %s\r\n", fw_file); | ||||
| 		return UPDNAND_STS_FW_INVALID_STG; | ||||
| 	} | ||||
| 
 | ||||
|  | @ -1714,7 +1718,7 @@ UINT32 System_OnStrg_UploadFW(UINT32 DevID) | |||
|     } | ||||
| 
 | ||||
| 	fst_er = FileSys_ReadFile(hFile, (UINT8 *)p_Mem, &uiFwSize, 0, NULL); | ||||
|     DBG_IND("Update Filename=%s, File Size=%d\r\n",FW_UPDATE_NAME,uiFwSize); | ||||
|     DBG_IND("Update Filename=%s, File Size=%d\r\n",fw_file,uiFwSize); | ||||
| 	FileSys_CloseFile(hFile); | ||||
| 	if (fst_er != FST_STA_OK) { | ||||
| 		DBG_ERR("FW bin read fail\r\n"); | ||||
|  |  | |||
|  | @ -94,6 +94,9 @@ void XML_ValueResult(UINT32 cmd, UINT64 value, HFS_U32 bufAddr, HFS_U32 *bufSize | |||
| #define HW_WIFI_CLIENT_SOCKET_NOTIFY_ENABLE    0x00000008 | ||||
| #define HW_SET_AUTO_RECORDING_DISABLE 	       0x00000010 //WIFIAPP_CMD_SET_AUTO_RECORDING (2012)
 | ||||
| 
 | ||||
| extern DCF_HANDLE System_Get_DCF_Handle(void); | ||||
| extern CHAR System_Get_DCF_Disk_Drive(DCF_HANDLE handle); | ||||
| 
 | ||||
| 
 | ||||
| typedef enum { | ||||
| 	WIFI_AUTH_TYPE_WPA_TKIP = 0, | ||||
|  | @ -2166,8 +2169,12 @@ int XML_GetUpdateFWPath(char *path, char *argument, HFS_U32 bufAddr, HFS_U32 *bu | |||
| { | ||||
| 	char url[XML_PATH_LEN]; | ||||
| 	char FWPath[XML_PATH_LEN]; | ||||
| 	UINT32 dcf_handle = (UINT32)System_Get_DCF_Handle(); /* 0:emmc 1:sd */ | ||||
| 	char font = System_Get_DCF_Disk_Drive(dcf_handle) == 'B' ? 'B' : 'A'; | ||||
| 	char fw_file[64] = {'\0'}; | ||||
| 	sprintf((char *)fw_file, "%c%s", font, FW_UPDATE_NAME); | ||||
| 
 | ||||
| 	XML_Nvt2ecosPath(FW_UPDATE_NAME, FWPath, sizeof(FWPath)); | ||||
| 	XML_Nvt2ecosPath(fw_file, FWPath, sizeof(FWPath)); | ||||
| 	snprintf(url, sizeof(url), "http://%s%s", UINet_GetIP(), (char *)FWPath); | ||||
| 
 | ||||
| 	XML_StringResult(WIFIAPP_CMD_GET_UPDATEFW_PATH, url, bufAddr, bufSize, mimeType); | ||||
|  |  | |||
|  | @ -262,6 +262,11 @@ INT32 UIMenuWndWiFiMobileLinkOK_OnBackgroundDone(VControl *pCtrl, UINT32 paramNu | |||
| 	NVTEVT event; | ||||
| 	UINT32 status; | ||||
| 
 | ||||
| 	UINT32 dcf_handle = (UINT32)System_Get_DCF_Handle(); /* 0:emmc 1:sd */ | ||||
| 	char font = System_Get_DCF_Disk_Drive(dcf_handle) == 'B' ? 'B' : 'A'; | ||||
| 	char fw_file[64] = {'\0'}; | ||||
| 	sprintf((char *)fw_file, "%c%s", font, FW_UPDATE_NAME); | ||||
| 
 | ||||
| 	event = paramArray[ONDONE_PARAM_INDEX_CMD]; | ||||
| 	status = paramArray[ONDONE_PARAM_INDEX_RET]; | ||||
| 	DBG_DUMP("%s event = 0x%x, status=%d\r\n", __FUNCTION__, event, status); | ||||
|  | @ -290,7 +295,7 @@ INT32 UIMenuWndWiFiMobileLinkOK_OnBackgroundDone(VControl *pCtrl, UINT32 paramNu | |||
| 
 | ||||
| 				WifiCmd_Done(WIFIFLAG_UPDATE_DONE, WIFIAPP_RET_OK); | ||||
| 
 | ||||
| 				ret = FileSys_DeleteFile(FW_UPDATE_NAME); | ||||
| 				ret = FileSys_DeleteFile(fw_file); | ||||
| 				if (ret != FST_STA_OK) { | ||||
| 					DBG_ERR("%s:delete FW fail %d\r\n", __FUNCTION__, status); | ||||
| 				} | ||||
|  |  | |||
|  | @ -11,6 +11,7 @@ | |||
| #endif | ||||
| #include <sys/types.h> | ||||
| #include <dirent.h> | ||||
| #include "DCF.h" | ||||
| 
 | ||||
| #define PAGE           32 | ||||
| #define PER_PAGE_NUM   5 | ||||
|  | @ -33,6 +34,10 @@ BOOL PrevSel_Img = false; | |||
| #define MENU_HAS_NOT_CHANGED 0 | ||||
| static int gMenuLuck = MENU_CLOSED; | ||||
| static int gMenuChanged = MENU_HAS_NOT_CHANGED; | ||||
| 
 | ||||
| extern DCF_HANDLE System_Get_DCF_Handle(void); | ||||
| extern char System_Get_DCF_Disk_Drive(DCF_HANDLE handle); | ||||
| 
 | ||||
| int is_menu_screen_luck(void) | ||||
| { | ||||
| 	return gMenuLuck; | ||||
|  | @ -85,7 +90,11 @@ static int is_camera_fw_upgrade(void) | |||
| { | ||||
| 	FST_FILE hFile = NULL; | ||||
| 		// return UPGRADABLE;
 | ||||
| 	hFile =  FileSys_OpenFile(FW_UPDATE_NAME, FST_OPEN_READ); | ||||
| 	UINT32 dcf_handle = (UINT32)System_Get_DCF_Handle(); /* 0:emmc 1:sd */ | ||||
| 	char font = System_Get_DCF_Disk_Drive(dcf_handle) == 'B' ? 'B' : 'A'; | ||||
| 	char fw_file[64] = {'\0'}; | ||||
| 	sprintf((char *)fw_file, "%c%s", font, FW_UPDATE_NAME); | ||||
| 	hFile =  FileSys_OpenFile(fw_file, FST_OPEN_READ); | ||||
| 	//if (gBattery < 40 || hFile == NULL)
 | ||||
| 	if (hFile == NULL) | ||||
| 	{ | ||||
|  |  | |||
|  | @ -4,6 +4,8 @@ | |||
| #include "UIApp/Network/WifiAppCmd.h" | ||||
| #include "UIApp/Network/UIAppNetwork.h" | ||||
| #include "UIApp/Network/UIAppWiFiCmdMovie.h" | ||||
| #include "DCF.h" | ||||
| 
 | ||||
| 
 | ||||
| static lv_group_t* gp_btns = NULL; | ||||
| char StringTmpBuf[32] = {0}; | ||||
|  | @ -11,6 +13,10 @@ static void task_delay_close(lv_task_t* task); | |||
| static void task_disconnect_last(lv_task_t* task); | ||||
| static void set_indev_keypad_group(lv_obj_t* obj); | ||||
| 
 | ||||
| extern DCF_HANDLE System_Get_DCF_Handle(void); | ||||
| extern char System_Get_DCF_Disk_Drive(DCF_HANDLE handle); | ||||
| 
 | ||||
| 
 | ||||
| typedef struct { | ||||
| 
 | ||||
| 	int* mode; | ||||
|  | @ -110,6 +116,10 @@ static void UIFlowWiFiLinkOK_BAK_EVT(lv_obj_t* obj, const LV_USER_EVENT_NVTMSG_D | |||
| { | ||||
| 	NVTEVT event; | ||||
| 	UINT32 status; | ||||
| 	UINT32 dcf_handle = (UINT32)System_Get_DCF_Handle(); /* 0:emmc 1:sd */ | ||||
| 	char font = System_Get_DCF_Disk_Drive(dcf_handle) == 'B' ? 'B' : 'A'; | ||||
| 	char fw_file[64] = {'\0'}; | ||||
| 	sprintf((char *)fw_file, "%c%s", font, FW_UPDATE_NAME); | ||||
| 
 | ||||
| 	event = msg->paramArray[ONDONE_PARAM_INDEX_CMD]; | ||||
| 	status = msg->paramArray[ONDONE_PARAM_INDEX_RET]; | ||||
|  | @ -139,7 +149,7 @@ static void UIFlowWiFiLinkOK_BAK_EVT(lv_obj_t* obj, const LV_USER_EVENT_NVTMSG_D | |||
| 
 | ||||
| 				WifiCmd_Done(WIFIFLAG_UPDATE_DONE, WIFIAPP_RET_OK); | ||||
| 
 | ||||
| 				ret = FileSys_DeleteFile(FW_UPDATE_NAME); | ||||
| 				ret = FileSys_DeleteFile(fw_file); | ||||
| 				if (ret != FST_STA_OK) { | ||||
| 					DBG_ERR("%s:delete FW fail %d\r\n", __FUNCTION__, status); | ||||
| 				} | ||||
|  |  | |||
|  | @ -94,6 +94,9 @@ EVENT_ITEM(NVTEVT_CB_MOVIE_VEDIO_READY, UIMenuWndWiFiMobileLinkOK_OnExeMovieVedi | |||
| EVENT_ITEM(NVTEVT_TIMER, UIMenuWndWiFiMobileLinkOK_OnTimer) | ||||
| EVENT_END | ||||
| 
 | ||||
| extern DCF_HANDLE System_Get_DCF_Handle(void); | ||||
| extern char System_Get_DCF_Disk_Drive(DCF_HANDLE handle); | ||||
| 
 | ||||
| extern char gLastMacAddr[]; | ||||
| INT32 UIMenuWndWiFiMobileLinkOK_OnOpen(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray) | ||||
| { | ||||
|  | @ -262,6 +265,11 @@ INT32 UIMenuWndWiFiMobileLinkOK_OnBackgroundDone(VControl *pCtrl, UINT32 paramNu | |||
| 	NVTEVT event; | ||||
| 	UINT32 status; | ||||
| 
 | ||||
| 	UINT32 dcf_handle = (UINT32)System_Get_DCF_Handle(); /* 0:emmc 1:sd */ | ||||
| 	char font = System_Get_DCF_Disk_Drive(dcf_handle) == 'B' ? 'B' : 'A'; | ||||
| 	char fw_file[64] = {'\0'}; | ||||
| 	sprintf((char *)fw_file, "%c%s", font, FW_UPDATE_NAME); | ||||
| 
 | ||||
| 	event = paramArray[ONDONE_PARAM_INDEX_CMD]; | ||||
| 	status = paramArray[ONDONE_PARAM_INDEX_RET]; | ||||
| 	DBG_DUMP("%s event = 0x%x, status=%d\r\n", __FUNCTION__, event, status); | ||||
|  | @ -290,7 +298,7 @@ INT32 UIMenuWndWiFiMobileLinkOK_OnBackgroundDone(VControl *pCtrl, UINT32 paramNu | |||
| 
 | ||||
| 				WifiCmd_Done(WIFIFLAG_UPDATE_DONE, WIFIAPP_RET_OK); | ||||
| 
 | ||||
| 				ret = FileSys_DeleteFile(FW_UPDATE_NAME); | ||||
| 				ret = FileSys_DeleteFile(fw_file); | ||||
| 				if (ret != FST_STA_OK) { | ||||
| 					DBG_ERR("%s:delete FW fail %d\r\n", __FUNCTION__, status); | ||||
| 				} | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 sober.song
						sober.song