NEWUI: fix eternal wait on wrong password
This commit is contained in:
parent
fc6bd5ef15
commit
62b864a8e7
8 changed files with 188 additions and 30 deletions
BIN
image/new_vending_info/alpha.png
Normal file
BIN
image/new_vending_info/alpha.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.3 KiB |
BIN
image/new_vending_info/bn_close_white.png
Normal file
BIN
image/new_vending_info/bn_close_white.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
BIN
image/new_vending_info/popup_incorrect.png
Normal file
BIN
image/new_vending_info/popup_incorrect.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
BIN
image/new_vending_info/popup_timeout.png
Normal file
BIN
image/new_vending_info/popup_timeout.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
BIN
image/new_vending_info/popup_wait.png
Normal file
BIN
image/new_vending_info/popup_wait.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
|
|
@ -157,6 +157,19 @@
|
||||||
|
|
||||||
SAVELOG " EventOpen EventOpen EventOpen EventOpen EventOpen EventOpen EventOpen EventOpen EventOpen EventOpen EventOpen EventOpen "
|
SAVELOG " EventOpen EventOpen EventOpen EventOpen EventOpen EventOpen EventOpen EventOpen EventOpen EventOpen EventOpen EventOpen "
|
||||||
Var MainMenuBlockCount = 2
|
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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</EventOpen>
|
</EventOpen>
|
||||||
<Timeout> 1000 </Timeout>
|
<Timeout> 1000 </Timeout>
|
||||||
<EventTimeout>
|
<EventTimeout>
|
||||||
|
|
@ -258,6 +271,8 @@
|
||||||
EndIf
|
EndIf
|
||||||
EndIf
|
EndIf
|
||||||
|
|
||||||
|
DEBUGVAR EnableNewBrewUI
|
||||||
|
|
||||||
Refresh
|
Refresh
|
||||||
TimerReset
|
TimerReset
|
||||||
|
|
||||||
|
|
@ -902,7 +917,7 @@
|
||||||
Var return = "Invisible"
|
Var return = "Invisible"
|
||||||
EndIf
|
EndIf
|
||||||
) </State>
|
) </State>
|
||||||
<Value> "New ui V2" </Value>
|
<Value> "Access setting (V2)" </Value>
|
||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
;<QRCode>
|
;<QRCode>
|
||||||
|
|
|
||||||
|
|
@ -169,14 +169,33 @@
|
||||||
Var PermissionLevel = ""
|
Var PermissionLevel = ""
|
||||||
Var tmpPassPhrase = ""
|
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"
|
||||||
|
|
||||||
|
|
||||||
</EventOpen>
|
</EventOpen>
|
||||||
<Timeout> 1000 </Timeout>
|
<Timeout> 1000 </Timeout>
|
||||||
<EventTimeout>
|
<EventTimeout>
|
||||||
|
|
||||||
|
DEBUGVAR Timeout
|
||||||
|
DEBUGVAR WhileRetryCounter
|
||||||
|
|
||||||
Var Timeout = Timeout + 1
|
If alphaPasswordPromptWithKeyboard = "Enable" Then
|
||||||
If Timeout > 15 Then
|
Var Timeout = 0
|
||||||
|
Else
|
||||||
|
Var Timeout = Timeout + 1
|
||||||
|
EndIf
|
||||||
|
|
||||||
|
If Timeout > 30 Then
|
||||||
Open "ROOT/taobin_project/xml/page_board.xml"
|
Open "ROOT/taobin_project/xml/page_board.xml"
|
||||||
EndIf
|
EndIf
|
||||||
|
|
||||||
|
|
@ -187,6 +206,9 @@
|
||||||
Var Timeout = 20
|
Var Timeout = 20
|
||||||
Var PasswordOK = 0
|
Var PasswordOK = 0
|
||||||
|
|
||||||
|
Var WaitPopup = "Invisible"
|
||||||
|
Var FailPopup = "Invisible"
|
||||||
|
|
||||||
Var alphaPasswordPromptWithKeyboard = "Invisible"
|
Var alphaPasswordPromptWithKeyboard = "Invisible"
|
||||||
Var alphaPasswordPrompt = "Invisible"
|
Var alphaPasswordPrompt = "Invisible"
|
||||||
|
|
||||||
|
|
@ -194,8 +216,8 @@
|
||||||
Var HiddenPassPhrase = ""
|
Var HiddenPassPhrase = ""
|
||||||
|
|
||||||
If ClickOn = "GetAccess" Then
|
If ClickOn = "GetAccess" Then
|
||||||
;MainMenu
|
MainMenu2
|
||||||
Open "ROOT/taobin_project/xml/vending_tasks_pre_main.xml"
|
;Open "ROOT/taobin_project/xml/vending_tasks_pre_main.xml"
|
||||||
EndIf
|
EndIf
|
||||||
|
|
||||||
If ClickOn = "QuickTest" Then
|
If ClickOn = "QuickTest" Then
|
||||||
|
|
@ -207,16 +229,72 @@
|
||||||
|
|
||||||
|
|
||||||
If WaitPasswordCheck = 1 Then
|
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
|
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
|
DEBUGVAR ShowVersionAll
|
||||||
|
|
||||||
If alphaPasswordPrompt = "Invisible" Then
|
If alphaPasswordPromptWithKeyboard = "Invisible" Then
|
||||||
Var alphaPasswordPrompt = "Enable"
|
Var alphaPasswordPromptWithKeyboard = "Enable"
|
||||||
Var ClickOn = "QuickTest"
|
Var ClickOn = "QuickTest"
|
||||||
EndIf
|
EndIf
|
||||||
|
|
||||||
|
|
@ -442,27 +520,14 @@
|
||||||
<EventClick>
|
<EventClick>
|
||||||
DEBUGVAR ShowVersionAll
|
DEBUGVAR ShowVersionAll
|
||||||
|
|
||||||
If alphaPasswordPrompt = "Invisible" Then
|
If alphaPasswordPromptWithKeyboard = "Invisible" Then
|
||||||
Var alphaPasswordPrompt = "Enable"
|
Var alphaPasswordPromptWithKeyboard = "Enable"
|
||||||
Var ClickOn = "GetAccess"
|
Var ClickOn = "GetAccess"
|
||||||
EndIf
|
EndIf
|
||||||
|
|
||||||
</EventClick>
|
</EventClick>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
|
|
||||||
<Button>
|
|
||||||
<X> 50 </X>
|
|
||||||
<Y> info_cancel_y </Y>
|
|
||||||
<Filename> "ROOT/taobin_project/image/new_vending_info/exit_button.png" </Filename>
|
|
||||||
<FilenamePress> "ROOT/taobin_project/image/new_vending_info/exit_button.png" </FilenamePress>
|
|
||||||
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
|
|
||||||
<Volume> SoundVolume </Volume>
|
|
||||||
<EventClick>
|
|
||||||
Open "ROOT/taobin_project/xml/page_board.xml"
|
|
||||||
</EventClick>
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
<EventIDCard>
|
<EventIDCard>
|
||||||
Var IDCardState = "Enable"
|
Var IDCardState = "Enable"
|
||||||
|
|
||||||
|
|
@ -889,6 +954,7 @@
|
||||||
|
|
||||||
Var PassPhrase = ""
|
Var PassPhrase = ""
|
||||||
Var HiddenPassPhrase = ""
|
Var HiddenPassPhrase = ""
|
||||||
|
Var WaitPopup = "Enable"
|
||||||
|
|
||||||
</EventClick>
|
</EventClick>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
@ -925,4 +991,81 @@
|
||||||
<Value> HiddenPassPhrase </Value>
|
<Value> HiddenPassPhrase </Value>
|
||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
|
|
||||||
|
; waitPopup-with-alpha
|
||||||
|
<Image>
|
||||||
|
<X> 0 </X>
|
||||||
|
<Y> 0 </Y>
|
||||||
|
<State> eval(
|
||||||
|
If WaitPopup = "Enable" Then
|
||||||
|
Var return = "Enable"
|
||||||
|
Else
|
||||||
|
If FailPopup = "Enable" Then
|
||||||
|
Var return = "Enable"
|
||||||
|
Else
|
||||||
|
Var return = "Invisible"
|
||||||
|
EndIf
|
||||||
|
EndIf
|
||||||
|
) </State>
|
||||||
|
<Filename> "ROOT/taobin_project/image/new_vending_info/alpha.png" </Filename>
|
||||||
|
</Image>
|
||||||
|
|
||||||
|
<Image>
|
||||||
|
<X> 240 </X>
|
||||||
|
<Y> 300 </Y>
|
||||||
|
<State> WaitPopup </State>
|
||||||
|
<Filename> "ROOT/taobin_project/image/new_vending_info/popup_wait.png" </Filename>
|
||||||
|
</Image>
|
||||||
|
|
||||||
|
<Image>
|
||||||
|
<X> 240 </X>
|
||||||
|
<Y> 300 </Y>
|
||||||
|
<State> FailPopup </State>
|
||||||
|
<Filename> FailCasePic </Filename>
|
||||||
|
</Image>
|
||||||
|
|
||||||
|
<Button>
|
||||||
|
<X> 375 </X>
|
||||||
|
<Y> 500 </Y>
|
||||||
|
<Refresh> "Enable" </Refresh>
|
||||||
|
<State> FailPopup </State>
|
||||||
|
<Filename> "ROOT/taobin_project/image/new_vending_info/bn_close_white.png" </Filename>
|
||||||
|
<Sound> "ROOT/sounds/codebuttom.wav" </Sound>
|
||||||
|
<Volume> SoundVolume </Volume>
|
||||||
|
<EventClick>
|
||||||
|
|
||||||
|
Var PassPhrase = ""
|
||||||
|
Var HiddenPassPhrase = ""
|
||||||
|
Var alphaPasswordPromptWithKeyboard = "Invisible"
|
||||||
|
Var alphaPasswordPrompt = "Invisible"
|
||||||
|
Var WaitPopup = "Invisible"
|
||||||
|
Var FailPopup = "Invisible"
|
||||||
|
|
||||||
|
|
||||||
|
</EventClick>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<Button>
|
||||||
|
<X> 50 </X>
|
||||||
|
<Y> info_cancel_y </Y>
|
||||||
|
<Filename> "ROOT/taobin_project/image/new_vending_info/exit_button.png" </Filename>
|
||||||
|
<FilenamePress> "ROOT/taobin_project/image/new_vending_info/exit_button.png" </FilenamePress>
|
||||||
|
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
|
||||||
|
<Volume> SoundVolume </Volume>
|
||||||
|
<EventClick>
|
||||||
|
|
||||||
|
Var PassPhrase = ""
|
||||||
|
Var HiddenPassPhrase = ""
|
||||||
|
Var alphaPasswordPromptWithKeyboard = "Invisible"
|
||||||
|
Var alphaPasswordPrompt = "Invisible"
|
||||||
|
Var WaitPopup = "Invisible"
|
||||||
|
Var FailPopup = "Invisible"
|
||||||
|
Var WaitPasswordCheck = 0
|
||||||
|
Var PasswordOK = 0
|
||||||
|
|
||||||
|
Open "ROOT/taobin_project/xml/page_board.xml"
|
||||||
|
</EventClick>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
|
||||||
</Page>
|
</Page>
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,7 @@
|
||||||
<Button>
|
<Button>
|
||||||
<Filename> "ROOT/taobin_project/image/new_vending_info/test_sys_only.png" </Filename>
|
<Filename> "ROOT/taobin_project/image/new_vending_info/test_sys_only.png" </Filename>
|
||||||
<EventOnClick>
|
<EventOnClick>
|
||||||
MainMenu
|
MainMenu2
|
||||||
|
|
||||||
</EventOnClick>
|
</EventOnClick>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
@ -130,7 +130,7 @@
|
||||||
<Button>
|
<Button>
|
||||||
<Filename> "ROOT/taobin_project/image/new_vending_info/service_ops.png" </Filename>
|
<Filename> "ROOT/taobin_project/image/new_vending_info/service_ops.png" </Filename>
|
||||||
<EventOnClick>
|
<EventOnClick>
|
||||||
MainMenu
|
MainMenu2
|
||||||
|
|
||||||
</EventOnClick>
|
</EventOnClick>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
@ -145,7 +145,7 @@
|
||||||
<Button>
|
<Button>
|
||||||
<Filename> "ROOT/taobin_project/image/new_vending_info/maintenance_repair.png" </Filename>
|
<Filename> "ROOT/taobin_project/image/new_vending_info/maintenance_repair.png" </Filename>
|
||||||
<EventOnClick>
|
<EventOnClick>
|
||||||
MainMenu
|
MainMenu2
|
||||||
|
|
||||||
</EventOnClick>
|
</EventOnClick>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
@ -160,7 +160,7 @@
|
||||||
<Button>
|
<Button>
|
||||||
<Filename> "ROOT/taobin_project/image/new_vending_info/configure_machine.png" </Filename>
|
<Filename> "ROOT/taobin_project/image/new_vending_info/configure_machine.png" </Filename>
|
||||||
<EventOnClick>
|
<EventOnClick>
|
||||||
MainMenu
|
MainMenu2
|
||||||
|
|
||||||
</EventOnClick>
|
</EventOnClick>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue