1.优化ui参数相关

This commit is contained in:
payton 2023-07-27 14:00:09 +08:00
parent 148df46ead
commit 9e10301103
3 changed files with 26 additions and 16 deletions

View File

@ -233,9 +233,6 @@ INT32 System_OnBoot(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
Load_MenuInfo(); Load_MenuInfo();
#else #else
Load_MenuInfo(); //reset value cause the FL_FSStatus as '0', we do so before NVTEVT_STRG_ATTACH finish Load_MenuInfo(); //reset value cause the FL_FSStatus as '0', we do so before NVTEVT_STRG_ATTACH finish
#if HUNTING_CAMERA_MCU == ENABLE
sf_cardv_para_check_start();
#endif
#endif #endif
#endif #endif
#endif #endif
@ -244,6 +241,10 @@ INT32 System_OnBoot(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
Init_MenuInfo(); Init_MenuInfo();
#endif #endif
#if HUNTING_CAMERA_MCU == ENABLE
sf_cardv_para_check_start();
#endif
#if (UCTRL_FUNC) #if (UCTRL_FUNC)
UctrlMain_Init(); UctrlMain_Init();
#endif #endif

View File

@ -511,8 +511,10 @@ void Load_MenuInfo(void)
} }
#endif #endif
#if HUNTING_CAMERA_MCU == ENABLE #if HUNTING_CAMERA_MCU == ENABLE
origInfo = currentInfo; //origInfo = currentInfo;
origInfo_check = currentInfo; //origInfo_check = currentInfo;
memcpy(&origInfo, &currentInfo, sizeof(currentInfo));
memcpy(&origInfo_check, &currentInfo, sizeof(currentInfo));
sf_share_mem_customer_down(0); sf_share_mem_customer_down(0);
#endif #endif
return; return;
@ -729,8 +731,10 @@ EXIT:
#if HUNTING_CAMERA_MCU == ENABLE #if HUNTING_CAMERA_MCU == ENABLE
sf_power_on_para_check_init(); sf_power_on_para_check_init();
#endif #endif
origInfo = currentInfo; //origInfo = currentInfo;
origInfo_check = currentInfo; //origInfo_check = currentInfo;
memcpy(&origInfo, &currentInfo, sizeof(currentInfo));
memcpy(&origInfo_check, &currentInfo, sizeof(currentInfo));
#if HUNTING_CAMERA_MCU == ENABLE #if HUNTING_CAMERA_MCU == ENABLE
sf_share_mem_customer_down(0); sf_share_mem_customer_down(0);
#endif #endif
@ -1095,6 +1099,8 @@ EXIT:
sum); sum);
#if HUNTING_CAMERA_MCU == ENABLE #if HUNTING_CAMERA_MCU == ENABLE
//origInfo = currentInfo;
//origInfo_check = currentInfo;
//sf_share_mem_customer_down(0); //sf_share_mem_customer_down(0);
#endif #endif
} }
@ -2266,10 +2272,11 @@ UIMenuStoreInfo* sf_ui_para_get(void)
*************************************************/ *************************************************/
BOOL sf_get_cardv_para_check_flag(void) BOOL sf_get_cardv_para_check_flag(void)
{ {
if(memcmp(&currentInfo, &origInfo_check, sizeof(UIMenuStoreInfo)) == 0){ if(memcmp(&currentInfo, &origInfo_check, sizeof(currentInfo)) == 0){
return FALSE; return FALSE;
} }
origInfo_check = currentInfo; memcpy(&origInfo_check, &currentInfo, sizeof(currentInfo));
//origInfo_check = currentInfo;
return TRUE; return TRUE;
} }

View File

@ -319,9 +319,10 @@ EXIT:
currentInfo.uhInfoSize = sizeof(UIMenuStoreInfo); currentInfo.uhInfoSize = sizeof(UIMenuStoreInfo);
} }
//SysCheckFlag(); //SysCheckFlag();
origInfo = currentInfo; //origInfo = currentInfo;
origInfo_check = currentInfo; //origInfo_check = currentInfo;
memcpy(&origInfo, &currentInfo, sizeof(currentInfo));
memcpy(&origInfo_check, &currentInfo, sizeof(currentInfo));
if(sys_mtd_fp){ if(sys_mtd_fp){
fclose(sys_mtd_fp); fclose(sys_mtd_fp);
sys_mtd_fp = NULL; sys_mtd_fp = NULL;
@ -362,8 +363,8 @@ BOOL sf_get_para_check_flag(void)
//MLOGI("menu info is changed\n"); //MLOGI("menu info is changed\n");
return FALSE; return FALSE;
} }
origInfo_check = currentInfo; //origInfo_check = currentInfo;
memcpy(&origInfo_check, &currentInfo, sizeof(currentInfo));
return TRUE; return TRUE;
} }
@ -937,7 +938,8 @@ void sf_customer_param_set(UIMenuStoreInfo *pSfCustomerPara)
{ {
//currentInfo = *pSfCustomerPara; //currentInfo = *pSfCustomerPara;
memcpy(&currentInfo,pSfCustomerPara,sizeof(UIMenuStoreInfo)); memcpy(&currentInfo,pSfCustomerPara,sizeof(UIMenuStoreInfo));
origInfo_check = currentInfo; //origInfo_check = currentInfo;
memcpy(&origInfo_check, &currentInfo, sizeof(UIMenuStoreInfo));
} }
void sf_customer_param_set_down(UIMenuStoreInfo *pSfCustomerPara) void sf_customer_param_set_down(UIMenuStoreInfo *pSfCustomerPara)