From a54978e5c6159a053638e0ebb7a6c512d25bb45b Mon Sep 17 00:00:00 2001 From: wanlop run Date: Mon, 30 Sep 2024 18:12:05 +0700 Subject: [PATCH] Renew make drink / next order --- xml/page_NewBrewing3.xml | 7 -- xml/page_NewBrewing3Conti.xml | 12 --- xml/page_drinkok.xml | 196 ++++++---------------------------- xml/page_make_drink_again.xml | 145 +++++++++++++++++++++++++ 4 files changed, 176 insertions(+), 184 deletions(-) create mode 100644 xml/page_make_drink_again.xml diff --git a/xml/page_NewBrewing3.xml b/xml/page_NewBrewing3.xml index 366a7ba8..faa13281 100644 --- a/xml/page_NewBrewing3.xml +++ b/xml/page_NewBrewing3.xml @@ -692,13 +692,6 @@ EndIf EndIf - ; run test; - ;I f CountDownBrewing = 40 Then - ; Open "ROOT/taobin_project/xml/page_drinkok.xml" - ;EndIf - ;I f CountDownBrewing = 0 Then - ; ;Open "ROOT/taobin_project/xml/page_drinkok.xml" - ;EndIf Var ShowCountDownBrewing = CountDownBrewing diff --git a/xml/page_NewBrewing3Conti.xml b/xml/page_NewBrewing3Conti.xml index 7754db2c..185c7e29 100644 --- a/xml/page_NewBrewing3Conti.xml +++ b/xml/page_NewBrewing3Conti.xml @@ -265,23 +265,11 @@ EndIf Endif - If Simulation = "true" Then - If CountDownBrewing = 0 Then - ;Open "ROOT/taobin_project/xml/page_drinkok.xml" - EndIf - EndIf If Timeout = 4 Then PlayLong "/mnt/sdcard/coffeevending/taobin_project/sounds/music1.mp3" EndIf - ; run test; - ;If CountDownBrewing = 40 Then - ; Open "ROOT/taobin_project/xml/page_drinkok.xml" - ;EndIf - If CountDownBrewing = 0 Then - ;Open "ROOT/taobin_project/xml/page_drinkok.xml" - EndIf Var ShowCountDownBrewing = CountDownBrewing diff --git a/xml/page_drinkok.xml b/xml/page_drinkok.xml index 083396a0..c4eee1d3 100644 --- a/xml/page_drinkok.xml +++ b/xml/page_drinkok.xml @@ -250,33 +250,6 @@ Open "ROOT/taobin_project/xml/page_drink_stuck.xml" EndIf - ; obsolete - If Timeout > TimeDelayDefault Then - SAVELOG "Longer Time out" - DEBUGVAR TimeDelayDefault - - If NextOrder = "true" Then - - Var NextOrder = "false" - TransferVar "next" "curr" - Var Seeker = "curr" - SAVELOG "Make next order by take-cup with close-maintenance" - - Var error_code_stop_now = 1221 - - If DoorCupPosition = "bottom" Then - - Else - Var error_code_stop_now = 1296 - __CMD "error-code-1296" 0 "-" "-" - EndIf - - Open "ROOT/taobin_project/xml/page_cannotConti.xml" - - Else - Open "ROOT/taobin_project/xml/page_back_to_main.xml" - EndIf - EndIf If Timeout = 2 Then RefreshAll EndIf @@ -293,161 +266,54 @@ Var next_pic_bg = DirImage + "/Preparing.png" Var BlinkImg = 1 EndIf - EndIf - - ; Do not change ; If MachineStage = "show-menu" Then - If CART_INDEX < CART_COUNT Then - If HaveCup = "false" Then - If CupChecking = "false" Then + Var Seeker.TNumberTaobinMember = "" - Var CART_INDEX = CART_INDEX + 1 - Cart "PreparID" CART_INDEX - Cart "MakeID" CART_INDEX - Open "ROOT/taobin_project/xml/page_thankyouMore.xml" + If NextOrder = "true" Then + + ; Fast-forward to page_cannotConti + If RejectOrder = "true" Then + ; BEGIN + Var NextOrder = "false" + + TransferVar "next" "curr" + Var Seeker = "curr" + + SAVELOG "Make next order by RejectOrder" + Open "ROOT/taobin_project/xml/page_cannotConti.xml" + ; END + EndIf + + ; next order set. Havecup and checkup value must false. Certain cup not on any arm. + + + If DoorCupPosition = "bottom" Then + ; BEGIN + Var NextOrder = "false" + + TransferVar "next" "curr" + Var Seeker = "curr" + SAVELOG "Make next order by take-cup" + Open "ROOT/taobin_project/xml/page_thankyouConti.xml" + ; END - EndIf Else - - If DoorCupPosition = "bottom" Then - If HaveCup = "true" Then - If MaybeHaveCup = "true" Then - - Else - If CupChecking = "true" Then - - Else - Var buttonRemoveCup = "Enable" - Var txtDrinkOKState = "Enable" - EndIf - EndIf - EndIf - - If CupOnArm = "true" Then - If MaybeHaveCup = "true" Then - - Else - If CupChecking = "true" Then - - Else - Var buttonRemoveCup = "Enable" - Var txtDrinkOKState = "Enable" - EndIf - EndIf - EndIf - Else - Var buttonRemoveCup = "Invisible" - EndIf - + Machine DoorClose EndIf - Else - If sendPayMultiFlag = 1 Then - - - If DoorCupPosition = "bottom" Then - If HaveCup = "true" Then - If MaybeHaveCup = "true" Then - - Else - If CupChecking = "true" Then - - Else - Var buttonRemoveCup = "Enable" - Var txtDrinkOKState = "Enable" - EndIf - EndIf - EndIf - - If CupOnArm = "true" Then - If MaybeHaveCup = "true" Then - - Else - If CupChecking = "true" Then - - Else - Var buttonRemoveCup = "Enable" - Var txtDrinkOKState = "Enable" - EndIf - EndIf - EndIf - Else - Var buttonRemoveCup = "Invisible" - EndIf - - Var Seeker.TNumberTaobinMember = "" - - If FailedCount > 0 Then - Open "ROOT/taobin_project/xml/page_drinkfail2.xml" - Else - If NextOrder = "true" Then - - ; Fast-forward to page_cannotConti - If RejectOrder = "true" Then - ; BEGIN - Var NextOrder = "false" - - TransferVar "next" "curr" - Var Seeker = "curr" - - SAVELOG "Make next order by RejectOrder" - Open "ROOT/taobin_project/xml/page_cannotConti.xml" - ; END - EndIf - - ; next order set. Havecup and checkup value must false. Certain cup not on any arm. - - If PaySuccessWithDaemonTask = 1 Then - Var NextOrder = "false" - SAVELOG "Make next order by pass" - Open "ROOT/taobin_project/xml/page_thankyouConti.xml" - Else - If HaveCup = "false" Then - If MaybeHaveCup = "true" Then - - Else - If CupChecking = "true" Then - - Else - If CupOnArm = "false" Then - - If DoorCupPosition = "bottom" Then - ; BEGIN - Var NextOrder = "false" - - TransferVar "next" "curr" - Var Seeker = "curr" - SAVELOG "Make next order by take-cup" - Open "ROOT/taobin_project/xml/page_thankyouConti.xml" - ; END - - Else - Machine DoorClose - EndIf - EndIf - EndIf - EndIf - EndIf - EndIf - Else - Open "ROOT/taobin_project/xml/page_back_to_main.xml" - EndIf - EndIf - EndIf + Open "ROOT/taobin_project/xml/page_back_to_main.xml" EndIf - EndIf - ; - + ; this stage for remove cup If MachineStage = "remove-cup" Then If CART_COUNT = 0 Then If NextOrder = "false" Then diff --git a/xml/page_make_drink_again.xml b/xml/page_make_drink_again.xml new file mode 100644 index 00000000..0c187118 --- /dev/null +++ b/xml/page_make_drink_again.xml @@ -0,0 +1,145 @@ + + "Enable" + 1080 + 1920 + "0xeae6e1" + SoundVolume + + + + Var Timeout = 0 + Var Timeout2 = 0 + SAVELOG "page_make_drink_again.xml" + + DEBUGVAR EnableDoubleCupNoError + DEBUGVAR HURR_FOREVER + + + 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 + ; MACHINE_BREW_THAI_CUP_ERROR_OVER_WEIGHT_SCALE_ARM_3 1030 + ; MACHINE_BREW_THAI_CUP_ERROR_NO_WEIGHT_SCALE_ARM_3 1026 + ; Clear eror 0xA6 + + + 1000 + + + Var Timeout = Timeout + 1 + + DEBUGVAR MachineStage + + DEBUGVAR HaveCup + DEBUGVAR CHECKCUP + DEBUGVAR DoorCupPosition + + + DEBUGVAR Timeout + DEBUGVAR Timeout2 + + If Timeout > 240 Then + SAVELOG "Timeout 240 from can not close door" + Open "ROOT/taobin_project/xml/page_brewing3Conti.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 DoorCupPosition = "bottom" Then + Var buttonRemoveCup = "Enable" + Else + Var buttonRemoveCup = "Invisible" + EndIf + + If MachineStage = "close-maintenance" Then + Var buttonRemoveCup = "Disable" + EndIf + + If Timeout2 = 1 Then + ;include="ROOT/taobin_project/inc/select_drink_current.inc" + + EndIf + + If Timeout2 = 5 Then + + MakeDrinkV1 UserSelectProductCode SelectSugarID + Var HURR_FOREVER = "F:1115" + Var MachineState_Result = 0 + Var LastMakeDrinkResult = "-" + Open "ROOT/taobin_project/xml/page_Newbrewing3Conti.xml" + + EndIf + + + TimerReset + Refresh + + + + + If ChangeStatus = "payout-end" Then + Var MultiGo = 1 + EndIf + + + +;include="ROOT/taobin_project/inc/video.inc" + + + + 335 + 1090 + "ROOT/taobin_project/image/user_take_cup_th/img_take_cup.png" + + + + + + 0 + 609 + Var(DirImage + "/img_take_cup_for_next_brew.png") + + + + + + + Var MachineStage = "show-menu" + + + +