do between order

This commit is contained in:
wanlop run 2025-01-07 19:36:31 +07:00
parent 8991619abd
commit 8b4dfb62d9
17 changed files with 2690 additions and 351 deletions

View file

@ -125,7 +125,7 @@
; under line
<Image>
<X> 0 </X>
<Y> 358 </Y>
<Y> 380 </Y>
<Filename> "ROOT/taobin_project/image/page3/bg1.png" </Filename>
</Image>

View file

@ -673,6 +673,17 @@
Var ButtonGamePressToPlayState = "Invisible"
Var Game01Enable = 0
EndIf
; TODO
DEBUGVAR EnableDoubleCupNoError
DEBUGVAR HURR_FOREVER
DEBUGVAR RequestPickupCupAlert
If RequestPickupCupAlert = "true" Then
Open "ROOT/taobin_project/xml/page_pickup_cup_between_order.xml"
EndIf

View file

@ -3,10 +3,13 @@
<Width> 1080 </Width>
<Height> 1920 </Height>
<Background> "0xeae6e1" </Background>
<Sound> "ROOT/taobin_project/sounds/chaching.mp3" </Sound>
<Volume> SoundVolume </Volume>
<EventOpen>
; On open
TRY "/mnt/sdcard/coffeevending/taobin_project/xml/process/payext_setup.ev"
Var CountDownThankyou = 4
Var CountDownBrewing = BrewTime
Var CountUpBrewing = 0
@ -25,7 +28,6 @@
Var ChangeAmountSum = 0
Var Tel_Confirm_Flag = 0
Var LastMakeDrinkResult = "-"
DEBUGVAR MachineStage
DEBUGVAR NextOrderStatus
@ -149,8 +151,8 @@
DEBUGVAR VendingCampaign
Var CreditCardVoid = 0
__CMD "PayWasSent" Seeker.ORDER_ID "-" "-"
</EventOpen>
<EventActionOk>
@ -399,7 +401,9 @@
Var waitAckPay = 2
Var Timeout = 5
Var ActionOKCase = 1
__CMD "send-pay-detail-now" error_code_stop_now PayDetail "-"
EndIf
EndIf
@ -418,6 +422,8 @@
Var TelephoneNumber = Seeker.TNumberTaobinCredit
Var PayO2 = Seeker.CoffeePinNumber
EndIf
SAVELOG " Cannot conti with new payment ChangeTimeout > 30 "
Var ServiceType = "coffee-refund"
Var ServiceCredit = SelectDrink
@ -439,6 +445,10 @@
EndIf
EndIf
DEBUGVAR MachineState_Result
DEBUGVAR ChangeOK
If ChangeOK = 3 Then
If ActionOKCase = 0 Then
@ -451,32 +461,24 @@
EndIf
If NextOrderStatus = "Disable" Then
Var PayDetail="1/F:1221/0/"
DEBUGVAR error_code_stop_now
If error_code_stop_now > 0 Then
Var PayDetail="1/F:" + error_code_stop_now
Var PayDetail = PayDetail + "/0/"
Var PayDetail = PayDetail + "/XML|"
Var PayDetail = PayDetail + Seeker.OrderChanel
Else
DEBUGVAR error_code_stop_now
If error_code_stop_now > 0 Then
Var PayDetail="1/F:" + error_code_stop_now
Var PayDetail = PayDetail + "/0/"
Var PayDetail = PayDetail + "/XML|"
Var PayDetail = PayDetail + Seeker.OrderChanel
Else
Var PayDetail = "1/" + HURR_FOREVER
Var PayDetail = PayDetail + "/"
Var PayDetail = PayDetail + ""
Var PayDetail = PayDetail + "/"
Var PayDetail = PayDetail + ""
Var PayDetail = PayDetail + "/XML|"
Var PayDetail = PayDetail + Seeker.OrderChanel
EndIf
EndIf
Var PayDetail = "1/" + HURR_FOREVER
Var PayDetail = PayDetail + "/"
Var PayDetail = PayDetail + ""
Var PayDetail = PayDetail + "/"
Var PayDetail = PayDetail + ""
Var PayDetail = PayDetail + "/XML|"
Var PayDetail = PayDetail + Seeker.OrderChanel
EndIf
Var DEE = PayDetail
@ -488,8 +490,8 @@
DEBUGVAR VendingTSIDTmp
PAYEXT SVT ACC VendingTSIDTmp DEE
__CMD "send-pay-detail-now" error_code_stop_now PayDetail "-"
;PAYEXT SVT ACC VendingTSIDTmp DEE
Var ActionOKCase = 1

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,215 @@
<Popup>
<Cache> "Enable" </Cache>
<Width> 1080 </Width>
<Height> 1920 </Height>
<Background> "0xeae6e1" </Background>
<Volume> SoundVolume </Volume>
<EventOpen>
Var Timeout = 0
Var Timeout2 = 0
SAVELOG "open page_pickup_cup_between_order.xml"
DEBUGVAR EnableDoubleCupNoError
DEBUGVAR HURR_FOREVER
If show_eng = "true" Then
Var DirImage = "ROOT/taobin_project/image/user_take_cup_en/"
Else
Var DirImage = "ROOT/taobin_project/image/user_take_cup_th/"
EndIf
DEBUGVAR Seeker.showname
DEBUGVAR UserSelectProductCode
DEBUGVAR topping1
DEBUGVAR topping2
DEBUGVAR topping3
DEBUGVAR topping4
DEBUGVAR topping5
DEBUGVAR topping6
DEBUGVAR topping7
DEBUGVAR topping8
DEBUGVAR topping9
DEBUGVAR topping10
Var PayCredit = 1
Var TimeoutForReCheckCup = 0
SAVELOG "version 0.9"
Var MenuReadyForCup = "#"
Var MenuReOrder = "-"
Var RequestPickupCupAlert = "-"
</EventOpen>
<Timeout> 1000 </Timeout>
<EventTimeout>
Var TimeoutForReCheckCup = TimeoutForReCheckCup + 1
DEBUGVAR MachineStage
DEBUGVAR HaveCup
DEBUGVAR CHECKCUP
DEBUGVAR DoorCupPosition
DEBUGVAR RequestPickupCupAlert
DEBUGVAR ProductCodeBrewing
DEBUGVAR MenuReadyForCup
DEBUGVAR TimeoutForReCheckCup
If TimeoutForReCheckCup > 3 Then
Var TimeoutForReCheckCup = 0
Var MenuReadyForCup = "#"
__CMD "check-cup" ProductCodeBrewing "-" "-"
EndIf
If MenuReadyForCup = "YES" Then
__CMD "re-order" ProductCodeBrewing "-" "XML page_pickup_cup_between_order"
EndIf
; Set stage machine come back to between order
If MachineStage = "remove-cup" Then
__CMD "set-stage-to-between-cup" "-" "-" "-"
EndIf
If MenuReOrder = "success" Then
SAVELOG " MenuReOrder MenuReOrder success "
Open "ROOT/taobin_project/xml/page_NewBrewing3Conti.xml"
EndIf
; any with timeout and arm cup ready.
If RequestPickupCupAlert = "brewing" Then
SAVELOG " RequestPickupCupAlert is brewing3 "
Open "ROOT/taobin_project/xml/page_NewBrewing3Conti.xml"
EndIf
; no take cup. forward to page_NewBrewing3Conti.xml
If RequestPickupCupAlert = "fail" Then
SAVELOG " RequestPickupCupAlert is fail "
Open "ROOT/taobin_project/xml/page_NewBrewing3Conti.xml"
EndIf
; Do not change
;
If MachineStage = "show-menu" Then
If HaveCup = "false" Then
If DoorCupPosition = "bottom" Then
Var Timeout2 = Timeout2 + 1
EndIf
EndIf
EndIf
If Timeout2 > 5 Then
SAVELOG " Timeout2 > 5 "
Open "ROOT/taobin_project/xml/page_NewBrewing3Conti.xml"
EndIf
DEBUGVAR Timeout
DEBUGVAR Timeout2
If show_eng = "true" Then
Else
If HaveCup = "true" Then
If InternationalEnable = 1 Then
Else
If Timeout = 4 Then
Play "/mnt/sdcard/coffeevending/taobin_project/sound_thai/remove_cup.mp3"
EndIf
If Timeout = 54 Then
Play "/mnt/sdcard/coffeevending/taobin_project/sound_thai/remove_cup.mp3"
EndIf
If Timeout = 90 Then
Play "/mnt/sdcard/coffeevending/taobin_project/sound_thai/remove_cup.mp3"
EndIf
EndIf
EndIf
EndIf
If Timeout > 240 Then
SAVELOG "Timeout 240 from can not close door"
Open "ROOT/taobin_project/xml/page_brewing3Conti.xml"
EndIf
; move to remove_cup_step Timeout = Timeout + 1
;include=ROOT/taobin_project/inc/remove_cup_step.inc
If Timeout = 3 Then
If DoorCupPosition = "bottom" Then
Machine RemoveCup
Var buttonRemoveCup = "Invisible"
; override for buttonRemoveCup Invisible away
Var CheckCupStateDoorCupClose = "-"
Var DoorCupPosition = "-"
EndIf
EndIf
TimerReset
Refresh
</EventTimeout>
<EventChangeStatus>
If ChangeStatus = "payout-end" Then
Var MultiGo = 1
EndIf
</EventChangeStatus>
;include="ROOT/taobin_project/inc/video.inc"
<Image>
<X> 335 </X>
<Y> 1090 </Y>
<Filename> "ROOT/taobin_project/image/user_take_cup_th/img_take_cup.png" </Filename>
</Image>
<Image>
<X> 0 </X>
<Y> 609 </Y>
<Filename> Var(DirImage + "/img_take_cup_for_next_brew.png") </Filename>
</Image>
<Button>
<X> 212 </X>
<Y> 1673 </Y>
<State> buttonRemoveCup </State>
<Filename> Var( DirImage + "/bn_door_open_take_double_cup.png" ) </Filename>
<FilenamePress> Var( DirImage + "/bp_door_open_take_double_cup.png" ) </FilenamePress>
<FilenameDisable> Var( DirImage + "/bd_door_open_take_double_cup.png" ) </FilenameDisable>
<EventClick>
Machine RemoveCup
Machine DoorLidOpen
Refresh
</EventClick>
</Button>
<EventUnitTest1>
Open CurrentXMLFileName2
</EventUnitTest1>
</Popup>

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 TCT5"
;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,13 +168,44 @@
__CMD "error-code-1296" 0 "-" "-"
EndIf
Var LastMakeDrinkResult = "fail"
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
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"
Open "ROOT/taobin_project/xml/page_cannotConti.xml"
EndIf
EndIf
@ -189,11 +214,44 @@
SAVELOG "RejectOrder page_thankyouConti"
Var error_code_stop_now = 1221
Var LastMakeDrinkResult = "fail"
Open "ROOT/taobin_project/xml/page_cannotConti.xml"
EndIf
__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
@ -371,7 +429,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>
@ -405,7 +462,7 @@
<Width> 1080 </Width>
<Align> end </Align>
<Color> 0xFF0000 </Color>
<Value> "TCT3 "</Value>
<Value> "TCT5 "</Value>
</Text>

View file

@ -755,6 +755,8 @@
DEBUGVAR MenuReason
; arm-not-ready
; brew-stg
; door-cup-alert
; stop-now-set
If show_eng = "true" Then
If MACHINE_SELF_TEST_COUNT_DOWN > 0 Then
@ -806,6 +808,7 @@
EndIf
If MenuReason = "-" Then
Else
@ -6550,14 +6553,6 @@
__CMD "statement" 0 StatementCheckMenu "-"
;If HalfPrice = "true" Then
; ; Discount 50
; DEBUGVAR HalfPrice
; __CMD "invoke-discount-50" UserSelectProductCode "-" "-"
;
;Else
; Var PriceDrink = PriceDrinkTmp
;EndIf
DEBUGVAR PriceDrinkTmp
@ -8215,11 +8210,13 @@
</Text>
<Text>
<X> 1 </X>
<Y> 1900 </Y>
<X> 0 </X>
<Y> 1888 </Y>
<State> MenuReasonStage </State>
<Font> KanitTTF </Font>
<Size> 18 </Size>
<Size> 22 </Size>
<Width> 1078 </Width>
<Align> end </Align>
<Color> 0xFF0000 </Color>
<Value> MenuReasonString</Value>
</Text>