解决参数没有变更时,不写Flash
This commit is contained in:
parent
4fa51839ce
commit
99d7d53553
|
@ -336,7 +336,7 @@ static BOOL Check_OTA(VOID)
|
|||
void Load_MenuInfo(void)
|
||||
{
|
||||
#if (PST_FUNC == ENABLE)
|
||||
#if 0
|
||||
#if 0
|
||||
MODELEXT_HEADER *head = NULL;
|
||||
BININFO *pBinInfo = (BININFO *)Dx_GetModelExtCfg(MODELEXT_TYPE_BIN_INFO, &head);
|
||||
PPSTORE_SECTION_HANDLE pSection;
|
||||
|
@ -407,7 +407,7 @@ void Load_MenuInfo(void)
|
|||
UINT32 result;
|
||||
UINT32 uiFWUpdate = 0;
|
||||
UINT32 uiTmpBoot = 0;
|
||||
|
||||
|
||||
#if 1 //cmdline for ota
|
||||
FILE *fp = NULL;
|
||||
UINT32 u32size = 0;
|
||||
|
@ -498,8 +498,7 @@ void Load_MenuInfo(void)
|
|||
#endif
|
||||
|
||||
#else //for #if (PST_FUNC == ENABLE)
|
||||
|
||||
if(Check_OTA() == TRUE){
|
||||
if(Check_OTA() == TRUE){
|
||||
DBG_DUMP("OTA success, reset system param\n");
|
||||
|
||||
// #if HUNTING_CAMERA_MCU == ENABLE
|
||||
|
@ -539,7 +538,7 @@ void Load_MenuInfo(void)
|
|||
unsigned long long partition_ofs= 0, partition_size = 0;
|
||||
int ret = -1;
|
||||
UINT32 sectorCnt = 0;
|
||||
FILE *fd_mmc = NULL;
|
||||
FILE *fd_mmc = NULL;
|
||||
INT32 rw_len = 0;
|
||||
void *pTempbuf = NULL;
|
||||
|
||||
|
@ -581,10 +580,10 @@ void Load_MenuInfo(void)
|
|||
}
|
||||
|
||||
#elif defined(_EMBMEM_SPI_NAND_)
|
||||
|
||||
|
||||
unsigned long long partition_ofs= 0, partition_size = 0;
|
||||
int ret = -1;
|
||||
FILE *nandump_fp = NULL;
|
||||
FILE *nandump_fp = NULL;
|
||||
INT32 rw_len = 0;
|
||||
UINT32 sectorCnt = 0;
|
||||
void *tmpInfo = NULL;
|
||||
|
@ -711,7 +710,8 @@ EXIT:
|
|||
ret = -1;
|
||||
goto EXIT;
|
||||
}
|
||||
|
||||
printf("[%s:%d]((UIMenuStoreInfo*)tmpInfo)->uhInfoSize=%lu,sizeof(currentInfo)=%lu\n",
|
||||
__FUNCTION__, __LINE__, ((UIMenuStoreInfo*)tmpInfo)->uhInfoSize, sizeof(currentInfo));
|
||||
if(((UIMenuStoreInfo*)tmpInfo)->uhInfoSize == sizeof(currentInfo)){
|
||||
|
||||
#if HUNTING_CAMERA_MCU == ENABLE
|
||||
|
@ -1072,12 +1072,20 @@ EXIT:
|
|||
#if HUNTING_CAMERA_MCU == ENABLE
|
||||
sf_power_on_para_check_init();
|
||||
#endif
|
||||
/* check if sys param changed */
|
||||
if(memcmp(¤tInfo, &origInfo, sizeof(currentInfo)) == 0){
|
||||
|
||||
|
||||
/* check if sys param changed */
|
||||
int sflSize = sizeof(currentInfo) - ((int)¤tInfo.TimelapseTime - (int)¤tInfo);
|
||||
printf("sizeof(currentInfo)=%d, (int)¤tInfo.TimelapseTime=%d, (int)¤tInfo=%d, sflSize=%d,\n",
|
||||
sizeof(currentInfo), (int)¤tInfo.TimelapseTime, (int)¤tInfo, sflSize);
|
||||
|
||||
if(memcmp(¤tInfo.TimelapseTime, &origInfo.TimelapseTime, sflSize) == 0)
|
||||
{
|
||||
|
||||
DBG_DUMP("menu info is not changed\n");
|
||||
goto EXIT;
|
||||
}
|
||||
|
||||
|
||||
sectorCnt = (sizeof(currentInfo) / _EMBMEM_BLK_SIZE_) + ((sizeof(currentInfo) % _EMBMEM_BLK_SIZE_)? 1 : 0);
|
||||
|
||||
ret = UIInfo_GetStrgPartitionInfo(&partition_ofs, &partition_size, PARTITION_PATH_SYS);
|
||||
|
@ -2402,4 +2410,4 @@ void sf_power_on_para_check_init(void)
|
|||
sf_set_pir_sensitivity(puiPara->PirSensitivity);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user