Improve sim card check bug.

This commit is contained in:
xiaojiazhu 2023-12-04 11:32:23 +08:00
parent f99a2c2123
commit 59dcff9209
5 changed files with 13 additions and 7 deletions

View File

@ -922,7 +922,7 @@
#define HUNTING_MCU_UART ENABLE #define HUNTING_MCU_UART ENABLE
#define HUNTING_IR_LED_940 ENABLE #define HUNTING_IR_LED_940 ENABLE
#define SF_EXIF_MN_BUF_SIZE 256 #define SF_EXIF_MN_BUF_SIZE 256
#define SF_BASE_VERSION "7MR5RCwDB08" #define SF_BASE_VERSION "7MR5RCwDB09"
#define HW_S530 DISABLE #define HW_S530 DISABLE
#define DCF_DIR_NAME "MEDIA" /* 100MEDIA */ #define DCF_DIR_NAME "MEDIA" /* 100MEDIA */
#define DCF_FILE_NAME "SYGW" /* SYFW0001.JPG */ #define DCF_FILE_NAME "SYGW" /* SYFW0001.JPG */

View File

@ -356,7 +356,7 @@ unsigned char sf_mcu_wdg_off(void);
void sf_set_module_sleep_flag(UINT8 flag); void sf_set_module_sleep_flag(UINT8 flag);
UINT8 sf_get_module_sleep_flag(void); UINT8 sf_get_module_sleep_flag(void);
int sf_app_while_flag(void); int sf_app_while_flag(void);
void sf_set_sim_insert(UINT32 sim); void sf_set_sim_insert(INT32 sim);
UINT32 sf_get_sim_insert(void); UINT32 sf_get_sim_insert(void);
int sf_get_signal_ready(void); int sf_get_signal_ready(void);
int sf_set_signal_ready(int value); int sf_set_signal_ready(int value);

View File

@ -57,7 +57,10 @@ unsigned char POWEROFF = 0;
SF_TIME_S sfMcuTime = { 0 }; SF_TIME_S sfMcuTime = { 0 };
static BOOL ConfigureModeFlag = 0; /* 0: HTC Mode, 1: Nomal Mode */ static BOOL ConfigureModeFlag = 0; /* 0: HTC Mode, 1: Nomal Mode */
//static UINT8 PowerOnMode = 0; //=>PWR_ON_SETUP //static UINT8 PowerOnMode = 0; //=>PWR_ON_SETUP
static UINT32 simCardInsert=0; #define SIM_CARD_INSERT 1
#define SIM_CARD_NOT_INSERT 0
#define SIM_CARD_DEFAULT_STATUS -1
static INT32 simCardInsert = SIM_CARD_DEFAULT_STATUS;
static UINT8 gModuleSleep = 1; static UINT8 gModuleSleep = 1;
static int isSignalReady = -1; static int isSignalReady = -1;
static SINT32 GPRS_ERRNO = 0; static SINT32 GPRS_ERRNO = 0;
@ -1225,7 +1228,7 @@ int sf_app_while_flag(void)
return 0; return 0;
} }
} }
void sf_set_sim_insert(UINT32 sim) void sf_set_sim_insert(INT32 sim)
{ {
if(simCardInsert != sim) if(simCardInsert != sim)
{ {

View File

@ -396,7 +396,7 @@ void sf_set_power_off_flag(UINT8 flag);
UINT8 sf_get_power_off_flag(void); UINT8 sf_get_power_off_flag(void);
int sf_while_flag(void); int sf_while_flag(void);
UINT8 sf_mcu_power_on_para_get(MCUParam_t attrId); UINT8 sf_mcu_power_on_para_get(MCUParam_t attrId);
void sf_set_sim_insert(UINT8 sim); void sf_set_sim_insert(INT32 sim);
UINT8 sf_get_mcu_rtc_set_sys(void); UINT8 sf_get_mcu_rtc_set_sys(void);
unsigned short sf_get_mcu_ver(void); unsigned short sf_get_mcu_ver(void);
UINT16 sf_mcu_get_irshtter(void); UINT16 sf_mcu_get_irshtter(void);

View File

@ -59,7 +59,10 @@ static UINT8 ModuleUpdating = 0;
static BOOL ConfigureModeFlag = 0; /* 0: HTC Mode, 1: Nomal Mode */ static BOOL ConfigureModeFlag = 0; /* 0: HTC Mode, 1: Nomal Mode */
static UINT8 AeNightMode = 0; /* 0:day 1:night */ static UINT8 AeNightMode = 0; /* 0:day 1:night */
//#define printf(fmt, args...) printk(fmt , ## args) //#define printf(fmt, args...) printk(fmt , ## args)
static UINT32 simCardInsert=0; #define SIM_CARD_INSERT 1
#define SIM_CARD_NOT_INSERT 0
#define SIM_CARD_DEFAULT_STATUS -1
static INT32 simCardInsert = SIM_CARD_DEFAULT_STATUS;
static UINT8 gModuleSleep = 1; static UINT8 gModuleSleep = 1;
UINT32 SmsCheck = 0; UINT32 SmsCheck = 0;
static UINT8 McuProductInfo = 0; static UINT8 McuProductInfo = 0;
@ -2027,7 +2030,7 @@ int sf_while_flag(void)
} }
} }
void sf_set_sim_insert(UINT8 sim) void sf_set_sim_insert(INT32 sim)
{ {
simCardInsert = sim; simCardInsert = sim;
} }