1.修改参数同步问题
This commit is contained in:
parent
049a600c44
commit
19307baf27
|
@ -501,6 +501,16 @@ void Load_MenuInfo(void)
|
||||||
|
|
||||||
if(Check_OTA() == TRUE){
|
if(Check_OTA() == TRUE){
|
||||||
DBG_DUMP("OTA success, reset system param\n");
|
DBG_DUMP("OTA success, reset system param\n");
|
||||||
|
|
||||||
|
#if HUNTING_CAMERA_MCU == ENABLE
|
||||||
|
if(sf_get_ui_para_flag())
|
||||||
|
{
|
||||||
|
memcpy(&origInfo, ¤tInfo, sizeof(currentInfo));
|
||||||
|
memcpy(&origInfo_check, ¤tInfo, sizeof(currentInfo));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
SysResetFlag();
|
SysResetFlag();
|
||||||
|
|
||||||
#if HUNTING_CAMERA_MCU == ENABLE
|
#if HUNTING_CAMERA_MCU == ENABLE
|
||||||
|
@ -515,7 +525,7 @@ void Load_MenuInfo(void)
|
||||||
//origInfo_check = currentInfo;
|
//origInfo_check = currentInfo;
|
||||||
memcpy(&origInfo, ¤tInfo, sizeof(currentInfo));
|
memcpy(&origInfo, ¤tInfo, sizeof(currentInfo));
|
||||||
memcpy(&origInfo_check, ¤tInfo, sizeof(currentInfo));
|
memcpy(&origInfo_check, ¤tInfo, sizeof(currentInfo));
|
||||||
sf_share_mem_customer_down(0);
|
//sf_share_mem_customer_down(0);
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -698,14 +708,19 @@ EXIT:
|
||||||
}
|
}
|
||||||
|
|
||||||
if(((UIMenuStoreInfo*)tmpInfo)->uhInfoSize == sizeof(currentInfo)){
|
if(((UIMenuStoreInfo*)tmpInfo)->uhInfoSize == sizeof(currentInfo)){
|
||||||
memcpy(¤tInfo, tmpInfo, sizeof(currentInfo));
|
|
||||||
#if HUNTING_CAMERA_MCU == ENABLE
|
#if HUNTING_CAMERA_MCU == ENABLE
|
||||||
|
if(!sf_get_ui_para_flag())
|
||||||
|
{
|
||||||
|
memcpy(¤tInfo, tmpInfo, sizeof(currentInfo));
|
||||||
|
}
|
||||||
if(currentInfo.OtaFlag)
|
if(currentInfo.OtaFlag)
|
||||||
{
|
{
|
||||||
SysResetFlag();
|
SysResetFlag();
|
||||||
currentInfo.uhInfoSize = sizeof(currentInfo);
|
currentInfo.uhInfoSize = sizeof(currentInfo);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
DBG_WRN("menu info size loaded from flash seems incorrect(old:%lu new:%lu), reset menu info\n",
|
DBG_WRN("menu info size loaded from flash seems incorrect(old:%lu new:%lu), reset menu info\n",
|
||||||
|
|
|
@ -123,5 +123,6 @@ UINT32 sf_cardv_hd_cap_start(void);
|
||||||
void sf_cardv_set_wait_shared_condition(int in);
|
void sf_cardv_set_wait_shared_condition(int in);
|
||||||
int sf_cardv_para_signaling_start(void);
|
int sf_cardv_para_signaling_start(void);
|
||||||
UINT32 sf_cardv_wifi_send(void);
|
UINT32 sf_cardv_wifi_send(void);
|
||||||
|
void sf_set_ui_para_flag(UINT8 flag);
|
||||||
|
UINT8 sf_get_ui_para_flag(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -89,6 +89,7 @@ static pthread_cond_t condition;
|
||||||
static pthread_mutex_t Param_mutexLock;
|
static pthread_mutex_t Param_mutexLock;
|
||||||
static int shared_condition = 1;
|
static int shared_condition = 1;
|
||||||
static SINT32 WifiSocket = 0;
|
static SINT32 WifiSocket = 0;
|
||||||
|
static UINT8 UiparaFlag = 0;
|
||||||
static SF_THREAD_S UpgradeTskParam =
|
static SF_THREAD_S UpgradeTskParam =
|
||||||
{
|
{
|
||||||
.IsRun = 0,
|
.IsRun = 0,
|
||||||
|
@ -1617,6 +1618,7 @@ static SINT32 sf_cardv_proccess_cmd_para_update(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||||
{
|
{
|
||||||
case SF_PARA_CMD_UPDATE:
|
case SF_PARA_CMD_UPDATE:
|
||||||
//MLOGI("NeedTimeSyncStartUp = %d\n",puiPara->NeedTimeSyncStartUp);
|
//MLOGI("NeedTimeSyncStartUp = %d\n",puiPara->NeedTimeSyncStartUp);
|
||||||
|
sf_set_ui_para_flag(1);
|
||||||
sf_share_mem_customer_update();
|
sf_share_mem_customer_update();
|
||||||
//MLOGI("NeedTimeSyncStartUp = %d\n",puiPara->NeedTimeSyncStartUp);
|
//MLOGI("NeedTimeSyncStartUp = %d\n",puiPara->NeedTimeSyncStartUp);
|
||||||
break;
|
break;
|
||||||
|
@ -2643,3 +2645,13 @@ UINT32 sf_cardv_wifi_send(void)
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UINT8 sf_get_ui_para_flag(void)
|
||||||
|
{
|
||||||
|
return UiparaFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
void sf_set_ui_para_flag(UINT8 flag)
|
||||||
|
{
|
||||||
|
UiparaFlag = flag;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user