From e6fe0e547e0a30bf2eaa89d5e40bb79506c3e9ac Mon Sep 17 00:00:00 2001 From: Ittipat Lusuk Date: Tue, 13 May 2025 15:52:20 +0700 Subject: [PATCH] Pause SmoothieCountdown when helper show --- inter/tha/xml/page_help_center.lxml | 7 +- inter/tha/xml/page_help_center_sending.lxml | 2 +- inter/tha/xml/page_instance_empty.lxml | 19 +--- .../xml/page_smoothie_suggest_and_process.xml | 20 +--- .../page_smoothie_suggest_and_process_2.xml | 93 ------------------- .../page_smoothie_suggest_and_process_3.xml | 90 ------------------ inter/tha/xml/topview_helper.lxml | 2 - xml/page_board.xml | 6 +- 8 files changed, 16 insertions(+), 223 deletions(-) diff --git a/inter/tha/xml/page_help_center.lxml b/inter/tha/xml/page_help_center.lxml index 3510f756..74d4ea69 100644 --- a/inter/tha/xml/page_help_center.lxml +++ b/inter/tha/xml/page_help_center.lxml @@ -39,6 +39,8 @@ Var Problem_Process_State[0] = "Enable" Var Problem_Process_State[1] = "Enable" + Var CurrHelpCenter = 1 + Var Timeout = 0 @@ -47,9 +49,9 @@ DEBUGVAR Timeout - If Timeout > 120 Then + If Timeout > 70 Then SAVELOG "Timeout" - + Var CurrHelpCenter = 0 If BaseOnPageBoard = 1 Then Var BaseOnPageBoard = 0 Var LanguageButtonEnable = "Enable" @@ -120,6 +122,7 @@ SoundVolume + Var CurrHelpCenter = 0 If BaseOnPageBoard = 1 Then Var BaseOnPageBoard = 0 Var LanguageButtonEnable = "Enable" diff --git a/inter/tha/xml/page_help_center_sending.lxml b/inter/tha/xml/page_help_center_sending.lxml index bf9326b1..ba6897d2 100644 --- a/inter/tha/xml/page_help_center_sending.lxml +++ b/inter/tha/xml/page_help_center_sending.lxml @@ -28,7 +28,7 @@ Var Timeout = Timeout + 1 If Timeout > 300 Then - + Var CurrHelpCenter = 0 If MachineStage = "remove-cup" Then OpenInst 2 "ROOT/taobin_project/xml/page_drinkfail3.xml" Else diff --git a/inter/tha/xml/page_instance_empty.lxml b/inter/tha/xml/page_instance_empty.lxml index cc89a786..662fda07 100644 --- a/inter/tha/xml/page_instance_empty.lxml +++ b/inter/tha/xml/page_instance_empty.lxml @@ -7,29 +7,12 @@ RootLayoutVisible 13 "hide" ;OpenInst 0 "/mnt/sdcard/coffeevending/taobin_project/xml/page_main_blank.xml" - - Var Timeout = 0 + Var CurrHelpCenter = 0 1000 - DEBUGVAR Timeout - If Timeout > 66 Then - SAVELOG "Timeout" - - TabMenuVisibleInst 99 - - If Seeker = "next" Then - Open "ROOT/taobin_project/xml/page_brewing3Conti.xml" - Else - SAVELOG "Back" - Open "ROOT/taobin_project/xml/page_back_to_main.xml" - EndIf - EndIf - Var Timeout = Timeout + 1 - - TimerReset diff --git a/inter/tha/xml/page_smoothie_suggest_and_process.xml b/inter/tha/xml/page_smoothie_suggest_and_process.xml index 26ad4372..043cb1bb 100644 --- a/inter/tha/xml/page_smoothie_suggest_and_process.xml +++ b/inter/tha/xml/page_smoothie_suggest_and_process.xml @@ -24,20 +24,6 @@ TRY "/mnt/sdcard/coffeevending/taobin_project/inter/tha/xml/ticket_time_blending.ev" - DEBUGVAR OpenFromPageBoard - If OpenFromPageBoard = 1 Then - Var OpenFromPageBoard = 0 - Var langnext1 = "true" - Var langnext2 = "true" - Var langnext3 = "true" - Var langnext4 = "true" - Var langnext5 = "true" - Var langnext6 = "true" - Var langnext7 = "true" - Var langnext8 = "true" - Var langnext9 = "true" - EndIf - Var NextPage = "-" @@ -163,7 +149,11 @@ If Show_btn_process = "Disable" Then ; do not thing Else - Var TimeOutSmoothiesProcess = TimeOutSmoothiesProcess - 1 + If CurrHelpCenter = 1 Then + ; do not thing to pause countdown smoothie process + Else + Var TimeOutSmoothiesProcess = TimeOutSmoothiesProcess - 1 + EndIf EndIf EndIf If TimeOutSmoothiesProcess = 2 Then diff --git a/inter/tha/xml/page_smoothie_suggest_and_process_2.xml b/inter/tha/xml/page_smoothie_suggest_and_process_2.xml index bc6dd1f6..46d44bae 100644 --- a/inter/tha/xml/page_smoothie_suggest_and_process_2.xml +++ b/inter/tha/xml/page_smoothie_suggest_and_process_2.xml @@ -94,99 +94,6 @@ Open "ROOT/taobin_project/inter/tha/xml/page_smoothie_suggest_and_process_3.xml" EndIf - - DEBUGVAR CH9991_Status - DEBUGVAR CH9992_Status - DEBUGVAR CH9993_Status - DEBUGVAR CH9994_Status - - DEBUGVAR HaveCup - DEBUGVAR CupOnArm - DEBUGVAR DoorCupPosition - DEBUGVAR CupChecking - DEBUGVAR CupArmMove - DEBUGVAR buttonRemoveCup - DEBUGVAR SmoothieProcessState - DEBUGVAR AnyArmConfuse - DEBUGVAR SensorDoorCupStatus - - - If CH9992_Status = "READY" Then - - If DoorCupPosition = "bottom" Then - If SmoothieProcessState = "idle" Then - Var TextDoorButtonID = 001202 - Else - If SmoothieProcessState = "insert" Then - Var TextDoorButtonID = 001203 - - Else - - EndIf - EndIf - Else - If DoorCupPosition = "top" Then - Var TextDoorButtonID = 001204 - If SmoothieProcessState = "press" Then - Var SmoothieProcessState = "insert" - EndIf - Else - If SmoothieProcessState = "idle" Then - - Else - If SmoothieProcessState = "press" Then - - Else - Var TextDoorButtonID = 001205 - EndIf - - EndIf - EndIf - EndIf - - - If AnyArmConfuse = 1 Then - If CountDownCertainConfuse > 0 Then - Var CountDownCertainConfuse = CountDownCertainConfuse - 1 - - If CountDownCertainConfuse = 0 Then - Machine DoorClose - EndIf - EndIf - EndIf - Else - - If CH9992_Status = "RUNNING" Then - Var SmoothieProcessState = "blendnow" - EndIf - EndIf - - If SmoothieProcessState = "blendnow" Then - Var TextDoorButtonID = 001206 - - Var SelectDrink = Seeker.selected_a_drink - Var SelectSugarID = "" - - Topping "Select" SelectDrink - - Var SmoothieProcessState = "blending" - - EndIf - - If SmoothieProcessState = "blending" Then - - - Menu "set-name" "Smoothie " - Menu "set-image" Seeker.PictureDrink - - - Open "ROOT/taobin_project/inter/tha/xml/page_payment_pack_and_send.xml" - - EndIf - - - DEBUGVAR TextDoorButtonID - Refresh TimerReset diff --git a/inter/tha/xml/page_smoothie_suggest_and_process_3.xml b/inter/tha/xml/page_smoothie_suggest_and_process_3.xml index a46e8775..8e74b3dd 100644 --- a/inter/tha/xml/page_smoothie_suggest_and_process_3.xml +++ b/inter/tha/xml/page_smoothie_suggest_and_process_3.xml @@ -113,23 +113,6 @@ 1000 - - ;SAVELOG SoundPlaying - - DEBUGVAR CH9991_Status - DEBUGVAR CH9992_Status - DEBUGVAR CH9993_Status - DEBUGVAR CH9994_Status - - DEBUGVAR HaveCup - DEBUGVAR CupOnArm - DEBUGVAR DoorCupPosition - DEBUGVAR CupChecking - DEBUGVAR CupArmMove - DEBUGVAR buttonRemoveCup - DEBUGVAR SmoothieProcessState - DEBUGVAR AnyArmConfuse - DEBUGVAR SensorDoorCupStatus DEBUGVAR Timeout @@ -138,79 +121,6 @@ Open "ROOT/taobin_project/xml/page_back_to_main.xml" EndIf - If CH9992_Status = "READY" Then - - If DoorCupPosition = "bottom" Then - If SmoothieProcessState = "idle" Then - Var TextDoorButtonID = 001202 - Else - If SmoothieProcessState = "insert" Then - Var TextDoorButtonID = 001203 - - Else - - EndIf - EndIf - Else - If DoorCupPosition = "top" Then - Var TextDoorButtonID = 001204 - If SmoothieProcessState = "press" Then - Var SmoothieProcessState = "insert" - EndIf - Else - If SmoothieProcessState = "idle" Then - - Else - If SmoothieProcessState = "press" Then - - Else - Var TextDoorButtonID = 001205 - EndIf - - EndIf - EndIf - EndIf - - - If AnyArmConfuse = 1 Then - If CountDownCertainConfuse > 0 Then - Var CountDownCertainConfuse = CountDownCertainConfuse - 1 - - If CountDownCertainConfuse = 0 Then - Machine DoorClose - EndIf - EndIf - EndIf - Else - - If CH9992_Status = "RUNNING" Then - Var SmoothieProcessState = "blendnow" - EndIf - EndIf - - If SmoothieProcessState = "blendnow" Then - Var TextDoorButtonID = 001206 - - Var SelectDrink = Seeker.selected_a_drink - Var SelectSugarID = "" - - Topping "Select" SelectDrink - - Var SmoothieProcessState = "blending" - - EndIf - - If SmoothieProcessState = "blending" Then - - - Menu "set-name" "Smoothie " - Menu "set-image" Seeker.PictureDrink - - - ;Open "ROOT/taobin_project/inter/tha/xml/page_payment_pack_and_send.xml" - - EndIf - Var Timeout = Timeout + 1 Refresh diff --git a/inter/tha/xml/topview_helper.lxml b/inter/tha/xml/topview_helper.lxml index 8093d219..f060d337 100644 --- a/inter/tha/xml/topview_helper.lxml +++ b/inter/tha/xml/topview_helper.lxml @@ -38,8 +38,6 @@ "/mnt/sdcard/coffeevending/wav/click.wav" SoundVolume - - Var CurrHelpCenter = 1 OpenInst 3 "ROOT/taobin_project/xml/topview2.xml" diff --git a/xml/page_board.xml b/xml/page_board.xml index 84d55b39..bbe70b4a 100644 --- a/xml/page_board.xml +++ b/xml/page_board.xml @@ -2119,12 +2119,12 @@ PRICE "Reset" "-" DEBUGVAR InternationalEnable DEBUGVAR CountryName - - Var BaseOnPageBoard = 0 If CurrHelpCenter = 1 Then ; do not thing when open the helper Else + Var BaseOnPageBoard = 0 + If InternationalEnable = 1 Then If CountryName = "Thailand" Then SAVELOG " Thailand Thailand Thailand Thailand Pooon Pooon Pooon Pooon Pooon" @@ -2603,6 +2603,8 @@ PRICE "Reset" "-" If CurrHelpCenter = 1 Then ; do not thing when open the helper Else + Var BaseOnPageBoard = 0 + If InternationalEnable = 1 Then If CountryName = "Thailand" Then