188 lines
No EOL
4.7 KiB
HTML
188 lines
No EOL
4.7 KiB
HTML
|
|
If DebugRemoveCup = 1 Then
|
|
DEBUGVAR TimeoutForProtectButtonHideLongTime
|
|
DEBUGVAR TimeoutForDoorCupOpenLongTime
|
|
|
|
|
|
DEBUGVAR CupOnArm
|
|
DEBUGVAR DoorCupPosition
|
|
DEBUGVAR CupChecking
|
|
DEBUGVAR CupArmMove
|
|
DEBUGVAR buttonRemoveCupOnArm
|
|
EndIf
|
|
If TimeoutForDoorCupOpenLongTime = "" Then
|
|
Var TimeoutForDoorCupOpenLongTime = 1
|
|
EndIf
|
|
|
|
|
|
If TimeoutInstance0 = 3 Then
|
|
SAVELOG "remove cup on arm 1.0"
|
|
EndIf
|
|
|
|
;SAVELOG "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
|
|
|
|
If Seeker = "curr" Then
|
|
|
|
If buttonRemoveCupOnArm = "Enable" Then
|
|
|
|
Else
|
|
If CupOnArm = "true" Then
|
|
Var TimeoutForProtectButtonHideLongTime = TimeoutForProtectButtonHideLongTime + 1
|
|
|
|
If TimeoutForProtectButtonHideLongTime > 60 Then
|
|
Var TimeoutForProtectButtonHideLongTime = 0
|
|
If DoorCupPosition = "bottom" Then
|
|
SAVELOG "Check Cup all from Long time button cup on arm hide"
|
|
Var buttonRemoveCupOnArm = "Enable"
|
|
EndIf
|
|
EndIf
|
|
EndIf
|
|
EndIf
|
|
|
|
|
|
If DoorCupPosition = "bottom" Then
|
|
Var TimeoutForDoorCupOpenLongTime = 0
|
|
Else
|
|
Var TimeoutForDoorCupOpenLongTime = TimeoutForDoorCupOpenLongTime + 1
|
|
EndIf
|
|
|
|
If TimeoutForDoorCupOpenLongTime > 40 Then
|
|
Var TimeoutForDoorCupOpenLongTime = 0
|
|
|
|
If DoorCupPosition = "bottom" Then
|
|
Var TimeoutForDoorCupOpenLongTime = 0
|
|
Else
|
|
Machine DoorClose
|
|
Var DoorCloseFromTimeout = "set"
|
|
EndIf
|
|
EndIf
|
|
|
|
|
|
|
|
If PreviseDoorCupPosition = DoorCupPosition Then
|
|
|
|
Else
|
|
DEBUGVAR PreviseDoorCupPosition
|
|
DEBUGVAR DoorCupPosition
|
|
|
|
If DoorCupPosition = "bottom" Then
|
|
Machine CheckCupLastIDProcess
|
|
EndIf
|
|
|
|
Var PreviseDoorCupPosition = DoorCupPosition
|
|
EndIf
|
|
|
|
If show_eng = "true" Then
|
|
|
|
Else
|
|
If TimeoutCupOnArm = 14 Then
|
|
If buttonRemoveCupOnArm = "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 TimeoutCupOnArm = TimeoutCupOnArm + 1
|
|
|
|
|
|
|
|
Var TimeoutInstance0 = TimeoutInstance0 + 1
|
|
|
|
|
|
; 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 CoundUpDelayCertainStage = "" Then
|
|
Var CoundUpDelayCertainStage = 0
|
|
EndIf
|
|
|
|
If DoorCupPosition = "bottom" Then
|
|
If CupOnArm = "true" Then
|
|
|
|
Else
|
|
|
|
Var CoundUpDelayCertainStage = CoundUpDelayCertainStage + 1
|
|
DEBUGVAR CoundUpDelayCertainStage
|
|
If CoundUpDelayCertainStage > 10 Then
|
|
|
|
Var buttonRemoveCupOnArm = "Invisible"
|
|
EndIf
|
|
EndIf
|
|
Else
|
|
Var CoundUpDelayCertainStage = 0
|
|
|
|
EndIf
|
|
|
|
|
|
; zone cup on arm
|
|
If buttonRemoveCupOnArm = "Enable" Then
|
|
If DoorCupPosition = "top" Then
|
|
Var buttonRemoveCupOnArm = "Invisible"
|
|
EndIf
|
|
Else
|
|
If DoorCupPosition = "top" Then
|
|
Var buttonRemoveCupOnArm = "Invisible"
|
|
Else
|
|
If CupOnArm = "true" Then
|
|
If CheckCupStateDoorCupClose = "" Then
|
|
Var buttonRemoveCupOnArm = "Enable"
|
|
EndIf
|
|
|
|
If CheckCupStateDoorCupClose = "done" Then
|
|
Var buttonRemoveCupOnArm = "Enable"
|
|
EndIf
|
|
Else
|
|
|
|
EndIf
|
|
EndIf
|
|
|
|
EndIf
|
|
|
|
|
|
|
|
Else
|
|
DEBUGVAR CH9991_Status
|
|
DEBUGVAR CH9992_Status
|
|
DEBUGVAR CH9993_Status
|
|
DEBUGVAR CH9994_Status
|
|
|
|
|
|
|
|
|
|
|
|
; Next hide away
|
|
Var buttonRemoveCupOnArm = "Invisible"
|
|
|
|
EndIf
|
|
|
|
; cfe cup-on-arm-reset
|
|
; cfe cup-on-arm-flag
|
|
; setvarint DebugRemoveCup 1 |