Merge remote-tracking branch 'origin/masterpiece' into th_mmr

This commit is contained in:
Ittipat Lusuk 2025-01-21 14:44:29 +07:00
commit 020098b2af
457 changed files with 95264 additions and 50614 deletions

View file

@ -59,15 +59,6 @@
;DEBUGVAR LidState
DEBUGVAR BottomText
;I f StarwState = "Press" Then
; Machine StrawWithDelay
; LED LedDoorLid Blink 255 255 255 255
;EndIf
;I f LidState = "Press" Then
; Machine LidWithDelay
; LED LedDoorLid Blink 255 255 255 255
;EndIf
DEBUGVAR Seeker.TNumberTaobinCredit
DEBUGVAR TelephoneNumber
@ -132,13 +123,14 @@
;include=ROOT/taobin_project/inc/remove_cup_event_open.inc
SAVELOG "Thank you conti version TCT3"
SAVELOG "Thank you conti version TCT6"
;PendingFlag InternationalEnable
;PendingFlag New_Payment
;PendingFlag
Var CupErrorCodeForNextOrder = 0
Var CountDownForShowMenuNextOrderToBrew = 4
</EventOpen>
<Timeout> 1000 </Timeout>
@ -160,12 +152,14 @@
Var Timeout2 = Timeout2 + 1
; Timeout2 10*60*2
; To be obsolete
If Timeout2 > 900 Then
SAVELOG "Timeout2 900"
SAVELOG "Make next order by take-cup with close-maintenance 2"
Var error_code_stop_now = 1221
If DoorCupPosition = "bottom" Then
@ -174,26 +168,94 @@
__CMD "error-code-1296" 0 "-" "-"
EndIf
Var LastMakeDrinkResult = "fail"
If New_Payment = 1 Then
__CMD "SetPay" "coffee-payment" Seeker.VendingTSID Seeker.ORDER_ID
EndIf
Open "ROOT/taobin_project/xml/page_cannotConti.xml "
EndIf
If Timeout2 > 898 Then
SAVELOG "Timeout2 898"
SAVELOG "Make next order by take-cup with close-maintenance 3"
Var error_code_stop_now = CupErrorCodeForNextOrder
If DoorCupPosition = "bottom" Then
Else
Var error_code_stop_now = 1296
__CMD "error-code-1296" 0 "-" "-"
EndIf
If New_Payment = 1 Then
__CMD "SetPay" "coffee-payment" Seeker.VendingTSID Seeker.ORDER_ID
EndIf
Var LastMakeDrinkResult = "fail"
Open "ROOT/taobin_project/xml/page_cannotConti.xml"
EndIf
; setvarint Timeout2 888
If Timeout2 > 890 Then
__CMD "cup-error-code" "-" "-" "-"
DEBUGVAR CupErrorCodeForNextOrder
EndIf
If MachineStage = "close-maintenance" Then
If stop_now = "true" Then
Var LastMakeDrinkResult = "fail"
If New_Payment = 1 Then
__CMD "SetPay" "coffee-payment" Seeker.VendingTSID Seeker.ORDER_ID
EndIf
Open "ROOT/taobin_project/xml/page_cannotConti.xml"
EndIf
EndIf
If RejectOrder = "true" Then
SAVELOG "RejectOrder page_thankyouConti"
Var error_code_stop_now = 1221
Open "ROOT/taobin_project/xml/page_cannotConti.xml"
__CMD "check-cup" Seeker.selected_a_drink "-" "-"
DEBUGVAR MenuReadyForCup
If MenuReadyForCup = "YES" Then
Var VideoPlayFile = VideoPath
Var VideoPlayFile = VideoPlayFile + VideoFileBegin
Var VideoPlayFile = VideoPlayFile + "1"
Var VideoPlayFile = VideoPlayFile + VideoFileEnd
Var PictureFile = PicturePath
Var PictureFile = PictureFile + PictureBegin
Var PictureFile = PictureFile + "1"
Var PictureFile = PictureFile + PictureEnd
DEBUGVAR CountDownForShowMenuNextOrderToBrew
DEBUGVAR Seeker.selected_a_drink
If CountDownForShowMenuNextOrderToBrew = 0 Then
Var CountDownThankyou = 0
Else
Var CountDownForShowMenuNextOrderToBrew = CountDownForShowMenuNextOrderToBrew - 1
EndIf
Else
EndIf
; old condition
If HaveCup = "false" Then
If MachineStage = "show-menu" Then
@ -268,6 +330,52 @@
EndIf
EndIf
EndIf
; run test;
If CountDownThankyou = 0 Then
; reset all var
DEBUGVAR MachineStage
SAVELOG "CountDownThankyou = 0"
Var CountDownBrewing = BrewTime
Var CountUpBrewing = 0
SAVELOG BrewTime
Var ShowCountDownBrewing = CountDownBrewing
Var MachineState_Result = 0
If MenuReadyForCup = "YES" Then
Var LastMakeDrinkResult = "-"
If New_Payment = 1 Then
__CMD "SetPay" "coffee-payment" Seeker.VendingTSID Seeker.ORDER_ID
EndIf
MakeDrinkV1 Seeker.selected_a_drink SelectSugarID
If CountryName = "Thailand" Then
If New_Payment = 1 Then
Open "ROOT/taobin_project/xml/page_NewBrewing3.xml"
Else
Open "ROOT/taobin_project/xml/page_brewing3.xml"
EndIf
Else
If InternationalEnable = 1 Then
Var Brew3Inter = CountryRootPath + "/xml/page_brewing3.lxml"
Open Brew3Inter
Else
;obsolete
If New_Payment = 1 Then
Open "ROOT/taobin_project/xml/page_NewBrewing3.xml"
Else
Open "ROOT/taobin_project/xml/page_brewing3.xml"
EndIf
EndIf
EndIf
EndIf
EndIf
@ -369,7 +477,6 @@
<X> 160 </X>
<Y> 1673 </Y>
<State> buttonRemoveCup </State>
;<Color> "0x00BDFF" </Color>
<Interval> 500 </Interval>
<Filename> Var( DirImage2 + "/bn_open_door.png" ) </Filename>
<FilenamePress> Var( DirImage2 + "/bp_open_door.png" ) </FilenamePress>
@ -403,7 +510,7 @@
<Width> 1080 </Width>
<Align> end </Align>
<Color> 0xFF0000 </Color>
<Value> "TCT3 "</Value>
<Value> "TCT6 "</Value>
</Text>
@ -427,7 +534,7 @@
</EventUnitTest1>
<EventUnitTest2>
Open "ROOT/xml/page_thankyouConti.xml"
Open "ROOT/taoin_project/xml/page_thankyouConti.xml"
</EventUnitTest2>
<EventUnitTest3>