diff --git a/code/application/source/cardv/SrcCode/Mode/UIModePhoto.c b/code/application/source/cardv/SrcCode/Mode/UIModePhoto.c index 9002bcfdb..99fef1a9a 100755 --- a/code/application/source/cardv/SrcCode/Mode/UIModePhoto.c +++ b/code/application/source/cardv/SrcCode/Mode/UIModePhoto.c @@ -22,11 +22,9 @@ int PRIMARY_MODE_PHOTO = -1; ///< Photo void ModePhoto_Open(void); void ModePhoto_Close(void); -extern UINT8 is_confirm; void ModePhoto_Open(void) { - is_confirm = 0; #if (PHOTO_MODE==ENABLE) Input_ResetMask(); Ux_SetActiveApp(&CustomPhotoObjCtrl); diff --git a/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/Resource/Plugin/lv_plugin_common.c b/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/Resource/Plugin/lv_plugin_common.c index a63800990..d18639c72 100755 --- a/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/Resource/Plugin/lv_plugin_common.c +++ b/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/Resource/Plugin/lv_plugin_common.c @@ -784,8 +784,8 @@ LV_PLUG_RET lv_plugin_scr_close(lv_obj_t* scr, const void * data) return LV_PLUG_SUCCESS; /* avoid recursively close */ - //if(lv_plugin_scr_is_ready_to_be_closed(scr)) - //return LV_PLUG_SUCCESS; + if(lv_plugin_scr_is_ready_to_be_closed(scr)) + return LV_PLUG_SUCCESS; /* add all screens ready to be closed LV_STATE_DISABLED */ child = NULL; @@ -796,8 +796,8 @@ LV_PLUG_RET lv_plugin_scr_close(lv_obj_t* scr, const void * data) do { next_child = lv_obj_get_child(inter_param->root_scr, child); - //lv_obj_add_state(child, LV_STATE_DISABLED); - lv_obj_add_state(scr, LV_STATE_DISABLED); + lv_obj_add_state(child, LV_STATE_DISABLED); + if(NULL == next_child) break; diff --git a/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowMenuCommonConfirm/UIFlowMenuCommonConfirmEventCallback.c b/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowMenuCommonConfirm/UIFlowMenuCommonConfirmEventCallback.c index 652af41ff..4bda4ad3f 100755 --- a/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowMenuCommonConfirm/UIFlowMenuCommonConfirmEventCallback.c +++ b/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowMenuCommonConfirm/UIFlowMenuCommonConfirmEventCallback.c @@ -380,7 +380,7 @@ void UIFlowMenuCommonConfirmAPI_Open(uint32_t itemID) lv_obj_t * btnmatrix = lv_msgbox_get_btnmatrix(msgbox); if(btnmatrix){ - lv_btnmatrix_set_focused_btn(btnmatrix, 1); + lv_btnmatrix_set_focused_btn(btnmatrix, 0); /* update font of button part */ // 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); } -#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) { - is_confirm = confirm_from_normal; if(NULL == wait_moment_scr){ 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: { - //if(gp){ - // lv_group_send_data(gp, LV_KEY_ENTER); - //} + // if(gp){ + // lv_group_send_data(gp, LV_KEY_ENTER); + // } // break; static int todo = 8; 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); break; } + } } @@ -596,7 +592,6 @@ void UIFlowMenuCommonConfirmEventCallback(lv_obj_t* obj, lv_event_t event) } case LV_PLUGIN_EVENT_SCR_CLOSE: - lv_plugin_scr_close(obj, gen_nvtmsg_data(NVTRET_CONFIRM, 0)); 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) { printf("[%s]event:%d\n", __FUNCTION__, event); - + switch(event) { diff --git a/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowMenuCommonItem/UIFlowMenuCommonItemEventCallback.c b/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowMenuCommonItem/UIFlowMenuCommonItemEventCallback.c index 6b2dbb6ea..021acc7a9 100755 --- a/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowMenuCommonItem/UIFlowMenuCommonItemEventCallback.c +++ b/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowMenuCommonItem/UIFlowMenuCommonItemEventCallback.c @@ -1110,26 +1110,12 @@ static void UIFlowMenuCommonItem_ScrClose(lv_obj_t* obj) #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) { DBG_DUMP("%s\r\n", __func__); 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->event == NVTRET_ENTER_MENU){ load_info_from_sf(); diff --git a/code/application/source/sf_app/code/source/wifi/sf_wifi_svr.c b/code/application/source/sf_app/code/source/wifi/sf_wifi_svr.c index cc793bd8a..3a15f9661 100755 --- a/code/application/source/sf_app/code/source/wifi/sf_wifi_svr.c +++ b/code/application/source/sf_app/code/source/wifi/sf_wifi_svr.c @@ -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) { int iCurrMode = System_GetState(SYS_STATE_CURRMODE); @@ -292,18 +291,7 @@ void sf_wifi_set_cam_mode(void) { iNextMode = PRIMARY_MODE_PHOTO; } - - 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()))) + if((iNextMode != iCurrMode) || ((TRUE != sf_is_preview()))) { UI_SetData(FL_PreMode, iCurrMode); UI_SetData(FL_NextMode, iNextMode);