diff --git a/image/new_vending_info/alpha.png b/image/new_vending_info/alpha.png new file mode 100644 index 00000000..3c1a34b0 Binary files /dev/null and b/image/new_vending_info/alpha.png differ diff --git a/image/new_vending_info/bn_close_white.png b/image/new_vending_info/bn_close_white.png new file mode 100644 index 00000000..70572704 Binary files /dev/null and b/image/new_vending_info/bn_close_white.png differ diff --git a/image/new_vending_info/popup_incorrect.png b/image/new_vending_info/popup_incorrect.png new file mode 100644 index 00000000..1ac1424d Binary files /dev/null and b/image/new_vending_info/popup_incorrect.png differ diff --git a/image/new_vending_info/popup_timeout.png b/image/new_vending_info/popup_timeout.png new file mode 100644 index 00000000..751fe995 Binary files /dev/null and b/image/new_vending_info/popup_timeout.png differ diff --git a/image/new_vending_info/popup_wait.png b/image/new_vending_info/popup_wait.png new file mode 100644 index 00000000..fedb6ba5 Binary files /dev/null and b/image/new_vending_info/popup_wait.png differ diff --git a/xml/vending_info.xml b/xml/vending_info.xml index 9466425e..2f057b2d 100644 --- a/xml/vending_info.xml +++ b/xml/vending_info.xml @@ -157,6 +157,19 @@ SAVELOG " EventOpen EventOpen EventOpen EventOpen EventOpen EventOpen EventOpen EventOpen EventOpen EventOpen EventOpen EventOpen " Var MainMenuBlockCount = 2 + + READ_FILE "/mnt/sdcard/coffeevending/enable_new_machine_test_ui" enable_new_ui + STRCONTAIN "1" enable_new_ui show_newui_mode + + If show_newui_mode = "true" Then + Var EnableNewBrewUI = "true" + Else + Var EnableNewBrewUI = "false" + EndIf + + + + 1000 @@ -258,6 +271,8 @@ EndIf EndIf + DEBUGVAR EnableNewBrewUI + Refresh TimerReset @@ -902,7 +917,7 @@ Var return = "Invisible" EndIf ) - "New ui V2" + "Access setting (V2)" ; diff --git a/xml/vending_info2.xml b/xml/vending_info2.xml index 538ff19a..c59cd9db 100644 --- a/xml/vending_info2.xml +++ b/xml/vending_info2.xml @@ -169,14 +169,33 @@ Var PermissionLevel = "" Var tmpPassPhrase = "" + Var WaitPasswordCheck = 0 + Var WaitPopup = "Invisible" + + Var WhileRetryCounter = 0 + Var FailPopup = "Invisible" + + ; define-case + Var FailCasePic = "" + Var FailCaseDir = "ROOT/taobin_project/image/new_vending_info/" + Var FailCaseIncorrect = "popup_incorrect.png" + Var FailCaseTimeout = "popup_timeout.png" + 1000 + DEBUGVAR Timeout + DEBUGVAR WhileRetryCounter - Var Timeout = Timeout + 1 - If Timeout > 15 Then + If alphaPasswordPromptWithKeyboard = "Enable" Then + Var Timeout = 0 + Else + Var Timeout = Timeout + 1 + EndIf + + If Timeout > 30 Then Open "ROOT/taobin_project/xml/page_board.xml" EndIf @@ -187,6 +206,9 @@ Var Timeout = 20 Var PasswordOK = 0 + Var WaitPopup = "Invisible" + Var FailPopup = "Invisible" + Var alphaPasswordPromptWithKeyboard = "Invisible" Var alphaPasswordPrompt = "Invisible" @@ -194,8 +216,8 @@ Var HiddenPassPhrase = "" If ClickOn = "GetAccess" Then - ;MainMenu - Open "ROOT/taobin_project/xml/vending_tasks_pre_main.xml" + MainMenu2 + ;Open "ROOT/taobin_project/xml/vending_tasks_pre_main.xml" EndIf If ClickOn = "QuickTest" Then @@ -207,16 +229,72 @@ If WaitPasswordCheck = 1 Then - If PasswordOK = 1 Then + If PasswordOK = 1 Then + Var Timeout = 20 + Var PasswordOK = 0 - Else + Var WaitPopup = "Invisible" + Var FailPopup = "Invisible" - __CMD "check-password-wait" "-" "-" "-" + Var alphaPasswordPromptWithKeyboard = "Invisible" + Var alphaPasswordPrompt = "Invisible" - EndIf + Var PassPhrase = "" + Var HiddenPassPhrase = "" + + If ClickOn = "GetAccess" Then + MainMenu2 + ;Open "ROOT/taobin_project/xml/vending_tasks_pre_main.xml" + EndIf + + If ClickOn = "QuickTest" Then + ;open + EndIf + Else + + If WhileRetryCounter < 10 Then + DEBUGVAR "WaitPasswordCheck" + __CMD "check-password-wait" "-" "-" "-" + Var Timeout = 0 + Var WaitPopup = "Enable" + Var FailPopup = "Invisible" + Var WhileRetryCounter = WhileRetryCounter + 1 + Else + DEBUGVAR "WaitPasswordCheck.MaxTimeout" + Var WhileRetryCounter = 0 + Var WaitPopup = "Invisible" + Var FailPopup = "Enable" + Var alphaPasswordPromptWithKeyboard = "Invisible" + Var FailCasePic = FailCaseDir + FailCaseIncorrect + ; auto-turnoff + DEBUGVAR "auto-turnoff" + Var WaitPasswordCheck = 0 + EndIf + + + + + EndIf + Else + If PasswordOK = 0 Then + If WaitPopup = "Enable" Then + Var WhileRetryCounter = WhileRetryCounter + 1 + EndIf + EndIf EndIf + ; case-unable-to-fetch-pw + If WhileRetryCounter > 10 Then + If WaitPopup = "Enable" Then + Var WaitPopup = "Invisible" + Var alphaPasswordPromptWithKeyboard = "Invisible" + Var WhileRetryCounter = 0 + Var FailPopup = "Enable" + Var FailCasePic = FailCaseDir + FailCaseTimeout + EndIf + + EndIf @@ -424,8 +502,8 @@ DEBUGVAR ShowVersionAll - If alphaPasswordPrompt = "Invisible" Then - Var alphaPasswordPrompt = "Enable" + If alphaPasswordPromptWithKeyboard = "Invisible" Then + Var alphaPasswordPromptWithKeyboard = "Enable" Var ClickOn = "QuickTest" EndIf @@ -442,27 +520,14 @@ DEBUGVAR ShowVersionAll - If alphaPasswordPrompt = "Invisible" Then - Var alphaPasswordPrompt = "Enable" + If alphaPasswordPromptWithKeyboard = "Invisible" Then + Var alphaPasswordPromptWithKeyboard = "Enable" Var ClickOn = "GetAccess" EndIf - - - Var IDCardState = "Enable" @@ -889,6 +954,7 @@ Var PassPhrase = "" Var HiddenPassPhrase = "" + Var WaitPopup = "Enable" @@ -925,4 +991,81 @@ HiddenPassPhrase + +; waitPopup-with-alpha + + 0 + 0 + eval( + If WaitPopup = "Enable" Then + Var return = "Enable" + Else + If FailPopup = "Enable" Then + Var return = "Enable" + Else + Var return = "Invisible" + EndIf + EndIf +) + "ROOT/taobin_project/image/new_vending_info/alpha.png" + + + + 240 + 300 + WaitPopup + "ROOT/taobin_project/image/new_vending_info/popup_wait.png" + + + + 240 + 300 + FailPopup + FailCasePic + + + + + + + diff --git a/xml/vending_tasks_pre_main.xml b/xml/vending_tasks_pre_main.xml index 16b92418..74204442 100644 --- a/xml/vending_tasks_pre_main.xml +++ b/xml/vending_tasks_pre_main.xml @@ -115,7 +115,7 @@ @@ -130,7 +130,7 @@ @@ -145,7 +145,7 @@ @@ -160,7 +160,7 @@