renovate remove cup and cup on arm
This commit is contained in:
parent
34ceea967c
commit
f6a7ec1501
57 changed files with 591 additions and 475 deletions
169
inc/remove_cup_on_arm_step.inc
Normal file
169
inc/remove_cup_on_arm_step.inc
Normal file
|
|
@ -0,0 +1,169 @@
|
|||
; setvarint DebugRemoveCup 1
|
||||
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 Timeout = 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 Timeout = Timeout + 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 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
|
||||
|
||||
Else
|
||||
If CupOnArm = "true" Then
|
||||
|
||||
If CheckCupStateDoorCupClose = "" Then
|
||||
Var buttonRemoveCupOnArm = "Enable"
|
||||
EndIf
|
||||
|
||||
If CheckCupStateDoorCupClose = "done" Then
|
||||
Var buttonRemoveCupOnArm = "Enable"
|
||||
EndIf
|
||||
Else
|
||||
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
|
||||
|
||||
Else
|
||||
DEBUGVAR
|
||||
; Next hide away
|
||||
Var buttonRemoveCupOnArm = "Invisible"
|
||||
|
||||
EndIf
|
||||
|
||||
;cfe cup-on-arm-reset
|
||||
;
|
||||
Loading…
Add table
Add a link
Reference in a new issue