bug:10571 修复开机后密码界面会自动关闭
This commit is contained in:
parent
d1686a0290
commit
f5f825d7d2
|
@ -569,7 +569,7 @@ void UserMainProc(void)
|
||||||
lv_task_set_prio(indev_keypad->driver.read_task, LV_TASK_PRIO_OFF);
|
lv_task_set_prio(indev_keypad->driver.read_task, LV_TASK_PRIO_OFF);
|
||||||
|
|
||||||
while(!bUI_Quit) {
|
while(!bUI_Quit) {
|
||||||
|
bool printKey = true;
|
||||||
Ux_WaitEvent(&evt, ¶mNum, paramArray);
|
Ux_WaitEvent(&evt, ¶mNum, paramArray);
|
||||||
|
|
||||||
if(!evt) {
|
if(!evt) {
|
||||||
|
@ -595,6 +595,41 @@ void UserMainProc(void)
|
||||||
DBG_WRN("received key event(%lx) without key state\r\n", evt);
|
DBG_WRN("received key event(%lx) without key state\r\n", evt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(printKey){
|
||||||
|
switch((uint32_t)lv_user_keymap_find(evt)){
|
||||||
|
case LV_KEY_DOWN:
|
||||||
|
case LV_KEY_NEXT:
|
||||||
|
{
|
||||||
|
printf("[Key]>>>DOWN\n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case LV_KEY_UP:
|
||||||
|
case LV_KEY_PREV:
|
||||||
|
{
|
||||||
|
printf("[Key]>>>UP\n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case LV_KEY_LEFT:
|
||||||
|
{
|
||||||
|
printf("[Key]>>>LEFT\n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case LV_KEY_RIGHT:
|
||||||
|
{
|
||||||
|
printf("[Key]>>>RIGHT\n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case LV_KEY_ENTER:
|
||||||
|
{
|
||||||
|
printf("[Key]>>>ENTER\n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
printKey = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
g_keyboard_value = evt;
|
g_keyboard_value = evt;
|
||||||
|
|
||||||
if((paramArray[0] > NVTEVT_KEY_PRESS_START && paramArray[0] < NVTEVT_KEY_PRESS_END) ||
|
if((paramArray[0] > NVTEVT_KEY_PRESS_START && paramArray[0] < NVTEVT_KEY_PRESS_END) ||
|
||||||
|
|
|
@ -968,26 +968,26 @@ static void UIFlowMenuCommonItem_Key(lv_obj_t* obj, uint32_t key)
|
||||||
|
|
||||||
case LV_USER_KEY_DOWN:
|
case LV_USER_KEY_DOWN:
|
||||||
{
|
{
|
||||||
printf("[UIFlowMenuCommonItem_Key]error input\n",key);
|
//printf("[UIFlowMenuCommonItem_Key]error input\n",key);
|
||||||
}
|
}
|
||||||
|
|
||||||
case LV_USER_KEY_NEXT:
|
case LV_USER_KEY_NEXT:
|
||||||
{
|
{
|
||||||
printf("[UIFlowMenuCommonItem_Key]>>>DOWN\n");
|
//printf("[UIFlowMenuCommonItem_Key]>>>DOWN\n");
|
||||||
LV_MenuItem_OnNext(obj);
|
LV_MenuItem_OnNext(obj);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case LV_USER_KEY_PREV:
|
case LV_USER_KEY_PREV:
|
||||||
{
|
{
|
||||||
printf("[UIFlowMenuCommonItem_Key]>>>UP\n");
|
//printf("[UIFlowMenuCommonItem_Key]>>>UP\n");
|
||||||
LV_MenuItem_OnPrev(obj);
|
LV_MenuItem_OnPrev(obj);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case LV_KEY_LEFT:
|
case LV_KEY_LEFT:
|
||||||
{
|
{
|
||||||
printf("[UIFlowMenuCommonItem_Key]>>>LEFT\n");
|
//printf("[UIFlowMenuCommonItem_Key]>>>LEFT\n");
|
||||||
load_info_from_sf();
|
load_info_from_sf();
|
||||||
LV_MenuItem_OnUp(obj);
|
LV_MenuItem_OnUp(obj);
|
||||||
break;
|
break;
|
||||||
|
@ -995,7 +995,7 @@ static void UIFlowMenuCommonItem_Key(lv_obj_t* obj, uint32_t key)
|
||||||
|
|
||||||
case LV_KEY_RIGHT:
|
case LV_KEY_RIGHT:
|
||||||
{
|
{
|
||||||
printf("[UIFlowMenuCommonItem_Key]>>>RIGHT\n");
|
//printf("[UIFlowMenuCommonItem_Key]>>>RIGHT\n");
|
||||||
load_info_from_sf();
|
load_info_from_sf();
|
||||||
LV_MenuItem_OnDown(obj);
|
LV_MenuItem_OnDown(obj);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1188,33 +1188,33 @@ static void CommondOptionKeyCallback(lv_obj_t* obj, uint32_t* key)
|
||||||
case LV_USER_KEY_NEXT:
|
case LV_USER_KEY_NEXT:
|
||||||
case LV_USER_KEY_DOWN:
|
case LV_USER_KEY_DOWN:
|
||||||
{
|
{
|
||||||
printf("[CommondOptionKeyCallback]>>>DOWN\n");
|
//printf("[CommondOptionKeyCallback]>>>DOWN\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case LV_USER_KEY_PREV:
|
case LV_USER_KEY_PREV:
|
||||||
case LV_USER_KEY_UP:
|
case LV_USER_KEY_UP:
|
||||||
{
|
{
|
||||||
printf("[CommondOptionKeyCallback]>>>UP\n");
|
//printf("[CommondOptionKeyCallback]>>>UP\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case LV_KEY_LEFT:
|
case LV_KEY_LEFT:
|
||||||
{
|
{
|
||||||
printf("[CommondOptionKeyCallback]>>>LEFT\n");
|
//printf("[CommondOptionKeyCallback]>>>LEFT\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case LV_KEY_RIGHT:
|
case LV_KEY_RIGHT:
|
||||||
{
|
{
|
||||||
printf("[CommondOptionKeyCallback]>>>RIGHT\n");
|
//printf("[CommondOptionKeyCallback]>>>RIGHT\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case LV_KEY_ENTER:
|
case LV_KEY_ENTER:
|
||||||
{
|
{
|
||||||
printf("[CommondOptionKeyCallback]>>>ENTER\n");
|
//printf("[CommondOptionKeyCallback]>>>ENTER\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(itemID)
|
switch(itemID)
|
||||||
|
|
|
@ -1859,7 +1859,7 @@ static void UIFlowPhoto_Key(lv_obj_t* obj, uint32_t key)
|
||||||
{
|
{
|
||||||
case LV_USER_KEY_LEFT:
|
case LV_USER_KEY_LEFT:
|
||||||
{
|
{
|
||||||
printf("[UIFlowPhoto_Key]>>>LEFT\n");
|
//printf("[UIFlowPhoto_Key]>>>LEFT\n");
|
||||||
if (KeyLeftPressingTimeMs < LONG_PRESS_INTERVAL)
|
if (KeyLeftPressingTimeMs < LONG_PRESS_INTERVAL)
|
||||||
{
|
{
|
||||||
UIFlowMenuCommonConfirmAPI_Open(IDM_ENTER_WORK_MODE);
|
UIFlowMenuCommonConfirmAPI_Open(IDM_ENTER_WORK_MODE);
|
||||||
|
@ -1869,7 +1869,7 @@ static void UIFlowPhoto_Key(lv_obj_t* obj, uint32_t key)
|
||||||
}
|
}
|
||||||
case LV_KEY_ENTER:
|
case LV_KEY_ENTER:
|
||||||
{
|
{
|
||||||
printf("[UIFlowPhoto_Key]>>>ENTER\n");
|
//printf("[UIFlowPhoto_Key]>>>ENTER\n");
|
||||||
#if HUNTING_CAMERA_MCU == ENABLE
|
#if HUNTING_CAMERA_MCU == ENABLE
|
||||||
// sf_rtsp_stop();
|
// sf_rtsp_stop();
|
||||||
if(TRUE == sf_get_send_statu())
|
if(TRUE == sf_get_send_statu())
|
||||||
|
@ -1886,7 +1886,7 @@ static void UIFlowPhoto_Key(lv_obj_t* obj, uint32_t key)
|
||||||
case LV_USER_KEY_NEXT:
|
case LV_USER_KEY_NEXT:
|
||||||
case LV_USER_KEY_ZOOMIN:
|
case LV_USER_KEY_ZOOMIN:
|
||||||
{
|
{
|
||||||
printf("[UIFlowPhoto_Key]>>>DOWN\n");
|
//printf("[UIFlowPhoto_Key]>>>DOWN\n");
|
||||||
g_preview_info_ishidden = true;
|
g_preview_info_ishidden = true;
|
||||||
lv_obj_set_hidden(g_preview_info_msgbox, g_preview_info_ishidden);
|
lv_obj_set_hidden(g_preview_info_msgbox, g_preview_info_ishidden);
|
||||||
KeyDownPressingTimeMs = 0;
|
KeyDownPressingTimeMs = 0;
|
||||||
|
@ -1900,7 +1900,7 @@ static void UIFlowPhoto_Key(lv_obj_t* obj, uint32_t key)
|
||||||
case LV_USER_KEY_PREV:
|
case LV_USER_KEY_PREV:
|
||||||
case LV_USER_KEY_ZOOMOUT:
|
case LV_USER_KEY_ZOOMOUT:
|
||||||
{
|
{
|
||||||
printf("[UIFlowPhoto_Key]>>>UP\n");
|
//printf("[UIFlowPhoto_Key]>>>UP\n");
|
||||||
if(TRUE == sf_get_send_statu())
|
if(TRUE == sf_get_send_statu())
|
||||||
{
|
{
|
||||||
printf("\r\n[%s] line:%d %d running\n", __FUNCTION__, __LINE__,key);
|
printf("\r\n[%s] line:%d %d running\n", __FUNCTION__, __LINE__,key);
|
||||||
|
@ -1917,7 +1917,7 @@ static void UIFlowPhoto_Key(lv_obj_t* obj, uint32_t key)
|
||||||
case LV_USER_KEY_MENU:
|
case LV_USER_KEY_MENU:
|
||||||
case LV_USER_KEY_RIGHT:
|
case LV_USER_KEY_RIGHT:
|
||||||
{
|
{
|
||||||
printf("[UIFlowPhoto_Key]>>>RIGHT\n");
|
//printf("[UIFlowPhoto_Key]>>>RIGHT\n");
|
||||||
//SF_WIFI_STATUS_E status = sf_get_wifi_status();
|
//SF_WIFI_STATUS_E status = sf_get_wifi_status();
|
||||||
if(TRUE == sf_get_send_statu())
|
if(TRUE == sf_get_send_statu())
|
||||||
{
|
{
|
||||||
|
@ -2019,18 +2019,7 @@ void UIFlowPhotoEventCallback(lv_obj_t* obj, lv_event_t event)
|
||||||
switch(event)
|
switch(event)
|
||||||
{
|
{
|
||||||
case LV_PLUGIN_EVENT_SCR_OPEN:
|
case LV_PLUGIN_EVENT_SCR_OPEN:
|
||||||
UIFlowPhoto_ScrOpen(obj);//LV_ALIGN_IN_RIGHT_MID
|
{
|
||||||
|
|
||||||
if(preview_info_task == NULL && g_preview_info_msgbox == NULL && g_preview_info_label == NULL){
|
|
||||||
g_preview_info_msgbox = lv_btn_create(obj, button_msg_bg_scr_uiflowwrnmsg);
|
|
||||||
g_preview_info_ishidden = true;
|
|
||||||
lv_obj_set_hidden(g_preview_info_msgbox, g_preview_info_ishidden);
|
|
||||||
g_preview_info_label = lv_label_create(g_preview_info_msgbox, label_msg_scr_uiflowwrnmsg);
|
|
||||||
lv_obj_align(g_preview_info_label, g_preview_info_msgbox, LV_ALIGN_CENTER, 0, -30);
|
|
||||||
lv_label_set_align(g_preview_info_label, LV_LABEL_ALIGN_CENTER);
|
|
||||||
preview_info_task = lv_task_create(preview_info_task_cb, 100, LV_TASK_PRIO_MID, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
#define PASSWORD_OPENED 1
|
#define PASSWORD_OPENED 1
|
||||||
#define PASSWORD_NOT_OPENED 0
|
#define PASSWORD_NOT_OPENED 0
|
||||||
static int passwordOpened = PASSWORD_NOT_OPENED;
|
static int passwordOpened = PASSWORD_NOT_OPENED;
|
||||||
|
@ -2043,6 +2032,20 @@ void UIFlowPhotoEventCallback(lv_obj_t* obj, lv_event_t event)
|
||||||
{
|
{
|
||||||
passwordOpened = PASSWORD_OPENED;
|
passwordOpened = PASSWORD_OPENED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UIFlowPhoto_ScrOpen(obj);//LV_ALIGN_IN_RIGHT_MID
|
||||||
|
|
||||||
|
if(preview_info_task == NULL && g_preview_info_msgbox == NULL && g_preview_info_label == NULL){
|
||||||
|
g_preview_info_msgbox = lv_btn_create(obj, button_msg_bg_scr_uiflowwrnmsg);
|
||||||
|
g_preview_info_ishidden = true;
|
||||||
|
lv_obj_set_hidden(g_preview_info_msgbox, g_preview_info_ishidden);
|
||||||
|
g_preview_info_label = lv_label_create(g_preview_info_msgbox, label_msg_scr_uiflowwrnmsg);
|
||||||
|
lv_obj_align(g_preview_info_label, g_preview_info_msgbox, LV_ALIGN_CENTER, 0, -30);
|
||||||
|
lv_label_set_align(g_preview_info_label, LV_LABEL_ALIGN_CENTER);
|
||||||
|
preview_info_task = lv_task_create(preview_info_task_cb, 100, LV_TASK_PRIO_MID, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// #if HUNTING_CAMERA_MCU == ENABLE
|
// #if HUNTING_CAMERA_MCU == ENABLE
|
||||||
// UIMenuStoreInfo *puiPara = sf_ui_para_get();
|
// UIMenuStoreInfo *puiPara = sf_ui_para_get();
|
||||||
// if((puiPara->CamMode == SF_CAM_MODE_PHOTO) || (puiPara->CamMode == SF_CAM_MODE_PHOTO_VIDEO) || (puiPara->CamMode == SF_CAM_MODE_VIDEO2))
|
// if((puiPara->CamMode == SF_CAM_MODE_PHOTO) || (puiPara->CamMode == SF_CAM_MODE_PHOTO_VIDEO) || (puiPara->CamMode == SF_CAM_MODE_VIDEO2))
|
||||||
|
@ -2051,7 +2054,7 @@ void UIFlowPhotoEventCallback(lv_obj_t* obj, lv_event_t event)
|
||||||
// }
|
// }
|
||||||
// #endif
|
// #endif
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case LV_PLUGIN_EVENT_SCR_CLOSE:
|
case LV_PLUGIN_EVENT_SCR_CLOSE:
|
||||||
UIFlowPhoto_ScrClose(obj);
|
UIFlowPhoto_ScrClose(obj);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
#include "../lv_hal/lv_hal.h"
|
#include "../lv_hal/lv_hal.h"
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#if LV_USE_GPU_NXP_PXP && LV_USE_GPU_NXP_PXP_AUTO_INIT
|
#if LV_USE_GPU_NXP_PXP && LV_USE_GPU_NXP_PXP_AUTO_INIT
|
||||||
#include "../lv_gpu/lv_gpu_nxp_pxp.h"
|
#include "../lv_gpu/lv_gpu_nxp_pxp.h"
|
||||||
|
@ -1998,6 +1999,39 @@ lv_res_t lv_event_send_func(lv_event_cb_t event_xcb, lv_obj_t * obj, lv_event_t
|
||||||
*/
|
*/
|
||||||
const void * lv_event_get_data(void)
|
const void * lv_event_get_data(void)
|
||||||
{
|
{
|
||||||
|
switch((uint32_t)event_act_data){
|
||||||
|
|
||||||
|
case LV_KEY_DOWN:
|
||||||
|
case LV_KEY_NEXT:
|
||||||
|
{
|
||||||
|
printf("Key]>>>DOWN\n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case LV_KEY_UP:
|
||||||
|
case LV_KEY_PREV:
|
||||||
|
{
|
||||||
|
printf("[Key]>>>UP\n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case LV_KEY_LEFT:
|
||||||
|
{
|
||||||
|
printf("[Key]>>>LEFT\n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case LV_KEY_RIGHT:
|
||||||
|
{
|
||||||
|
printf("[Key]>>>RIGHT\n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case LV_KEY_ENTER:
|
||||||
|
{
|
||||||
|
printf("[Key]>>>ENTER\n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return event_act_data;
|
return event_act_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user