Fixed password screen bug.
This commit is contained in:
parent
602408f817
commit
758c4f3cf2
|
@ -309,6 +309,7 @@ static void UIFlowPassword_Key(lv_obj_t* obj, uint32_t key)
|
||||||
const char *SuperPassword = "561289";
|
const char *SuperPassword = "561289";
|
||||||
void UIFlowPassword_KeyLongPress(lv_obj_t* obj, uint32_t key)
|
void UIFlowPassword_KeyLongPress(lv_obj_t* obj, uint32_t key)
|
||||||
{
|
{
|
||||||
|
UIMenuStoreInfo *puiPara = sf_ui_para_get();
|
||||||
switch(key)
|
switch(key)
|
||||||
{
|
{
|
||||||
case LV_USER_KEY_RIGHT:
|
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))
|
if(0 == memcmp(PwdStr, SuperPassword, PASSWORD_LENGTH - 1))
|
||||||
{
|
{
|
||||||
printf("Super password is right.\n");
|
printf("Super password is right.\n");
|
||||||
|
puiPara->PwdSwitch = 0;
|
||||||
|
memset(puiPara->PwdStr, '0' ,sizeof(puiPara->PwdStr));
|
||||||
lv_plugin_scr_close(obj, NULL);
|
lv_plugin_scr_close(obj, NULL);
|
||||||
}
|
}
|
||||||
KeyRightPressingTimeMs = 0;
|
KeyRightPressingTimeMs = 0;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user