diff --git a/code/application/sifarsdk b/code/application/sifarsdk index a6ca30776..6cda096a7 160000 --- a/code/application/sifarsdk +++ b/code/application/sifarsdk @@ -1 +1 @@ -Subproject commit a6ca30776ca46792db2e471099c44799eab0bf17 +Subproject commit 6cda096a723e0e0c52bc302ddd1a60f47a07c40f diff --git a/code/application/source/cardv/SrcCode/UIApp/Photo/UIAppPhoto_Exe.c b/code/application/source/cardv/SrcCode/UIApp/Photo/UIAppPhoto_Exe.c index dfc6e0f02..2c3c0ec01 100755 --- a/code/application/source/cardv/SrcCode/UIApp/Photo/UIAppPhoto_Exe.c +++ b/code/application/source/cardv/SrcCode/UIApp/Photo/UIAppPhoto_Exe.c @@ -5095,8 +5095,9 @@ static INT32 PhotoExe_Preview_SliceEncode_Encode_Screennail_RC(HD_VIDEO_FRAME* v PhotoExe_SliceEncode_Info* slice_encode_screennail_info = PhotoExe_Preview_SliceEncode_Get_Info(PHOTO_ENC_JPG_SCREENNAIL); #if HUNTING_CAMERA_MCU == ENABLE UIMenuStoreInfo *puiPara = sf_ui_para_get(); - const UINT32 ubount = (((sf_get_screen_nail_width(puiPara->SendPicSize)) * (sf_get_screen_nail_height(puiPara->SendPicSize))*3/(2*JPG_COMERESSED_RATIO_8)) + (((sf_get_screen_nail_width(puiPara->SendPicSize)) * (sf_get_screen_nail_height(puiPara->SendPicSize))*3/(2*JPG_COMERESSED_RATIO_8)) * 20 / 100)); - const UINT32 lbount = (((sf_get_screen_nail_width(puiPara->SendPicSize)) * (sf_get_screen_nail_height(puiPara->SendPicSize))*3/(2*JPG_COMERESSED_RATIO_8)) - (((sf_get_screen_nail_width(puiPara->SendPicSize)) * (sf_get_screen_nail_height(puiPara->SendPicSize))*3/(2*JPG_COMERESSED_RATIO_8)) * 20 / 100)); + const int COMEPRESSED_RATIO = JPG_COMERESSED_RATIO_12; + const UINT32 ubount = (((sf_get_screen_nail_width(puiPara->SendPicSize)) * (sf_get_screen_nail_height(puiPara->SendPicSize))*3/(2*COMEPRESSED_RATIO)) + (((sf_get_screen_nail_width(puiPara->SendPicSize)) * (sf_get_screen_nail_height(puiPara->SendPicSize))*3/(2*COMEPRESSED_RATIO)) * 20 / 100)); + const UINT32 lbount = (((sf_get_screen_nail_width(puiPara->SendPicSize)) * (sf_get_screen_nail_height(puiPara->SendPicSize))*3/(2*COMEPRESSED_RATIO)) - (((sf_get_screen_nail_width(puiPara->SendPicSize)) * (sf_get_screen_nail_height(puiPara->SendPicSize))*3/(2*COMEPRESSED_RATIO)) * 20 / 100)); #else const UINT32 ubount = CFG_JPG_PREVIEW_SLICE_ENC_RC_SCREENNAIL_UBOUND; diff --git a/code/application/source/sf_app/code/include/sf_service.h b/code/application/source/sf_app/code/include/sf_service.h index 3017da416..f8c2e89e8 100755 --- a/code/application/source/sf_app/code/include/sf_service.h +++ b/code/application/source/sf_app/code/include/sf_service.h @@ -59,7 +59,7 @@ int sf_check_eth0(void); int sf_check_usb0(void); void serach_gps_onkey_start(void); -void open_gps(void); +void open_gps(const SINT32 utc); int get_gps_location(void); void keep_get_gps_location(const SF_GPS_PARAM param); void keep_seraching_gps_location(const int timeout_ms); diff --git a/code/application/source/sf_app/code/source/app/sf_common.c b/code/application/source/sf_app/code/source/app/sf_common.c index d2365854c..bd33c3807 100644 --- a/code/application/source/sf_app/code/source/app/sf_common.c +++ b/code/application/source/sf_app/code/source/app/sf_common.c @@ -575,7 +575,17 @@ static SINT32 sf_app_process_cmd_SD(SF_MESSAGE_BUF_S *pMessageBuf) case FST_STA_OK: sf_set_card(1); sf_sd_status_set(SF_SD_OK); - sf_sys_status_led_set(SF_LED_SYS_STATE_SD_NORMAL); + SF_STORE_ATTR_S storeattrs = {0}; + sf_sd_info_get(&storeattrs); + printf("SD free=%dM/%dM\n", storeattrs.SDFree, storeattrs.SDTotalSize); + if (storeattrs.SDFree < 30) /* 30MB */ + { + sf_sys_status_led_set(SF_LED_SYS_STATE_SD_NORMAL); + } + else + { + sf_sys_status_led_set(SF_LED_SYS_STATE_SD_FULL); + } sf_statistics_param_load(sf_statistics_param_get()); MLOGI("card-%d mount OK\r\n", pMessageBuf->arg2 + 1); sf_set_key_fw_update(sf_get_fw_update()); diff --git a/code/application/source/sf_app/code/source/app/sf_service.c b/code/application/source/sf_app/code/source/app/sf_service.c index f97504c08..6ea7dfc67 100755 --- a/code/application/source/sf_app/code/source/app/sf_service.c +++ b/code/application/source/sf_app/code/source/app/sf_service.c @@ -1301,6 +1301,7 @@ static SINT32 app_Register_Net_startup_mode(SF_FN_PARAM_S *pfnParam) { sf_4G_usb_net_apn_cfg(pfnParam); sf_USB_net_init(); if ((SF_ON == pCustomerParam->GpsSwitch)) { + open_gps(s32ret); serach_gps_onkey_start(); } @@ -1429,7 +1430,7 @@ static SINT32 app_Register_Net_startup_mode(SF_FN_PARAM_S *pfnParam) { s32ret = sf_get_ntp(s32ret, ¤t_time); } if ((SF_ON == pCustomerParam->GpsSwitch)) { - open_gps(); + open_gps(s32ret); } if (1 == pCustomerParam->NeedTimeSyncStartUp) { printf("[%s:%d]8 between A and B,no reg net again,no reset time sync.\n", @@ -1476,7 +1477,7 @@ static SINT32 app_Register_Net_startup_mode(SF_FN_PARAM_S *pfnParam) { s32ret = sf_get_ntp(s32ret, ¤t_time); } if ((SF_ON == pCustomerParam->GpsSwitch)) { - open_gps(); + open_gps(s32ret); } if (0 != sf_get_cq_signal()) { pCustomerParam->GpsSendFlag = 1; @@ -1758,12 +1759,12 @@ int sf_check_usb0(void) return 0; } -void open_gps(void) +void open_gps(const SINT32 utc) { UIMenuStoreInfo *pCustomerParam = sf_app_ui_para_get(); SINT32 s32ret = 0; SF_PARA_TIME_S current_time = { 0, 0, 0, 0, 0, 0}; - s32ret = sf_get_ntp(s32ret, ¤t_time); + s32ret = sf_get_ntp(utc, ¤t_time); #define NTP_TIME_LENGTH 32 char ntp_time[NTP_TIME_LENGTH] = {0}; snprintf(ntp_time, NTP_TIME_LENGTH, "%04d/%02d/%02d,%02d:%02d:%02d", @@ -1839,7 +1840,7 @@ static void *serach_gps_onkey_thread(void *param) SF_GPS_PARAM gps_param; gps_param.timeout_ms = SERACH_GPS_TIMEOUT_MS; gps_param.period_ms = SERACH_PERIOD_MS; - open_gps(); + // open_gps(); keep_get_gps_location(gps_param); return NULL; } diff --git a/rtos/code/application/source/cardv/SrcCode/UIApp/PhotoFast/PhotoFastSliceEncode.c b/rtos/code/application/source/cardv/SrcCode/UIApp/PhotoFast/PhotoFastSliceEncode.c index 1af6c66e1..7cd72c940 100755 --- a/rtos/code/application/source/cardv/SrcCode/UIApp/PhotoFast/PhotoFastSliceEncode.c +++ b/rtos/code/application/source/cardv/SrcCode/UIApp/PhotoFast/PhotoFastSliceEncode.c @@ -880,8 +880,9 @@ static INT32 PhotoFast_SliceEncode_Encode_Screennail_RC(HD_VIDEO_FRAME* video_fr PhotoFast_SliceEncode_Info* slice_encode_screennail_info = PhotoFast_SliceEncode_Get_Info(PHOTO_ENC_JPG_SCREENNAIL); #if HUNTING_CAMERA_MCU == ENABLE UIMenuStoreInfo *puiPara = sf_ui_para_get(); - const UINT32 ubount = (((sf_get_screen_nail_width(puiPara->SendPicSize)) * (sf_get_screen_nail_height(puiPara->SendPicSize))*3/(2*JPG_COMERESSED_RATIO_8)) + (((sf_get_screen_nail_width(puiPara->SendPicSize)) * (sf_get_screen_nail_height(puiPara->SendPicSize))*3/(2*JPG_COMERESSED_RATIO_8)) * 20 / 100)); - const UINT32 lbount = (((sf_get_screen_nail_width(puiPara->SendPicSize)) * (sf_get_screen_nail_height(puiPara->SendPicSize))*3/(2*JPG_COMERESSED_RATIO_8)) - (((sf_get_screen_nail_width(puiPara->SendPicSize)) * (sf_get_screen_nail_height(puiPara->SendPicSize))*3/(2*JPG_COMERESSED_RATIO_8)) * 20 / 100)); + const int COMEPRESSED_RATIO = JPG_COMERESSED_RATIO_12; + const UINT32 ubount = (((sf_get_screen_nail_width(puiPara->SendPicSize)) * (sf_get_screen_nail_height(puiPara->SendPicSize))*3/(2*COMEPRESSED_RATIO)) + (((sf_get_screen_nail_width(puiPara->SendPicSize)) * (sf_get_screen_nail_height(puiPara->SendPicSize))*3/(2*COMEPRESSED_RATIO)) * 20 / 100)); + const UINT32 lbount = (((sf_get_screen_nail_width(puiPara->SendPicSize)) * (sf_get_screen_nail_height(puiPara->SendPicSize))*3/(2*COMEPRESSED_RATIO)) - (((sf_get_screen_nail_width(puiPara->SendPicSize)) * (sf_get_screen_nail_height(puiPara->SendPicSize))*3/(2*COMEPRESSED_RATIO)) * 20 / 100)); #else const UINT32 ubount = CFG_PHOTOFAST_SLICE_ENC_RC_SCREENNAIL_UBOUND; const UINT32 lbount = CFG_PHOTOFAST_SLICE_ENC_RC_SCREENNAIL_LBOUND;