From ba876371b3848a4ec19c5e5980d5a72b6f1cbf68 Mon Sep 17 00:00:00 2001 From: xiehongyan Date: Thu, 4 Jan 2024 20:22:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UIFlowMenuCommonOptionEventCallback.c | 4 +++- code/lib/source/sifar/code/source/common/sf_common.c | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowMenuCommonOption/UIFlowMenuCommonOptionEventCallback.c b/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowMenuCommonOption/UIFlowMenuCommonOptionEventCallback.c index 7d007e0f4..6fd674c52 100755 --- a/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowMenuCommonOption/UIFlowMenuCommonOptionEventCallback.c +++ b/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowMenuCommonOption/UIFlowMenuCommonOptionEventCallback.c @@ -372,13 +372,14 @@ static void LV_MenuCommonOption_UpdateContent(TM_MENU *pMenu) lv_obj_set_pos(image_option1_scr_uiflowmenucommonoption, 288, 0); ui_hidden = false; } - else if (i == 1) + else if (i == 1 && (1 == SelOption)) { lv_plugin_menu_select_item(menu_option, 0); s_SelOption = 0; SelOption = 0; lv_plugin_menu_set_item_state(menu_option, 1, LV_PLUGIN_MENU_ITEM_STATE_DISABLED); ui_hidden = true; + SysSetFlag(pItem->SysFlag,0); } } else @@ -945,6 +946,7 @@ static void LV_MenuOption_OnOpen(lv_obj_t* obj, TM_MENU *data) UINT32 cardStatus = System_GetState(SYS_STATE_CARD); if (cardStatus == CARD_REMOVED) { + SelOption = 0; lv_plugin_menu_set_item_state(menu_option, 1, LV_PLUGIN_MENU_ITEM_STATE_DISABLED); } } diff --git a/code/lib/source/sifar/code/source/common/sf_common.c b/code/lib/source/sifar/code/source/common/sf_common.c index 0a7c49ad6..d9bae9498 100755 --- a/code/lib/source/sifar/code/source/common/sf_common.c +++ b/code/lib/source/sifar/code/source/common/sf_common.c @@ -258,7 +258,7 @@ void sf_mode_detect(void) time=0; - printf("[*x] get pir statu : %d ...\n", sf_get_pir_statu_flag()); + //printf("[*x] get pir statu : %d ...\n", sf_get_pir_statu_flag()); if((sf_get_pir_statu_flag()) && (!gpio_getPin(GPIO_KEY_TEST))) { timeBak++; @@ -284,7 +284,7 @@ void sf_mode_detect(void) } else if((sf_get_pir_statu_flag()) && (CMD_FORMAT_SD_STA != sf_get_card_statu())) { - printf("[sf_mode_detect][*x] empezar going to pir................................\n"); + //printf("[sf_mode_detect][*x] empezar going to pir................................\n"); pwroffcnt++; //printf("[%s:%d]pwroffcnt=%d\n",__FUNCTION__,__LINE__,pwroffcnt); //sf_enter_auto_mode_count_down_show(4 - pwroffcnt);