parent
59a981e2b5
commit
a3c60a1d15
|
@ -22,11 +22,9 @@ int PRIMARY_MODE_PHOTO = -1; ///< Photo
|
||||||
|
|
||||||
void ModePhoto_Open(void);
|
void ModePhoto_Open(void);
|
||||||
void ModePhoto_Close(void);
|
void ModePhoto_Close(void);
|
||||||
extern UINT8 is_confirm;
|
|
||||||
|
|
||||||
void ModePhoto_Open(void)
|
void ModePhoto_Open(void)
|
||||||
{
|
{
|
||||||
is_confirm = 0;
|
|
||||||
#if (PHOTO_MODE==ENABLE)
|
#if (PHOTO_MODE==ENABLE)
|
||||||
Input_ResetMask();
|
Input_ResetMask();
|
||||||
Ux_SetActiveApp(&CustomPhotoObjCtrl);
|
Ux_SetActiveApp(&CustomPhotoObjCtrl);
|
||||||
|
|
|
@ -784,8 +784,8 @@ LV_PLUG_RET lv_plugin_scr_close(lv_obj_t* scr, const void * data)
|
||||||
return LV_PLUG_SUCCESS;
|
return LV_PLUG_SUCCESS;
|
||||||
|
|
||||||
/* avoid recursively close */
|
/* avoid recursively close */
|
||||||
//if(lv_plugin_scr_is_ready_to_be_closed(scr))
|
if(lv_plugin_scr_is_ready_to_be_closed(scr))
|
||||||
//return LV_PLUG_SUCCESS;
|
return LV_PLUG_SUCCESS;
|
||||||
|
|
||||||
/* add all screens ready to be closed LV_STATE_DISABLED */
|
/* add all screens ready to be closed LV_STATE_DISABLED */
|
||||||
child = NULL;
|
child = NULL;
|
||||||
|
@ -796,8 +796,8 @@ LV_PLUG_RET lv_plugin_scr_close(lv_obj_t* scr, const void * data)
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
next_child = lv_obj_get_child(inter_param->root_scr, child);
|
next_child = lv_obj_get_child(inter_param->root_scr, child);
|
||||||
//lv_obj_add_state(child, LV_STATE_DISABLED);
|
lv_obj_add_state(child, LV_STATE_DISABLED);
|
||||||
lv_obj_add_state(scr, LV_STATE_DISABLED);
|
|
||||||
if(NULL == next_child)
|
if(NULL == next_child)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -380,7 +380,7 @@ void UIFlowMenuCommonConfirmAPI_Open(uint32_t itemID)
|
||||||
lv_obj_t * btnmatrix = lv_msgbox_get_btnmatrix(msgbox);
|
lv_obj_t * btnmatrix = lv_msgbox_get_btnmatrix(msgbox);
|
||||||
|
|
||||||
if(btnmatrix){
|
if(btnmatrix){
|
||||||
lv_btnmatrix_set_focused_btn(btnmatrix, 1);
|
lv_btnmatrix_set_focused_btn(btnmatrix, 0);
|
||||||
|
|
||||||
/* update font of button part */
|
/* update font of button part */
|
||||||
// lv_plugin_msgbox_update_font(msgbox, LV_MSGBOX_PART_BTN);
|
// lv_plugin_msgbox_update_font(msgbox, LV_MSGBOX_PART_BTN);
|
||||||
|
@ -389,15 +389,10 @@ void UIFlowMenuCommonConfirmAPI_Open(uint32_t itemID)
|
||||||
lv_plugin_scr_open(UIFlowMenuCommonConfirm, NULL);
|
lv_plugin_scr_open(UIFlowMenuCommonConfirm, NULL);
|
||||||
|
|
||||||
}
|
}
|
||||||
#define confirm_from_null 0
|
|
||||||
#define confirm_from_sf 1
|
|
||||||
#define confirm_from_normal 2
|
|
||||||
|
|
||||||
UINT8 is_confirm = confirm_from_null;
|
|
||||||
|
|
||||||
void UIFlowMenuCommonConfirm_OnOpen(lv_obj_t* obj)
|
void UIFlowMenuCommonConfirm_OnOpen(lv_obj_t* obj)
|
||||||
{
|
{
|
||||||
is_confirm = confirm_from_normal;
|
|
||||||
if(NULL == wait_moment_scr){
|
if(NULL == wait_moment_scr){
|
||||||
wait_moment_scr = UIFlowWaitMoment;
|
wait_moment_scr = UIFlowWaitMoment;
|
||||||
}
|
}
|
||||||
|
@ -469,9 +464,9 @@ static void UIFlowMenuCommonConfirm_MessageBox_Key(lv_obj_t* obj, uint32_t key)
|
||||||
}
|
}
|
||||||
case LV_USER_KEY_SHUTTER2:
|
case LV_USER_KEY_SHUTTER2:
|
||||||
{
|
{
|
||||||
//if(gp){
|
// if(gp){
|
||||||
// lv_group_send_data(gp, LV_KEY_ENTER);
|
// lv_group_send_data(gp, LV_KEY_ENTER);
|
||||||
//}
|
// }
|
||||||
// break;
|
// break;
|
||||||
static int todo = 8;
|
static int todo = 8;
|
||||||
lv_event_send(obj, LV_EVENT_CLICKED, &todo);
|
lv_event_send(obj, LV_EVENT_CLICKED, &todo);
|
||||||
|
@ -480,6 +475,7 @@ static void UIFlowMenuCommonConfirm_MessageBox_Key(lv_obj_t* obj, uint32_t key)
|
||||||
// UIFlowMenuCommonConfirm_MessageBox_ValueChanged(obj, &todo);
|
// UIFlowMenuCommonConfirm_MessageBox_ValueChanged(obj, &todo);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -596,7 +592,6 @@ void UIFlowMenuCommonConfirmEventCallback(lv_obj_t* obj, lv_event_t event)
|
||||||
}
|
}
|
||||||
|
|
||||||
case LV_PLUGIN_EVENT_SCR_CLOSE:
|
case LV_PLUGIN_EVENT_SCR_CLOSE:
|
||||||
lv_plugin_scr_close(obj, gen_nvtmsg_data(NVTRET_CONFIRM, 0));
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
@ -624,7 +619,7 @@ void UIFlowMenuCommonConfirmEventCallback(lv_obj_t* obj, lv_event_t event)
|
||||||
void message_box_confirm_msg_event_callback(lv_obj_t* obj, lv_event_t event)
|
void message_box_confirm_msg_event_callback(lv_obj_t* obj, lv_event_t event)
|
||||||
{
|
{
|
||||||
printf("[%s]event:%d\n", __FUNCTION__, event);
|
printf("[%s]event:%d\n", __FUNCTION__, event);
|
||||||
|
|
||||||
switch(event)
|
switch(event)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -1110,26 +1110,12 @@ static void UIFlowMenuCommonItem_ScrClose(lv_obj_t* obj)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
extern UINT8 is_confirm;
|
|
||||||
|
|
||||||
|
|
||||||
#define confirm_from_null 0
|
|
||||||
#define confirm_from_sf 1
|
|
||||||
#define confirm_from_normal 2
|
|
||||||
|
|
||||||
static void UIFlowMenuCommonItem_ChildScrClose(lv_obj_t* obj,const LV_USER_EVENT_NVTMSG_DATA* msg)
|
static void UIFlowMenuCommonItem_ChildScrClose(lv_obj_t* obj,const LV_USER_EVENT_NVTMSG_DATA* msg)
|
||||||
{
|
{
|
||||||
DBG_DUMP("%s\r\n", __func__);
|
DBG_DUMP("%s\r\n", __func__);
|
||||||
|
|
||||||
set_indev_keypad_group(obj);
|
set_indev_keypad_group(obj);
|
||||||
|
|
||||||
if(is_confirm == confirm_from_sf){
|
|
||||||
is_confirm = confirm_from_null;
|
|
||||||
Ux_PostEvent(NVTEVT_SYSTEM_MODE, 1, PRIMARY_MODE_PHOTO);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if(msg){
|
if(msg){
|
||||||
if(msg->event == NVTRET_ENTER_MENU){
|
if(msg->event == NVTRET_ENTER_MENU){
|
||||||
load_info_from_sf();
|
load_info_from_sf();
|
||||||
|
|
|
@ -273,7 +273,6 @@ void sf_set_wifi_status(SF_WIFI_STATUS_E enStatus)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extern UINT8 is_confirm;
|
|
||||||
void sf_wifi_set_cam_mode(void)
|
void sf_wifi_set_cam_mode(void)
|
||||||
{
|
{
|
||||||
int iCurrMode = System_GetState(SYS_STATE_CURRMODE);
|
int iCurrMode = System_GetState(SYS_STATE_CURRMODE);
|
||||||
|
@ -292,18 +291,7 @@ void sf_wifi_set_cam_mode(void)
|
||||||
{
|
{
|
||||||
iNextMode = PRIMARY_MODE_PHOTO;
|
iNextMode = PRIMARY_MODE_PHOTO;
|
||||||
}
|
}
|
||||||
|
if((iNextMode != iCurrMode) || ((TRUE != sf_is_preview())))
|
||||||
if (is_confirm == 2)
|
|
||||||
{
|
|
||||||
is_confirm = 1;
|
|
||||||
Ux_PostEvent(NVTEVT_KEY_RIGHT, 1, NVTEVT_KEY_PRESS);
|
|
||||||
Ux_PostEvent(NVTEVT_KEY_RIGHT, 1, NVTEVT_KEY_RELEASE);
|
|
||||||
Ux_PostEvent(NVTEVT_KEY_ENTER, 1, NVTEVT_KEY_PRESS);
|
|
||||||
Ux_PostEvent(NVTEVT_KEY_ENTER, 1, NVTEVT_KEY_RELEASE);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((iNextMode != iCurrMode) || ((TRUE != sf_is_preview())))
|
|
||||||
{
|
{
|
||||||
UI_SetData(FL_PreMode, iCurrMode);
|
UI_SetData(FL_PreMode, iCurrMode);
|
||||||
UI_SetData(FL_NextMode, iNextMode);
|
UI_SetData(FL_NextMode, iNextMode);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user