1.修复冲突;2.增加dbg开关

This commit is contained in:
payton 2023-09-14 09:51:08 +08:00
parent 716e19b4ca
commit 4dd6c4e3b3
3 changed files with 25 additions and 42 deletions

View File

@ -262,7 +262,12 @@ UINT32 DrvKey_DetNormalKey(void)
cmdflag = 1; cmdflag = 1;
//sf_set_card_statu(CMD_FORMAT_SD_STA); //sf_set_card_statu(CMD_FORMAT_SD_STA);
//BKG_PostEvent(NVTEVT_BKW_FORMAT_CARD); //BKG_PostEvent(NVTEVT_BKW_FORMAT_CARD);
}else if((!cmdflag) && (time >= 10000) && (FALSE == sf_check_net_work_flag()) && (!sf_get_pir_statu_flag())){ }else if((!cmdflag) && (time >= 3000) && (retset_time >= 3000) && (!sf_get_pir_statu_flag())){
printf("[%s:%d] SendKeyCnt:%d KeyTestPressCnt:%d time: %dms retset_time:%dms\n", __FUNCTION__, __LINE__, SendKeyCnt, KeyTestPressCnt, time, retset_time);
cmdflag = 1;
sf_set_debug_mode();
}
else if((!cmdflag) && (time >= 10000) && (FALSE == sf_check_net_work_flag()) && (!sf_get_pir_statu_flag())){
printf("[%s:%d] SendKeyCnt:%d KeyTestPressCnt:%d time: %dms\n", __FUNCTION__, __LINE__, SendKeyCnt, KeyTestPressCnt, time); printf("[%s:%d] SendKeyCnt:%d KeyTestPressCnt:%d time: %dms\n", __FUNCTION__, __LINE__, SendKeyCnt, KeyTestPressCnt, time);
cmdflag = 1; cmdflag = 1;
sf_set_module_update(1); sf_set_module_update(1);

View File

@ -127,7 +127,7 @@ void sf_set_ui_para_flag(UINT8 flag);
UINT8 sf_get_ui_para_flag(void); UINT8 sf_get_ui_para_flag(void);
BOOL sf_cmd_ftp_ota(unsigned char argc, char **argv); BOOL sf_cmd_ftp_ota(unsigned char argc, char **argv);
BOOL sf_cmd_switch_esim(unsigned char argc, char **argv); BOOL sf_cmd_switch_esim(unsigned char argc, char **argv);
void sf_set_debug_mode(void);
#endif #endif

View File

@ -59,6 +59,7 @@
#include <sf_keymng.h> #include <sf_keymng.h>
#include <sf_param_struct.h> #include <sf_param_struct.h>
#include "UIAppNetwork.h" #include "UIAppNetwork.h"
#include "sf_common.h"
#include "sf_mcu.h" #include "sf_mcu.h"
#include "sf_4g_lpa.h" #include "sf_4g_lpa.h"
#include <sf_wifi_svr.h> #include <sf_wifi_svr.h>
@ -278,7 +279,7 @@ void sf_mode_detect(void)
{ {
#if defined(_MODEL_565_HUNTING_EVB_LINUX_4G_68CS_) #if defined(_MODEL_565_HUNTING_EVB_LINUX_4G_68CS_)
Ux_PostEvent(NVTEVT_SYSTEM_SHUTDOWN, 1, APP_POWER_OFF_NORMAL); //shutdown start Ux_PostEvent(NVTEVT_SYSTEM_SHUTDOWN, 1, APP_POWER_OFF_NORMAL); //shutdown start
#elif defined(_MODEL_565_HUNTING_EVB_LINUX_4G_S530_) #elif defined(_MODEL_565_HUNTING_EVB_LINUX_4G_S530_) || defined(_MODEL_565_HUNTING_EVB_LINUX_4G_S550_)
Ux_PostEvent(NVTEVT_SYSTEM_SHUTDOWN, 1, APP_POWER_OFF_APO); //shutdown start Ux_PostEvent(NVTEVT_SYSTEM_SHUTDOWN, 1, APP_POWER_OFF_APO); //shutdown start
#endif #endif
} }
@ -1701,45 +1702,6 @@ static SINT32 sf_cardv_proccess_cmd_gprs(SF_MESSAGE_BUF_S *pMessageBuf)
return SF_SUCCESS; return SF_SUCCESS;
} }
void sf_cardv_wifi_send()
{
SINT32 fd = 0;
SINT32 sendBuffLen = 0;
SINT8 sendBuff[1024] = { 0 };
SINT32 i = 0;
struct stat statBuf;
if(SF_SUCCESS == sf_share_mem_hd_update())
{
SF_REPORT_WIFI_ATTR_S* wifiCfg = sf_wifi_cfg_get();
fd = sf_get_wifi_socket();
SF_CHAR filePath[64] = { 0 };
SINT32 fdWifi = -1;
sprintf(filePath, "/tmp/wifiData.txt");
printf("filePath:%s\n", filePath);
fdWifi = open(filePath, O_RDWR, 0777);
if(fdWifi >= 0)
{
fstat(fdWifi, &statBuf);
sendBuffLen = statBuf.st_size;
printf("fSize=%d\n", sendBuffLen);
read(fdWifi, sendBuff, sendBuffLen);
close(fdWifi);
for(i = 0; i < sendBuffLen; i++)
{
printf("[%x]-", sendBuff[i]);
}
printf("\n[cardv-sendBuff-1] e\n");
send(fd, sendBuff, sendBuffLen, 0);
remove("/tmp/wifiData.txt");
}
}
}
static SINT32 sf_cardv_proccess_cmd_wifi(SF_MESSAGE_BUF_S *pMessageBuf) static SINT32 sf_cardv_proccess_cmd_wifi(SF_MESSAGE_BUF_S *pMessageBuf)
{ {
MLOGI("ID = %#x\n",pMessageBuf->arg1); MLOGI("ID = %#x\n",pMessageBuf->arg1);
@ -2733,3 +2695,19 @@ void sf_set_ui_para_flag(UINT8 flag)
{ {
UiparaFlag = flag; UiparaFlag = flag;
} }
void sf_set_debug_mode(void)
{
UIMenuStoreInfo *puiPara = sf_ui_para_get();
if(1 == puiPara->DebugMode)
{
puiPara->DebugMode = 0;
sf_sys_status_led_set(SF_LED_SYS_STATE_DEBUG_OFF);
}
else
{
puiPara->DebugMode = 1;
sf_sys_status_led_set(SF_LED_SYS_STATE_DEBUG_ON);
}
}