Hot fix remove cup not showing button

This commit is contained in:
Kenta420 2025-01-16 15:45:19 +07:00
parent 8206f95131
commit 0acd376e6c
2 changed files with 69 additions and 199 deletions

View file

@ -40,8 +40,6 @@
<Timeout> 1000 </Timeout>
<EventTimeout>
Var Timeout = Timeout + 1
DEBUGVAR Timeout
@ -49,99 +47,44 @@
DEBUGVAR NextOrder
DEBUGVAR HaveCup
If Door_Open_flagBlink = 0 Then
Var Door_Open_flagBlink = 1
Var Door_Open_State="Enable"
Else
Var Door_Open_flagBlink = 0
Var Door_Open_State="Invisible"
EndIf
If HaveCup = "true" Then
DEBUGVAR CheckCupStateDoorCupClose
If CheckCupStateDoorCupClose = "" Then
Var buttonRemoveCup = "Enable"
EndIf
If CheckCupStateDoorCupClose = "done" Then
Var buttonRemoveCup = "Enable"
EndIf
If CheckCupStateDoorCupClose = "reset" Then
If CheckCupStateDoorCupCloseCnt = 0 Then
Var CheckCupStateDoorCupClose = ""
Else
Var CheckCupStateDoorCupCloseCnt = CheckCupStateDoorCupCloseCnt - 1
EndIf
EndIf
Else
If buttonRemoveCup = "Enable" Then
Var buttonRemoveCup = "Invisible"
EndIf
EndIf
If buttonRemoveCup = "Invisible" Then
Var Door_Open_State = "Invisible"
EndIf
DEBUGVAR buttonRemoveCup
DEBUGVAR NextOrder
DEBUGVAR Door_Open_State
If MachineStage = "remove-cup" Then
Else
If NextOrder = "true" Then
Var NextOrder = "false"
If NextOrder = "true" Then
Var NextOrder = "false"
TransferVar "next" "curr"
Var Seeker = "curr"
TransferVar "next" "curr"
Var Seeker = "curr"
SAVELOG "Remove cup drink fail "
SAVELOG "Have Cup 2"
Open "ROOT/taobin_project/xml/page_thankyouConti.xml"
Else
Open "ROOT/taobin_project/xml/page_back_to_main.xml"
EndIf
EndIf
; must remove cup.
If HaveCup = "true" Then
Else
If NextOrder = "true" Then
Var NextOrder = "false"
TransferVar "next" "curr"
Var Seeker = "curr"
SAVELOG "Have Cup"
Open "ROOT/taobin_project/xml/page_thankyouConti.xml"
Else
Open "ROOT/taobin_project/xml/page_back_to_main.xml"
EndIf
EndIf
Open "ROOT/taobin_project/xml/page_thankyouConti.xml"
Else
Open "ROOT/taobin_project/xml/page_back_to_main.xml"
EndIf
If Timeout > 240 Then
If NextOrder = "true" Then
SAVELOG "TIME OUT 240"
Var NextOrder = "false"
TransferVar "next" "curr"
Var Seeker = "curr"
If Timeout > 120 Then
If NextOrder = "true" Then
SAVELOG "TIME OUT 240"
Var NextOrder = "false"
Open "ROOT/taobin_project/xml/page_thankyouConti.xml"
Else
Open "ROOT/taobin_project/xml/page_back_to_main.xml"
EndIf
EndIf
TransferVar "next" "curr"
Var Seeker = "curr"
Open "ROOT/taobin_project/xml/page_thankyouConti.xml"
Else
Open "ROOT/taobin_project/xml/page_back_to_main.xml"
EndIf
EndIf
Refresh
TimerReset
TimerReset
</EventTimeout>