doing cup on arm
This commit is contained in:
parent
12d31e3cde
commit
0e5e9a0639
38 changed files with 9975 additions and 3110 deletions
|
|
@ -1,4 +1,5 @@
|
|||
|
||||
;Var DebugRemoveCup = 1
|
||||
If DebugRemoveCup = 1 Then
|
||||
DEBUGVAR TimeoutForProtectButtonHideLongTime
|
||||
DEBUGVAR TimeoutForDoorCupOpenLongTime
|
||||
|
|
@ -9,32 +10,70 @@ If DebugRemoveCup = 1 Then
|
|||
DEBUGVAR CupChecking
|
||||
DEBUGVAR CupArmMove
|
||||
DEBUGVAR buttonRemoveCupOnArm
|
||||
DEBUGVAR Seeker
|
||||
DEBUGVAR CountDownCupOnArmCertainStage
|
||||
EndIf
|
||||
|
||||
If TimeoutForDoorCupOpenLongTime = "" Then
|
||||
Var TimeoutForDoorCupOpenLongTime = 1
|
||||
EndIf
|
||||
|
||||
|
||||
If TimeoutInstance0 = 3 Then
|
||||
SAVELOG "remove cup on arm 1.0"
|
||||
If TimeoutInstance0 = "" Then
|
||||
Var TimeoutInstance0 = 0
|
||||
Var CountDownCupOnArmCertainStage = 0
|
||||
EndIf
|
||||
|
||||
;SAVELOG "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
|
||||
If TimeoutInstance0 = 3 Then
|
||||
SAVELOG "remove cup on arm 1.1"
|
||||
EndIf
|
||||
|
||||
If Seeker = "curr" Then
|
||||
Var CupOnAnyArm = 0
|
||||
|
||||
DEBUGVAR CH9991_Status
|
||||
DEBUGVAR CH9992_Status
|
||||
DEBUGVAR CH9993_Status
|
||||
DEBUGVAR CH9994_Status
|
||||
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
|
||||
|
||||
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
|
||||
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
|
||||
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
|
||||
|
|
@ -58,7 +97,7 @@ If Seeker = "curr" Then
|
|||
EndIf
|
||||
|
||||
|
||||
|
||||
; check cup now after door closed
|
||||
If PreviseDoorCupPosition = DoorCupPosition Then
|
||||
|
||||
Else
|
||||
|
|
@ -72,10 +111,13 @@ If Seeker = "curr" Then
|
|||
Var PreviseDoorCupPosition = DoorCupPosition
|
||||
EndIf
|
||||
|
||||
|
||||
|
||||
; sound play
|
||||
If show_eng = "true" Then
|
||||
|
||||
Else
|
||||
If TimeoutCupOnArm = 14 Then
|
||||
If TimeoutInstance0 = 14 Then
|
||||
If buttonRemoveCupOnArm = "Enable" Then
|
||||
If CupChecking = "false" Then
|
||||
If DoorCupPosition = "bottom" Then
|
||||
|
|
@ -99,9 +141,6 @@ If Seeker = "curr" Then
|
|||
EndIf
|
||||
EndIf
|
||||
|
||||
Var TimeoutCupOnArm = TimeoutCupOnArm + 1
|
||||
|
||||
|
||||
|
||||
Var TimeoutInstance0 = TimeoutInstance0 + 1
|
||||
|
||||
|
|
@ -124,18 +163,17 @@ If Seeker = "curr" Then
|
|||
Var CoundUpDelayCertainStage = 0
|
||||
EndIf
|
||||
|
||||
|
||||
If DoorCupPosition = "bottom" Then
|
||||
If CupOnArm = "true" Then
|
||||
|
||||
Var CoundUpDelayCertainStage = CoundUpDelayCertainStage + 1
|
||||
DEBUGVAR CoundUpDelayCertainStage
|
||||
If CoundUpDelayCertainStage > 10 Then
|
||||
|
||||
Else
|
||||
|
||||
Var CoundUpDelayCertainStage = CoundUpDelayCertainStage + 1
|
||||
DEBUGVAR CoundUpDelayCertainStage
|
||||
If CoundUpDelayCertainStage > 10 Then
|
||||
|
||||
Var buttonRemoveCupOnArm = "Invisible"
|
||||
EndIf
|
||||
Var buttonRemoveCupOnArm = "Invisible"
|
||||
|
||||
EndIf
|
||||
|
||||
Else
|
||||
Var CoundUpDelayCertainStage = 0
|
||||
|
||||
|
|
@ -151,35 +189,30 @@ If Seeker = "curr" Then
|
|||
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
|
||||
If CheckCupStateDoorCupClose = "" Then
|
||||
Var buttonRemoveCupOnArm = "Enable"
|
||||
EndIf
|
||||
|
||||
If CheckCupStateDoorCupClose = "done" Then
|
||||
Var buttonRemoveCupOnArm = "Enable"
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
EndIf
|
||||
|
||||
|
||||
DEBUGVAR buttonRemoveCupOnArm
|
||||
|
||||
Else
|
||||
DEBUGVAR CH9991_Status
|
||||
DEBUGVAR CH9992_Status
|
||||
DEBUGVAR CH9993_Status
|
||||
DEBUGVAR CH9994_Status
|
||||
|
||||
|
||||
|
||||
If CountDownCupOnArmCertainStage > 0 Then
|
||||
Var CountDownCupOnArmCertainStage = CountDownCupOnArmCertainStage - 1
|
||||
EndIf
|
||||
|
||||
|
||||
; Next hide away
|
||||
Var buttonRemoveCupOnArm = "Invisible"
|
||||
If CountDownCupOnArmCertainStage = 0 Then
|
||||
Var buttonRemoveCupOnArm = "Invisible"
|
||||
EndIf
|
||||
|
||||
EndIf
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,9 @@
|
|||
DEBUGVAR TimeoutForProtectButtonHideLongTime
|
||||
DEBUGVAR TiemoutForDoorCupOpenLongTime
|
||||
|
||||
If TimeoutInstance0 = "" Then
|
||||
Var TimeoutInstance0 = 0
|
||||
EndIf
|
||||
|
||||
If TimeoutInstance0 = 3 Then
|
||||
SAVELOG "remove cup step version 1.1"
|
||||
|
|
|
|||
|
|
@ -19,11 +19,13 @@
|
|||
DEBUGVAR CupChecking
|
||||
DEBUGVAR CupArmMove
|
||||
If CupOnArm = "false" Then
|
||||
SAVELOG " button remove cup on arm hide "
|
||||
SAVELOG " ============================= >button remove cup on arm hide "
|
||||
Var buttonRemoveCupOnArm = "Invisible"
|
||||
Else
|
||||
Var buttonRemoveCupOnArm = "Enable"
|
||||
EndIf
|
||||
|
||||
EindIf
|
||||
Refresh
|
||||
|
||||
</EventDrink>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue