taobin_project/inter/tha/xml/page_smoothie_suggest_and_process.xml
wanlop run a169f84751 doing
2025-06-16 15:07:32 +07:00

614 lines
13 KiB
XML

<Popup>
<Cache> "Enable" </Cache>
<Width> 1080 </Width>
<Height> 1920 </Height>
;<Background> "0xeae6e1" </Background>
<Volume> SoundVolume </Volume>
<EventOpen>
SAVELOG "======================================= page_smoothie_suggest_and_process.xml == Version 1.07 =============================="
; On open
TopView "show"
; On open
Machine WakeUp
RootLayoutVisible 3 "show"
;include="ROOT/taobin_project/inter/tha/xml/multi/tab_menu_hide.lxml"
DEBUGVAR ToppingNewShow
TRY "/mnt/sdcard/coffeevending/taobin_project/xml/sometime/campaign_sound.ev"
TRY "/mnt/sdcard/coffeevending/taobin_project/inter/tha/xml/ticket_time_blending.ev"
Var NextPage = "-"
If Seeker = "curr" Then
Machine DoorLidClose
EndIf
CoinVending OFF
; Clear value
Topping "clear" "-"
Var DirImage = "ROOT/taobin_project/image/smoothie/proccess"
Var ProcessCupDebugText = ""
Var FromSmoothieProcess = "Enable"
Var FromPaymentCash = "Invisible"
Var FromBrewingProcess = "Invisible"
Var BaseOnPageBoard = 0
Var TimeOutHandPoint = 0
Var ShowHandPoint = "Invisible"
Var MotionHandPoint = 0
Var Show_btn_process = "Enable"
Var Showhelper = "Invisible"
Var EnableBtnLangWithHelper = 1
Var VideoSmoothieProcess = "ROOT/taobin_project/animation01/Taobin_empty.mp4"
DEBUGVAR TimeOutSmoothiesProcess
If TimeOutSmoothiesProcess < 100 Then
Var Second_x = 580
Var CountDown_x = 475
EndIf
If TimeOutSmoothiesProcess > 99 Then
Var Second_x = 600
Var CountDown_x = 460
EndIf
Var TextDoorButtonID = 001202
Var SmoothieProcessState = "idle"
Var CountDownCertainConfuse = 2
Var ArmIDForMakeOrder = 0
If CH9992_Status = "READY" Then
Var ArmIDForMakeOrder = 2
EndIf
If CH9994_Status = "READY" Then
Var ArmIDForMakeOrder = 4
EndIf
; reset
Var ChannelArmForProccessStatus = "-"
DEBUGVAR ArmIDForMakeOrder
__CMD "ui-load-playlist" 0 SelectDrink "-"
Var CountDownCupStageRunningTimeout = 15
</EventOpen>
<Timeout> 1000 </Timeout>
<EventTimeout>
;SAVELOG SoundPlaying
Var TimeOutHandPoint = TimeOutHandPoint + 1
If ArmIDForMakeOrder = 0 Then
If CH9992_Status = "READY" Then
Var ArmIDForMakeOrder = 2
EndIf
If CH9994_Status = "READY" Then
Var ArmIDForMakeOrder = 4
EndIf
EndIf
If TextDoorButtonID = 001202 Then
If Show_btn_process = "Disable" Then
Var ShowHandPoint = "Invisible"
Else
If TimeOutHandPoint > 9 Then
If MotionHandPoint = 0 Then
Var ShowHandPoint = "Enable"
Var MotionHandPoint = 1
Else
Var ShowHandPoint = "Invisible"
Var MotionHandPoint = 0
EndIf
EndIf
EndIf
Else
Var ShowHandPoint = "Invisible"
EndIf
If Show_btn_process = "Disable" Then
Var VideoSmoothieProcess = "ROOT/taobin_project/video/TaoBin_Tao_Pun_motion_proof3_pause.mp4"
Var Showhelper = "Enable"
Var Show_btn_help = "Invisible"
Else
If EnableHelperShow = 1 Then
Var Show_btn_help = "Enable"
Else
Var Show_btn_help = "Invisible"
EndIf
Var VideoSmoothieProcess = "ROOT/taobin_project/video/TaoBin_Tao_Pun_motion_proof3.mp4"
Var Showhelper = "Invisible"
EndIf
If TimeOutSmoothiesProcess < 100 Then
If TimeOutSmoothiesProcess < 10 Then
Var Second_x = 560
Var CountDown_x = 495
Else
Var Second_x = 580
Var CountDown_x = 475
EndIf
EndIf
If TimeOutSmoothiesProcess > 99 Then
Var Second_x = 600
Var CountDown_x = 460
EndIf
DEBUGVAR TimeOutSmoothiesProcess
If TimeOutSmoothiesProcess > 0 Then
If Show_btn_process = "Disable" Then
; do not thing
Else
If CurrHelpCenter = 1 Then
; do not thing to pause countdown smoothie process
Else
Var TimeOutSmoothiesProcess = TimeOutSmoothiesProcess - 1
EndIf
EndIf
EndIf
If TimeOutSmoothiesProcess = 2 Then
Machine DoorClose
EndIf
If TimeOutSmoothiesProcess = 0 Then
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 CountDownCupStageRunningTimeout
DEBUGVAR DoorCupPosition
DEBUGVAR buttonRemoveCup
DEBUGVAR SmoothieProcessState
DEBUGVAR AnyArmConfuse
DEBUGVAR SensorDoorCupStatus
DEBUGVAR ArmIDForMakeOrder
DEBUGVAR CountDownCertainConfuse
If ArmIDForMakeOrder = 2 Then
Var ChannelArmForProccessStatus = CH9992_Status
EndIf
If ArmIDForMakeOrder = 4 Then
Var ChannelArmForProccessStatus = CH9994_Status
EndIf
DEBUGVAR ChannelArmForProccessStatus
If ChannelArmForProccessStatus = "READY" Then
If DoorCupPosition = "bottom" Then
If SmoothieProcessState = "idle" Then
Var TextDoorButtonID = 001202
Else
If SmoothieProcessState = "insert" Then
Var TextDoorButtonID = 001203
Machine CheckCupLastIDProcess
Var SmoothieProcessState = "checking"
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
SAVELOG " CountDownCertainConfuse CountDownCertainConfuse "
Var CountDownCertainConfuse = 2
EndIf
If CountDownCertainConfuse > 0 Then
Var CountDownCertainConfuse = CountDownCertainConfuse - 1
If CountDownCertainConfuse = 0 Then
Machine DoorClose
EndIf
EndIf
EndIf
If SmoothieProcessState = "checking" Then
If CountDownCupStageRunningTimeout > 0 Then
Var CountDownCupStageRunningTimeout = CountDownCupStageRunningTimeout - 1
EndIf
If CountDownCupStageRunningTimeout = 0 Then
Var SmoothieProcessState = "idle"
Var TextDoorButtonID = 001202
EndIf
EndIf
Else
If ChannelArmForProccessStatus = "RUNNING" Then
Var SmoothieProcessState = "blendnow"
EndIf
EndIf
If SmoothieProcessState = "blendnow" Then
Var TextDoorButtonID = 001206
If DoorCupPosition = "bottom" Then
Var SmoothieProcessState = "blending"
Else
Machine DoorClose
EndIf
EndIf
If SmoothieProcessState = "blending" Then
Open "ROOT/taobin_project/inter/tha/xml/page_payment_pack_and_send.xml"
EndIf
DEBUGVAR TextDoorButtonID
Refresh
TimerReset
</EventTimeout>
; setvarint TimeOutSmoothiesProcess 2
;DEBUGVAR Var [ChannelArmForProccessStatus] = RUNNING
<Image>
<X> 0 </X>
<Y> 380 </Y>
<Width> 1080 </Width>
<Height> 1540 </Height>
<Color> "0xeae6e1" </Color>
</Image>
<EventLanguageOnChange>
DEBUGVAR LanguageShow
Var ButtonLanguageCurrentXPosition = 1015
Var ButtonLanguageCurrentYPosition = 458 - 38
Var ButtonLanguageListXPosition = 990
Var ButtonLanguageListYPosition = 450 - 38
Var LanguageButtonEnable = "Enable"
OpenInst 3 "ROOT/taobin_project/xml/topview2.xml"
RefreshAll
</EventLanguageOnChange>
;include="ROOT/taobin_project/inc/video.inc"
;
;
;
; zone
;
;
;
<Video>
<X> 0 </X>
<Y> 500 </Y>
<Refresh> "Reload" </Refresh>
<Loop> "true" </Loop>
<Filename> VideoSmoothieProcess </Filename>
</Video>
; helper
;<Image>
;<X> 420 </X>
;<Y> 652 </Y>
;<State> Showhelper </State>
;<Width> 240 </Width>
;<Height> 341 </Height>
;<Filename> "ROOT/taobin_project/image/page_help_center/helper.png" </Filename>
;</Image>
; Showhelper
;<Text>
;<X> 0 </X>
;<Y> 1080 </Y>
;<State> Showhelper </State>
;<Language>
;<ID> 002409 </ID>
;</Language>
;</Text>
; helper button
<Button>
<X> 940 </X>
<Y> 420 </Y>
<State> Show_btn_help </State>
<Filename> "ROOT/taobin_project/image/page_payment/helper.png" </Filename>
<FilenamePress> "ROOT/taobin_project/image/page_payment/helper.png" </FilenamePress>
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
<Volume> SoundVolume </Volume>
<EventClick>
Var OpenFromXML = "ROOT/taobin_project/inter/tha/xml/page_smoothie_suggest_and_process.xml"
OpenInst 3 "ROOT/taobin_project/xml/topview2.xml"
OpenInst 14 "ROOT/taobin_project/inter/tha/xml/page_help_center.lxml"
</EventClick>
</Button>
; helper button lead
<Button>
<X> 940 </X>
<Y> 420 </Y>
<State> Showhelper </State>
<Filename> "ROOT/taobin_project/image/page_help_center/help_lead.png" </Filename>
<FilenamePress> "ROOT/taobin_project/image/page_payment/helper.png" </FilenamePress>
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
<Volume> SoundVolume </Volume>
<EventClick>
Var OpenFromXML = "ROOT/taobin_project/inter/tha/xml/page_smoothie_suggest_and_process.xml"
Open "ROOT/taobin_project/xml/page_drinkfail2.xml"
</EventClick>
</Button>
<Button>
<X> 210 </X>
<Y> 1431 </Y>
<State> Show_btn_process </State>
<Filename> "ROOT/taobin_project/image/smoothie/proccess/bn_get_blend.png" </Filename>
<FilenamePress> "ROOT/taobin_project/image/smoothie/proccess/bp_get_blend.png" </FilenamePress>
<FilenameDisable> "ROOT/taobin_project/image/smoothie/proccess/bd_get_blend.png" </FilenameDisable>
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
<Volume> SoundVolume </Volume>
<EventClick>
SAVELOG " SmoothieProcessState press "
If DoorCupPosition = "top" Then
Else
If SmoothieProcessState = "checking" Then
Else
Var CountDownCupStageRunningTimeout = 15
Var CountDownCertainConfuse = 2
Var ArmIDForMakeOrderStr = "" + ArmIDForMakeOrder
DEBUGVAR ArmIDForMakeOrderStr
__CMD "UseArm" ArmIDForMakeOrderStr "-" "-"
Machine InsertCupAndOpen
EndIf
EndIf
Var SmoothieProcessState = "press"
</EventClick>
</Button>
<Text>
<X> 0 </X>
<Y> 1451 </Y>
<Width> 1080 </Width>
<Height> 85 </Height>
<Align> Center </Align>
<Language>
<ID> TextDoorButtonID </ID>
</Language>
</Text>
; second time
<Text>
<Refresh> "Enable" </Refresh>
<X> CountDown_x </X>
<Y> 1540 </Y>
<Size> 72 </Size>
<Font> RobotoBold </Font>
<Color> 0xFFFFFF </Color>
<Value> TimeOutSmoothiesProcess </Value>
</Text>
<Text>
<Refresh> "Enable" </Refresh>
<X> Second_x </X>
<Y> 1560 </Y>
<Size> 52 </Size>
<Font> RobotoBold </Font>
<Color> 0xFFFFFF </Color>
<Value> "S" </Value>
</Text>
<Image>
<X> 725 </X>
<Y> 1431 </Y>
<State> ShowHandPoint </State>
<Filename> "ROOT/taobin_project/image/smoothie/proccess/hand_point.png" </Filename>
<Image>
; cancel
<Button>
<X> 210 </X>
<Y> 1700 </Y>
<State> Show_btn_process </State>
<Filename> "ROOT/taobin_project/image/smoothie/proccess/bn_cancel_smoothie.png" </Filename>
<FilenamePress> "ROOT/taobin_project/image/smoothie/proccess/bp_cancel_smoothie.png" </FilenamePress>
<FilenameDisable> "ROOT/taobin_project/image/smoothie/proccess/bp_cancel_smoothie.png" </FilenameDisable>
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
<Volume> SoundVolume </Volume>
<EventClick>
SAVELOG " Cancel order press "
If DoorCupPosition = "bottom" Then
Var OpenFromXML = "ROOT/taobin_project/inter/tha/xml/page_smoothie_suggest_and_process.xml"
OpenInst 3 "ROOT/taobin_project/xml/topview2.xml"
Open "ROOT/taobin_project/inter/tha/xml/page_smoothie_suggest_and_process_2.xml"
EndIf
</EventClick>
</Button>
<Text>
<X> 0 </X>
<Y> 1724 </Y>
<Width> 1080 </Width>
<Height> 85 </Height>
<Align> Center </Align>
<Language>
<ID> 002402 </ID>
</Language>
</Text>
<Text>
<X> 5 </X>
<Y> 1880 </Y>
<Size> 24 </Size>
<Align> Center </Align>
<Width> 1080 </Width>
<Font> RobotoRegular </Font>
<Color> 0xFFFFFF </Color>
<Value> ProcessCupDebugText </Value>
</Text>
<Text>
<X> 1 </X>
<Y> 1 </Y>
<Font> KanitTTF </Font>
<Size> 22 </Size>
<Width> 1080 </Width>
<Align> end </Align>
<Color> 0xFF0000 </Color>
<Value> "V105 "</Value>
</Text>
<EventUnitTest1>
Open "ROOT/taobin_project/xml/page_back_to_main.xml"
</EventUnitTest1>
<EventUnitTest4>
Var StrawGetMoreState = "Invisible"
Var bg_lidProblem_ST = "Enable"
Var GetLidButtonState2 = "Invisible"
Var bg_lidProblem_ST2 ="Enable"
Var XStraw = 376
Var EnableGetMoreStrawFileName2 = "Invisible"
Var bg_strawProblem_ST2 ="Enable"
</EventUnitTest4>
<EventUnitTest2>
Var MachineState_Result = 0
Var waitAckPay = 1
Var BREW_COUNT_DOWN_FROM_APP = "on"
Var CountDownBrewing = 122
Var MachineStage = "testing"
Var BREW_CNT = 122
Var InternationalEnable = 1
DEBUGVAR InternationalEnable
Var LanguageObjectShow = "Enable"
Var NoLangObjectShow = "Invisible"
Var Top2Timeout = 19
DEBUGVAR CountDownBrewing
;Open "/mnt/sdcard/coffeevending/taobin_project/xml/page_lid_straw.xml"
</EventUnitTest2>
; Initial for jump to page_brewing3.xml
<EventUnitTest3>
;Open "ROOT/taobin_project/inter/tha/xml/page_collect_point_1.lxml"
Open "ROOT/taobin_project/xml/page_check_member2.xml"
</EventUnitTest3>
<EventUnitTest5>
<Name> "Set timeout put cup to 300 sec." </Name>
<Script>
Var TimeOutSmoothiesProcess = 300
</Script>
</EventUnitTest5>
<EventUnitTest6>
<Name> "Set timeout put cup to 5 sec." </Name>
<Script>
Var TimeOutSmoothiesProcess = 5
</Script>
</EventUnitTest6>
<EventUnitTest7>
<Name> "Put cup ready to blend." </Name>
<Script>
Var SmoothieProcessState = "blendnow"
</Script>
</EventUnitTest7>
<EventUnitTest8>
</EventUnitTest8>
</Popup>