166 lines
4 KiB
HTML
166 lines
4 KiB
HTML
|
|
|
|
DEBUGVAR TimeoutForProtectButtonHideLongTime
|
|
DEBUGVAR TiemoutForDoorCupOpenLongTime
|
|
|
|
|
|
If TimeoutInstance0 = 3 Then
|
|
SAVELOG "remove cup step version 1.1"
|
|
EndIf
|
|
|
|
|
|
If buttonRemoveCup = "Enable" Then
|
|
|
|
Else
|
|
|
|
Var TimeoutForProtectButtonHideLongTime = TimeoutForProtectButtonHideLongTime + 1
|
|
|
|
If TimeoutForProtectButtonHideLongTime > 60 Then
|
|
Var TimeoutForProtectButtonHideLongTime = 0
|
|
If DoorCupPosition = "bottom" Then
|
|
SAVELOG "Check Cup all from Long time button hide"
|
|
Var buttonRemoveCup = "Enable"
|
|
EndIf
|
|
EndIf
|
|
EndIf
|
|
|
|
|
|
Var TiemoutForDoorCupOpenLongTime = TiemoutForDoorCupOpenLongTime + 1
|
|
If TiemoutForDoorCupOpenLongTime > 60 Then
|
|
Var TiemoutForDoorCupOpenLongTime = 0
|
|
|
|
If DoorCupPosition = "bottom" Then
|
|
Var TiemoutForDoorCupOpenLongTime = 0
|
|
Else
|
|
Machine DoorClose
|
|
Var DoorCloseFromTimeout = "set"
|
|
EndIf
|
|
EndIf
|
|
|
|
|
|
|
|
If PreviseDoorCupPosition = DoorCupPosition Then
|
|
|
|
Else
|
|
DEBUGVAR PreviseDoorCupPosition
|
|
DEBUGVAR DoorCupPosition
|
|
|
|
If DoorCupPosition = "bottom" Then
|
|
Machine CheckCupCurrentProcess
|
|
EndIf
|
|
|
|
Var PreviseDoorCupPosition = DoorCupPosition
|
|
EndIf
|
|
|
|
If show_eng = "true" Then
|
|
|
|
Else
|
|
If Timeout = 14 Then
|
|
If buttonRemoveCup = "Enable" Then
|
|
If CupChecking = "false" Then
|
|
If DoorCupPosition = "bottom" Then
|
|
If InternationalEnable = 1 Then
|
|
|
|
Else
|
|
Play "/mnt/sdcard/coffeevending/taobin_project/sound_thai/remove_cup.mp3"
|
|
EndIf
|
|
EndIf
|
|
EndIf
|
|
If CupArmMove = "false" Then
|
|
If DoorCupPosition = "bottom" Then
|
|
If InternationalEnable = 1 Then
|
|
|
|
Else
|
|
Play "/mnt/sdcard/coffeevending/taobin_project/sound_thai/remove_cup.mp3"
|
|
EndIf
|
|
EndIf
|
|
EndIf
|
|
EndIf
|
|
EndIf
|
|
EndIf
|
|
|
|
Var Timeout = Timeout + 1
|
|
|
|
|
|
DEBUGVAR HaveCup
|
|
DEBUGVAR CupOnArm
|
|
DEBUGVAR DoorCupPosition
|
|
DEBUGVAR CupChecking
|
|
DEBUGVAR CupArmMove
|
|
DEBUGVAR buttonRemoveCup
|
|
|
|
|
|
Var TimeoutInstance0 = TimeoutInstance0 + 1
|
|
|
|
|
|
If TimeoutInstance0 > 360 Then
|
|
Var TimeoutInstance0 = 0
|
|
SAVELOG "Check Cup all"
|
|
Machine CheckCupAll
|
|
EndIf
|
|
|
|
; Logic have differrent drinkfail3.xml
|
|
; protect lock
|
|
;
|
|
|
|
If CheckCupStateDoorCupCloseCnt > 0 Then
|
|
Var CheckCupStateDoorCupCloseCnt = CheckCupStateDoorCupCloseCnt - 1
|
|
DEBUGVAR CheckCupStateDoorCupCloseCnt
|
|
|
|
If CheckCupStateDoorCupCloseCnt = 0 Then
|
|
Var CheckCupStateDoorCupClose = ""
|
|
EndIf
|
|
|
|
EndIf
|
|
|
|
|
|
|
|
|
|
|
|
If HaveCup = "true" Then
|
|
|
|
If CheckCupStateDoorCupClose = "" Then
|
|
Var buttonRemoveCup = "Enable"
|
|
EndIf
|
|
|
|
Else
|
|
If buttonRemoveCup = "Enable" Then
|
|
Var buttonRemoveCup = "Disable"
|
|
EndIf
|
|
EndIf
|
|
|
|
If DoorCupPosition = "bottom" Then
|
|
|
|
Else
|
|
Var buttonRemoveCup = "Disable2"
|
|
Var CoundUpDelayCertainStage = 0
|
|
EndIf
|
|
|
|
If CupArmMove = "true" Then
|
|
Var buttonRemoveCup = "Disable"
|
|
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 CoundUpDelayCertainStage = CoundUpDelayCertainStage + 1
|
|
If CoundUpDelayCertainStage > 8 Then
|
|
Var buttonRemoveCup = "Enable"
|
|
EndIf
|
|
EndIf
|
|
If buttonRemoveCup = "Disable" Then
|
|
Var CoundUpDelayCertainStage = CoundUpDelayCertainStage + 1
|
|
If CoundUpDelayCertainStage > 8 Then
|
|
Var buttonRemoveCup = "Enable"
|
|
EndIf
|
|
EndIf
|
|
EndIf
|
|
EndIf
|
|
EndIf
|
|
EndIf
|
|
|