解决参数没有变更时,不写Flash

This commit is contained in:
greg 2024-01-12 13:59:55 +08:00
parent 4fa51839ce
commit 99d7d53553

View File

@ -498,7 +498,6 @@ void Load_MenuInfo(void)
#endif
#else //for #if (PST_FUNC == ENABLE)
if(Check_OTA() == TRUE){
DBG_DUMP("OTA success, reset system param\n");
@ -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,8 +1072,16 @@ EXIT:
#if HUNTING_CAMERA_MCU == ENABLE
sf_power_on_para_check_init();
#endif
/* check if sys param changed */
if(memcmp(&currentInfo, &origInfo, sizeof(currentInfo)) == 0){
int sflSize = sizeof(currentInfo) - ((int)&currentInfo.TimelapseTime - (int)&currentInfo);
printf("sizeof(currentInfo)=%d, (int)&currentInfo.TimelapseTime=%d, (int)&currentInfo=%d, sflSize=%d,\n",
sizeof(currentInfo), (int)&currentInfo.TimelapseTime, (int)&currentInfo, sflSize);
if(memcmp(&currentInfo.TimelapseTime, &origInfo.TimelapseTime, sflSize) == 0)
{
DBG_DUMP("menu info is not changed\n");
goto EXIT;
}