From 900006bb892559ee58f67eea1e30d1a7fffe02f9 Mon Sep 17 00:00:00 2001 From: payton Date: Fri, 21 Jul 2023 14:16:15 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=8C=89=E9=94=AE=E7=94=9F=E6=88=90=E7=9B=B8?= =?UTF-8?q?=E6=9C=BA=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DxInput_Key.c | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/code/application/source/cardv/SrcCode/Dx/565_HUNTING_EVB_LINUX_4G_S530/DxInput_Key.c b/code/application/source/cardv/SrcCode/Dx/565_HUNTING_EVB_LINUX_4G_S530/DxInput_Key.c index 9ff8fc511..5210a6fcc 100644 --- a/code/application/source/cardv/SrcCode/Dx/565_HUNTING_EVB_LINUX_4G_S530/DxInput_Key.c +++ b/code/application/source/cardv/SrcCode/Dx/565_HUNTING_EVB_LINUX_4G_S530/DxInput_Key.c @@ -25,6 +25,7 @@ #if HUNTING_CAMERA_MCU == ENABLE #include +#include "sf_sd_common.h" #endif #if 0 #include "rtc.h" @@ -230,12 +231,21 @@ UINT32 DrvKey_DetNormalKey(void) KeyTestPressCnt++; vos_perf_mark(&tticktmp); time = ((tticktmp/1000) - (ttick/1000)); - }else{ - if(KeyTestPressCnt && (0 == sf_get_fw_update())){ - if((!cmdflag) && (0 == sf_get_fw_update()) && (time >= 3000) && (sf_get_pir_statu_flag())){ + if(0 == sf_get_fw_update()){ + if((0 == cmdflag) && (time <= 5000) && (retset_PressCnt)){ cmdflag = 1; - BKG_PostEvent(NVTEVT_BKW_FORMAT_CARD); - }else if((!cmdflag) && (0 == sf_get_fw_update()) && (time >= 10000)){ + sf_save_camera_info(); + vos_perf_mark(&ttick); + } + } + }else{ + if(KeyTestPressCnt && (0 == sf_get_fw_update())){ + + if((!cmdflag) && (time >= 3000) && (sf_get_pir_statu_flag())){ + cmdflag = 1; + //sf_set_card_statu(CMD_FORMAT_SD_STA); + //BKG_PostEvent(NVTEVT_BKW_FORMAT_CARD); + }else if((!cmdflag) && (time >= 10000) && (FALSE == sf_check_net_work_flag()) && (!sf_get_pir_statu_flag())){ cmdflag = 1; sf_set_module_update(1); }else if((++SendKeyCnt < SendKey_LessCnt) && (!cmdflag)){//shot key