fix page removecup.xml

This commit is contained in:
wanlop run 2024-05-31 16:14:45 +07:00
parent 6dda40133d
commit a19d0c57a3
35 changed files with 37572 additions and 3132 deletions

View file

@ -13,6 +13,9 @@
READ_FILE "/mnt/sdcard/coffeevending/country/short" StrCountryShort
DEBUGVAR StrCountryShort
; Don't forget
; This file can open before page_board.xml
If StrCountryShort = "MYS" Then
Open "ROOT/taobin_project/inter/mys/xml/page_remove_cup.lxml"
EndIf
@ -21,6 +24,11 @@
Open "ROOT/taobin_project/inter/aus/xml/page_remove_cup.lxml"
EndIf
If StrCountryShort = "SGP" Then
Open "ROOT/taobin_project/inter/sgp/xml/page_remove_cup.lxml"
EndIf
If show_eng = "true" Then
@ -36,14 +44,24 @@
LED LedDoorDoor 5 255 255 255 255
Var TimeoutInstance0 = 0
Var CheckCupStateDoorCupClose = "-"
Var CheckCupStateDoorCupCloseCnt = 0
</EventOpen>
<Timeout> 2000 </Timeout>
<Timeout> 1000 </Timeout>
<EventTimeout>
;SAVELOG MachineErrorDetail
Var MachineErrorDetailAll = MachineErrorDetail + " / "
Var MachineErrorDetailAll = MachineErrorDetailAll + MachineErrorDetailEng
DEBUGVAR HaveCup
DEBUGVAR CupOnArm
DEBUGVAR DoorCupPosition
DEBUGVAR CupChecking
DEBUGVAR CupArmMove
DEBUGVAR buttonRemoveCup
; Add haveCup false for block display abnormal. Alternate between page_board.xml and this file.
If HaveCup = "false" Then
If MachineStage = "show-menu" Then
@ -73,8 +91,14 @@
If Timeout > 15 Then
Var Timeout = 0
EndIf
Var TimeoutInstance0 = TimeoutInstance0 + 1
If TimeoutInstance0 > 600 Then
Var TimeoutInstance0 = 0
SAVELOG "Check Cup all"
Machine CheckCupAll
EndIf
; Logic have differrent drinkfail3.xml
@ -83,33 +107,71 @@
If CheckCupStateDoorCupCloseCnt > 0 Then
Var CheckCupStateDoorCupCloseCnt = CheckCupStateDoorCupCloseCnt - 1
EndIf
DEBUGVAR CheckCupStateDoorCupCloseCnt
If CheckCupStateDoorCupCloseCnt = 0 Then
Var CheckCupStateDoorCupClose = ""
If CheckCupStateDoorCupCloseCnt = 0 Then
Var CheckCupStateDoorCupClose = ""
EndIf
EndIf
If HaveCup = "true" Then
If CheckCupStateDoorCupClose = "" Then
Var buttonRemoveCup = "Enable"
EndIf
If CheckCupStateDoorCupClose = "done" Then
Var buttonRemoveCup = "Enable"
EndIf
Else
If buttonRemoveCup = "Enable" Then
Var buttonRemoveCup = "Invisible"
EndIf
EndIf
If DoorCupPosition = "bottom" Then
Else
Var buttonRemoveCup = "Invisible"
EndIf
If CupArmMove = "true" Then
Var buttonRemoveCup = "Invisible"
If show_eng = "true" Then
Var MachineErrorDetailAll = "Please wait."
Else
Var MachineErrorDetailAll = "กรุณารอสักครู่"
EndIf
Else
If CupArmMove = "false" Then
If HaveCup = "true" Then
If DoorCupPosition = "bottom" Then
If buttonRemoveCup = "Invisible" Then
Var buttonRemoveCup = "Enable"
EndIf
EndIf
EndIf
EndIf
EndIf
Refresh
TimerReset
</EventTimeout>
<EventDrink>
SAVELOG "EventDrink"
DEBUGVAR HaveCup
DEBUGVAR CupOnArm
DEBUGVAR DoorCupPosition
DEBUGVAR CupChecking
DEBUGVAR CupArmMove
If HaveCup = "true" Then
Var buttonRemoveCup = "Enable"
Else
Var buttonRemoveCup = "Invisible"
EndIf
</EventDrink>
<Image>
<X> 0 </X>
<Y> 852 </Y>
@ -130,8 +192,13 @@
Machine RemoveCup
Machine DoorLidOpen
Var buttonRemoveCup = "Invisible"
; protect value update too slow.
Var DoorCupPosition = "-"
Var CheckCupStateDoorCupClose = "reset"
Var CheckCupStateDoorCupCloseCnt = 30
Refresh
</EventClick>
</Button>