adjust UX sugar 0 cal

This commit is contained in:
wanlop run 2024-03-08 22:54:19 +07:00
parent 390c770503
commit 7a60083da0
22 changed files with 456 additions and 583 deletions

View file

@ -4,29 +4,56 @@
<Height> 1920 </Height>
<Background> "0xeae6e1" </Background>
<Volume> SoundVolume </Volume>
<Sound> "ROOT/sounds/Ding-dong.wav" </Sound>
<EventOpen>
Var Timeout = 0
Var Timeout2 = 0
SAVELOG "page_pickup_cup_from_error.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
</EventOpen>
<Timeout> 1000 </Timeout>
<EventTimeout>
Var Timeout = Timeout + 1
DEBUGVAR MachineStage
DEBUGVAR HaveCup
DEBUGVAR CHECKCUP
DEBUGVAR DoorCupPosition
DEBUGVAR Timeout
DEBUGVAR Timeout2
If Timeout = 3 Then
If DoorCupPosition = "bottom" Then
@ -34,9 +61,36 @@
EndIf
EndIf
If Timeout > 120 Then
SAVELOG "Not pickup CUP"
If show_eng = "true" Then
Else
If HaveCup = "true" Then
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
If Timeout > 180 Then
If DoorCupPosition = "bottom" Then
SAVELOG "Not pickup CUP"
Open "ROOT/taobin_project/xml/page_brewing3Conti.xml"
Else
Machine DoorClose
EndIf
EndIf
If Timeout > 240 Then
SAVELOG "Timeout 240 from can not close door"
Open "ROOT/taobin_project/xml/page_brewing3Conti.xml"
EndIf
@ -46,12 +100,36 @@
; 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"
Var txtDrinkOKState = "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_brewing3Conti.xml"
EndIf
@ -71,31 +149,27 @@
<Image>
<X> 757 </X>
<Y> 424 </Y>
<Filename> next_pic_bg </Filename>
<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> 1418 </Y>
<State> TextBottomShow </State>
<Filename> Var( DirImage + "text_bottom.png") </Filename>
<Y> 609 </Y>
<Filename> Var(DirImage + "/img_take_cup_for_next_brew.png") </Filename>
</Image>
<Button>
<X> 160 </X>
<X> 212 </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>
<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>
;Var buttonRemoveCup = "Invisible"
Machine RemoveCup
Machine DoorLidOpen
Refresh