Merge branch 'masterpiece' of ssh://kong:/1TBHDD/ikong/taobin_project into masterpiece

This commit is contained in:
nattapon tachawong 2025-06-17 14:02:56 +07:00
commit decac96cba
560 changed files with 233482 additions and 69931 deletions

View file

@ -1,7 +1,7 @@
<Button>
<X> btnRemoveCupX </X>
<Y> btnRemoveCupYNotPageBoard </Y>
<State> buttonRemoveCup </State>
<State> buttonRemoveCupOnArm </State>
;<Color> "0x00BDFF" </Color>
<Interval> 500 </Interval>
<Filename> bnRemoveCup </Filename>
@ -9,6 +9,16 @@
<EventClick>
Machine RemoveCup
Machine DoorLidOpen
Var buttonRemoveCup = "Invisible"
SAVELOG "Press button remove cup on-arm"
Var buttonRemoveCupOnArm = "Invisible"
; protect value update too slow.
Var DoorCupPosition = "-"
Var CheckCupStateDoorCupClose = "reset"
Var CheckCupStateDoorCupCloseCnt = 30
Var TimeoutForProtectButtonHideLongTime = 0
RefreshAll
</EventClick>
</Button>

View file

@ -272,6 +272,7 @@ EndIf
Var Seeker.topping9 = topping9
Var Seeker.topping10 = topping10
Var Seeker.topping11 = topping11
var Seeker.topping11_2 = topping11_2
Var Seeker.topping12 = topping12
Var Seeker.topping13 = topping13
@ -286,6 +287,12 @@ EndIf
Var Seeker.strMulti6_4 = strMulti6_4
Var Seeker.strMulti6_5 = strMulti6_5
Var Seeker.strMulti6_6 = strMulti6_6
Var Seeker.strMulti11_1 = strMulti11_1
Var Seeker.strMulti11_2 = strMulti11_2
Var Seeker.strMulti11_3 = strMulti11_3
Var Seeker.strMulti11_4 = strMulti11_4
Var Seeker.strMulti11_5 = strMulti11_5
@ -298,6 +305,7 @@ EndIf
DEBUGVAR Seeker.topping9
DEBUGVAR Seeker.topping10
DEBUGVAR Seeker.topping11
DEBUGVAR Seeker.topping11_2
DEBUGVAR Seeker.topping12
DEBUGVAR Seeker.topping13
DEBUGVAR Seeker.get_a_straw
@ -309,11 +317,22 @@ EndIf
DEBUGVAR Seeker.strMulti6_4
DEBUGVAR Seeker.strMulti6_5
DEBUGVAR Seeker.strMulti11_1
DEBUGVAR Seeker.strMulti11_2
DEBUGVAR Seeker.strMulti11_3
DEBUGVAR Seeker.strMulti11_4
DEBUGVAR Seeker.strMulti11_5
DEBUGVAR LidState
DEBUGVAR StrawState
DEBUGVAR UserSelectProductCode
If Seeker.SmoothieToPayment = 1 Then
Var StrawState = "Press"
Var Seeker.thankStrawFlag = 1
EndIf
If StrawState = "Press" Then
Machine StrawOrder
EndIf
@ -337,7 +356,7 @@ EndIf
Var LidState = "Enable"
EndIf
;
DEBUGVAR StrawState
DEBUGVAR PromotionIDCurrentOrder
@ -373,17 +392,6 @@ EndIf
GetLongTimeInMinute LastTimeClickOrder
If CART_COUNT = 0 Then
If UserSelectProductCode = "-" Then
Else
If SelectDrinkType = 1 Then
; Move to MenuReady
;OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/page_blank.xml"
;Open "ROOT/taobin_project/xml/page_payment.xml"
EndIf
EndIf
DEBUGVAR SelectToppingType
If SelectDrinkType = 0 Then

View file

@ -0,0 +1,249 @@
;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
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

View file

@ -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"
@ -24,7 +27,6 @@ Else
EndIf
EndIf
Var TiemoutForDoorCupOpenLongTime = TiemoutForDoorCupOpenLongTime + 1
If TiemoutForDoorCupOpenLongTime > 60 Then
Var TiemoutForDoorCupOpenLongTime = 0

View file

@ -0,0 +1,31 @@
<EventMachineCupReady>
SAVELOG "EventMachineCupReady"
Refresh
</EventMachineCupReady>
<EventMachineCupNotReady>
SAVELOG "EventMachineCupNotReady"
</EventMachineCupNotReady>
<EventDrink>
SAVELOG "EVDrink"
DEBUGVAR HaveCup
DEBUGVAR CupOnArm
DEBUGVAR DoorCupPosition
DEBUGVAR CupChecking
DEBUGVAR CupArmMove
If CupOnArm = "false" Then
SAVELOG " ============================= >button remove cup on arm hide "
Var buttonRemoveCupOnArm = "Invisible"
Else
Var buttonRemoveCupOnArm = "Enable"
EindIf
Refresh
</EventDrink>

View file

@ -34,6 +34,16 @@
Topping "Multiply6-ID" Seeker.strMulti6_1
Topping "Multiply6-ID" Seeker.strMulti6_2
Topping "Multiply6-ID" Seeker.strMulti6_3
If Seeker.topping11_2 = "" Then
Else
Topping "Multiply11-ID" Seeker.strMulti11_1
Topping "Multiply11-ID" Seeker.strMulti11_2
Topping "Multiply11-ID" Seeker.strMulti11_3
Topping "Multiply11-ID" Seeker.strMulti11_4
Topping "Multiply11-ID" Seeker.strMulti11_5
EndIf
EndIf
Topping "Pack" ExtendDataCurr