1.启动标志调整,以免启动方式错乱
This commit is contained in:
parent
e444e4c4b9
commit
6e01c4f871
|
@ -2367,6 +2367,11 @@ void sf_power_on_para_check_init(void)
|
|||
memset(puiPara->SimIccid,'\0',sizeof(puiPara->SimIccid));
|
||||
memset(puiPara->ServiceProvider,'\0',sizeof(puiPara->ServiceProvider));
|
||||
}
|
||||
else if(PowerOnMode == PWR_ON_GPRS_INIT)
|
||||
{
|
||||
puiPara->NeedTimeSyncStartUp = 1;
|
||||
puiPara->NetWorkNeedSearch = 0;
|
||||
}
|
||||
else if(PowerOnMode == PWR_ON_TIME_SYNC)
|
||||
{
|
||||
puiPara->NetWorkNeedSearch = 0;
|
||||
|
|
|
@ -105,6 +105,7 @@ int sf_check_sd(void);
|
|||
void sf_save_camera_gps_info(void);
|
||||
void set_at_parament(void);
|
||||
int sf_net_dns_ck(void);
|
||||
void sf_register_net_para_ck(void);
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
#include "sf_log.h"
|
||||
#include "sf_param_enum.h"
|
||||
#include "sf_qrcode.h"
|
||||
#include <ctype.h>
|
||||
#include <dirent.h>
|
||||
|
@ -1713,16 +1714,7 @@ static SINT32 app_Register_Net_startup_mode(SF_FN_PARAM_S *pfnParam)
|
|||
sf_set_signal_ready_flag(TRUE);
|
||||
}
|
||||
|
||||
if (1 == pCustomerParam->NeedTimeSyncStartUp) {
|
||||
printf("[%s:%d]8 between A and B,no reg net again,no reset time "
|
||||
"sync.\n",
|
||||
__FUNCTION__, __LINE__);
|
||||
sf_set_dr_reset_time_sys_flag(1);
|
||||
}
|
||||
|
||||
if (0 != sf_get_cq_signal()) {
|
||||
pCustomerParam->NeedTimeSyncStartUp = 1;
|
||||
}
|
||||
// if (pCustomerParam->DailyReportSwitch) {
|
||||
// pCustomerParam->GpsSendFlag =
|
||||
// 1; // indicate need send dp file in b power on.
|
||||
|
@ -1861,12 +1853,7 @@ static SINT32 app_Register_Net_startup_mode(SF_FN_PARAM_S *pfnParam)
|
|||
if (s32ret != SF_SUCCESS) {
|
||||
sf_set_signal_ready_flag(TRUE);
|
||||
}
|
||||
if (0 != sf_get_cq_signal()) {
|
||||
//pCustomerParam->GpsSendFlag = 1;
|
||||
pCustomerParam->NeedTimeSyncStartUp = 1;
|
||||
// avoid always A mode power on
|
||||
pCustomerParam->NetWorkNeedSearch = 0;
|
||||
}
|
||||
|
||||
SF_APPCOMM_CHECK_RETURN(s32ret, SF_APP_ERROR_REQUEST);
|
||||
// sf_4G_usb_net_apn_cfg(pfnParam);
|
||||
// set_at_parament();
|
||||
|
@ -1939,8 +1926,6 @@ static SINT32 app_Register_Net_startup_mode(SF_FN_PARAM_S *pfnParam)
|
|||
s32ret = sf_read_message();
|
||||
SF_APPCOMM_CHECK_RETURN(s32ret, SF_APP_ERROR_REQUEST);
|
||||
|
||||
pCustomerParam->NetWorkNeedSearch = 0;
|
||||
pCustomerParam->NeedTimeSyncStartUp = 0;
|
||||
|
||||
s32ret = sf_file_send_auto();
|
||||
//SF_APPCOMM_CHECK_RETURN(s32ret, SF_APP_ERROR_FILE_SEND);
|
||||
|
@ -1986,6 +1971,8 @@ void app_Register_Net_thread(void) {
|
|||
|
||||
pthread_detach(pthread_self());
|
||||
s32ret = app_Register_Net_startup_mode(&stpfncallback);
|
||||
sf_register_net_para_ck();
|
||||
|
||||
switch (s32ret) {
|
||||
case SF_APP_ERROR_REQUEST:
|
||||
app_Register_Net_Error_return_init(&stpfncallback);
|
||||
|
@ -2536,6 +2523,39 @@ int sf_net_dns_ck(void)
|
|||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
void sf_register_net_para_ck(void)
|
||||
{
|
||||
SF_STARTUP_TYPE_E startup = sf_poweron_type_get();
|
||||
UIMenuStoreInfo *puiPara = sf_app_ui_para_get();
|
||||
SLOGE("NeedTimeSyncStartUp:%d NetWorkNeedSearch:%d\n", puiPara->NeedTimeSyncStartUp, puiPara->NetWorkNeedSearch);
|
||||
|
||||
switch (startup) {
|
||||
case SF_MCU_STARTUP_DP:
|
||||
if (1 == puiPara->NeedTimeSyncStartUp) {
|
||||
printf("[%s:%d]8 between A and B,no reg net again,no reset time "
|
||||
"sync.\n",
|
||||
__FUNCTION__, __LINE__);
|
||||
sf_set_dr_reset_time_sys_flag(1);
|
||||
}
|
||||
|
||||
if (0 != sf_get_cq_signal()) {
|
||||
puiPara->NeedTimeSyncStartUp = 1;
|
||||
}
|
||||
break;
|
||||
case SF_MCU_STARTUP_RESET:
|
||||
puiPara->NeedTimeSyncStartUp = 1;
|
||||
puiPara->NetWorkNeedSearch = 0;
|
||||
break;
|
||||
case SF_MCU_STARTUP_SYN_PARAM:
|
||||
puiPara->NetWorkNeedSearch = 0;
|
||||
puiPara->NeedTimeSyncStartUp = 0;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
SLOGE("NeedTimeSyncStartUp:%d NetWorkNeedSearch:%d\n", puiPara->NeedTimeSyncStartUp, puiPara->NetWorkNeedSearch);
|
||||
|
||||
}
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
}
|
||||
|
|
|
@ -297,7 +297,15 @@ void sf_app_power_on_para_check_init(void)
|
|||
if(0 == puiPara->NetWorkNeedSearch){
|
||||
puiPara->NetWorkNeedSearch = 1;
|
||||
}
|
||||
puiPara->FristSendDailyAndGps = 1;
|
||||
puiPara->GpsSendFlag = 0;
|
||||
memset(puiPara->SimIccid,'\0',sizeof(puiPara->SimIccid));
|
||||
memset(puiPara->ServiceProvider,'\0',sizeof(puiPara->ServiceProvider));
|
||||
}
|
||||
else if(PowerOnMode == SF_MCU_STARTUP_RESET)
|
||||
{
|
||||
puiPara->NeedTimeSyncStartUp = 1;
|
||||
puiPara->NetWorkNeedSearch = 0;
|
||||
}
|
||||
else if(PowerOnMode == SF_MCU_STARTUP_SYN_PARAM)
|
||||
{
|
||||
|
@ -311,6 +319,7 @@ void sf_app_power_on_para_check_init(void)
|
|||
// puiPara->GpsSendFlag = 1; // indicate need send dp file in b power on.
|
||||
// }
|
||||
}
|
||||
|
||||
printf("PowerOnMode=%d NeedTimeSyncStartUp=%d NetWorkNeedSearch:%d\n", PowerOnMode, puiPara->NeedTimeSyncStartUp, puiPara->NetWorkNeedSearch);
|
||||
if(puiPara->Multishot != sf_sys_get_flag(FL_CONTINUE_SHOT))
|
||||
{
|
||||
|
|
|
@ -491,6 +491,7 @@ void Save_MenuInfo(void)
|
|||
#else
|
||||
|
||||
#if (HUNTING_CAMERA_MODEL == ENABLE)
|
||||
printf("%s:%d s\n", __FUNCTION__, __LINE__);
|
||||
|
||||
if(is_storage_sys_partition_exist() == TRUE && memcmp(¤tInfo, &origInfo, sizeof(currentInfo))){
|
||||
UINT32 uiSectorAddr = 0;
|
||||
|
@ -542,6 +543,7 @@ void Save_MenuInfo(void)
|
|||
}
|
||||
}
|
||||
}
|
||||
printf("%s:%d e\n", __FUNCTION__, __LINE__);
|
||||
|
||||
#endif /* HUNTING_CAMERA_MODEL == ENABLE */
|
||||
#endif /* PST_FUNC == ENABLE */
|
||||
|
@ -1743,6 +1745,11 @@ void sf_power_on_para_check_init(void)
|
|||
memset(puiPara->Latitude, 0, sizeof(puiPara->Latitude));
|
||||
//sf_dailyReport_refresh();
|
||||
}
|
||||
else if(PowerOnMode == PWR_ON_GPRS_INIT)
|
||||
{
|
||||
puiPara->NeedTimeSyncStartUp = 1;
|
||||
puiPara->NetWorkNeedSearch = 0;
|
||||
}
|
||||
else if(PowerOnMode == PWR_ON_TIME_SYNC)
|
||||
{
|
||||
puiPara->NetWorkNeedSearch = 0;
|
||||
|
|
Loading…
Reference in New Issue
Block a user