251 lines
No EOL
6.1 KiB
HTML
251 lines
No EOL
6.1 KiB
HTML
|
|
;setvarint DebugRemoveCup 1
|
|
;Var DebugRemoveCup = 1
|
|
If DebugRemoveCup = 1 Then
|
|
DEBUGVAR TimeoutForProtectButtonHideLongTime
|
|
DEBUGVAR TimeoutForDoorCupOpenLongTime
|
|
|
|
|
|
DEBUGVAR CupOnArm
|
|
DEBUGVAR DoorCupPosition
|
|
DEBUGVAR CupChecking
|
|
DEBUGVAR CupArmMove
|
|
DEBUGVAR buttonRemoveCupOnArm
|
|
DEBUGVAR Seeker
|
|
DEBUGVAR CountDownCupOnArmCertainStage
|
|
|
|
DEBUGVAR CountDownCupOnArmSuccessDelay
|
|
DEBUGVAR CH9991_Status
|
|
DEBUGVAR CH9992_Status
|
|
DEBUGVAR CH9993_Status
|
|
DEBUGVAR CH9994_Status
|
|
|
|
; setvar CH9992_Status SUCCESS
|
|
EndIf
|
|
|
|
If TimeoutForDoorCupOpenLongTime = "" Then
|
|
Var TimeoutForDoorCupOpenLongTime = 1
|
|
EndIf
|
|
|
|
|
|
If TimeoutInstance0 = "" Then
|
|
Var TimeoutInstance0 = 0
|
|
Var CountDownCupOnArmCertainStage = 0
|
|
Var CountDownCupOnArmSuccessDelay = 8
|
|
Var CountDownDrinkOK = 8
|
|
EndIf
|
|
|
|
If TimeoutInstance0 = 3 Then
|
|
SAVELOG "remove cup on arm 1.4"
|
|
EndIf
|
|
|
|
Var CupOnAnyArm = 0
|
|
|
|
If CH9991_Status = "SUCCESS" Then
|
|
Var CupOnAnyArm = 1
|
|
EndIf
|
|
If CH9992_Status = "SUCCESS" Then
|
|
Var CupOnAnyArm = 1
|
|
EndIf
|
|
If CH9993_Status = "SUCCESS" Then
|
|
Var CupOnAnyArm = 1
|
|
EndIf
|
|
If CH9994_Status = "SUCCESS" Then
|
|
Var CupOnAnyArm = 1
|
|
EndIf
|
|
|
|
; from drink_ok.xml break show button.
|
|
If CountDownDrinkOK > 0 Then
|
|
If DoorCupPosition = "bottom" Then
|
|
Var CountDownDrinkOK = CountDownDrinkOK - 1
|
|
DEBUGVAR CountDownDrinkOK
|
|
Var CountDownCupOnArmSuccessDelay = 10
|
|
EndIf
|
|
Var CupOnAnyArm = 0
|
|
Else
|
|
|
|
EndIf
|
|
|
|
|
|
If CupOnAnyArm = 1 Then
|
|
If CountDownCupOnArmSuccessDelay = 0 Then
|
|
|
|
Else
|
|
Var CountDownCupOnArmSuccessDelay = CountDownCupOnArmSuccessDelay - 1
|
|
Var CupOnAnyArm = 0
|
|
DEBUGVAR CountDownCupOnArmSuccessDelay
|
|
EndIf
|
|
EndIf
|
|
|
|
If CupOnAnyArm = 0 Then
|
|
If Seeker = "curr" Then
|
|
If CupOnArm = "true" Then
|
|
Var CupOnAnyArm = 1
|
|
EndIf
|
|
EndIf
|
|
EndIf
|
|
|
|
If CurrentXMLFileName0 = "/mnt/sdcard/coffeevending/taobin_project/xml/page_remove_cup.xml" Then
|
|
Var CupOnAnyArm = 0
|
|
EndIf
|
|
|
|
DEBUGVAR CupOnAnyArm
|
|
|
|
If CupOnAnyArm = 1 Then
|
|
Var CountDownCupOnArmCertainStage = 3
|
|
|
|
If buttonRemoveCupOnArm = "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 cup on arm hide"
|
|
Var buttonRemoveCupOnArm = "Enable"
|
|
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
|
|
|
|
|
|
; check cup now after door closed
|
|
If PreviseDoorCupPosition = DoorCupPosition Then
|
|
|
|
Else
|
|
DEBUGVAR PreviseDoorCupPosition
|
|
DEBUGVAR DoorCupPosition
|
|
|
|
If DoorCupPosition = "bottom" Then
|
|
Machine CheckCupLastIDProcess
|
|
EndIf
|
|
|
|
Var PreviseDoorCupPosition = DoorCupPosition
|
|
EndIf
|
|
|
|
|
|
|
|
; sound play
|
|
If show_eng = "true" Then
|
|
|
|
Else
|
|
If TimeoutInstance0 = 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 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
|
|
|
|
Var CoundUpDelayCertainStage = CoundUpDelayCertainStage + 1
|
|
DEBUGVAR CoundUpDelayCertainStage
|
|
If CoundUpDelayCertainStage > 10 Then
|
|
|
|
Var buttonRemoveCupOnArm = "Invisible"
|
|
|
|
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 CheckCupStateDoorCupClose = "" Then
|
|
Var buttonRemoveCupOnArm = "Enable"
|
|
EndIf
|
|
|
|
If CheckCupStateDoorCupClose = "done" Then
|
|
Var buttonRemoveCupOnArm = "Enable"
|
|
EndIf
|
|
EndIf
|
|
|
|
EndIf
|
|
|
|
DEBUGVAR buttonRemoveCupOnArm
|
|
|
|
Else
|
|
|
|
If CountDownCupOnArmCertainStage > 0 Then
|
|
Var CountDownCupOnArmCertainStage = CountDownCupOnArmCertainStage - 1
|
|
EndIf
|
|
|
|
|
|
; Next hide away
|
|
If CountDownCupOnArmCertainStage = 0 Then
|
|
Var buttonRemoveCupOnArm = "Invisible"
|
|
EndIf
|
|
|
|
EndIf
|
|
|
|
; cfe cup-on-arm-reset
|
|
; cfe cup-on-arm-flag
|
|
; setvarint DebugRemoveCup 1 |