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:
zyj 2023-10-24 10:43:31 +08:00
commit f2c157c5ec
4 changed files with 36 additions and 3 deletions

View File

@ -1,12 +1,33 @@
#include "UIFlowLVGL/UIFlowLVGL.h"
#include <stdio.h>
static lv_group_t* gp = NULL;
static void set_indev_keypad_group(lv_obj_t* obj)
{
if(gp == NULL){
gp = lv_group_create();
lv_group_add_obj(gp, obj);
}
lv_indev_t* indev = lv_plugin_find_indev_by_type(LV_INDEV_TYPE_KEYPAD);
lv_indev_set_group(indev, gp);
}
static void UIFlowPassword_ScrOpen(lv_obj_t* obj)
{
set_indev_keypad_group(obj);
}
void OpenPasswordScreen(void)
{
lv_plugin_scr_open(UIFlowPassword, NULL);
}
void UIFlowPasswordEventCallback(lv_obj_t* obj, lv_event_t event)
{
printf("========================== %d\n", event);
printf(" UIFlowPasswordEventCallback %d\n", event);
switch(event)
{
case LV_PLUGIN_EVENT_SCR_OPEN:
UIFlowPassword_ScrOpen(obj);
break;
case LV_PLUGIN_EVENT_SCR_CLOSE:

View File

@ -0,0 +1,7 @@
#ifndef UIFLOW_PASSWORD_EVENT_CALLBACK_H
#define UIFLOW_PASSWORD_EVENT_CALLBACK_H
#include "UIFlowLVGL/UIFlowMenuCommonConfirm/UIFlowMenuCommonConfirmAPI.h"
#include "UIFlowLVGL/UIFlowLVGL.h"
#include "Resource/Plugin/lvgl_plugin.h"
void OpenPasswordScreen(void);
#endif /*UIFLOW_PASSWORD_EVENT_CALLBACK_H*/

View File

@ -3,6 +3,7 @@
#include "UIFlowLVGL/UIFlowLVGL.h"
#include "UIFlowLVGL/UIFlowWrnMsg/UIFlowWrnMsgAPI.h"
#include "UIFlowLVGL/UIFlowMenuCommonConfirm/UIFlowMenuCommonConfirmAPI.h"
#include "UIFlowLVGL/UIFlowPassword/UIFlowPasswordEventCallback.h"
#include "UIFlowPhotoParams.h"
#include "UIFlowPhotoFuncs.h"
#include "ImageApp/ImageApp_Photo.h"
@ -1528,6 +1529,7 @@ void UIFlowPhotoEventCallback(lv_obj_t* obj, lv_event_t event)
{
case LV_PLUGIN_EVENT_SCR_OPEN:
UIFlowPhoto_ScrOpen(obj);
// OpenPasswordScreen();
#if HUNTING_CAMERA_MCU == ENABLE
UIMenuStoreInfo *puiPara = sf_ui_para_get();
if((puiPara->CamMode == SF_CAM_MODE_PHOTO) || (puiPara->CamMode == SF_CAM_MODE_PHOTO_VIDEO))

View File

@ -30,7 +30,7 @@ static void task_msgbox_timer_cb(lv_task_t* task)
{
#define BUF_LENGTH 256
char buf[BUF_LENGTH] = {0};
printf(" task_msgbox_timer_cb\n ");
// printf(" task_msgbox_timer_cb\n ");
// LV_PLUGIN_STRING_ID_STRID_PLEASE_INSERT_SD
if(LV_PLUGIN_STRING_ID_STRING_ENTER_WORK == msgID)
{
@ -85,7 +85,10 @@ void UIFlowWrnMsgAPI_Open_StringID(lv_plugin_res_id id, uint16_t auto_close_time
*******************************************************************/
lv_plugin_msgbox_allocate_ext_attr(msgbox);
lv_plugin_msgbox_set_text(msgbox, id);
if(LV_PLUGIN_STRING_ID_STRING_ENTER_WORK != msgID)
{
lv_plugin_msgbox_set_text(msgbox, id);
}
/* add button */
// btn_map[0] = lv_plugin_get_string(LV_PLUGIN_STRING_ID_STRID_OK)->ptr;