1.Rtos水印修改:a.录像水印日期底部修改为透明;b.图片水印部分修改;c.修复连拍图标水印显示异常问题;
This commit is contained in:
parent
157aed50df
commit
de20b1091a
6
rtos/code/application/source/cardv/Makefile
Normal file → Executable file
6
rtos/code/application/source/cardv/Makefile
Normal file → Executable file
|
@ -254,9 +254,9 @@ SRC += \
|
||||||
./SrcCode/UIWnd/LVGL_SPORTCAM/Resource/Languages/Language_SC.c \
|
./SrcCode/UIWnd/LVGL_SPORTCAM/Resource/Languages/Language_SC.c \
|
||||||
./SrcCode/UIWnd/LVGL_SPORTCAM/Resource/Languages/Language_TC.c \
|
./SrcCode/UIWnd/LVGL_SPORTCAM/Resource/Languages/Language_TC.c \
|
||||||
./SrcCode/UIWnd/LVGL_SPORTCAM/Resource/Fonts/notosans_black_8_1bpp.c \
|
./SrcCode/UIWnd/LVGL_SPORTCAM/Resource/Fonts/notosans_black_8_1bpp.c \
|
||||||
./SrcCode/UIWnd/LVGL_SPORTCAM/Resource/Fonts/notosans_black_16_1bpp.c \
|
./SrcCode/UIWnd/LVGL_SPORTCAM/Resource/Fonts/arialuni_16_1bpp.c \
|
||||||
./SrcCode/UIWnd/LVGL_SPORTCAM/Resource/Fonts/notosans_black_32_1bpp.c \
|
./SrcCode/UIWnd/LVGL_SPORTCAM/Resource/Fonts/arialuni_32_1bpp.c \
|
||||||
./SrcCode/UIWnd/LVGL_SPORTCAM/Resource/Fonts/notosans_black_48_1bpp.c \
|
./SrcCode/UIWnd/LVGL_SPORTCAM/Resource/Fonts/arialuni_48_1bpp.c \
|
||||||
./SrcCode/UIWnd/LVGL_SPORTCAM/Resource/Fonts/notosans_black_64_1bpp.c \
|
./SrcCode/UIWnd/LVGL_SPORTCAM/Resource/Fonts/notosans_black_64_1bpp.c \
|
||||||
./SrcCode/UIWnd/LVGL_SPORTCAM/Resource/Fonts/notosans_black_128_1bpp.c \
|
./SrcCode/UIWnd/LVGL_SPORTCAM/Resource/Fonts/notosans_black_128_1bpp.c \
|
||||||
./SrcCode/UIWnd/LVGL_SPORTCAM/Resource/Fonts/notosanscjkjp_black_16_1bpp.c \
|
./SrcCode/UIWnd/LVGL_SPORTCAM/Resource/Fonts/notosanscjkjp_black_16_1bpp.c \
|
||||||
|
|
9
rtos/code/application/source/cardv/SrcCode/PrjCfg_HUNTING_S530.h
Normal file → Executable file
9
rtos/code/application/source/cardv/SrcCode/PrjCfg_HUNTING_S530.h
Normal file → Executable file
|
@ -1037,9 +1037,9 @@
|
||||||
******************************************************************************************/
|
******************************************************************************************/
|
||||||
#define LV_USER_CFG_STAMP_FONT_ID_XXL LV_PLUGIN_FONT_ID_NOTOSANS_BLACK_128_1BPP
|
#define LV_USER_CFG_STAMP_FONT_ID_XXL LV_PLUGIN_FONT_ID_NOTOSANS_BLACK_128_1BPP
|
||||||
#define LV_USER_CFG_STAMP_FONT_ID_XL LV_PLUGIN_FONT_ID_NOTOSANS_BLACK_64_1BPP
|
#define LV_USER_CFG_STAMP_FONT_ID_XL LV_PLUGIN_FONT_ID_NOTOSANS_BLACK_64_1BPP
|
||||||
#define LV_USER_CFG_STAMP_FONT_ID_LARGE LV_PLUGIN_FONT_ID_NOTOSANS_BLACK_48_1BPP
|
#define LV_USER_CFG_STAMP_FONT_ID_LARGE LV_PLUGIN_FONT_ID_ARIALUNI_48_1BPP
|
||||||
#define LV_USER_CFG_STAMP_FONT_ID_MEDIUM LV_PLUGIN_FONT_ID_NOTOSANS_BLACK_32_1BPP
|
#define LV_USER_CFG_STAMP_FONT_ID_MEDIUM LV_PLUGIN_FONT_ID_ARIALUNI_32_1BPP
|
||||||
#define LV_USER_CFG_STAMP_FONT_ID_SMALL LV_PLUGIN_FONT_ID_NOTOSANS_BLACK_16_1BPP
|
#define LV_USER_CFG_STAMP_FONT_ID_SMALL LV_PLUGIN_FONT_ID_ARIALUNI_16_1BPP
|
||||||
#define LV_USER_CFG_STAMP_FONT_ID_XS LV_PLUGIN_FONT_ID_NOTOSANS_BLACK_8_1BPP
|
#define LV_USER_CFG_STAMP_FONT_ID_XS LV_PLUGIN_FONT_ID_NOTOSANS_BLACK_8_1BPP
|
||||||
|
|
||||||
#define LV_USER_CFG_STAMP_LETTER_SPACE 0
|
#define LV_USER_CFG_STAMP_LETTER_SPACE 0
|
||||||
|
@ -1051,7 +1051,8 @@
|
||||||
|
|
||||||
/* please always fill ARGB8888, alpha channel will be discarded if output format is yuv (Photo UIDateImprint) */
|
/* please always fill ARGB8888, alpha channel will be discarded if output format is yuv (Photo UIDateImprint) */
|
||||||
#define LV_USER_CFG_STAMP_COLOR_TEXT 0xFFFFFFFF /* text color */
|
#define LV_USER_CFG_STAMP_COLOR_TEXT 0xFFFFFFFF /* text color */
|
||||||
#define LV_USER_CFG_STAMP_COLOR_BACKGROUND 0XFF000000 /* background color */
|
#define LV_USER_CFG_STAMP_COLOR_BACKGROUND 0XFF000000 /* background color: black */
|
||||||
|
#define LV_USER_CFG_MOVIE_DATESTAMP_COLOR_BACKGROUND 0X00000000 /* background color: none */
|
||||||
#define LV_USER_CFG_STAMP_COLOR_FRAME 0x00000000 /* frame color */
|
#define LV_USER_CFG_STAMP_COLOR_FRAME 0x00000000 /* frame color */
|
||||||
|
|
||||||
/*******************************************************************************************
|
/*******************************************************************************************
|
||||||
|
|
4
rtos/code/application/source/cardv/SrcCode/UIApp/MovieStamp/MovieStamp.c
Normal file → Executable file
4
rtos/code/application/source/cardv/SrcCode/UIApp/MovieStamp/MovieStamp.c
Normal file → Executable file
|
@ -1208,7 +1208,7 @@ void MovieStamp_UpdateData(void)
|
||||||
//DBG_DUMP("i=%d, w=%d, %d, %d\r\n", i,g_VsOsdWidth[i], g_VsOsdHight[i],g_VsFontOut[i].GenImg.loff[0]);
|
//DBG_DUMP("i=%d, w=%d, %d, %d\r\n", i,g_VsOsdWidth[i], g_VsOsdHight[i],g_VsFontOut[i].GenImg.loff[0]);
|
||||||
//MovieStamp_VsUpdateOsd(i, TRUE, 1, g_MovieStampPos[i].uiX, g_MovieStampPos[i].uiY, g_VsOsdWidth[i], g_VsOsdHight[i], (void*)g_pVsFontDataAddr[i]);
|
//MovieStamp_VsUpdateOsd(i, TRUE, 1, g_MovieStampPos[i].uiX, g_MovieStampPos[i].uiY, g_VsOsdWidth[i], g_VsOsdHight[i], (void*)g_pVsFontDataAddr[i]);
|
||||||
|
|
||||||
MovieStamp_CombineStamp(i, 0xF000);
|
MovieStamp_CombineStamp(i, 0x0);
|
||||||
|
|
||||||
// update 1st stamp
|
// update 1st stamp
|
||||||
// if(MovieStamp_VsUpdateOsd(g_VEncHDPathId[i], TRUE, MOVIE_STAMP_LAYER1, VS_DATESTAMP_REGION, g_MovieStampPos[i].uiX, g_MovieStampPos[i].uiY, g_VsOsdWidth[i], g_VsOsdHight[i], (void*)g_pVsFontDataAddr[i])){
|
// if(MovieStamp_VsUpdateOsd(g_VEncHDPathId[i], TRUE, MOVIE_STAMP_LAYER1, VS_DATESTAMP_REGION, g_MovieStampPos[i].uiX, g_MovieStampPos[i].uiY, g_VsOsdWidth[i], g_VsOsdHight[i], (void*)g_pVsFontDataAddr[i])){
|
||||||
|
@ -1490,7 +1490,7 @@ void MovieStamp_VsFontConfig(UINT32 uiVEncOutPortId)
|
||||||
YUV_GET_RGB(y, u, v, r, g, b);
|
YUV_GET_RGB(y, u, v, r, g, b);
|
||||||
|
|
||||||
#if defined(_UI_STYLE_LVGL_)
|
#if defined(_UI_STYLE_LVGL_)
|
||||||
g_VsFontIn[uiVEncOutPortId].ciTransparet = ((LV_COLOR_GET_A32((lv_color32_t){.full = LV_USER_CFG_STAMP_COLOR_BACKGROUND}) >> 4) << 12) | ((g>>4)<<4) | (b>>4); //0x0000;
|
g_VsFontIn[uiVEncOutPortId].ciTransparet = ((LV_COLOR_GET_A32((lv_color32_t){.full = LV_USER_CFG_MOVIE_DATESTAMP_COLOR_BACKGROUND}) >> 4) << 12) | ((g>>4)<<4) | (b>>4); //0x0000;
|
||||||
#else
|
#else
|
||||||
g_VsFontIn[uiVEncOutPortId].ciTransparet = ((r>>4)<<8) | ((g>>4)<<4) | (b>>4); //0x0000;
|
g_VsFontIn[uiVEncOutPortId].ciTransparet = ((r>>4)<<8) | ((g>>4)<<4) | (b>>4); //0x0000;
|
||||||
#endif
|
#endif
|
||||||
|
|
6
rtos/code/application/source/cardv/SrcCode/UIApp/Photo/UIDateImprint.c
Normal file → Executable file
6
rtos/code/application/source/cardv/SrcCode/UIApp/Photo/UIDateImprint.c
Normal file → Executable file
|
@ -209,7 +209,7 @@ typedef struct {
|
||||||
GXIMG_CP_ENG copyEngine;
|
GXIMG_CP_ENG copyEngine;
|
||||||
UINT32 lockptn;
|
UINT32 lockptn;
|
||||||
BOOL isStrDirty;
|
BOOL isStrDirty;
|
||||||
CHAR StrBuf[128];
|
CHAR StrBuf[64];
|
||||||
UINT32 pic_cnt;
|
UINT32 pic_cnt;
|
||||||
} DATE_IMPRINT_INFO;
|
} DATE_IMPRINT_INFO;
|
||||||
|
|
||||||
|
@ -508,6 +508,8 @@ void UiDateImprint_SelStampFont(UINT32 uiImageWidth, char **font, UINT32 *ScaleF
|
||||||
red_id = LV_USER_CFG_STAMP_FONT_ID_XXL;
|
red_id = LV_USER_CFG_STAMP_FONT_ID_XXL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
printf("[%s:%d]uiImageWidth=%d,stamp font id=%d\n", __FUNCTION__, __LINE__, uiImageWidth, red_id);
|
||||||
|
|
||||||
*font = (char *) lv_plugin_get_font(red_id)->font;
|
*font = (char *) lv_plugin_get_font(red_id)->font;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
@ -585,6 +587,8 @@ void UiDateImprint_GetStampFont(UINT32 uiImageWidth, char **font)
|
||||||
red_id = LV_USER_CFG_STAMP_FONT_ID_XXL;
|
red_id = LV_USER_CFG_STAMP_FONT_ID_XXL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
printf("[%s:%d]uiImageWidth=%d,stamp font id=%d\n", __FUNCTION__, __LINE__, uiImageWidth, red_id);
|
||||||
|
|
||||||
*font = (char *) lv_plugin_get_font(red_id)->font;
|
*font = (char *) lv_plugin_get_font(red_id)->font;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
269
rtos/code/application/source/cardv/SrcCode/UIApp/PhotoFast/PhotoFastCapDateImprint.c
Normal file → Executable file
269
rtos/code/application/source/cardv/SrcCode/UIApp/PhotoFast/PhotoFastCapDateImprint.c
Normal file → Executable file
|
@ -23,27 +23,45 @@
|
||||||
#define __DBGFLT__ "*" //*=All, [mark]=CustomClass
|
#define __DBGFLT__ "*" //*=All, [mark]=CustomClass
|
||||||
#include <kwrap/debug.h>
|
#include <kwrap/debug.h>
|
||||||
|
|
||||||
|
#include "UIInfo/UIInfo.h"
|
||||||
|
|
||||||
|
#include "sf_battery.h"
|
||||||
|
|
||||||
#if PHOTO_STAMP_ISP_STATUS == DISABLE
|
#if PHOTO_STAMP_ISP_STATUS == DISABLE
|
||||||
|
|
||||||
|
char StampStr[256] = {0};
|
||||||
|
|
||||||
static char* PhotoFast_InitStrBuf(void)
|
static char* PhotoFast_InitStrBuf(void)
|
||||||
{
|
{
|
||||||
char *str = NULL;
|
char *dateStr = NULL;
|
||||||
|
INT16 cTemper = 0;
|
||||||
|
INT16 fTemper = 0;
|
||||||
|
UINT8 temperStr[16] = {0};
|
||||||
|
|
||||||
|
//UIMenuStoreInfo *puiPara = sf_ui_para_get();
|
||||||
|
|
||||||
DateTime_Load();
|
DateTime_Load();
|
||||||
|
|
||||||
switch (UI_GetData(FL_DATE_STAMP))
|
switch (UI_GetData(FL_DATE_STAMP))
|
||||||
{
|
{
|
||||||
case DATEIMPRINT_DATE:
|
case DATEIMPRINT_DATE:
|
||||||
str = DateTime_MakeYMD();
|
dateStr = DateTime_MakeYMD();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DATEIMPRINT_DATE_TIME:
|
case DATEIMPRINT_DATE_TIME:
|
||||||
default:
|
default:
|
||||||
str = DateTime_MakeYMDHMS();
|
dateStr = DateTime_MakeYMDHMS();
|
||||||
break;
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return str;
|
sf_stamp_temperature_get(&fTemper, &cTemper);
|
||||||
|
snprintf((char *)temperStr, sizeof(temperStr), "%d%c%cF %d%c%cC", fTemper, 0xC2, 0xB0, cTemper, 0xC2, 0xB0);
|
||||||
|
printf("[%s:%d]temperStr=%s\n", __FUNCTION__, __LINE__, temperStr);
|
||||||
|
|
||||||
|
snprintf((char *)StampStr, sizeof(StampStr), "%s %s", temperStr, dateStr);
|
||||||
|
printf("[%s:%d]StampStr=%s\n", __FUNCTION__, __LINE__, StampStr);
|
||||||
|
|
||||||
|
return StampStr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
|
@ -73,6 +91,8 @@ void PhotoFast_SelStampFont(UINT32 uiImageWidth, char **font, UINT32 *ScaleFacto
|
||||||
red_id = LV_USER_CFG_STAMP_FONT_ID_XS;
|
red_id = LV_USER_CFG_STAMP_FONT_ID_XS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
printf("[%s:%d]uiImageWidth=%d,stamp font id=%d\n", __FUNCTION__, __LINE__, uiImageWidth, red_id);
|
||||||
|
|
||||||
// DBG_DUMP("**** red_id = %lu\n", red_id);
|
// DBG_DUMP("**** red_id = %lu\n", red_id);
|
||||||
|
|
||||||
*font = (char *) lv_plugin_get_font(red_id)->font;
|
*font = (char *) lv_plugin_get_font(red_id)->font;
|
||||||
|
@ -125,8 +145,8 @@ void PhotoFast_SelStampFont(UINT32 uiImageWidth, char **font, UINT32 *ScaleFacto
|
||||||
|
|
||||||
/* YUV color key */
|
/* YUV color key */
|
||||||
#define CKEY_Y 0x0
|
#define CKEY_Y 0x0
|
||||||
#define CKEY_U 0x88
|
#define CKEY_U 0x80
|
||||||
#define CKEY_V 0x88
|
#define CKEY_V 0x80
|
||||||
#define CKEY ((CKEY_Y & 0xFF) | ((CKEY_U & 0xFF) << 8) | ((CKEY_V & 0xFF) << 16))
|
#define CKEY ((CKEY_Y & 0xFF) | ((CKEY_U & 0xFF) << 8) | ((CKEY_V & 0xFF) << 16))
|
||||||
|
|
||||||
#define LV_USER_FONT_CONV_ALIGN_W 8
|
#define LV_USER_FONT_CONV_ALIGN_W 8
|
||||||
|
@ -456,9 +476,11 @@ void UiDateImprint_DrawBG(UINT32 stamp_height, HD_VIDEO_FRAME* Img)
|
||||||
param.color = LV_USER_CFG_STAMP_COLOR_BACKGROUND; /* ARGB format */
|
param.color = LV_USER_CFG_STAMP_COLOR_BACKGROUND; /* ARGB format */
|
||||||
param.thickness = 10;
|
param.thickness = 10;
|
||||||
param.rect.w = Img->dim.w;
|
param.rect.w = Img->dim.w;
|
||||||
param.rect.h = stamp_height;
|
//param.rect.h = stamp_height;
|
||||||
|
//printf("[%s:%d]stamp_height=%d\n", __FUNCTION__, __LINE__, stamp_height);
|
||||||
|
param.rect.h = stamp_height/10*12; //50/10*12 = 60
|
||||||
param.rect.x = 0;
|
param.rect.x = 0;
|
||||||
param.rect.y = Img->dim.h - stamp_height;
|
param.rect.y = Img->dim.h - 58;
|
||||||
param.type = HD_GFX_RECT_SOLID;
|
param.type = HD_GFX_RECT_SOLID;
|
||||||
|
|
||||||
hd_gfx_draw_rect(¶m);
|
hd_gfx_draw_rect(¶m);
|
||||||
|
@ -583,10 +605,20 @@ void UiDateImprint_AttachICON(UINT32 stamp_height, HD_VIDEO_FRAME* Img, lv_plugi
|
||||||
param_img.src_region.h = src_img.dim.h;
|
param_img.src_region.h = src_img.dim.h;
|
||||||
param_img.engine = 0;
|
param_img.engine = 0;
|
||||||
param_img.dst_img = *Img;
|
param_img.dst_img = *Img;
|
||||||
param_img.dst_region.w = (src_img.dim.w / src_img.dim.h) * stamp_height;
|
printf("[%s:%d]src_img.dim.w=%d,src_img.dim.h=%d\n", __FUNCTION__, __LINE__, src_img.dim.w, src_img.dim.h);
|
||||||
|
param_img.dst_region.w = ((src_img.dim.w / src_img.dim.h) * stamp_height);
|
||||||
param_img.dst_region.h = stamp_height;
|
param_img.dst_region.h = stamp_height;
|
||||||
|
printf("[%s:%d]param_img.dst_region.w=%d,param_img.dst_region.h=%d\n", __FUNCTION__, __LINE__, param_img.dst_region.w, param_img.dst_region.h);
|
||||||
|
if(res_id == LV_PLUGIN_IMG_ID_ICON_10234_GPS)
|
||||||
|
{
|
||||||
|
param_img.dst_region.x = (*x_curr_ofs - param_img.dst_region.w);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
param_img.dst_region.x = (*x_curr_ofs - padding - param_img.dst_region.w);
|
param_img.dst_region.x = (*x_curr_ofs - padding - param_img.dst_region.w);
|
||||||
param_img.dst_region.y = param_img.dst_img.dim.h - param_img.dst_region.h;
|
}
|
||||||
|
printf("[%s:%d]param_img.dst_region.x=%d\n", __FUNCTION__, __LINE__, param_img.dst_region.x);
|
||||||
|
param_img.dst_region.y = param_img.dst_img.dim.h - param_img.dst_region.h - 2;
|
||||||
|
|
||||||
vf_gfx_scale(¶m_img, 1);
|
vf_gfx_scale(¶m_img, 1);
|
||||||
|
|
||||||
|
@ -595,13 +627,156 @@ void UiDateImprint_AttachICON(UINT32 stamp_height, HD_VIDEO_FRAME* Img, lv_plugi
|
||||||
*x_curr_ofs = param_img.dst_region.x;
|
*x_curr_ofs = param_img.dst_region.x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void UiDateImprint_AttachString(UINT32 stamp_height, HD_VIDEO_FRAME* Img, UINT8* name, bool enable_ckey, UINT32 padding, UINT32* x_curr_ofs)
|
||||||
|
{
|
||||||
|
VF_GFX_SCALE param_img = {0};
|
||||||
|
HD_VIDEO_FRAME src_img;
|
||||||
|
|
||||||
|
stamp_text.draw_cfg.string.text = (char *)name;
|
||||||
|
|
||||||
|
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_cfg_to_hd_frame(
|
||||||
|
&stamp_text.draw_cfg,
|
||||||
|
&stamp_text.mem_cfg,
|
||||||
|
stamp_text.buff_size.width,
|
||||||
|
stamp_text.buff_size.height,
|
||||||
|
&src_img
|
||||||
|
);
|
||||||
|
|
||||||
|
memset(¶m_img, 0, sizeof(param_img));
|
||||||
|
param_img.quality = HD_GFX_SCALE_QUALITY_NULL;
|
||||||
|
param_img.src_img = src_img;
|
||||||
|
param_img.src_region.x = 0;
|
||||||
|
param_img.src_region.y = 0;
|
||||||
|
param_img.src_region.w = src_img.dim.w;
|
||||||
|
param_img.src_region.h = src_img.dim.h;
|
||||||
|
param_img.engine = 0;
|
||||||
|
param_img.dst_img = *Img;
|
||||||
|
param_img.dst_region.w = (src_img.dim.w / src_img.dim.h) * stamp_height;
|
||||||
|
param_img.dst_region.h = stamp_height;
|
||||||
|
param_img.dst_region.x = (*x_curr_ofs - padding - param_img.dst_region.w);
|
||||||
|
param_img.dst_region.y = param_img.dst_img.dim.h - param_img.dst_region.h;
|
||||||
|
|
||||||
|
vf_gfx_scale(¶m_img, 1);
|
||||||
|
|
||||||
|
*x_curr_ofs = param_img.dst_region.x;
|
||||||
|
}
|
||||||
|
|
||||||
|
void sf_get_gps_info_str(UINT8 *str, UINT8 type)
|
||||||
|
{
|
||||||
|
UINT32 i = 0;
|
||||||
|
UIMenuStoreInfo *puiPara = sf_ui_para_get();
|
||||||
|
|
||||||
|
printf("[%s:%d]puiPara->GpsSwitch=%d,puiPara->Latitude:%s,puiPara->Longitude:%s\n",
|
||||||
|
__FUNCTION__, __LINE__, puiPara->GpsSwitch, puiPara->Latitude, puiPara->Longitude);
|
||||||
|
if(puiPara->GpsSwitch == SF_ON)
|
||||||
|
{
|
||||||
|
if((puiPara->Latitude[0] == '\0') || (puiPara->Longitude[0] == '\0'))
|
||||||
|
{
|
||||||
|
str[0] = '\0';
|
||||||
|
}
|
||||||
|
else if(type == 1)
|
||||||
|
{
|
||||||
|
str[i++] = puiPara->Latitude[9];
|
||||||
|
str[i++] = puiPara->Latitude[0];
|
||||||
|
str[i++] = puiPara->Latitude[1];
|
||||||
|
str[i++] = 0xC2;
|
||||||
|
str[i++] = 0xB0;
|
||||||
|
str[i++] = puiPara->Latitude[2];
|
||||||
|
str[i++] = puiPara->Latitude[3];
|
||||||
|
str[i++] = 0x27; // '
|
||||||
|
str[i++] = puiPara->Latitude[5];
|
||||||
|
str[i++] = puiPara->Latitude[6];
|
||||||
|
str[i++] = 0x22; // "
|
||||||
|
str[i++] = ' ';
|
||||||
|
str[i++] = puiPara->Longitude[10];
|
||||||
|
str[i++] = puiPara->Longitude[0];
|
||||||
|
str[i++] = puiPara->Longitude[1];
|
||||||
|
str[i++] = puiPara->Longitude[2];
|
||||||
|
str[i++] = 0xC2;
|
||||||
|
str[i++] = 0xB0;
|
||||||
|
str[i++] = puiPara->Longitude[3];
|
||||||
|
str[i++] = puiPara->Longitude[4];
|
||||||
|
str[i++] = 0x27; // '
|
||||||
|
str[i++] = puiPara->Longitude[6];
|
||||||
|
str[i++] = puiPara->Longitude[7];
|
||||||
|
str[i++] = 0x22; // "
|
||||||
|
str[i++] = '\0';
|
||||||
|
}
|
||||||
|
else if(type == 2)
|
||||||
|
{
|
||||||
|
str[i++] = puiPara->Latitude[9];
|
||||||
|
str[i++] = puiPara->Latitude[0];
|
||||||
|
str[i++] = puiPara->Latitude[1];
|
||||||
|
str[i++] = 0x2A;
|
||||||
|
str[i++] = puiPara->Latitude[2];
|
||||||
|
str[i++] = puiPara->Latitude[3];
|
||||||
|
str[i++] = 0x27; // '
|
||||||
|
str[i++] = puiPara->Latitude[5];
|
||||||
|
str[i++] = puiPara->Latitude[6];
|
||||||
|
str[i++] = 0x22; // "
|
||||||
|
str[i++] = ' ';
|
||||||
|
str[i++] = puiPara->Longitude[10];
|
||||||
|
str[i++] = puiPara->Longitude[0];
|
||||||
|
str[i++] = puiPara->Longitude[1];
|
||||||
|
str[i++] = puiPara->Longitude[2];
|
||||||
|
str[i++] = 0x2A;
|
||||||
|
str[i++] = puiPara->Longitude[3];
|
||||||
|
str[i++] = puiPara->Longitude[4];
|
||||||
|
str[i++] = 0x27; // '
|
||||||
|
str[i++] = puiPara->Longitude[6];
|
||||||
|
str[i++] = puiPara->Longitude[7];
|
||||||
|
str[i++] = 0x22; // "
|
||||||
|
str[i++] = '\0';
|
||||||
|
}
|
||||||
|
else if(type == 3)
|
||||||
|
{
|
||||||
|
str[i++] = puiPara->Latitude[9];
|
||||||
|
str[i++] = puiPara->Latitude[0];
|
||||||
|
str[i++] = puiPara->Latitude[1];
|
||||||
|
str[i++] = '.';
|
||||||
|
str[i++] = puiPara->Latitude[2];
|
||||||
|
str[i++] = puiPara->Latitude[3];
|
||||||
|
str[i++] = '.';
|
||||||
|
str[i++] = puiPara->Latitude[5];
|
||||||
|
str[i++] = puiPara->Latitude[6];
|
||||||
|
str[i++] = '-';
|
||||||
|
|
||||||
|
str[i++] = puiPara->Longitude[10];
|
||||||
|
str[i++] = puiPara->Longitude[0];
|
||||||
|
str[i++] = puiPara->Longitude[1];
|
||||||
|
str[i++] = puiPara->Longitude[2];
|
||||||
|
str[i++] = '.';
|
||||||
|
str[i++] = puiPara->Longitude[3];
|
||||||
|
str[i++] = puiPara->Longitude[4];
|
||||||
|
str[i++] = '.';
|
||||||
|
str[i++] = puiPara->Longitude[6];
|
||||||
|
str[i++] = puiPara->Longitude[7];
|
||||||
|
str[i++] = '\0';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
str[0] = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
|
printf("[%s:%d]str:%s\n", __FUNCTION__, __LINE__, str);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
INT32 PhotoFastCapDateImprint_GenYuvData(HD_VIDEO_FRAME *pDstImg)
|
INT32 PhotoFastCapDateImprint_GenYuvData(HD_VIDEO_FRAME *pDstImg)
|
||||||
{
|
{
|
||||||
HD_VIDEO_FRAME src_img;
|
HD_VIDEO_FRAME src_img;
|
||||||
VF_GFX_COPY param_text = {0};
|
VF_GFX_COPY param_text = {0};
|
||||||
UINT32 padding = 0;
|
UINT32 padding = 0;
|
||||||
UINT32 x_curr_ofs = 0; /* start from date stamp */
|
UINT32 x_curr_ofs = 0; /* start from date stamp */
|
||||||
|
UINT8 customString[32] = {0};
|
||||||
|
INT32 year = 0, month = 0, day = 0;
|
||||||
|
UINT8 moonday = 0;
|
||||||
|
UINT8 batValue = 0;
|
||||||
|
|
||||||
|
UIMenuStoreInfo *puiPara = sf_ui_para_get();
|
||||||
|
|
||||||
/* select font by image width */
|
/* select font by image width */
|
||||||
|
|
||||||
|
@ -611,12 +786,8 @@ INT32 PhotoFastCapDateImprint_GenYuvData(HD_VIDEO_FRAME *pDstImg)
|
||||||
#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
|
||||||
#if PHOTO_STAMP_ISP_STATUS == ENABLE
|
|
||||||
stamp_text.draw_cfg.string.text = &photo_aesteam[0];// STRING;
|
|
||||||
#else
|
|
||||||
stamp_text.draw_cfg.string.text = PhotoFast_InitStrBuf();
|
|
||||||
#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);
|
||||||
|
@ -629,14 +800,8 @@ INT32 PhotoFastCapDateImprint_GenYuvData(HD_VIDEO_FRAME *pDstImg)
|
||||||
&src_img
|
&src_img
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//draw background
|
||||||
padding = src_img.dim.h;
|
|
||||||
x_curr_ofs = pDstImg->dim.w - src_img.dim.w;
|
|
||||||
|
|
||||||
UiDateImprint_DrawBG(src_img.dim.h, pDstImg);
|
UiDateImprint_DrawBG(src_img.dim.h, pDstImg);
|
||||||
UiDateImprint_AttachLogo(src_img.dim.h, pDstImg);
|
|
||||||
UiDateImprint_AttachICON(src_img.dim.h, pDstImg, LV_PLUGIN_IMG_ID_ICON_1020A, true, padding, &x_curr_ofs);
|
|
||||||
UiDateImprint_AttachICON(src_img.dim.h, pDstImg, LV_PLUGIN_IMG_ID_ICON_1021E, true, padding, &x_curr_ofs);
|
|
||||||
|
|
||||||
memset(¶m_text, 0, sizeof(param_text));
|
memset(¶m_text, 0, sizeof(param_text));
|
||||||
param_text.src_img = src_img;
|
param_text.src_img = src_img;
|
||||||
|
@ -645,13 +810,62 @@ INT32 PhotoFastCapDateImprint_GenYuvData(HD_VIDEO_FRAME *pDstImg)
|
||||||
param_text.src_region.w = src_img.dim.w;
|
param_text.src_region.w = src_img.dim.w;
|
||||||
param_text.src_region.h = src_img.dim.h;
|
param_text.src_region.h = src_img.dim.h;
|
||||||
param_text.dst_img = *pDstImg;
|
param_text.dst_img = *pDstImg;
|
||||||
param_text.dst_pos.x = pDstImg->dim.w - src_img.dim.w;
|
param_text.dst_pos.x = pDstImg->dim.w - src_img.dim.w - src_img.dim.h/2;
|
||||||
param_text.dst_pos.y = pDstImg->dim.h - src_img.dim.h;
|
param_text.dst_pos.y = pDstImg->dim.h - src_img.dim.h;
|
||||||
param_text.alpha = 255;
|
param_text.alpha = 255;
|
||||||
param_text.colorkey = CKEY;
|
param_text.colorkey = CKEY;
|
||||||
param_text.engine = 0;
|
param_text.engine = 0;
|
||||||
vf_gfx_copy(¶m_text);
|
vf_gfx_copy(¶m_text);
|
||||||
|
|
||||||
|
padding = src_img.dim.h;
|
||||||
|
x_curr_ofs = param_text.dst_pos.x;
|
||||||
|
|
||||||
|
//logo stamp
|
||||||
|
UiDateImprint_AttachLogo(src_img.dim.h * 3, pDstImg);
|
||||||
|
|
||||||
|
//moon stamp
|
||||||
|
year = DateTime_Get(DATETIME_YEAR);
|
||||||
|
month = DateTime_Get(DATETIME_MONTH);
|
||||||
|
day = DateTime_Get(DATETIME_DAY);
|
||||||
|
printf("[%s:%d]get date time:%04d %02d %02d\n", __FUNCTION__, __LINE__, year, month, day);
|
||||||
|
moonday = (sf_solar_to_Lunar(year, month, day)) - 1;
|
||||||
|
UiDateImprint_AttachICON(src_img.dim.h, pDstImg, LV_PLUGIN_IMG_ID_ICON_10200_MOON + moonday, true, padding, &x_curr_ofs);
|
||||||
|
|
||||||
|
//battery stamp
|
||||||
|
batValue = sf_battery_level_get();
|
||||||
|
if(batValue < SF_BATT_LEVEL_1)
|
||||||
|
{
|
||||||
|
batValue = 1;
|
||||||
|
}
|
||||||
|
batValue -= 1;
|
||||||
|
UiDateImprint_AttachICON(src_img.dim.h, pDstImg, LV_PLUGIN_IMG_ID_ICON_10230_BATTERT + batValue, true, padding, &x_curr_ofs);
|
||||||
|
printf("[%s:%d]moonday=%d,batValue=%d\n", __FUNCTION__, __LINE__, moonday, batValue);
|
||||||
|
|
||||||
|
//camid stamp
|
||||||
|
if((puiPara->CamNameSwitch == SF_CAMID_ON) && (puiPara->CamNameStr[0] != '\0'))
|
||||||
|
{
|
||||||
|
snprintf((char *)customString, sizeof(customString), "%s", puiPara->CamNameStr);
|
||||||
|
printf("[%s:%d]customString=%s\n", __FUNCTION__, __LINE__, customString);
|
||||||
|
//sprintf(customString, "Cam1");
|
||||||
|
UiDateImprint_AttachString(src_img.dim.h, pDstImg, customString, true, padding, &x_curr_ofs);
|
||||||
|
}
|
||||||
|
|
||||||
|
//gps stamp
|
||||||
|
//sprintf((char *)puiPara->Latitude, "3458.3100N");
|
||||||
|
//sprintf((char *)puiPara->Longitude, "12294.4200E");
|
||||||
|
sf_get_gps_info_str(customString, 1);
|
||||||
|
if(puiPara->GpsSwitch == SF_ON)
|
||||||
|
{
|
||||||
|
if(customString[0] != '\0')
|
||||||
|
{
|
||||||
|
//snprintf((char *)customString, sizeof(customString), "N22%c%c34'57\" E113%c%c55'19\"", 0xC2, 0xB0, 0xC2, 0xB0);
|
||||||
|
printf("[%s:%d]customString=%s\n", __FUNCTION__, __LINE__, customString);
|
||||||
|
UiDateImprint_AttachString(src_img.dim.h, pDstImg, customString, true, padding, &x_curr_ofs);
|
||||||
|
}
|
||||||
|
|
||||||
|
UiDateImprint_AttachICON(src_img.dim.h, pDstImg, LV_PLUGIN_IMG_ID_ICON_10234_GPS, true, padding, &x_curr_ofs);
|
||||||
|
}
|
||||||
|
|
||||||
return E_OK;
|
return E_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -695,11 +909,8 @@ INT32 PhotoFastCapDateImprint_GenYuvData2(HD_VIDEO_FRAME *pDstImg)
|
||||||
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
|
||||||
|
|
||||||
#if PHOTO_STAMP_ISP_STATUS == ENABLE
|
|
||||||
stamp_text.draw_cfg.string.text = &photo_aesteam[0];// STRING;
|
|
||||||
#else
|
|
||||||
stamp_text.draw_cfg.string.text = PhotoFast_InitStrBuf();
|
stamp_text.draw_cfg.string.text = PhotoFast_InitStrBuf();
|
||||||
#endif
|
|
||||||
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);
|
||||||
|
|
||||||
|
|
26
rtos/code/application/source/cardv/SrcCode/UIApp/PhotoFast/PhotoFastSliceEncode.c
Normal file → Executable file
26
rtos/code/application/source/cardv/SrcCode/UIApp/PhotoFast/PhotoFastSliceEncode.c
Normal file → Executable file
|
@ -109,8 +109,8 @@ static void PhotoFast_SliceEncode_Get_Src_Slice_Info(
|
||||||
src_info->height = video_frame.dim.h;
|
src_info->height = video_frame.dim.h;
|
||||||
|
|
||||||
if(src_info->slice_num > 1){
|
if(src_info->slice_num > 1){
|
||||||
src_info->slice_height = ALIGN_CEIL(video_frame.dim.h / src_info->slice_num, 2);
|
src_info->slice_height = ALIGN_CEIL((src_info->width * dst_info->slice_height) / dst_info->width, 2);
|
||||||
src_info->last_slice_height = src_info->height - src_info->slice_height * (src_info->slice_num - 1);
|
src_info->last_slice_height = ALIGN_CEIL(src_info->height - src_info->slice_height * (src_info->slice_num - 1), 2);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
src_info->slice_height = video_frame.dim.h;
|
src_info->slice_height = video_frame.dim.h;
|
||||||
|
@ -585,9 +585,9 @@ static INT32 PhotoFast_SliceEncode_Init_VF_GFX_Slice(
|
||||||
UINT32 offset;
|
UINT32 offset;
|
||||||
UINT32 scr_slice_height = (slice_idx == (src_slice_info.slice_num - 1)) ? src_slice_info.last_slice_height : src_slice_info.slice_height;
|
UINT32 scr_slice_height = (slice_idx == (src_slice_info.slice_num - 1)) ? src_slice_info.last_slice_height : src_slice_info.slice_height;
|
||||||
UINT32 dst_slice_height = (slice_idx == (dst_slice_info.slice_num - 1)) ? dst_slice_info.last_slice_height : dst_slice_info.slice_height;
|
UINT32 dst_slice_height = (slice_idx == (dst_slice_info.slice_num - 1)) ? dst_slice_info.last_slice_height : dst_slice_info.slice_height;
|
||||||
|
UINT32 dst_scale_slice_height = (slice_idx == (dst_slice_info.slice_num - 1)) ? (src_slice_info.last_slice_height * dst_slice_info.slice_height / src_slice_info.slice_height) : dst_slice_info.slice_height;
|
||||||
|
|
||||||
/* dst img */
|
/* dst img */
|
||||||
|
|
||||||
addr_dst[0] = dst_buffer_info.pa;
|
addr_dst[0] = dst_buffer_info.pa;
|
||||||
loff_dst[0] = dst_slice_info.width;
|
loff_dst[0] = dst_slice_info.width;
|
||||||
addr_dst[1] = addr_dst[0] + loff_dst[0] * dst_slice_height;
|
addr_dst[1] = addr_dst[0] + loff_dst[0] * dst_slice_height;
|
||||||
|
@ -606,7 +606,7 @@ static INT32 PhotoFast_SliceEncode_Init_VF_GFX_Slice(
|
||||||
vf_gfx_scale_param->dst_region.x = 0;
|
vf_gfx_scale_param->dst_region.x = 0;
|
||||||
vf_gfx_scale_param->dst_region.y = 0;
|
vf_gfx_scale_param->dst_region.y = 0;
|
||||||
vf_gfx_scale_param->dst_region.w = dst_slice_info.width;
|
vf_gfx_scale_param->dst_region.w = dst_slice_info.width;
|
||||||
vf_gfx_scale_param->dst_region.h = dst_slice_height;
|
vf_gfx_scale_param->dst_region.h = dst_scale_slice_height;
|
||||||
vf_gfx_scale_param->dst_img.blk = dst_buffer_info.blk;
|
vf_gfx_scale_param->dst_img.blk = dst_buffer_info.blk;
|
||||||
vf_gfx_scale_param->quality = HD_GFX_SCALE_QUALITY_NULL;
|
vf_gfx_scale_param->quality = HD_GFX_SCALE_QUALITY_NULL;
|
||||||
|
|
||||||
|
@ -643,6 +643,24 @@ static INT32 PhotoFast_SliceEncode_Init_VF_GFX_Slice(
|
||||||
addr_dst[0], addr_dst[1]
|
addr_dst[0], addr_dst[1]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if(slice_idx == (dst_slice_info.slice_num - 1)){
|
||||||
|
|
||||||
|
HD_GFX_DRAW_RECT draw_rect = {0};
|
||||||
|
|
||||||
|
draw_rect.dst_img.dim = vf_gfx_scale_param->dst_img.dim;
|
||||||
|
draw_rect.dst_img.ddr_id = vf_gfx_scale_param->dst_img.ddr_id;
|
||||||
|
draw_rect.dst_img.format = vf_gfx_scale_param->dst_img.pxlfmt;
|
||||||
|
draw_rect.dst_img.p_phy_addr[0] = vf_gfx_scale_param->dst_img.phy_addr[0];
|
||||||
|
draw_rect.dst_img.p_phy_addr[1] = vf_gfx_scale_param->dst_img.phy_addr[1];
|
||||||
|
draw_rect.dst_img.lineoffset[0] = vf_gfx_scale_param->dst_img.loff[0];
|
||||||
|
draw_rect.dst_img.lineoffset[1] = vf_gfx_scale_param->dst_img.loff[1];
|
||||||
|
draw_rect.color = LV_USER_CFG_STAMP_COLOR_BACKGROUND;
|
||||||
|
draw_rect.thickness = 1;
|
||||||
|
draw_rect.type = HD_GFX_RECT_SOLID;
|
||||||
|
draw_rect.rect = (HD_IRECT){0, 0, vf_gfx_scale_param->dst_img.dim.w, vf_gfx_scale_param->dst_img.dim.h};
|
||||||
|
hd_gfx_draw_rect(&draw_rect);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return E_OK;
|
return E_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -656,6 +656,7 @@ ER lv_user_font_conv(
|
||||||
lv_obj_t* canvas = lv_canvas_create(NULL, NULL);
|
lv_obj_t* canvas = lv_canvas_create(NULL, NULL);
|
||||||
|
|
||||||
/* if img_dsc.header.cf = LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED , canvas will output alpha channel = 0 for pixel which color is LV_COLOR_TRANSP */
|
/* if img_dsc.header.cf = LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED , canvas will output alpha channel = 0 for pixel which color is LV_COLOR_TRANSP */
|
||||||
|
lv_img_cache_invalidate_src(NULL);
|
||||||
lv_canvas_set_buffer(canvas, working_buffer, result.width, result.height, LV_IMG_CF_TRUE_COLOR_ALPHA);
|
lv_canvas_set_buffer(canvas, working_buffer, result.width, result.height, LV_IMG_CF_TRUE_COLOR_ALPHA);
|
||||||
draw_img_dsc = _lv_user_font_conv_get_draw_img_dsc(draw_cfg);
|
draw_img_dsc = _lv_user_font_conv_get_draw_img_dsc(draw_cfg);
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,3 @@
|
||||||
/*
|
|
||||||
* lv_user_font_conv_cmd.c
|
|
||||||
*
|
|
||||||
* Created on: 2021¦~11¤ë17¤é
|
|
||||||
* Author: NVT02970
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <kwrap/stdio.h>
|
#include <kwrap/stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -35,7 +29,7 @@
|
||||||
|
|
||||||
|
|
||||||
#define MAX_WORKER_NUM 10
|
#define MAX_WORKER_NUM 10
|
||||||
#define LV_USER_FONT_CONV_TEST_FONT_RES_ID LV_PLUGIN_FONT_ID_NOTOSANS_BLACK_32_1BPP
|
#define LV_USER_FONT_CONV_TEST_FONT_RES_ID LV_PLUGIN_FONT_ID_ARIALUNI_32_1BPP
|
||||||
#define LV_USER_FONT_CONV_TEST_STRING_ID LV_PLUGIN_STRING_ID_STRID_IMGSIZE
|
#define LV_USER_FONT_CONV_TEST_STRING_ID LV_PLUGIN_STRING_ID_STRID_IMGSIZE
|
||||||
|
|
||||||
static HD_RESULT lv_user_font_conv_get_hd_common_buf(UINT32 size, lv_user_font_conv_mem_cfg* mem, INT32* blk)
|
static HD_RESULT lv_user_font_conv_get_hd_common_buf(UINT32 size, lv_user_font_conv_mem_cfg* mem, INT32* blk)
|
||||||
|
|
8
rtos/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIInfo/UIInfo.c
Normal file → Executable file
8
rtos/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIInfo/UIInfo.c
Normal file → Executable file
|
@ -1213,6 +1213,14 @@ void SysResetFlag(void)
|
||||||
puiPara->TimeSend3Switch = DEFAULT_TIMESEND3_SWITCH;
|
puiPara->TimeSend3Switch = DEFAULT_TIMESEND3_SWITCH;
|
||||||
puiPara->TimeSend4Switch = DEFAULT_TIMESEND4_SWITCH;
|
puiPara->TimeSend4Switch = DEFAULT_TIMESEND4_SWITCH;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
puiPara->x1 = 0;
|
||||||
|
puiPara->x2 = 0;
|
||||||
|
puiPara->x3 = 0;
|
||||||
|
puiPara->x4 = 0;
|
||||||
|
puiPara->x5 = 0;
|
||||||
|
puiPara->x6 = 0;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
SysSetFlag(FL_ETHCAM_TX_IP_ADDR, DEFAULT_ETHCAM_TX_IP_ADDR);
|
SysSetFlag(FL_ETHCAM_TX_IP_ADDR, DEFAULT_ETHCAM_TX_IP_ADDR);
|
||||||
|
|
8
rtos/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIInfo/UIInfo.h
Normal file → Executable file
8
rtos/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIInfo/UIInfo.h
Normal file → Executable file
|
@ -532,6 +532,14 @@ typedef struct _UIMenuUIMenuStoreInfo {
|
||||||
UINT8 WifiApPWD[16];
|
UINT8 WifiApPWD[16];
|
||||||
UINT8 Zoom;
|
UINT8 Zoom;
|
||||||
UINT32 FileKey;
|
UINT32 FileKey;
|
||||||
|
|
||||||
|
UINT32 x1;
|
||||||
|
UINT32 x2;
|
||||||
|
UINT32 x3;
|
||||||
|
UINT32 x4;
|
||||||
|
UINT32 x5;
|
||||||
|
UINT32 x6;
|
||||||
|
|
||||||
//============Sifar==============///Payton
|
//============Sifar==============///Payton
|
||||||
|
|
||||||
} UIMenuStoreInfo;
|
} UIMenuStoreInfo;
|
||||||
|
|
7
rtos/code/application/source/cardv/rtos-main-hunting_lvgl.lds
Normal file → Executable file
7
rtos/code/application/source/cardv/rtos-main-hunting_lvgl.lds
Normal file → Executable file
|
@ -312,10 +312,9 @@ SECTIONS
|
||||||
./SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowLVGL.o (.text* .data* .data1* .rodata* .rodata1* .reginfo* .init* .exit*)
|
./SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowLVGL.o (.text* .data* .data1* .rodata* .rodata1* .reginfo* .init* .exit*)
|
||||||
./SrcCode/UIWnd/LVGL_SPORTCAM/Resource/Plugin/lv_plugin_common.o (.text* .data* .data1* .rodata* .rodata1* .reginfo* .init* .exit*)
|
./SrcCode/UIWnd/LVGL_SPORTCAM/Resource/Plugin/lv_plugin_common.o (.text* .data* .data1* .rodata* .rodata1* .reginfo* .init* .exit*)
|
||||||
./SrcCode/UIWnd/LVGL_SPORTCAM/Resource/Images/images.o (.text* .data* .data1* .rodata* .rodata1* .reginfo* .init* .exit*)
|
./SrcCode/UIWnd/LVGL_SPORTCAM/Resource/Images/images.o (.text* .data* .data1* .rodata* .rodata1* .reginfo* .init* .exit*)
|
||||||
./SrcCode/UIWnd/LVGL_SPORTCAM/Resource/Fonts/notosans_black_32_1bpp.o (.text* .data* .data1* .rodata* .rodata1* .reginfo* .init* .exit*)
|
./SrcCode/UIWnd/LVGL_SPORTCAM/Resource/Fonts/arialuni_16_1bpp.o (.text* .data* .data1* .rodata* .rodata1* .reginfo* .init* .exit*)
|
||||||
./SrcCode/UIWnd/LVGL_SPORTCAM/Resource/Fonts/notosans_black_48_1bpp.o (.text* .data* .data1* .rodata* .rodata1* .reginfo* .init* .exit*)
|
./SrcCode/UIWnd/LVGL_SPORTCAM/Resource/Fonts/arialuni_32_1bpp.o (.text* .data* .data1* .rodata* .rodata1* .reginfo* .init* .exit*)
|
||||||
./SrcCode/UIWnd/LVGL_SPORTCAM/Resource/Fonts/notosans_black_16_1bpp.o (.text* .data* .data1* .rodata* .rodata1* .reginfo* .init* .exit*)
|
./SrcCode/UIWnd/LVGL_SPORTCAM/Resource/Fonts/arialuni_48_1bpp.o (.text* .data* .data1* .rodata* .rodata1* .reginfo* .init* .exit*)
|
||||||
./SrcCode/UIWnd/LVGL_SPORTCAM/Resource/Fonts/notosans_black_8_1bpp.o (.text* .data* .data1* .rodata* .rodata1* .reginfo* .init* .exit*)
|
|
||||||
./SrcCode/UIWnd/LVGL_SPORTCAM/Resource/Palette/palette.o (.text* .data* .data1* .rodata* .rodata1* .reginfo* .init* .exit*)
|
./SrcCode/UIWnd/LVGL_SPORTCAM/Resource/Palette/palette.o (.text* .data* .data1* .rodata* .rodata1* .reginfo* .init* .exit*)
|
||||||
./SrcCode/System/SysMain.o (.text* .data* .data1* .rodata* .rodata1* .reginfo* .init* .exit*)
|
./SrcCode/System/SysMain.o (.text* .data* .data1* .rodata* .rodata1* .reginfo* .init* .exit*)
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,4 +40,5 @@ void sf_temper_update(void);
|
||||||
INT16 sf_celsius_change_to_fahrenheit(INT16 cTemper);
|
INT16 sf_celsius_change_to_fahrenheit(INT16 cTemper);
|
||||||
void sf_BatteryInfoSave(char *name);
|
void sf_BatteryInfoSave(char *name);
|
||||||
UINT32 sf_get_temper_adc(void);
|
UINT32 sf_get_temper_adc(void);
|
||||||
|
UINT8 sf_solar_to_Lunar(UINT16 Year,UINT8 Month, UINT8 Day);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1427,6 +1427,135 @@ void sf_temper_update(void)
|
||||||
cTemper = sf_adc2Temperature((UINT16)TemperAdc, 1);
|
cTemper = sf_adc2Temperature((UINT16)TemperAdc, 1);
|
||||||
fTemper = sf_celsius_change_to_fahrenheit(cTemper);
|
fTemper = sf_celsius_change_to_fahrenheit(cTemper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsigned long DayCode[12]= {0,31,59,90,120,151,181,212,243,273,304,334};
|
||||||
|
unsigned long DayCode_Leap[12]= {0,31,60,91,121,152,182,213,244,274,305,335};
|
||||||
|
|
||||||
|
UINT8 sf_solar_to_Lunar(UINT16 Year,UINT8 Month, UINT8 Day)
|
||||||
|
{
|
||||||
|
float temp = 0,Tempnum = 0;
|
||||||
|
UINT8 tempn = 0,tempQ = 0,tempR = 0,LunarDay = 0;
|
||||||
|
UINT8 LunarDaytemp = 0;
|
||||||
|
|
||||||
|
if(Year>=2000)
|
||||||
|
Year=Year-2000;
|
||||||
|
|
||||||
|
if (Year<21)
|
||||||
|
{
|
||||||
|
UINT16 wMonthAdd[12] = {0,31,59,90,120,151,181,212,243,273,304,334};
|
||||||
|
|
||||||
|
UINT32 wNongliData[100] =
|
||||||
|
{
|
||||||
|
2635,333387,1701,1748,267701,694,2391,133423,1175,396438
|
||||||
|
,3402,3749,331177,1453,694,201326,2350,465197,3221,3402
|
||||||
|
,400202,2901,1386,267611,605,2349,137515,2709,464533,1738
|
||||||
|
,2901,330421,1242,2651,199255,1323,529706,3733,1706,398762
|
||||||
|
,2741,1206,267438,2647,1318,204070,3477,461653,1386,2413
|
||||||
|
,330077,1197,2637,268877,3365,531109,2900,2922,398042,2395
|
||||||
|
,1179,267415,2635,661067,1701,1748,398772,2742,2391,330031
|
||||||
|
,1175,1611,200010,3749,527717,1452,2742,332397,2350,3222
|
||||||
|
,268949,3402,3493,133973,1386,464219,605,2349,334123,2709
|
||||||
|
,2890,267946,2773,592565,1210,2651,395863,1323,2707,265877
|
||||||
|
};
|
||||||
|
|
||||||
|
UINT16 wCurYear;
|
||||||
|
UINT8 wCurMonth,wCurDay;
|
||||||
|
int nIsEnd,m,k,n,i;
|
||||||
|
UINT16 nTheDate,nBit;
|
||||||
|
//static int wCurYear,wCurMonth,wCurDay;
|
||||||
|
//static int nTheDate,nIsEnd,m,k,n,i,nBit;
|
||||||
|
|
||||||
|
wCurYear = Year+2000;
|
||||||
|
wCurMonth = Month;
|
||||||
|
wCurDay = Day;
|
||||||
|
|
||||||
|
nTheDate = (wCurYear - 1921) * 365 + (wCurYear - 1921) / 4 + wCurDay +
|
||||||
|
wMonthAdd[wCurMonth - 1] - 38;
|
||||||
|
|
||||||
|
if((!(wCurYear % 4)) && (wCurMonth > 2))
|
||||||
|
nTheDate = nTheDate + 1;
|
||||||
|
|
||||||
|
nIsEnd = 0;
|
||||||
|
m = 0;
|
||||||
|
while(nIsEnd != 1)
|
||||||
|
{
|
||||||
|
if(wNongliData[m] < 4095)
|
||||||
|
k = 11;
|
||||||
|
else
|
||||||
|
k = 12;
|
||||||
|
n = k;
|
||||||
|
while(n>=0)
|
||||||
|
{
|
||||||
|
nBit = wNongliData[m];
|
||||||
|
|
||||||
|
for(i=1; i<n+1; i++) //
|
||||||
|
nBit = nBit/2;
|
||||||
|
|
||||||
|
nBit = nBit % 2;
|
||||||
|
|
||||||
|
if (nTheDate <= (29 + nBit))
|
||||||
|
{
|
||||||
|
nIsEnd = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
nTheDate = nTheDate - 29 - nBit;
|
||||||
|
n = n - 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(nIsEnd)
|
||||||
|
break;
|
||||||
|
|
||||||
|
m = m + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
wCurYear = 1921 + m;
|
||||||
|
wCurMonth = k - n + 1;
|
||||||
|
wCurDay = nTheDate;
|
||||||
|
|
||||||
|
LunarDay=wCurDay ;
|
||||||
|
}// new code
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
if(Year<=100)
|
||||||
|
Year=Year+2000;
|
||||||
|
|
||||||
|
if (((Year% 400) == 0) || ((Year% 4) != 0))
|
||||||
|
{
|
||||||
|
temp=DayCode[Month-1]+Day;
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
temp=DayCode_Leap[Month-1]+Day;
|
||||||
|
|
||||||
|
}
|
||||||
|
// UI_PrintOSDNumber(temp, 2, 0, 4);
|
||||||
|
// UI_PrintOSDNumber(Year, 10, 0, 4);
|
||||||
|
tempQ=(Year-1977)/4;
|
||||||
|
tempR=(Year-1977)%4;
|
||||||
|
// UI_PrintOSDNumber(tempQ, 2, 2, 4);
|
||||||
|
// UI_PrintOSDNumber(tempR, 2, 3, 4);
|
||||||
|
Tempnum=14*tempQ+10.6*(tempR+1)+temp;
|
||||||
|
// UI_PrintOSDNumber(temp, 2, 4, 4);
|
||||||
|
tempn=Tempnum/29.5;
|
||||||
|
// UI_PrintOSDNumber(Tempnum, 2, 5, 4);
|
||||||
|
LunarDaytemp=(Tempnum-tempn*29.5)*10;
|
||||||
|
if(LunarDaytemp%10>=5)
|
||||||
|
LunarDay=(Tempnum-tempn*29.5)+1;
|
||||||
|
else if (LunarDaytemp%1000<10)
|
||||||
|
LunarDay=30;
|
||||||
|
else if (LunarDaytemp%1000>300)
|
||||||
|
LunarDay=1;
|
||||||
|
else
|
||||||
|
LunarDay=Tempnum-tempn*29.5;
|
||||||
|
// UI_PrintOSDNumber(LunarDay, 2, 6, 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
return LunarDay;
|
||||||
|
}
|
||||||
|
|
||||||
#if SF_BATTERY_TEST == ENABLE
|
#if SF_BATTERY_TEST == ENABLE
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user