1.去除一些编译警告
2.修复ftp发送后led灯显示 3.去除ntp时间同步
This commit is contained in:
parent
0a7fbcec2f
commit
049a600c44
|
@ -50,7 +50,7 @@ void sf_lpa_profile_active_change(void);
|
|||
|
||||
UINT8 sf_is_esim_card(void);
|
||||
UINT8 sf_is_esim_init_finish(void);
|
||||
|
||||
SF_BOOL sf_get_eid(UINT8 *eidStr);
|
||||
UINT32 sf_get_profile_total(void);
|
||||
UINT32 sf_is_profile_index_enable(UINT8 index);
|
||||
UINT32 sf_get_profile_item(UINT8 index, LPA_PROFILE_INFO *profileInfo);
|
||||
|
|
|
@ -102,7 +102,7 @@ void keep_seraching_gps_location(const int timeout_ms);
|
|||
void app_RegisterNet_stop(void);
|
||||
int sf_check_sd(void);
|
||||
void sf_save_camera_gps_info(void);
|
||||
|
||||
void set_at_parament(void);
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
}
|
||||
|
|
|
@ -4669,9 +4669,11 @@ SINT32 sf_get_utc(VOID)
|
|||
rtcTime.Hour = hour;
|
||||
rtcTime.Min = minute;
|
||||
rtcTime.Sec = second;
|
||||
sf_sys_rtc_time_set(&rtcTime);
|
||||
sf_set_mcu_rtc_flag(1);
|
||||
printf("[%s:%d]set RTC: %04d/%02d/%02d %02d:%02d:%02d\n", __FUNCTION__, __LINE__, rtcTime.Year, rtcTime.Mon, rtcTime.Day, rtcTime.Hour, rtcTime.Min, rtcTime.Sec);
|
||||
if (SF_TRUE == sf_sys_rtc_time_check(&rtcTime)) {
|
||||
sf_sys_rtc_time_set(&rtcTime);
|
||||
sf_set_mcu_rtc_flag(1);
|
||||
printf("[%s:%d]set RTC: %04d/%02d/%02d %02d:%02d:%02d\n", __FUNCTION__, __LINE__, rtcTime.Year, rtcTime.Mon, rtcTime.Day, rtcTime.Hour, rtcTime.Min, rtcTime.Sec);
|
||||
}
|
||||
}
|
||||
|
||||
goto SF_UTC_END;
|
||||
|
@ -4833,7 +4835,7 @@ SINT32 sf_get_ntp(SINT32 value, SF_PARA_TIME_S *current_time)
|
|||
if(strstr((const char *)gsmPara, "+QNTP: 0") != NULL)
|
||||
{
|
||||
time = 0;
|
||||
int zoneSecond = 0;
|
||||
//int zoneSecond = 0;
|
||||
UINT8 *CCLK = (UINT8 *)strstr((const char *)gsmPara, "+QNTP: 0");
|
||||
|
||||
year = (CCLK[10] - '0') * 1000 + (CCLK[11] - '0') * 100 + (CCLK[12] - '0') * 10 + (CCLK[13] - '0');
|
||||
|
@ -4857,7 +4859,7 @@ SINT32 sf_get_ntp(SINT32 value, SF_PARA_TIME_S *current_time)
|
|||
}
|
||||
|
||||
//getUtcTimeFlag = 1;
|
||||
rtcTime.Year = year;
|
||||
/*rtcTime.Year = year;
|
||||
rtcTime.Mon = month;
|
||||
rtcTime.Day = day;
|
||||
rtcTime.Hour = hour;
|
||||
|
@ -4885,7 +4887,7 @@ SINT32 sf_get_ntp(SINT32 value, SF_PARA_TIME_S *current_time)
|
|||
sf_sys_rtc_time_set(&rtcTime);
|
||||
sf_set_mcu_rtc_flag(1);
|
||||
printf("[%s:%d]set RTC: %04d/%02d/%02d %02d:%02d:%02d\n", __FUNCTION__, __LINE__, rtcTime.Year, rtcTime.Mon, rtcTime.Day, rtcTime.Hour, rtcTime.Min, rtcTime.Sec);
|
||||
}
|
||||
}*/
|
||||
|
||||
goto SF_GEN_NTP_QIDEACT;
|
||||
}
|
||||
|
|
|
@ -1295,6 +1295,7 @@ SINT32 sf_send_file_to_ftp(UINT8 mode)
|
|||
}
|
||||
else
|
||||
{
|
||||
FtpOpenOk = SUCCESS;
|
||||
return ret2;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
#include "sf_system.h"
|
||||
#include "at_manager.h"
|
||||
#include "Log.h"
|
||||
|
||||
#include "sf_4g_lpa.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
|
@ -170,11 +170,11 @@ static SINT16 app_Qlog_procress(void) {
|
|||
}
|
||||
#endif
|
||||
|
||||
void sf_usb_net_init()
|
||||
void sf_usb_net_init(void)
|
||||
{
|
||||
static U16 flag = 0;
|
||||
SF_CHAR cmdStr[128] ={0};
|
||||
int ret = 0;
|
||||
//int ret = 0;
|
||||
UIMenuStoreInfo *puiPara = sf_app_ui_para_get();
|
||||
|
||||
if(flag == 0)
|
||||
|
@ -197,7 +197,7 @@ void sf_usb_net_init()
|
|||
{
|
||||
sprintf(cmdStr, "/usr/bin/quectel-CM-EG91 -n %d&", E_PDP_INDEX);
|
||||
}
|
||||
ret = system(cmdStr);
|
||||
system(cmdStr);
|
||||
sleep(3);
|
||||
}
|
||||
|
||||
|
@ -232,31 +232,31 @@ SINT32 sf_USB_net_init(void)
|
|||
for (i = 0; i < 20; i++)
|
||||
{
|
||||
if(strncmp(puiPara->ModuleVer, GPRS_MODULE_TYPE_EG915Q, 6) == 0)
|
||||
{
|
||||
{
|
||||
ret = sf_check_usb0();
|
||||
|
||||
if(ret != SUCCESS)
|
||||
{
|
||||
{
|
||||
ret = sf_check_eth0();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
else
|
||||
{
|
||||
|
||||
ret = sf_check_eth0();
|
||||
if(ret != SUCCESS)
|
||||
{
|
||||
{
|
||||
ret = sf_check_usb0();
|
||||
}
|
||||
}
|
||||
if (SUCCESS == ret)
|
||||
{
|
||||
{
|
||||
ret = SF_SUCCESS;
|
||||
MLOGI("usb net ip up\r\n");
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
else
|
||||
{
|
||||
sleep(1);
|
||||
}
|
||||
}
|
||||
|
@ -1231,7 +1231,10 @@ SINT32 sf_cardv_file_to_app_send_thread(void) {
|
|||
ThumbSend.IsRun = 0;
|
||||
sf_file_thumb_cfg_clear();
|
||||
sf_share_mem_file_down(1, s32ret);
|
||||
|
||||
|
||||
if (sf_poweron_type_get() == SF_MCU_STARTUP_ONKEY) {
|
||||
app_led_net_reg_stop(s32ret);
|
||||
}
|
||||
if ((sf_poweron_type_get() != SF_MCU_STARTUP_ONKEY) && (!sf_sms_check_send())) {
|
||||
sf_power_off();
|
||||
}
|
||||
|
@ -1282,9 +1285,9 @@ static SINT32 app_Register_Net_Error_return_setup(SF_FN_PARAM_S *pfnParam,
|
|||
SLOGD("s32ret:%x\n", s32ret);
|
||||
// SLOGD("bind flag:%x\n", pStaticParam->bindFlag);
|
||||
if (sf_poweron_type_get() == SF_MCU_STARTUP_ONKEY) {
|
||||
if (SF_TRUE == sf_sys_rtc_time_check(&rtcTime)) {
|
||||
sf_sys_rtc_time_set(&rtcTime);
|
||||
}
|
||||
//if (SF_TRUE == sf_sys_rtc_time_check(&rtcTime)) {
|
||||
// sf_sys_rtc_time_set(&rtcTime);
|
||||
//}
|
||||
|
||||
app_led_net_reg_stop(s32ret);
|
||||
}
|
||||
|
@ -1311,10 +1314,10 @@ static SINT32 app_Register_Net_Error_return_server(SF_FN_PARAM_S *pfnParam,
|
|||
SLOGE("s32ret:%#x\n", s32ret);
|
||||
// SLOGD("bind flag:%x\n", pStaticParam->bindFlag);
|
||||
if (sf_poweron_type_get() == SF_MCU_STARTUP_ONKEY) {
|
||||
if (SF_TRUE == sf_sys_rtc_time_check(&rtcTime)) {
|
||||
sf_sys_rtc_time_set(&rtcTime);
|
||||
sf_sys_rtoscmd_set(4, NULL); // SET RTC time to rtos
|
||||
}
|
||||
//if (SF_TRUE == sf_sys_rtc_time_check(&rtcTime)) {
|
||||
// sf_sys_rtc_time_set(&rtcTime);
|
||||
// sf_sys_rtoscmd_set(4, NULL); // SET RTC time to rtos
|
||||
// }
|
||||
|
||||
app_led_net_reg_stop(s32ret);
|
||||
}
|
||||
|
@ -1394,7 +1397,7 @@ static SINT32 app_Register_Net_startup_mode(SF_FN_PARAM_S *pfnParam)
|
|||
|
||||
if(sf_is_esim_card())
|
||||
{
|
||||
sf_get_eid(eid);
|
||||
sf_get_eid((UINT8*)eid);
|
||||
printf("pPara->EsimEid=%s\n", pCustomerParam->EsimEid);
|
||||
printf("pPara->eid=%s\n", eid);
|
||||
if((pCustomerParam->EsimEid[0] != '\0') && (SF_STRCMP(pCustomerParam->EsimEid, eid) != 0))
|
||||
|
@ -1437,10 +1440,7 @@ static SINT32 app_Register_Net_startup_mode(SF_FN_PARAM_S *pfnParam)
|
|||
#endif
|
||||
|
||||
s32ret = sf_get_utc();
|
||||
if ((s32ret == SF_SIM_ERROR_UTC) && (SF_ON != pCustomerParam->GpsSwitch)) {
|
||||
SF_PARA_TIME_S current_time = { 0, 0, 0, 0, 0, 0};
|
||||
s32ret = sf_get_ntp(s32ret, ¤t_time);
|
||||
}
|
||||
|
||||
sf_4G_usb_net_apn_cfg(pfnParam);
|
||||
set_at_parament();
|
||||
sf_USB_net_init();
|
||||
|
@ -1602,11 +1602,7 @@ static SINT32 app_Register_Net_startup_mode(SF_FN_PARAM_S *pfnParam)
|
|||
sf_USB_net_init();
|
||||
|
||||
s32ret = sf_get_utc();
|
||||
if ((s32ret == SF_SIM_ERROR_UTC) &&
|
||||
(SF_ON != pCustomerParam->GpsSwitch)) {
|
||||
SF_PARA_TIME_S current_time = {0, 0, 0, 0, 0, 0};
|
||||
s32ret = sf_get_ntp(s32ret, ¤t_time);
|
||||
}
|
||||
|
||||
if ((SF_ON == pCustomerParam->GpsSwitch)) {
|
||||
s32ret = open_gps(s32ret);
|
||||
}
|
||||
|
@ -1654,7 +1650,7 @@ static SINT32 app_Register_Net_startup_mode(SF_FN_PARAM_S *pfnParam)
|
|||
|
||||
if(sf_is_esim_card())
|
||||
{
|
||||
sf_get_eid(eid);
|
||||
sf_get_eid((UINT8*)eid);
|
||||
printf("pPara->EsimEid=%s\n", pCustomerParam->EsimEid);
|
||||
printf("pPara->eid=%s\n", eid);
|
||||
if((pCustomerParam->EsimEid[0] != '\0') && (SF_STRCMP(pCustomerParam->EsimEid, eid) != 0))
|
||||
|
@ -1740,10 +1736,7 @@ static SINT32 app_Register_Net_startup_mode(SF_FN_PARAM_S *pfnParam)
|
|||
sf_USB_net_init();
|
||||
|
||||
s32ret = sf_get_utc();
|
||||
if ((s32ret == SF_SIM_ERROR_UTC) && (SF_ON != pCustomerParam->GpsSwitch)) {
|
||||
SF_PARA_TIME_S current_time = { 0, 0, 0, 0, 0, 0};
|
||||
s32ret = sf_get_ntp(s32ret, ¤t_time);
|
||||
}
|
||||
|
||||
if ((SF_ON == pCustomerParam->GpsSwitch)) {
|
||||
s32ret = open_gps(s32ret);
|
||||
}
|
||||
|
@ -2052,10 +2045,10 @@ void set_at_parament(void)
|
|||
|
||||
SINT32 open_gps(const SINT32 utc)
|
||||
{
|
||||
UIMenuStoreInfo *pCustomerParam = sf_app_ui_para_get();
|
||||
SINT32 s32ret = 0;
|
||||
//UIMenuStoreInfo *pCustomerParam = sf_app_ui_para_get();
|
||||
//SINT32 s32ret = 0;
|
||||
SF_PARA_TIME_S current_time = { 0, 0, 0, 0, 0, 0};
|
||||
s32ret = sf_get_ntp(utc, ¤t_time);
|
||||
sf_get_ntp(utc, ¤t_time);
|
||||
#define NTP_TIME_LENGTH 32
|
||||
char ntp_time[NTP_TIME_LENGTH] = {0};
|
||||
snprintf(ntp_time, NTP_TIME_LENGTH, "%04d/%02d/%02d,%02d:%02d:%02d",
|
||||
|
|
Loading…
Reference in New Issue
Block a user