Merge branch 'Branch_S550_GUI' of 192.168.6.216:/linux-em-group/s530-ntk into branch_s550_gui_debug
This commit is contained in:
commit
a4282f8253
|
@ -151,11 +151,11 @@ void DrvKey_Init(void)
|
||||||
static UINT32 KeyTestPressCnt = 0;
|
static UINT32 KeyTestPressCnt = 0;
|
||||||
static UINT32 SendKeyCnt = 0;
|
static UINT32 SendKeyCnt = 0;
|
||||||
|
|
||||||
static UINT32 LeftKeyPressCnt = 0;
|
// static UINT32 LeftKeyPressCnt = 0;
|
||||||
static UINT32 LeftSendKeyCnt = 0;
|
// static UINT32 LeftSendKeyCnt = 0;
|
||||||
|
|
||||||
static UINT32 RightKeyPressCnt = 0;
|
// static UINT32 RightKeyPressCnt = 0;
|
||||||
static UINT32 RightSendKeyCnt = 0;
|
// static UINT32 RightSendKeyCnt = 0;
|
||||||
|
|
||||||
//static BOOL KeyPress_Long = FALSE;
|
//static BOOL KeyPress_Long = FALSE;
|
||||||
|
|
||||||
|
@ -179,17 +179,17 @@ UINT32 DrvKey_DetNormalKey(void)
|
||||||
static UINT32 cmdflag = 0;
|
static UINT32 cmdflag = 0;
|
||||||
static UINT32 time = 0;
|
static UINT32 time = 0;
|
||||||
|
|
||||||
static UINT32 LeftCmdflag = 0;
|
// static UINT32 LeftCmdflag = 0;
|
||||||
static VOS_TICK LeftTtick=0;
|
// static VOS_TICK LeftTtick=0;
|
||||||
static UINT32 LeftFlag = 0;
|
// static UINT32 LeftFlag = 0;
|
||||||
static UINT32 LeftPressFlag = 0;
|
static UINT32 LeftPressFlag = 0;
|
||||||
static UINT32 LeftTime = 0;
|
// static UINT32 LeftTime = 0;
|
||||||
|
|
||||||
static UINT32 RightCmdflag = 0;
|
// static UINT32 RightCmdflag = 0;
|
||||||
static VOS_TICK RightTtick=0;
|
// static VOS_TICK RightTtick=0;
|
||||||
static UINT32 RightFlag = 0;
|
// static UINT32 RightFlag = 0;
|
||||||
//static UINT32 RightPressFlag = 0;
|
// static UINT32 RightPressFlag = 0;
|
||||||
static UINT32 RightTime = 0;
|
// static UINT32 RightTime = 0;
|
||||||
//static UINT32 retset_cmdflag = 0;
|
//static UINT32 retset_cmdflag = 0;
|
||||||
#if (ADC_KEY == ENABLE)
|
#if (ADC_KEY == ENABLE)
|
||||||
UINT32 uiKey1Lvl = VolDet_GetKey1Level();
|
UINT32 uiKey1Lvl = VolDet_GetKey1Level();
|
||||||
|
@ -282,93 +282,99 @@ UINT32 DrvKey_DetNormalKey(void)
|
||||||
if (gpio_getPin(GPIO_KEY_DOWN)) {
|
if (gpio_getPin(GPIO_KEY_DOWN)) {
|
||||||
uiKeyCode |= FLGKEY_DOWN;
|
uiKeyCode |= FLGKEY_DOWN;
|
||||||
}
|
}
|
||||||
|
if (gpio_getPin(GPIO_KEY_RIGHT)) {
|
||||||
if(gpio_getPin(GPIO_KEY_RIGHT))
|
uiKeyCode |= FLGKEY_RIGHT;
|
||||||
{
|
}
|
||||||
if(0 == RightFlag){
|
if (!gpio_getPin(GPIO_KEY_LEFT)) {
|
||||||
vos_perf_mark(&RightTtick);
|
uiKeyCode |= FLGKEY_LEFT;
|
||||||
RightFlag = 1;
|
|
||||||
}
|
|
||||||
RightKeyPressCnt++;
|
|
||||||
vos_perf_mark(&tticktmp);
|
|
||||||
RightTime = ((tticktmp/1000) - (RightTtick/1000));
|
|
||||||
if((!RightCmdflag) && (RightTime >= 5000))
|
|
||||||
{
|
|
||||||
RightCmdflag = 1;
|
|
||||||
sf_save_camera_info();
|
|
||||||
vos_perf_mark(&ttick);
|
|
||||||
}
|
|
||||||
|
|
||||||
}else {
|
|
||||||
|
|
||||||
if(RightKeyPressCnt && (0 == sf_get_fw_update())){
|
|
||||||
|
|
||||||
if((++RightSendKeyCnt < SendKey_LessCnt) && (!RightCmdflag)){//shot key
|
|
||||||
printf("[%s:%d] RightSendKeyCnt:%d RightKeyPressCnt:%d RightTime: %dms\n", __FUNCTION__, __LINE__, RightSendKeyCnt, RightKeyPressCnt, RightTime);
|
|
||||||
uiKeyCode |= FLGKEY_RIGHT;
|
|
||||||
}else {
|
|
||||||
printf("[%s:%d] RightSendKeyCnt:%d RightKeyPressCnt:%d RightTime: %dms\n", __FUNCTION__, __LINE__, RightSendKeyCnt, RightKeyPressCnt, RightTime);
|
|
||||||
|
|
||||||
RightSendKeyCnt = 0;
|
|
||||||
RightKeyPressCnt = 0;
|
|
||||||
RightFlag = 0;
|
|
||||||
RightTtick = 0;
|
|
||||||
RightCmdflag = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
}else{
|
|
||||||
RightSendKeyCnt = 0;
|
|
||||||
RightKeyPressCnt = 0;
|
|
||||||
RightFlag = 0;
|
|
||||||
RightTtick = 0;
|
|
||||||
RightCmdflag = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!(gpio_getPin(GPIO_KEY_LEFT)))
|
// if(gpio_getPin(GPIO_KEY_RIGHT))
|
||||||
{
|
// {
|
||||||
if(0 == LeftFlag){
|
// if(0 == RightFlag){
|
||||||
vos_perf_mark(&LeftTtick);
|
// vos_perf_mark(&RightTtick);
|
||||||
LeftFlag = 1;
|
// RightFlag = 1;
|
||||||
}
|
// }
|
||||||
LeftKeyPressCnt++;
|
// RightKeyPressCnt++;
|
||||||
vos_perf_mark(&tticktmp);
|
// vos_perf_mark(&tticktmp);
|
||||||
LeftTime = ((tticktmp/1000) - (LeftTtick/1000));
|
// RightTime = ((tticktmp/1000) - (RightTtick/1000));
|
||||||
if((!LeftCmdflag) && (LeftTime >= 3000))
|
// if((!RightCmdflag) && (RightTime >= 5000))
|
||||||
{
|
// {
|
||||||
LeftCmdflag = 1;
|
// RightCmdflag = 1;
|
||||||
printf("[%s:%d] LeftSendKeyCnt:%d LeftKeyPressCnt:%d LeftTime: %dms\n", __FUNCTION__, __LINE__, LeftSendKeyCnt, LeftKeyPressCnt, LeftTime);
|
// sf_save_camera_info();
|
||||||
Ux_PostEvent(NVTEVT_SYSTEM_SHUTDOWN, 1, APP_POWER_OFF_APO);
|
// vos_perf_mark(&ttick);
|
||||||
}
|
// }
|
||||||
}else {
|
|
||||||
|
|
||||||
if(LeftKeyPressCnt && (0 == sf_get_fw_update())){
|
// }else {
|
||||||
|
|
||||||
if((++LeftSendKeyCnt < SendKey_LessCnt) && (!LeftCmdflag)){//shot key
|
// if(RightKeyPressCnt && (0 == sf_get_fw_update())){
|
||||||
printf("[%s:%d] LeftSendKeyCnt:%d LeftKeyPressCnt:%d LeftTime: %dms\n", __FUNCTION__, __LINE__, LeftSendKeyCnt, LeftKeyPressCnt, LeftTime);
|
|
||||||
uiKeyCode |= FLGKEY_LEFT;
|
|
||||||
}else {
|
|
||||||
printf("[%s:%d] LeftSendKeyCnt:%d LeftKeyPressCnt:%d LeftTime: %dms\n", __FUNCTION__, __LINE__, LeftSendKeyCnt, LeftKeyPressCnt, LeftTime);
|
|
||||||
|
|
||||||
LeftSendKeyCnt = 0;
|
// if((++RightSendKeyCnt < SendKey_LessCnt) && (!RightCmdflag)){//shot key
|
||||||
LeftKeyPressCnt = 0;
|
// printf("[%s:%d] RightSendKeyCnt:%d RightKeyPressCnt:%d RightTime: %dms\n", __FUNCTION__, __LINE__, RightSendKeyCnt, RightKeyPressCnt, RightTime);
|
||||||
LeftFlag = 0;
|
// uiKeyCode |= FLGKEY_RIGHT;
|
||||||
LeftTtick = 0;
|
// }else {
|
||||||
LeftCmdflag = 0;
|
// printf("[%s:%d] RightSendKeyCnt:%d RightKeyPressCnt:%d RightTime: %dms\n", __FUNCTION__, __LINE__, RightSendKeyCnt, RightKeyPressCnt, RightTime);
|
||||||
}
|
|
||||||
|
|
||||||
}else{
|
// RightSendKeyCnt = 0;
|
||||||
LeftSendKeyCnt = 0;
|
// RightKeyPressCnt = 0;
|
||||||
LeftKeyPressCnt = 0;
|
// RightFlag = 0;
|
||||||
LeftFlag = 0;
|
// RightTtick = 0;
|
||||||
LeftTtick = 0;
|
// RightCmdflag = 0;
|
||||||
LeftCmdflag = 0;
|
// }
|
||||||
}
|
|
||||||
|
// }else{
|
||||||
|
// RightSendKeyCnt = 0;
|
||||||
|
// RightKeyPressCnt = 0;
|
||||||
|
// RightFlag = 0;
|
||||||
|
// RightTtick = 0;
|
||||||
|
// RightCmdflag = 0;
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
// if(!(gpio_getPin(GPIO_KEY_LEFT)))
|
||||||
|
// {
|
||||||
|
// if(0 == LeftFlag){
|
||||||
|
// vos_perf_mark(&LeftTtick);
|
||||||
|
// LeftFlag = 1;
|
||||||
|
// }
|
||||||
|
// LeftKeyPressCnt++;
|
||||||
|
// vos_perf_mark(&tticktmp);
|
||||||
|
// LeftTime = ((tticktmp/1000) - (LeftTtick/1000));
|
||||||
|
// if((!LeftCmdflag) && (LeftTime >= 3000))
|
||||||
|
// {
|
||||||
|
// LeftCmdflag = 1;
|
||||||
|
// printf("[%s:%d] LeftSendKeyCnt:%d LeftKeyPressCnt:%d LeftTime: %dms\n", __FUNCTION__, __LINE__, LeftSendKeyCnt, LeftKeyPressCnt, LeftTime);
|
||||||
|
// Ux_PostEvent(NVTEVT_SYSTEM_SHUTDOWN, 1, APP_POWER_OFF_APO);
|
||||||
|
// }
|
||||||
|
// }else {
|
||||||
|
|
||||||
|
// if(LeftKeyPressCnt && (0 == sf_get_fw_update())){
|
||||||
|
|
||||||
|
// if((++LeftSendKeyCnt < SendKey_LessCnt) && (!LeftCmdflag)){//shot key
|
||||||
|
// printf("[%s:%d] LeftSendKeyCnt:%d LeftKeyPressCnt:%d LeftTime: %dms\n", __FUNCTION__, __LINE__, LeftSendKeyCnt, LeftKeyPressCnt, LeftTime);
|
||||||
|
// uiKeyCode |= FLGKEY_LEFT;
|
||||||
|
// }else {
|
||||||
|
// printf("[%s:%d] LeftSendKeyCnt:%d LeftKeyPressCnt:%d LeftTime: %dms\n", __FUNCTION__, __LINE__, LeftSendKeyCnt, LeftKeyPressCnt, LeftTime);
|
||||||
|
|
||||||
|
// LeftSendKeyCnt = 0;
|
||||||
|
// LeftKeyPressCnt = 0;
|
||||||
|
// LeftFlag = 0;
|
||||||
|
// LeftTtick = 0;
|
||||||
|
// LeftCmdflag = 0;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// }else{
|
||||||
|
// LeftSendKeyCnt = 0;
|
||||||
|
// LeftKeyPressCnt = 0;
|
||||||
|
// LeftFlag = 0;
|
||||||
|
// LeftTtick = 0;
|
||||||
|
// LeftCmdflag = 0;
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// }
|
||||||
if (gpio_getPin(GPIO_KEY_DATAREADY)) {
|
if (gpio_getPin(GPIO_KEY_DATAREADY)) {
|
||||||
uiKeyCode |= FLGKEY_DATAREADY;
|
uiKeyCode |= FLGKEY_DATAREADY;
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,13 @@ int General_MenuCallback(UINT32 uiMessage, UINT32 uiParam)
|
||||||
}
|
}
|
||||||
case IDM_VIDEO_SIZE:
|
case IDM_VIDEO_SIZE:
|
||||||
{
|
{
|
||||||
puiPara->VideoSize = uwOption;
|
#define VIDEO_SIZE 3
|
||||||
|
int videoSize[VIDEO_SIZE] = {
|
||||||
|
MOVIE_SIZE_FRONT_1920x1080P30,
|
||||||
|
MOVIE_SIZE_FRONT_1280x720P30,
|
||||||
|
MOVIE_SIZE_FRONT_848x480P30
|
||||||
|
};
|
||||||
|
puiPara->VideoSize = videoSize[uwOption];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case IDM_VIDEA_LENGTH:
|
case IDM_VIDEA_LENGTH:
|
||||||
|
@ -750,6 +756,7 @@ static void update_DateTime_Time_msg(lv_obj_t* obj)
|
||||||
void show_DateTime_page(lv_obj_t* obj)
|
void show_DateTime_page(lv_obj_t* obj)
|
||||||
{
|
{
|
||||||
OperatingTimeIndex = 0;
|
OperatingTimeIndex = 0;
|
||||||
|
DateTimeIndex = 0;
|
||||||
|
|
||||||
init_Matrix_style();
|
init_Matrix_style();
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,18 @@ static void load_info_from_sf(void)
|
||||||
SysSetFlag(IDF_CAMERA_NAME, puiPara->CamNameSwitch == SF_CAMID_OFF ? OPTION_0 : OPTION_1);
|
SysSetFlag(IDF_CAMERA_NAME, puiPara->CamNameSwitch == SF_CAMID_OFF ? OPTION_0 : OPTION_1);
|
||||||
SysSetFlag(IDF_CAMERA_MODE, puiPara->CamMode == 2 ? OPTION_1 : OPTION_0);
|
SysSetFlag(IDF_CAMERA_MODE, puiPara->CamMode == 2 ? OPTION_1 : OPTION_0);
|
||||||
SysSetFlag(IDF_IMAGE_SIZE, puiPara->ImgSize);
|
SysSetFlag(IDF_IMAGE_SIZE, puiPara->ImgSize);
|
||||||
SysSetFlag(IDF_VIDEO_SIZE, puiPara->VideoSize);
|
if (MOVIE_SIZE_FRONT_1920x1080P30 == puiPara->VideoSize)
|
||||||
|
{
|
||||||
|
SysSetFlag(IDF_VIDEO_SIZE, 0);
|
||||||
|
}
|
||||||
|
if (MOVIE_SIZE_FRONT_1280x720P30 == puiPara->VideoSize)
|
||||||
|
{
|
||||||
|
SysSetFlag(IDF_VIDEO_SIZE, 1);
|
||||||
|
}
|
||||||
|
if (MOVIE_SIZE_FRONT_848x480P30 == puiPara->VideoSize)
|
||||||
|
{
|
||||||
|
SysSetFlag(IDF_VIDEO_SIZE, 2);
|
||||||
|
}
|
||||||
SysSetFlag(IDF_VIDEA_LENGTH, puiPara->VideoLenth == 10 ? OPTION_0 : OPTION_1);
|
SysSetFlag(IDF_VIDEA_LENGTH, puiPara->VideoLenth == 10 ? OPTION_0 : OPTION_1);
|
||||||
SysSetFlag(IDF_FLASH_POWER, puiPara->FlashLed);
|
SysSetFlag(IDF_FLASH_POWER, puiPara->FlashLed);
|
||||||
SysSetFlag(IDF_SENSITIVITY, puiPara->DigitPirSensitivity);
|
SysSetFlag(IDF_SENSITIVITY, puiPara->DigitPirSensitivity);
|
||||||
|
@ -544,27 +555,37 @@ static void LV_MenuCommonItem_UpdateContent(TM_MENU *pMenu)
|
||||||
if(!u_hiddenitem){
|
if(!u_hiddenitem){
|
||||||
|
|
||||||
if(i == 0){
|
if(i == 0){
|
||||||
lv_obj_set_hidden(image_option_01_scr_uiflowmenucommonitem, true);
|
// lv_obj_set_hidden(image_option_01_scr_uiflowmenucommonitem, true);
|
||||||
|
lv_plugin_img_set_src(image_option_01_scr_uiflowmenucommonitem, LV_PLUGIN_IMG_ID_SF_NEXT2);
|
||||||
|
lv_obj_set_hidden(image_option_01_scr_uiflowmenucommonitem, false);
|
||||||
lv_plugin_label_set_text(label_option_1_scr_uiflowmenucommonitem, pOption->TextId);
|
lv_plugin_label_set_text(label_option_1_scr_uiflowmenucommonitem, pOption->TextId);
|
||||||
lv_plugin_label_update_font(label_option_1_scr_uiflowmenucommonitem, LV_OBJ_PART_MAIN);
|
lv_plugin_label_update_font(label_option_1_scr_uiflowmenucommonitem, LV_OBJ_PART_MAIN);
|
||||||
lv_obj_set_hidden(container_option_1_scr_uiflowmenucommonitem, false);
|
lv_obj_set_hidden(container_option_1_scr_uiflowmenucommonitem, false);
|
||||||
}else if(i == 1){
|
}else if(i == 1){
|
||||||
lv_obj_set_hidden(image_option_02_scr_uiflowmenucommonitem, true);
|
// lv_obj_set_hidden(image_option_02_scr_uiflowmenucommonitem, true);
|
||||||
|
lv_plugin_img_set_src(image_option_02_scr_uiflowmenucommonitem, LV_PLUGIN_IMG_ID_SF_NEXT2);
|
||||||
|
lv_obj_set_hidden(image_option_02_scr_uiflowmenucommonitem, false);
|
||||||
lv_plugin_label_set_text(label_option_2_scr_uiflowmenucommonitem, pOption->TextId);
|
lv_plugin_label_set_text(label_option_2_scr_uiflowmenucommonitem, pOption->TextId);
|
||||||
lv_plugin_label_update_font(label_option_2_scr_uiflowmenucommonitem, LV_OBJ_PART_MAIN);
|
lv_plugin_label_update_font(label_option_2_scr_uiflowmenucommonitem, LV_OBJ_PART_MAIN);
|
||||||
lv_obj_set_hidden(container_option_2_scr_uiflowmenucommonitem, false);
|
lv_obj_set_hidden(container_option_2_scr_uiflowmenucommonitem, false);
|
||||||
}else if(i == 2){
|
}else if(i == 2){
|
||||||
lv_obj_set_hidden(image_option_03_scr_uiflowmenucommonitem, true);
|
// lv_obj_set_hidden(image_option_03_scr_uiflowmenucommonitem, true);
|
||||||
|
lv_plugin_img_set_src(image_option_03_scr_uiflowmenucommonitem, LV_PLUGIN_IMG_ID_SF_NEXT2);
|
||||||
|
lv_obj_set_hidden(image_option_03_scr_uiflowmenucommonitem, false);
|
||||||
lv_plugin_label_set_text(label_option_3_scr_uiflowmenucommonitem, pOption->TextId);
|
lv_plugin_label_set_text(label_option_3_scr_uiflowmenucommonitem, pOption->TextId);
|
||||||
lv_plugin_label_update_font(label_option_3_scr_uiflowmenucommonitem, LV_OBJ_PART_MAIN);
|
lv_plugin_label_update_font(label_option_3_scr_uiflowmenucommonitem, LV_OBJ_PART_MAIN);
|
||||||
lv_obj_set_hidden(container_option_3_scr_uiflowmenucommonitem, false);
|
lv_obj_set_hidden(container_option_3_scr_uiflowmenucommonitem, false);
|
||||||
}else if(i == 3){
|
}else if(i == 3){
|
||||||
lv_obj_set_hidden(image_option_04_scr_uiflowmenucommonitem, true);
|
// lv_obj_set_hidden(image_option_04_scr_uiflowmenucommonitem, true);
|
||||||
|
lv_plugin_img_set_src(image_option_04_scr_uiflowmenucommonitem, LV_PLUGIN_IMG_ID_SF_NEXT2);
|
||||||
|
lv_obj_set_hidden(image_option_04_scr_uiflowmenucommonitem, false);
|
||||||
lv_plugin_label_set_text(label_option_4_scr_uiflowmenucommonitem, pOption->TextId);
|
lv_plugin_label_set_text(label_option_4_scr_uiflowmenucommonitem, pOption->TextId);
|
||||||
lv_plugin_label_update_font(label_option_4_scr_uiflowmenucommonitem, LV_OBJ_PART_MAIN);
|
lv_plugin_label_update_font(label_option_4_scr_uiflowmenucommonitem, LV_OBJ_PART_MAIN);
|
||||||
lv_obj_set_hidden(container_option_4_scr_uiflowmenucommonitem, false);
|
lv_obj_set_hidden(container_option_4_scr_uiflowmenucommonitem, false);
|
||||||
}else if(i == 4){
|
}else if(i == 4){
|
||||||
lv_obj_set_hidden(image_option_05_scr_uiflowmenucommonitem, true);
|
// lv_obj_set_hidden(image_option_05_scr_uiflowmenucommonitem, true);
|
||||||
|
lv_plugin_img_set_src(image_option_05_scr_uiflowmenucommonitem, LV_PLUGIN_IMG_ID_SF_NEXT2);
|
||||||
|
lv_obj_set_hidden(image_option_05_scr_uiflowmenucommonitem, false);
|
||||||
lv_plugin_label_set_text(label_option_5_scr_uiflowmenucommonitem, pOption->TextId);
|
lv_plugin_label_set_text(label_option_5_scr_uiflowmenucommonitem, pOption->TextId);
|
||||||
lv_plugin_label_update_font(label_option_5_scr_uiflowmenucommonitem, LV_OBJ_PART_MAIN);
|
lv_plugin_label_update_font(label_option_5_scr_uiflowmenucommonitem, LV_OBJ_PART_MAIN);
|
||||||
lv_obj_set_hidden(container_option_5_scr_uiflowmenucommonitem, false);
|
lv_obj_set_hidden(container_option_5_scr_uiflowmenucommonitem, false);
|
||||||
|
@ -599,6 +620,7 @@ static void LV_MenuCommonItem_UpdateContent(TM_MENU *pMenu)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if(u_ItemSel){
|
if(u_ItemSel){
|
||||||
|
printf(" ============================= select = %d\n", i);
|
||||||
if(i == 0){
|
if(i == 0){
|
||||||
lv_obj_set_hidden(image_option_01_scr_uiflowmenucommonitem, true);
|
lv_obj_set_hidden(image_option_01_scr_uiflowmenucommonitem, true);
|
||||||
lv_obj_set_hidden(container_option_1_scr_uiflowmenucommonitem, true);
|
lv_obj_set_hidden(container_option_1_scr_uiflowmenucommonitem, true);
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#include "UIFlowLVGL/UIFlowWrnMsg/UIFlowWrnMsgAPI.h"
|
#include "UIFlowLVGL/UIFlowWrnMsg/UIFlowWrnMsgAPI.h"
|
||||||
#include "UIFlowLVGL/UIFlowMenuCommonConfirm/UIFlowMenuCommonConfirmAPI.h"
|
#include "UIFlowLVGL/UIFlowMenuCommonConfirm/UIFlowMenuCommonConfirmAPI.h"
|
||||||
#include "UIFlowLVGL/UIFlowPassword/UIFlowPasswordEventCallback.h"
|
#include "UIFlowLVGL/UIFlowPassword/UIFlowPasswordEventCallback.h"
|
||||||
|
#include "UIFlowLVGL_SPORTCAM.h"
|
||||||
#include "UIFlowPhotoParams.h"
|
#include "UIFlowPhotoParams.h"
|
||||||
#include "UIFlowPhotoFuncs.h"
|
#include "UIFlowPhotoFuncs.h"
|
||||||
#include "ImageApp/ImageApp_Photo.h"
|
#include "ImageApp/ImageApp_Photo.h"
|
||||||
|
@ -49,6 +50,8 @@ static lv_task_t* task_qview = NULL;
|
||||||
static void task_selftimer_cb(lv_task_t* task);
|
static void task_selftimer_cb(lv_task_t* task);
|
||||||
static void task_qview_cb(lv_task_t* task);
|
static void task_qview_cb(lv_task_t* task);
|
||||||
static void task_update_icons_timer_cb(lv_task_t* task);
|
static void task_update_icons_timer_cb(lv_task_t* task);
|
||||||
|
#define LONG_PRESS_INTERVAL 500
|
||||||
|
static unsigned long KeyLeftPressingTimeMs = 0;
|
||||||
|
|
||||||
static BOOL g_PhotoBgInitFileSys = FALSE;
|
static BOOL g_PhotoBgInitFileSys = FALSE;
|
||||||
|
|
||||||
|
@ -1437,6 +1440,11 @@ static void UIFlowPhoto_Key(lv_obj_t* obj, uint32_t key)
|
||||||
#endif
|
#endif
|
||||||
switch(key)
|
switch(key)
|
||||||
{
|
{
|
||||||
|
case LV_USER_KEY_LEFT:
|
||||||
|
{
|
||||||
|
KeyLeftPressingTimeMs = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
case LV_KEY_ENTER:
|
case LV_KEY_ENTER:
|
||||||
{
|
{
|
||||||
#if HUNTING_CAMERA_MCU == ENABLE
|
#if HUNTING_CAMERA_MCU == ENABLE
|
||||||
|
@ -1525,6 +1533,24 @@ void UIFlowPhoto_KeyRelease(lv_obj_t* obj, uint32_t key)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
void UIFlowPhtot_KeyLongPress(lv_obj_t* obj, uint32_t key)
|
||||||
|
{
|
||||||
|
switch(key)
|
||||||
|
{
|
||||||
|
case LV_USER_KEY_LEFT:
|
||||||
|
{
|
||||||
|
KeyLeftPressingTimeMs += LONG_PRESS_INTERVAL;
|
||||||
|
if (3 * 1000 <= KeyLeftPressingTimeMs)
|
||||||
|
{
|
||||||
|
Ux_PostEvent(NVTEVT_SYSTEM_SHUTDOWN, 1, APP_POWER_OFF_APO);
|
||||||
|
KeyLeftPressingTimeMs = 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void UIFlowPhotoEventCallback(lv_obj_t* obj, lv_event_t event)
|
void UIFlowPhotoEventCallback(lv_obj_t* obj, lv_event_t event)
|
||||||
{
|
{
|
||||||
|
@ -1564,8 +1590,6 @@ void UIFlowPhotoEventCallback(lv_obj_t* obj, lv_event_t event)
|
||||||
case LV_USER_EVENT_KEY_RELEASE:
|
case LV_USER_EVENT_KEY_RELEASE:
|
||||||
{
|
{
|
||||||
uint32_t* key = (uint32_t*)lv_event_get_data();
|
uint32_t* key = (uint32_t*)lv_event_get_data();
|
||||||
printf(" ===================================== 2222 release key = %d\n", *key);
|
|
||||||
|
|
||||||
/* handle key event */
|
/* handle key event */
|
||||||
UIFlowPhoto_Key(obj, *key);
|
UIFlowPhoto_Key(obj, *key);
|
||||||
|
|
||||||
|
@ -1590,13 +1614,15 @@ void UIFlowPhotoEventCallback(lv_obj_t* obj, lv_event_t event)
|
||||||
|
|
||||||
// break;
|
// break;
|
||||||
// }
|
// }
|
||||||
// case LV_USER_EVENT_KEY_LONG_PRESS:
|
case LV_USER_EVENT_KEY_LONG_PRESS:
|
||||||
// {
|
{
|
||||||
// uint32_t* key = (uint32_t*)lv_event_get_data();
|
uint32_t* key = (uint32_t*)lv_event_get_data();
|
||||||
// UIFlowPhoto_KeyRelease(obj, *key);
|
UIFlowPhtot_KeyLongPress(obj, *key);
|
||||||
|
break;
|
||||||
|
UIFlowPhoto_KeyRelease(obj, *key);
|
||||||
|
|
||||||
// break;
|
break;
|
||||||
// }
|
}
|
||||||
|
|
||||||
|
|
||||||
/* handle nvt event except key event */
|
/* handle nvt event except key event */
|
||||||
|
|
|
@ -1200,7 +1200,7 @@ static void play_video(lv_obj_t *obj)
|
||||||
}
|
}
|
||||||
if(PLB_ST_PLAY_MOV == g_PlbData.State)
|
if(PLB_ST_PLAY_MOV == g_PlbData.State)
|
||||||
{
|
{
|
||||||
printf("now sotp play the video.\n");
|
printf("now stop play the video.\n");
|
||||||
g_PlbData.State = PLB_ST_FULL;
|
g_PlbData.State = PLB_ST_FULL;
|
||||||
lv_plugin_img_set_src(image_play_scr_uiflowplay, LV_PLUGIN_IMG_ID_SF_STOP);
|
lv_plugin_img_set_src(image_play_scr_uiflowplay, LV_PLUGIN_IMG_ID_SF_STOP);
|
||||||
lv_label_set_text_fmt(label_playtime_scr_uiflowplay, "%02d:%02d", 0, 0);
|
lv_label_set_text_fmt(label_playtime_scr_uiflowplay, "%02d:%02d", 0, 0);
|
||||||
|
@ -1886,17 +1886,17 @@ static void UIFlowPlay_CB_Error(lv_obj_t* obj, const LV_USER_EVENT_NVTMSG_DATA*
|
||||||
|
|
||||||
static void UIFlowPlay_Key(lv_obj_t* obj, uint32_t key)
|
static void UIFlowPlay_Key(lv_obj_t* obj, uint32_t key)
|
||||||
{
|
{
|
||||||
|
|
||||||
switch(key)
|
switch(key)
|
||||||
{
|
{
|
||||||
case LV_USER_KEY_SELECT:
|
case LV_USER_KEY_SELECT:
|
||||||
{
|
{
|
||||||
UIFlowPlay_OnKeySelect(obj);
|
|
||||||
break;
|
break;
|
||||||
|
UIFlowPlay_OnKeySelect(obj);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case LV_USER_KEY_SHUTTER2:
|
// case LV_USER_KEY_SHUTTER2:
|
||||||
|
case LV_KEY_ENTER:
|
||||||
{
|
{
|
||||||
play_video(obj);
|
play_video(obj);
|
||||||
break;
|
break;
|
||||||
|
@ -1933,24 +1933,28 @@ static void UIFlowPlay_Key(lv_obj_t* obj, uint32_t key)
|
||||||
|
|
||||||
case LV_USER_KEY_ZOOMIN:
|
case LV_USER_KEY_ZOOMIN:
|
||||||
{
|
{
|
||||||
|
break;
|
||||||
UIFlowPlay_OnKeyZoomIn(obj);
|
UIFlowPlay_OnKeyZoomIn(obj);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case LV_USER_KEY_ZOOMOUT:
|
case LV_USER_KEY_ZOOMOUT:
|
||||||
{
|
{
|
||||||
|
break;
|
||||||
UIFlowPlay_OnKeyZoomOut(obj);
|
UIFlowPlay_OnKeyZoomOut(obj);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case LV_USER_KEY_MENU:
|
case LV_USER_KEY_MENU:
|
||||||
{
|
{
|
||||||
|
break;
|
||||||
UIFlowPlay_OnKeyMenu(obj);
|
UIFlowPlay_OnKeyMenu(obj);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case LV_USER_KEY_MODE:
|
case LV_USER_KEY_MODE:
|
||||||
{
|
{
|
||||||
|
break;
|
||||||
UIFlowPlay_OnKeyMode(obj);
|
UIFlowPlay_OnKeyMode(obj);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2037,6 +2041,7 @@ static void UIFlowPlayBtnEventCallback(lv_obj_t* obj, lv_event_t event)
|
||||||
{
|
{
|
||||||
case LV_EVENT_CLICKED:
|
case LV_EVENT_CLICKED:
|
||||||
{
|
{
|
||||||
|
break;
|
||||||
UIFlowPlay_OnKeySelect(obj);
|
UIFlowPlay_OnKeySelect(obj);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -166,7 +166,7 @@ SINT32 sf_check_max_num(void)
|
||||||
sprintf((char *)logStr, "[%s:%d]Reach Max Num/Day Limit,Error Code:0x%08x", __FUNCTION__, __LINE__, ret);
|
sprintf((char *)logStr, "[%s:%d]Reach Max Num/Day Limit,Error Code:0x%08x", __FUNCTION__, __LINE__, ret);
|
||||||
SLOGE((char *)logStr);
|
SLOGE((char *)logStr);
|
||||||
}
|
}
|
||||||
ret = SF_SUCCESS;
|
// ret = SF_SUCCESS;
|
||||||
|
|
||||||
printf("[%s:%d]ret=%d\n", __FUNCTION__, __LINE__, ret);
|
printf("[%s:%d]ret=%d\n", __FUNCTION__, __LINE__, ret);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user