taobin_project/inc/remove_cup_step.inc

142 lines
3.3 KiB
PHP
Raw Normal View History

2024-09-23 18:44:54 +07:00
2024-09-24 23:47:36 +07:00
DEBUGVAR TimeoutForProtectButtonHideLongTime
2024-10-04 16:06:58 +07:00
DEBUGVAR TiemoutForDoorCupOpenLongTime
2024-09-23 18:44:54 +07:00
2024-10-08 15:12:28 +07:00
If buttonRemoveCup = "Enable" Then
2024-09-23 18:44:54 +07:00
2024-10-08 15:12:28 +07:00
Else
Var TimeoutForProtectButtonHideLongTime = TimeoutForProtectButtonHideLongTime + 1
If TimeoutForProtectButtonHideLongTime > 120 Then
Var TimeoutForProtectButtonHideLongTime = 0
2024-09-23 18:44:54 +07:00
If DoorCupPosition = "bottom" Then
SAVELOG "Check Cup all from Long time button hide"
2024-10-08 15:12:28 +07:00
Var buttonRemoveCup = "Enable"
2024-09-23 18:44:54 +07:00
EndIf
EndIf
EndIf
2024-10-04 16:06:58 +07:00
Var TiemoutForDoorCupOpenLongTime = TiemoutForDoorCupOpenLongTime + 1
If TiemoutForDoorCupOpenLongTime > 120 Then
Var TiemoutForDoorCupOpenLongTime = 0
If DoorCupPosition = "bottom" Then
Var TiemoutForDoorCupOpenLongTime = 0
Else
Machine DoorClose
EndIf
EndIf
2024-09-23 18:44:54 +07:00
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
2024-09-23 18:44:54 +07:00
EndIf
EndIf
2024-10-04 16:06:58 +07:00
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
2024-09-23 18:44:54 +07:00
EndIf
EndIf
EndIf
Var Timeout = Timeout + 1
2024-10-02 20:09:36 +07:00
2024-09-23 18:44:54 +07:00
Var Timeout = 0
DEBUGVAR HaveCup
DEBUGVAR CupOnArm
DEBUGVAR DoorCupPosition
DEBUGVAR CupChecking
DEBUGVAR CupArmMove
DEBUGVAR buttonRemoveCup
2024-10-02 20:09:36 +07:00
2024-09-23 18:44:54 +07:00
Var TimeoutInstance0 = TimeoutInstance0 + 1
2024-10-04 16:06:58 +07:00
If TimeoutInstance0 > 360 Then
2024-09-23 18:44:54 +07:00
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
2024-10-04 16:06:58 +07:00
2024-09-23 18:44:54 +07:00
If HaveCup = "true" Then
If CheckCupStateDoorCupClose = "" Then
Var buttonRemoveCup = "Enable"
EndIf
Else
If buttonRemoveCup = "Enable" Then
Var buttonRemoveCup = "Invisible"
EndIf
EndIf
If DoorCupPosition = "bottom" Then
Else
Var buttonRemoveCup = "Invisible"
Var CoundUpDelayCertainStage = 0
EndIf
If CupArmMove = "true" Then
Var buttonRemoveCup = "Invisible"
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
EndIf
EndIf
EndIf
EndIf
2024-07-11 11:15:40 +07:00