From 758c4f3cf23cfeaddae0e116cdf5e5131e0039b3 Mon Sep 17 00:00:00 2001 From: xiaojiazhu Date: Fri, 24 Nov 2023 14:28:49 +0800 Subject: [PATCH] Fixed password screen bug. --- .../UIFlowLVGL/UIFlowPassword/UIFlowPasswordEventCallback.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPassword/UIFlowPasswordEventCallback.c b/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPassword/UIFlowPasswordEventCallback.c index 3332feb40..d90af1c9d 100755 --- a/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPassword/UIFlowPasswordEventCallback.c +++ b/code/application/source/cardv/SrcCode/UIWnd/LVGL_SPORTCAM/UIFlowLVGL/UIFlowPassword/UIFlowPasswordEventCallback.c @@ -309,6 +309,7 @@ static void UIFlowPassword_Key(lv_obj_t* obj, uint32_t key) const char *SuperPassword = "561289"; void UIFlowPassword_KeyLongPress(lv_obj_t* obj, uint32_t key) { + UIMenuStoreInfo *puiPara = sf_ui_para_get(); switch(key) { case LV_USER_KEY_RIGHT: @@ -320,6 +321,8 @@ void UIFlowPassword_KeyLongPress(lv_obj_t* obj, uint32_t key) if(0 == memcmp(PwdStr, SuperPassword, PASSWORD_LENGTH - 1)) { printf("Super password is right.\n"); + puiPara->PwdSwitch = 0; + memset(puiPara->PwdStr, '0' ,sizeof(puiPara->PwdStr)); lv_plugin_scr_close(obj, NULL); } KeyRightPressingTimeMs = 0;