taobin_project/inc/remove_cup_step.inc

169 lines
4 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
2025-06-06 17:30:21 +07:00
If TimeoutInstance0 = "" Then
Var TimeoutInstance0 = 0
EndIf
2024-09-23 18:44:54 +07:00
2025-01-16 17:13:58 +07:00
If TimeoutInstance0 = 3 Then
SAVELOG "remove cup step version 1.1"
EndIf
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
2025-01-15 10:35:56 +07:00
If TimeoutForProtectButtonHideLongTime > 60 Then
2024-10-08 15:12:28 +07:00
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
2025-01-15 10:35:56 +07:00
If TiemoutForDoorCupOpenLongTime > 60 Then
2024-10-04 16:06:58 +07:00
Var TiemoutForDoorCupOpenLongTime = 0
If DoorCupPosition = "bottom" Then
Var TiemoutForDoorCupOpenLongTime = 0
Else
Machine DoorClose
2025-01-16 17:13:58 +07:00
Var DoorCloseFromTimeout = "set"
2024-10-04 16:06:58 +07:00
EndIf
EndIf
2025-01-16 17:13:58 +07:00
If PreviseDoorCupPosition = DoorCupPosition Then
Else
DEBUGVAR PreviseDoorCupPosition
DEBUGVAR DoorCupPosition
If DoorCupPosition = "bottom" Then
Machine CheckCupCurrentProcess
EndIf
Var PreviseDoorCupPosition = DoorCupPosition
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
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
2025-01-16 17:13:58 +07:00
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
2025-03-07 17:30:30 +07:00
Var buttonRemoveCup = "Disable"
2024-09-23 18:44:54 +07:00
EndIf
EndIf
If DoorCupPosition = "bottom" Then
Else
2025-03-07 17:30:30 +07:00
Var buttonRemoveCup = "Disable2"
2024-09-23 18:44:54 +07:00
Var CoundUpDelayCertainStage = 0
EndIf
If CupArmMove = "true" Then
2025-03-07 17:30:30 +07:00
Var buttonRemoveCup = "Disable"
2024-09-23 18:44:54 +07:00
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
2025-03-07 17:30:30 +07:00
If buttonRemoveCup = "Disable" Then
Var CoundUpDelayCertainStage = CoundUpDelayCertainStage + 1
If CoundUpDelayCertainStage > 8 Then
Var buttonRemoveCup = "Enable"
EndIf
EndIf
2024-09-23 18:44:54 +07:00
EndIf
EndIf
EndIf
EndIf
2024-07-11 11:15:40 +07:00