1.修改不插sd卡亮灯;2.优化WiFi初始化时间;3.优化代码

This commit is contained in:
payton 2023-08-31 16:49:13 +08:00
parent d446998ff4
commit cb241ae3da
4 changed files with 30 additions and 16 deletions

View File

@ -881,14 +881,14 @@ INT32 System_OnStrgAttach(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
} }
#if HUNTING_CAMERA_MCU == ENABLE #if HUNTING_CAMERA_MCU == ENABLE
if((CMD_FORMAT_SD_STA != sf_get_card_statu())){ if((CMD_FORMAT_SD_STA != sf_get_card_statu())){
stMessageBuf.arg1 = STRG_CB_MOUNT_FINISH; stMessageBuf.arg1 = STRG_CB_MOUNT_FINISH;
stMessageBuf.arg2 = result; stMessageBuf.arg2 = result;
stMessageBuf.arg3 = FST_STA_OK; stMessageBuf.arg3 = FST_STA_OK;
stMessageBuf.cmdId = CMD_SD; stMessageBuf.cmdId = CMD_SD;
sf_com_message_send_to_app(&stMessageBuf); sf_com_message_send_to_app(&stMessageBuf);
} }
#endif #endif
#endif #endif
#if defined(__FREERTOS) #if defined(__FREERTOS)
if (p_shm && p_shm->boot.LdCtrl2 & LDCF_UPDATE_FW) { 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); System_SetState(SYS_STATE_FS, FS_DISK_ERROR);
break; 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) #if (POWERON_FAST_BOOT == ENABLE)
INIT_SETFLAG(FLGINIT_STRGATH); INIT_SETFLAG(FLGINIT_STRGATH);
#endif #endif

View File

@ -1623,8 +1623,9 @@ INT32 sf_net_wifi_init(UINT32 mode, UINT32 security)
DBG_IND("set wifi %d %d \r\n", mode, security); DBG_IND("set wifi %d %d \r\n", mode, security);
system("modprobe 8189fs"); system("modprobe 8189fs");
sleep(2); //usleep(2);
system("ifconfig lo 127.0.0.1"); system("ifconfig lo 127.0.0.1");
DBG_IND("ifconfig\r\n");
memset(pwifi, 0, sizeof(nvt_wifi_settings)); memset(pwifi, 0, sizeof(nvt_wifi_settings));

View File

@ -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->Latitude, "3458.3100N");
//sprintf((char *)puiPara->Longitude, "12294.4200E"); //sprintf((char *)puiPara->Longitude, "12294.4200E");
sf_get_gps_info_str(customString, 1); 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') if(customString[0] != '\0')
{ {

View File

@ -432,7 +432,7 @@ void PhotoFastCapDateImprint_InitBuff(void)
// else{ // else{
// size = stamp_img.buff_size.output_buffer_size; // 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; size = stamp_text.buff_size.output_buffer_size;
ret = hd_common_mem_alloc("stamp_pri", &pa, (void **)&va, size, ddr_id); 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(); UIMenuStoreInfo *puiPara = sf_ui_para_get();
if(puiPara->StampSwitch == 0)
{
return E_OK;
}
/* select font by image width */ /* select font by image width */
#if PHOTO_STAMP_ISP_STATUS == DISABLE #if PHOTO_STAMP_ISP_STATUS == DISABLE
UINT32 ScaleFactor; /* not used , for backward capability*/ UINT32 ScaleFactor; /* not used , for backward capability*/
PhotoFast_SelStampFont(pDstImg->dim.w, (char**)&(stamp_text.draw_cfg.string.font), &ScaleFactor); PhotoFast_SelStampFont(pDstImg->dim.w, (char**)&(stamp_text.draw_cfg.string.font), &ScaleFactor);
stamp_text.draw_cfg.string.text = PhotoFast_InitStrBuf();
#else #else
stamp_text.draw_cfg.string.font = (lv_font_t *) lv_plugin_get_font(FONT)->font; stamp_text.draw_cfg.string.font = (lv_font_t *) lv_plugin_get_font(FONT)->font;
#endif #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_calc_buffer_size(&stamp_text.draw_cfg, &stamp_text.buff_size);
lv_user_font_conv(&stamp_text.draw_cfg, &stamp_text.mem_cfg); 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->Latitude, "3458.3100N");
//sprintf((char *)puiPara->Longitude, "12294.4200E"); //sprintf((char *)puiPara->Longitude, "12294.4200E");
sf_get_gps_info_str(customString, 1); 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') if(customString[0] != '\0')
{ {
@ -908,11 +912,11 @@ INT32 PhotoFastCapDateImprint_GenYuvData2(HD_VIDEO_FRAME *pDstImg)
#if PHOTO_STAMP_ISP_STATUS == DISABLE #if PHOTO_STAMP_ISP_STATUS == DISABLE
UINT32 ScaleFactor; /* not used , for backward capability*/ UINT32 ScaleFactor; /* not used , for backward capability*/
PhotoFast_SelStampFont(pDstImg->dim.w, (char**)&(stamp_text.draw_cfg.string.font), &ScaleFactor); PhotoFast_SelStampFont(pDstImg->dim.w, (char**)&(stamp_text.draw_cfg.string.font), &ScaleFactor);
stamp_text.draw_cfg.string.text = PhotoFast_InitStrBuf();
#else #else
stamp_text.draw_cfg.string.font = (lv_font_t *) lv_plugin_get_font(FONT)->font; stamp_text.draw_cfg.string.font = (lv_font_t *) lv_plugin_get_font(FONT)->font;
#endif #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_calc_buffer_size(&stamp_text.draw_cfg, &stamp_text.buff_size);
lv_user_font_conv(&stamp_text.draw_cfg, &stamp_text.mem_cfg); lv_user_font_conv(&stamp_text.draw_cfg, &stamp_text.mem_cfg);