From cb241ae3da2a6450f7fa6e55148482b29abd9b50 Mon Sep 17 00:00:00 2001 From: payton Date: Thu, 31 Aug 2023 16:49:13 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E4=B8=8D=E6=8F=92sd?= =?UTF-8?q?=E5=8D=A1=E4=BA=AE=E7=81=AF=EF=BC=9B2.=E4=BC=98=E5=8C=96WiFi?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E6=97=B6=E9=97=B4=EF=BC=9B3.?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../source/cardv/SrcCode/System/SysStrg_Exe.c | 25 +++++++++++++------ .../SrcCode/UIApp/Network/UIAppNetwork.c | 3 ++- .../cardv/SrcCode/UIApp/Photo/UIDateImprint.c | 2 +- .../UIApp/PhotoFast/PhotoFastCapDateImprint.c | 16 +++++++----- 4 files changed, 30 insertions(+), 16 deletions(-) diff --git a/code/application/source/cardv/SrcCode/System/SysStrg_Exe.c b/code/application/source/cardv/SrcCode/System/SysStrg_Exe.c index e0a43dd52..82fd1ff8b 100644 --- a/code/application/source/cardv/SrcCode/System/SysStrg_Exe.c +++ b/code/application/source/cardv/SrcCode/System/SysStrg_Exe.c @@ -881,14 +881,14 @@ INT32 System_OnStrgAttach(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray) } #if HUNTING_CAMERA_MCU == ENABLE - if((CMD_FORMAT_SD_STA != sf_get_card_statu())){ - stMessageBuf.arg1 = STRG_CB_MOUNT_FINISH; - stMessageBuf.arg2 = result; - stMessageBuf.arg3 = FST_STA_OK; - stMessageBuf.cmdId = CMD_SD; - sf_com_message_send_to_app(&stMessageBuf); - } -#endif + if((CMD_FORMAT_SD_STA != sf_get_card_statu())){ + stMessageBuf.arg1 = STRG_CB_MOUNT_FINISH; + stMessageBuf.arg2 = result; + stMessageBuf.arg3 = FST_STA_OK; + stMessageBuf.cmdId = CMD_SD; + sf_com_message_send_to_app(&stMessageBuf); + } + #endif #endif #if defined(__FREERTOS) if (p_shm && p_shm->boot.LdCtrl2 & LDCF_UPDATE_FW) { @@ -961,6 +961,15 @@ INT32 System_OnStrgAttach(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray) System_SetState(SYS_STATE_FS, FS_DISK_ERROR); break; } + + #if HUNTING_CAMERA_MCU == ENABLE + + if((FS_DISK_ERROR == System_GetState(SYS_STATE_FS))){ + stMessageBuf.arg1 = CMD_SD_STRG_CB_UNMOUNT_FINISH; + stMessageBuf.cmdId = CMD_SD; + sf_com_message_send_to_app(&stMessageBuf); + } + #endif #if (POWERON_FAST_BOOT == ENABLE) INIT_SETFLAG(FLGINIT_STRGATH); #endif diff --git a/code/application/source/cardv/SrcCode/UIApp/Network/UIAppNetwork.c b/code/application/source/cardv/SrcCode/UIApp/Network/UIAppNetwork.c index 38261b7c0..0a0f6724f 100644 --- a/code/application/source/cardv/SrcCode/UIApp/Network/UIAppNetwork.c +++ b/code/application/source/cardv/SrcCode/UIApp/Network/UIAppNetwork.c @@ -1623,8 +1623,9 @@ INT32 sf_net_wifi_init(UINT32 mode, UINT32 security) DBG_IND("set wifi %d %d \r\n", mode, security); system("modprobe 8189fs"); - sleep(2); + //usleep(2); system("ifconfig lo 127.0.0.1"); + DBG_IND("ifconfig\r\n"); memset(pwifi, 0, sizeof(nvt_wifi_settings)); diff --git a/code/application/source/cardv/SrcCode/UIApp/Photo/UIDateImprint.c b/code/application/source/cardv/SrcCode/UIApp/Photo/UIDateImprint.c index e3bd8d040..ef84b4a8f 100755 --- a/code/application/source/cardv/SrcCode/UIApp/Photo/UIDateImprint.c +++ b/code/application/source/cardv/SrcCode/UIApp/Photo/UIDateImprint.c @@ -1433,7 +1433,7 @@ ER UiDateImprint_CopyData(DS_STAMP_INFOR *stampInfo,HD_VIDEO_FRAME* Img, UINT32 //sprintf((char *)puiPara->Latitude, "3458.3100N"); //sprintf((char *)puiPara->Longitude, "12294.4200E"); sf_get_gps_info_str(customString, 1); - if(0/*puiPara->GpsSwitch == SF_ON*/) + if(0/*(puiPara->GpsSwitch == SF_ON) && (customString[0] != '\0')*/) { if(customString[0] != '\0') { diff --git a/rtos/code/application/source/cardv/SrcCode/UIApp/PhotoFast/PhotoFastCapDateImprint.c b/rtos/code/application/source/cardv/SrcCode/UIApp/PhotoFast/PhotoFastCapDateImprint.c index 23060181d..ffc9b59ac 100755 --- a/rtos/code/application/source/cardv/SrcCode/UIApp/PhotoFast/PhotoFastCapDateImprint.c +++ b/rtos/code/application/source/cardv/SrcCode/UIApp/PhotoFast/PhotoFastCapDateImprint.c @@ -432,7 +432,7 @@ void PhotoFastCapDateImprint_InitBuff(void) // else{ // size = stamp_img.buff_size.output_buffer_size; // } - stamp_text.buff_size.output_buffer_size = stamp_text.buff_size.output_buffer_size/4*5; + stamp_text.buff_size.output_buffer_size = stamp_text.buff_size.output_buffer_size/4*5; //add alloc buff. size = stamp_text.buff_size.output_buffer_size; ret = hd_common_mem_alloc("stamp_pri", &pa, (void **)&va, size, ddr_id); @@ -781,17 +781,21 @@ INT32 PhotoFastCapDateImprint_GenYuvData(HD_VIDEO_FRAME *pDstImg) UIMenuStoreInfo *puiPara = sf_ui_para_get(); + if(puiPara->StampSwitch == 0) + { + return E_OK; + } /* select font by image width */ #if PHOTO_STAMP_ISP_STATUS == DISABLE UINT32 ScaleFactor; /* not used , for backward capability*/ PhotoFast_SelStampFont(pDstImg->dim.w, (char**)&(stamp_text.draw_cfg.string.font), &ScaleFactor); + + stamp_text.draw_cfg.string.text = PhotoFast_InitStrBuf(); #else stamp_text.draw_cfg.string.font = (lv_font_t *) lv_plugin_get_font(FONT)->font; #endif - stamp_text.draw_cfg.string.text = PhotoFast_InitStrBuf(); - lv_user_font_conv_calc_buffer_size(&stamp_text.draw_cfg, &stamp_text.buff_size); lv_user_font_conv(&stamp_text.draw_cfg, &stamp_text.mem_cfg); @@ -857,7 +861,7 @@ INT32 PhotoFastCapDateImprint_GenYuvData(HD_VIDEO_FRAME *pDstImg) //sprintf((char *)puiPara->Latitude, "3458.3100N"); //sprintf((char *)puiPara->Longitude, "12294.4200E"); sf_get_gps_info_str(customString, 1); - if(0/*puiPara->GpsSwitch == SF_ON*/) + if(0/*(puiPara->GpsSwitch == SF_ON) && (customString[0] != '\0')*/) { if(customString[0] != '\0') { @@ -908,11 +912,11 @@ INT32 PhotoFastCapDateImprint_GenYuvData2(HD_VIDEO_FRAME *pDstImg) #if PHOTO_STAMP_ISP_STATUS == DISABLE UINT32 ScaleFactor; /* not used , for backward capability*/ PhotoFast_SelStampFont(pDstImg->dim.w, (char**)&(stamp_text.draw_cfg.string.font), &ScaleFactor); + + stamp_text.draw_cfg.string.text = PhotoFast_InitStrBuf(); #else stamp_text.draw_cfg.string.font = (lv_font_t *) lv_plugin_get_font(FONT)->font; #endif - - stamp_text.draw_cfg.string.text = PhotoFast_InitStrBuf(); lv_user_font_conv_calc_buffer_size(&stamp_text.draw_cfg, &stamp_text.buff_size); lv_user_font_conv(&stamp_text.draw_cfg, &stamp_text.mem_cfg);