diff --git a/code/application/source/cardv/SrcCode/PrjCfg_HUNTING_S530.h b/code/application/source/cardv/SrcCode/PrjCfg_HUNTING_S530.h index 2fcf8ddfc..a1842f4ac 100644 --- a/code/application/source/cardv/SrcCode/PrjCfg_HUNTING_S530.h +++ b/code/application/source/cardv/SrcCode/PrjCfg_HUNTING_S530.h @@ -34,7 +34,7 @@ //.............................................................................. // FW version and name -#define FW_UPDATE_NAME "A:\\FW98565Z.bin" +#define FW_UPDATE_NAME "A:\\FW98565A.bin" #define FW_VERSION_RELEASE DISABLE //DISABLE #define FW_VERSION_NUM "REGULAR_0402_001" @@ -920,7 +920,7 @@ #define HUNTING_MCU_I2C DISABLE #define HUNTING_MCU_UART ENABLE #define HUNTING_IR_LED_940 ENABLE -#define SF_BASE_VERSION "7MD4RCwD6T4" +#define SF_BASE_VERSION "7MD4RCwD6T5" #define HW_S530 1 #define DCF_DIR_NAME "MEDIA" /* 100MEDIA */ #define DCF_FILE_NAME "SYFW" /* SYFW0001.JPG */ @@ -959,7 +959,7 @@ #define SF_TEST_OTA_FTP 0 #define CUSTOM_TEST_OTA_FTP 0 -#define SF_BATTERY_TEST ENABLE +#define SF_BATTERY_TEST DISABLE #define SF_BATTERY_TEST_FILE "A:\\BATTERY.TXT" #define SF_HW_TEST DISABLE //////////////////////sf end/////////////////////////////// diff --git a/code/application/source/sf_app/code/include/sf_device.h b/code/application/source/sf_app/code/include/sf_device.h index 602066c8a..23a47f83e 100644 --- a/code/application/source/sf_app/code/include/sf_device.h +++ b/code/application/source/sf_app/code/include/sf_device.h @@ -55,6 +55,8 @@ void sf_set_pir_statu_flag(SINT32 flag); BOOL sf_load_ko(void); +SINT32 sf_in_update(void); + #ifdef __cplusplus #if __cplusplus } diff --git a/code/application/source/sf_app/code/include/sf_ftp.h b/code/application/source/sf_app/code/include/sf_ftp.h index c656180ee..fa6602525 100644 --- a/code/application/source/sf_app/code/include/sf_ftp.h +++ b/code/application/source/sf_app/code/include/sf_ftp.h @@ -218,5 +218,6 @@ SINT32 sf_concentrated_ftp_send(void); SINT32 sf_hd_ftp_send(void); SINT32 sf_video_ftp_send(void); SINT32 sf_get_ftp_open_flag(void); +SINT32 sf_log_send_ftp(void); #endif /*_SF_FTP_H_*/ diff --git a/code/application/source/sf_app/code/include/sf_keymng.h b/code/application/source/sf_app/code/include/sf_keymng.h index c5145a68e..aa3f9f321 100644 --- a/code/application/source/sf_app/code/include/sf_keymng.h +++ b/code/application/source/sf_app/code/include/sf_keymng.h @@ -41,6 +41,7 @@ typedef enum sf_MESSAGE_CMD_KEY_e SF_EVENT_KEY_HOLD_DOWN, SF_EVENT_KEY_HOLD_UP, SF_EVENT_KEY_GROUP, + SF_EVENT_KEY_TEST, SF_EVENT_KEY_BUTT }SF_MESSAGE_CMD_KEY_E; diff --git a/code/application/source/sf_app/code/include/sf_ledmng.h b/code/application/source/sf_app/code/include/sf_ledmng.h index ae7930fcb..4c74eda89 100644 --- a/code/application/source/sf_app/code/include/sf_ledmng.h +++ b/code/application/source/sf_app/code/include/sf_ledmng.h @@ -8,7 +8,7 @@ extern "C" { #include "sf_type.h" #include "sf_param_common.h" -#define LED_GRPOUP_MAX 100 +#define LED_GRPOUP_MAX 100 /*LCD GPIO - LGPIO*/ #define SF_L_GPIO_SHIFT_BASE 96 @@ -64,52 +64,52 @@ typedef enum sfHAL_LED_GPIO_IDX_E SF_HAL_LED_IDX_BUIT, } SF_LED_GPIO_IDX_E; -typedef enum _SF_LED_STATUS_E -{ +typedef enum _SF_LED_STATUS_E +{ LED_STATUS_HOLD_OFF = 0, - LED_STATUS_HOLD_ON, - LED_STATUS_SLOWFLASH_ON, - LED_STATUS_QUICKFLASH_ON, - LED_STATUS_FLASH_OFF, - LED_STATUS_BUIT -} SF_LED_STATUS_E; -typedef enum _SF_LED_TYPE_E -{ - LED_TYPE_OFF = 0, - LED_TYPE_GREEN, - LED_TYPE_YELLOW, - LED_TYPE_RED, - LED_TYPE_ON, - LED_TYPE_BUIT -} SF_LED_TYPE_E; - -typedef enum sf_LED_GROUP_E -{ - LED_GROUP_SD = 0, - LED_GROUP_BAT, - LED_GROUP_SIGNAL, - LED_GROUP_ACCOUNT, - LED_GROUP_STATUS, - LED_GROUP_BUIT - -} SF_LED_GROUD_E; - -typedef SINT32 (*SF_LED_EVENT_CALLBACK_FN_PTR)(SF_LED_GROUD_E enGroupType,SINT32 enstatus); + LED_STATUS_HOLD_ON, + LED_STATUS_SLOWFLASH_ON, + LED_STATUS_QUICKFLASH_ON, + LED_STATUS_FLASH_OFF, + LED_STATUS_BUIT +} SF_LED_STATUS_E; +typedef enum _SF_LED_TYPE_E +{ + LED_TYPE_OFF = 0, + LED_TYPE_GREEN, + LED_TYPE_YELLOW, + LED_TYPE_RED, + LED_TYPE_ON, + LED_TYPE_BUIT +} SF_LED_TYPE_E; -typedef struct sf_LED_REG_S { - SF_BOOL IsUsed; - SF_BOOL IsRun; - SINT8 LedGroupID; - SINT8 enStatusType; - SINT32 FlashTimeUs; +typedef enum sf_LED_GROUP_E +{ + LED_GROUP_SD = 0, + LED_GROUP_BAT, + LED_GROUP_SIGNAL, + LED_GROUP_ACCOUNT, + LED_GROUP_STATUS, + LED_GROUP_BUIT + +} SF_LED_GROUD_E; + +typedef SINT32 (*SF_LED_EVENT_CALLBACK_FN_PTR)(SF_LED_GROUD_E enGroupType,SINT32 enstatus); + +typedef struct sf_LED_REG_S { + SF_BOOL IsUsed; + SF_BOOL IsRun; + SINT8 LedGroupID; + SINT8 enStatusType; + SINT32 FlashTimeUs; pthread_t TskId; } SF_LED_REG_S; -typedef struct sf_LED_EVENT_S { - SF_LED_REG_S stLedGroupReg[LED_GRPOUP_MAX]; +typedef struct sf_LED_EVENT_S { + SF_LED_REG_S stLedGroupReg[LED_GRPOUP_MAX]; SF_LED_EVENT_CALLBACK_FN_PTR pfn_led_event_exe; pthread_mutex_t LEDMNGMutex; - + } SF_LED_EVENT_S; const SF_CHAR* sf_led_status_getstatusstring(SF_LED_STATUS_E enType); @@ -120,9 +120,9 @@ const SF_CHAR* sf_led_group_getstatusstring(SF_LED_GROUD_E enType); SINT32 sf_led_add_exe(SF_LED_EVENT_CALLBACK_FN_PTR pfn_led_event_exe); SINT32 sf_led_remove_exe(SF_LED_EVENT_CALLBACK_FN_PTR pfn_led_event_exe); - + SINT32 sf_led_event_register(SINT8 enLedEvent); - + SINT32 sf_led_event_unregister(SINT8 enLedEvent); SINT32 sf_led_flash_start(SF_LED_REG_S *pLedGroupReg); diff --git a/code/application/source/sf_app/code/include/sf_param_enum.h b/code/application/source/sf_app/code/include/sf_param_enum.h index 3c67f7692..3fcf843d6 100644 --- a/code/application/source/sf_app/code/include/sf_param_enum.h +++ b/code/application/source/sf_app/code/include/sf_param_enum.h @@ -146,7 +146,7 @@ extern "C" { #define SF_DAILYREPORT_FILENAME SF_SD_ROOT"THUMB/d.txt" #define SF_ERROR_CODE SF_SD_ROOT"THUMB/warning.txt" #define SF_DAILYREPORT_TXT "DailyReport.txt" - +#define SF_LOG_TXT "log.txt" #define GPIO_DIR_OUT 1 #define GPIO_DIR_IN 0 diff --git a/code/application/source/sf_app/code/include/sf_sms.h b/code/application/source/sf_app/code/include/sf_sms.h index 62ce721e1..5e6780a5f 100644 --- a/code/application/source/sf_app/code/include/sf_sms.h +++ b/code/application/source/sf_app/code/include/sf_sms.h @@ -264,5 +264,7 @@ UINT8 sf_get_send_hd(void); UINT8 sf_get_send_video(void); UINT8 sf_set_send_hd(UINT8 value); UINT8 sf_set_send_video(UINT8 value); +UINT8 sf_get_send_log(void); +UINT8 sf_set_send_log(UINT8 value); #endif /*_SF_SMS_H_*/ diff --git a/code/application/source/sf_app/code/source/4gMng/sf_eg91_sim.c b/code/application/source/sf_app/code/source/4gMng/sf_eg91_sim.c index 75292becd..03d4dd3ce 100644 --- a/code/application/source/sf_app/code/source/4gMng/sf_eg91_sim.c +++ b/code/application/source/sf_app/code/source/4gMng/sf_eg91_sim.c @@ -2295,7 +2295,7 @@ SINT32 sf_module_complete_init(void) UIMenuStoreInfo *puiPara = sf_app_ui_para_get(); - SLOGD(" s"); + SLOGD(" s\n"); //needRecordLogFlag = 1; puiPara->NetGeneration = SF_NET_NO; @@ -2918,7 +2918,7 @@ SINT32 sf_net_regist_manual(void) UIMenuStoreInfo *puiPara = sf_app_ui_para_get(); - SF_LOG(" s"); + SF_LOG(" s\n"); #if MEGA_TEST @@ -3204,7 +3204,7 @@ SINT32 sf_net_regist_manual(void) { SLOGI(gsmPara); - if(PWR_ON_TIME_SYNC == sf_convert_power_on_mode()) + if(PWR_ON_TIME_SYNC == sf_poweron_type_get()) { eNetRegLocation = QUECTEL_NETREG_QNWINFO; strcpy((char *)gsmPara, "AT+QNWINFO\r"); @@ -3578,7 +3578,7 @@ SINT32 sf_net_regist_manual(void) } } - if((sf_get_mode_flag()) || (PWR_ON_GPRS_INIT == sf_convert_power_on_mode()) || (PWR_ON_DAILY_REPORT == sf_convert_power_on_mode())) + if((sf_get_mode_flag()) || (PWR_ON_GPRS_INIT == sf_poweron_type_get()) || (PWR_ON_DAILY_REPORT == sf_poweron_type_get())) { eNetRegLocation = QUECTEL_NETREG_ATW; strcpy((char *)gsmPara, "AT&W\r"); @@ -3661,7 +3661,7 @@ SINT32 sf_auto_net_reg(void) UIMenuStoreInfo *puiPara = sf_app_ui_para_get(); - SF_LOG(" s"); + SF_LOG(" s\n"); //needRecordLogFlag = 1; puiPara->NetGeneration = 0; @@ -3724,7 +3724,7 @@ SINT32 sf_auto_net_reg(void) } else if(strstr((const char *)gsmPara, "+QSIMSTAT: 0,1")) { - if(PWR_ON_SMS == sf_convert_power_on_mode()) + if(PWR_ON_SMS == sf_poweron_type_get()) { eNetRegLocation = QUECTEL_NETREG_CGREG; strcpy((char *)gsmPara, "AT+CGREG?\r"); diff --git a/code/application/source/sf_app/code/source/app/sf_device.c b/code/application/source/sf_app/code/source/app/sf_device.c index 52135d6af..e214f366f 100644 --- a/code/application/source/sf_app/code/source/app/sf_device.c +++ b/code/application/source/sf_app/code/source/app/sf_device.c @@ -33,7 +33,8 @@ #include "sf_eg91_sim.h" #include "sf_commu_mcu_reg.h" #include "sf_ftp.h" - +#include "IOCfg.h" +#include "sf_common.h" #ifdef __cplusplus #if __cplusplus extern "C" { @@ -363,6 +364,11 @@ SINT32 app_led_net_reg_stop(SINT32 s32ret) UINT8 netSearchStep = sf_get_netsearch_step(); if(s32ret == SF_SUCCESS) { UINT8 signalLevel = 0; + /*if(sf_get_fw_update()) + { + sf_sys_status_led_set(SF_LED_SYS_STATE_GPRS_SIGNAL_0); + return SF_SUCCESS; + }*/ sf_4G_signal_level_get(puiPara->NetGeneration,sf_get_cq_signal(),&signalLevel); MLOGI("signalLevel = %d\n",signalLevel); sf_app_cq_signal_to_cardv(); @@ -613,6 +619,17 @@ BOOL sf_load_ko(void) return ret2; } +SINT32 sf_in_update(void) +{ + SINT8 regValue = 0; + SF_MUTEX_LOCK(GPIO_mutexLock); + sf_hal_gpio_init(GPIO_KEY_TEST, GPIO_DIR_IN); + sf_hal_gpio_get(GPIO_KEY_TEST, ®Value); + sf_hal_gpio_deinit(GPIO_KEY_TEST); + SF_MUTEX_UNLOCK(GPIO_mutexLock); + + return (regValue & 0xFF) ? 0:1; +} #ifdef __cplusplus #if __cplusplus