taobin_project/xml/page_drink_stuck.xml

469 lines
8.7 KiB
XML
Raw Normal View History

2024-01-22 13:06:50 +07:00
<Popup>
<Cache> "Enable" </Cache>
<Width> 1080 </Width>
<Height> 1920 </Height>
<Background> "0xeae6e1" </Background>
<Volume> SoundVolume </Volume>
<Sound> "ROOT/sounds/Ding-dong.wav" </Sound>
<EventOpen>
DEBUGVAR StarwState
DEBUGVAR LidState
DEBUGVAR Seeker.PictureDrink
DEBUGVAR Seeker.showname
Var buttonRemoveCup = "Invisible"
Var TextBottomShow = "Enable"
If show_eng = "true" Then
Var DirImage2 = "ROOT/taobin_project/image/topping2_en"
Else
Var DirImage2 = "ROOT/taobin_project/image/topping2"
EndIf
Var bg_strawlid_ST = "Enable"
Var bg_strawProblem_ST = "Invisible"
;Var bg_strawProblem_Y = 1470
Var bg_strawProblem = DirImage2 + "/bg_strawProblem.png"
Var straw_problem_flag = 0
If Seeker.strawAction = 1 Then
Machine Straw
;Var bg_strawlid = DirImage2 + "/bg_strawProblem.png"
Var bg_strawProblem_ST = "Enable"
If Seeker.lidAction = 0 Then
Else
;Var bg_strawProblem_Y = 1680
Var bg_strawlid_ST = "Invisible"
Var LidStateX = "Invisible"
Var StrawStateX = "Invisible"
EndIf
EndIf
If Seeker.lidAction = 1 Then
Machine Lid
EndIf
Var ExtendData = Seeker.ExtendData
; On open
Var LidState = "Enable"
Var StarwState = "Enable"
Var videoEnd = 0
If show_eng = "true" Then
Var DirImage = "ROOT/taobin_project/image/complete_en/"
Else
Var DirImage = "ROOT/taobin_project/image/complete/"
EndIf
Var VideoPlayFile = VideoPath
Var VideoPlayFile = VideoPlayFile + VideoFileBegin
Var VideoPlayFile = VideoPlayFile + "24"
Var VideoPlayFile = VideoPlayFile + VideoFileEnd
Var Timeout = 0
Var Timeout2 = 0
StopLongPlay
;Var show_eng = "false"
Var sendPayMultiFlag = 0
Var next_pic = ""
Var next_name = ""
Var nextCount = ""
Var next_pic_bg = ""
Var BlinkImg = 0
Var txtDrinkOKState = "Invisible"
Var MultiGo = 1
Var sendPayMultiFlag = 1
Var bg_strawlid_ST = "Invisible"
Var bg_strawProblem_ST = "Invisible"
Var StrawStateX = "Invisible"
Var LidStateX = "Invisible"
LED LedDoorCup 1 255 255 255 255
Var DelayButton = 0
DEBUGVAR GetMoreStrawCount
If GetMoreStrawCount <= 0 Then
If StrawProblemStatus = 1 Then
Var bg_strawProblem_ST = "Enable"
EndIf
EndIf
</EventOpen>
<Timeout> 500 </Timeout>
<EventTimeout>
DEBUGVAR LastMakeDrinkResult
DEBUGVAR MachineStage
DEBUGVAR CupOnArm
DEBUGVAR buttonRemoveCup
DEBUGVAR CART_COUNT
DEBUGVAR HaveCup
DEBUGVAR CHECKCUP
DEBUGVAR CupChecking
DEBUGVAR MaybeHaveCup
DEBUGVAR NextOrder
DEBUGVAR DoorCupPosition
Var Timeout = Timeout + 1
If BrewTimeoutExtend = 1 Then
DEBUGVAR BrewTimeoutExtend
EndIf
If Timeout > 840 Then
SAVELOG "Longer Time out"
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 > 30 Then
Var MultiGo = 1
EndIf
If BlinkImg = 1 Then
Var next_pic_bg = DirImage + "/Preparing.png"
Var BlinkImg = 2
Else
If BlinkImg = 2 Then
Var next_pic_bg = DirImage + "/Preparing.png"
Var BlinkImg = 1
EndIf
EndIf
; Do not change
;
If MachineStage = "show-menu" Then
EndIf
If DoorCupPosition = "bottom" Then
Var buttonRemoveCup = "Enable"
Var txtDrinkOKState = "Enable"
EndIf
; away
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
EndIf
;
If MachineStage = "remove-cup" Then
If CART_COUNT = 0 Then
If NextOrder = "false" Then
Open "ROOT/taobin_project/xml/page_back_to_remove_cup.xml"
Else
Var buttonRemoveCup = "Enable"
Var txtDrinkOKState = "Enable"
Var Timeout2 = Timeout2 + 1
If Timeout2 > 15 Then
Play "/mnt/sdcard/coffeevending/taobin_project/sound_thai/remove_cup.mp3"
Var Timeout2 = 0
EndIf
EndIf
Else
Var buttonRemoveCup = "Enable"
Var txtDrinkOKState = "Enable"
Var Timeout2 = Timeout2 + 1
If Timeout2 > 15 Then
Play "/mnt/sdcard/coffeevending/taobin_project/sound_thai/remove_cup.mp3"
Var Timeout2 = 0
EndIf
EndIf
EndIf
If Timeout = 5 Then
If show_eng = "true" Then
2024-04-30 18:16:58 +07:00
Var PlaySoundStraw = "/mnt/sdcard/coffeevending/taobin_project/sound_eng/Straw.mp3"
If CountryName = "Australia" Then
Var PlaySoundStraw = "/mnt/sdcard/coffeevending/taobin_project/sound_eng/Straw_without_change.m4a"
EndIf
Play PlaySoundStraw
2024-01-22 13:06:50 +07:00
Else
Var PlaySoundLag = "/mnt/sdcard/coffeevending/taobin_project/sound_thai/drinkfinish.mp3"
; Play Sound #zone
If SoundBackToSchoolEnable = 1 Then
If SoundBackToSchoolType = 1 Then
Var RootPathSoundBackToSchool = "/mnt/sdcard/coffeevending/taobin_project/sound_thai/boy/"
EndIf
If SoundBackToSchoolType = 2 Then
Var RootPathSoundBackToSchool = "/mnt/sdcard/coffeevending/taobin_project/sound_thai/girl/"
EndIf
Var PlaySoundLag = RootPathSoundBackToSchool + "drinkfinish.wav"
EndIf
Play PlaySoundLag
EndIf
EndIf
If MachineStage = "close-maintenance" Then
If stop_now = "true" Then
If NextOrder = "true" Then
Var NextOrder = "false"
TransferVar "next" "curr"
Var Seeker = "curr"
SAVELOG "Make next order by take-cup with close-maintenance"
Open "ROOT/taobin_project/xml/page_cannotConti.xml"
Else
Open "ROOT/taobin_project/xml/page_back_to_main.xml"
EndIf
EndIf
EndIf
If txtDrinkOKState = "Enable" Then
Var TextBottomShow = "Invisible"
Else
Var TextBottomShow = "Enable"
EndIf
TimerReset
Refresh
</EventTimeout>
<EventChangeStatus>
If ChangeStatus = "payout-end" Then
Var MultiGo = 1
EndIf
</EventChangeStatus>
;include="ROOT/taobin_project/inc/video.inc"
2024-01-22 13:06:50 +07:00
<Video>
<X> 0 </X>
<Y> 380 </Y>
<Refresh> "Reload" </Refresh>
<Loop> "true" </Loop>
<Filename> VideoPlayFile </Filename>
</Video>
<Image>
<X> 757 </X>
<Y> 424 </Y>
<Filename> next_pic_bg </Filename>
</Image>
<Image>
<X> 125 </X>
<Y> 1700 </Y>
<Height> 300 </Height>
<Width> 320 </Width>
<Filename> Seeker.PictureDrink </Filename>
</Image>
<Text>
<X> 300 </X>
<Y> 1750 </Y>
<Width> 1080 </Width>
<Align> Center </Align>
<Size> 48 </Size>
<Color> 0x513C2F </Color>
<Value>
eval(
STRCONTAIN "size" Seeker.showname SizeFromSheet
If SizeFromSheet = "true" Then
SPLIT Seeker.showname "###" 1 PureName
Var return = PureName
Else
Var return = Seeker.showname
EndIf
)
</Value>
</Text>
<Image>
<X> 0 </X>
<Y> 1418 </Y>
<State> TextBottomShow </State>
<Filename> Var( DirImage + "text_bottom.png") </Filename>
</Image>
<Text>
<X> 757 </X>
<Y> 448 </Y>
<Size> 20 </Size>
<Width> 280</Width>
<Align> Center </Align>
<Font> RobotoBlack </Font>
<Color> 0x513C2F </Color>
<Value> nextCount </Value>
</Text>
<Text>
<X> 757 </X>
<Y> 538 </Y>
<Size> 20 </Size>
<Width> 280</Width>
<Align> Center </Align>
<Font> RobotoBlack </Font>
<Color> 0x513C2F </Color>
<Value> next_name </Value>
</Text>
<Image>
<X> 823 </X>
<Y> 600 </Y>
<Width> 148 </Width>
<Height> 200 </Height>
<Filename> next_pic </Filename>
</Image>
<Image>
<X> 77 </X>
<Y> 1378 </Y>
<State> txtDrinkOKState </State>
<Filename> Var( DirImage + "/txtDrinkOK.png" ) </Filename>
</Image>
<Button>
<X> 160 </X>
<Y> 1673 </Y>
<State> buttonRemoveCup </State>
;<Color> "0x00BDFF" </Color>
<Interval> 500 </Interval>
<Filename> Var( DirImage + "/bn_open_door.png" ) </Filename>
<FilenamePress> Var( DirImage + "/bp_open_door.png" ) </FilenamePress>
<EventClick>
;Var buttonRemoveCup = "Invisible"
Machine RemoveCup
Machine DoorLidOpen
Refresh
</EventClick>
</Button>
<EventUnitTest1>
Var MachineStage = "show-menu"
</EventUnitTest1>
</Popup>