1.Fix sync time bug.
2.Fix thumbnail too large bug. 3.At command read again without write.
This commit is contained in:
parent
6e3f4401ff
commit
f8d48b7120
|
@ -1 +1 @@
|
||||||
Subproject commit a6ca30776ca46792db2e471099c44799eab0bf17
|
Subproject commit 6cda096a723e0e0c52bc302ddd1a60f47a07c40f
|
|
@ -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);
|
PhotoExe_SliceEncode_Info* slice_encode_screennail_info = PhotoExe_Preview_SliceEncode_Get_Info(PHOTO_ENC_JPG_SCREENNAIL);
|
||||||
#if HUNTING_CAMERA_MCU == ENABLE
|
#if HUNTING_CAMERA_MCU == ENABLE
|
||||||
UIMenuStoreInfo *puiPara = sf_ui_para_get();
|
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 int COMEPRESSED_RATIO = JPG_COMERESSED_RATIO_12;
|
||||||
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 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
|
#else
|
||||||
const UINT32 ubount = CFG_JPG_PREVIEW_SLICE_ENC_RC_SCREENNAIL_UBOUND;
|
const UINT32 ubount = CFG_JPG_PREVIEW_SLICE_ENC_RC_SCREENNAIL_UBOUND;
|
||||||
|
|
|
@ -59,7 +59,7 @@ int sf_check_eth0(void);
|
||||||
int sf_check_usb0(void);
|
int sf_check_usb0(void);
|
||||||
|
|
||||||
void serach_gps_onkey_start(void);
|
void serach_gps_onkey_start(void);
|
||||||
void open_gps(void);
|
void open_gps(const SINT32 utc);
|
||||||
int get_gps_location(void);
|
int get_gps_location(void);
|
||||||
void keep_get_gps_location(const SF_GPS_PARAM param);
|
void keep_get_gps_location(const SF_GPS_PARAM param);
|
||||||
void keep_seraching_gps_location(const int timeout_ms);
|
void keep_seraching_gps_location(const int timeout_ms);
|
||||||
|
|
|
@ -575,7 +575,17 @@ static SINT32 sf_app_process_cmd_SD(SF_MESSAGE_BUF_S *pMessageBuf)
|
||||||
case FST_STA_OK:
|
case FST_STA_OK:
|
||||||
sf_set_card(1);
|
sf_set_card(1);
|
||||||
sf_sd_status_set(SF_SD_OK);
|
sf_sd_status_set(SF_SD_OK);
|
||||||
|
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);
|
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());
|
sf_statistics_param_load(sf_statistics_param_get());
|
||||||
MLOGI("card-%d mount OK\r\n", pMessageBuf->arg2 + 1);
|
MLOGI("card-%d mount OK\r\n", pMessageBuf->arg2 + 1);
|
||||||
sf_set_key_fw_update(sf_get_fw_update());
|
sf_set_key_fw_update(sf_get_fw_update());
|
||||||
|
|
|
@ -1301,6 +1301,7 @@ static SINT32 app_Register_Net_startup_mode(SF_FN_PARAM_S *pfnParam) {
|
||||||
sf_4G_usb_net_apn_cfg(pfnParam);
|
sf_4G_usb_net_apn_cfg(pfnParam);
|
||||||
sf_USB_net_init();
|
sf_USB_net_init();
|
||||||
if ((SF_ON == pCustomerParam->GpsSwitch)) {
|
if ((SF_ON == pCustomerParam->GpsSwitch)) {
|
||||||
|
open_gps(s32ret);
|
||||||
serach_gps_onkey_start();
|
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);
|
s32ret = sf_get_ntp(s32ret, ¤t_time);
|
||||||
}
|
}
|
||||||
if ((SF_ON == pCustomerParam->GpsSwitch)) {
|
if ((SF_ON == pCustomerParam->GpsSwitch)) {
|
||||||
open_gps();
|
open_gps(s32ret);
|
||||||
}
|
}
|
||||||
if (1 == pCustomerParam->NeedTimeSyncStartUp) {
|
if (1 == pCustomerParam->NeedTimeSyncStartUp) {
|
||||||
printf("[%s:%d]8 between A and B,no reg net again,no reset time sync.\n",
|
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);
|
s32ret = sf_get_ntp(s32ret, ¤t_time);
|
||||||
}
|
}
|
||||||
if ((SF_ON == pCustomerParam->GpsSwitch)) {
|
if ((SF_ON == pCustomerParam->GpsSwitch)) {
|
||||||
open_gps();
|
open_gps(s32ret);
|
||||||
}
|
}
|
||||||
if (0 != sf_get_cq_signal()) {
|
if (0 != sf_get_cq_signal()) {
|
||||||
pCustomerParam->GpsSendFlag = 1;
|
pCustomerParam->GpsSendFlag = 1;
|
||||||
|
@ -1758,12 +1759,12 @@ int sf_check_usb0(void)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void open_gps(void)
|
void open_gps(const SINT32 utc)
|
||||||
{
|
{
|
||||||
UIMenuStoreInfo *pCustomerParam = sf_app_ui_para_get();
|
UIMenuStoreInfo *pCustomerParam = sf_app_ui_para_get();
|
||||||
SINT32 s32ret = 0;
|
SINT32 s32ret = 0;
|
||||||
SF_PARA_TIME_S current_time = { 0, 0, 0, 0, 0, 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
|
#define NTP_TIME_LENGTH 32
|
||||||
char ntp_time[NTP_TIME_LENGTH] = {0};
|
char ntp_time[NTP_TIME_LENGTH] = {0};
|
||||||
snprintf(ntp_time, NTP_TIME_LENGTH, "%04d/%02d/%02d,%02d:%02d:%02d",
|
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;
|
SF_GPS_PARAM gps_param;
|
||||||
gps_param.timeout_ms = SERACH_GPS_TIMEOUT_MS;
|
gps_param.timeout_ms = SERACH_GPS_TIMEOUT_MS;
|
||||||
gps_param.period_ms = SERACH_PERIOD_MS;
|
gps_param.period_ms = SERACH_PERIOD_MS;
|
||||||
open_gps();
|
// open_gps();
|
||||||
keep_get_gps_location(gps_param);
|
keep_get_gps_location(gps_param);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
PhotoFast_SliceEncode_Info* slice_encode_screennail_info = PhotoFast_SliceEncode_Get_Info(PHOTO_ENC_JPG_SCREENNAIL);
|
||||||
#if HUNTING_CAMERA_MCU == ENABLE
|
#if HUNTING_CAMERA_MCU == ENABLE
|
||||||
UIMenuStoreInfo *puiPara = sf_ui_para_get();
|
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 int COMEPRESSED_RATIO = JPG_COMERESSED_RATIO_12;
|
||||||
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 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
|
#else
|
||||||
const UINT32 ubount = CFG_PHOTOFAST_SLICE_ENC_RC_SCREENNAIL_UBOUND;
|
const UINT32 ubount = CFG_PHOTOFAST_SLICE_ENC_RC_SCREENNAIL_UBOUND;
|
||||||
const UINT32 lbount = CFG_PHOTOFAST_SLICE_ENC_RC_SCREENNAIL_LBOUND;
|
const UINT32 lbount = CFG_PHOTOFAST_SLICE_ENC_RC_SCREENNAIL_LBOUND;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user