DO unify
This commit is contained in:
parent
922ae67bd3
commit
b7ad0d3ac8
85 changed files with 4360 additions and 5 deletions
183
xml/menu_new_layout_gen.py
Normal file
183
xml/menu_new_layout_gen.py
Normal file
|
|
@ -0,0 +1,183 @@
|
|||
|
||||
out_xml('<FrameScroll> \r\n')
|
||||
out_xml('<X> 10 </X>\r\n')
|
||||
out_xml('<Y> 497 </Y>\r\n')
|
||||
out_xml('<Width> 1080 </Width>\r\n')
|
||||
out_xml('<ScrollHeight> "auto" </ScrollHeight>\r\n')
|
||||
out_xml('<Scroll> "Vertical" </Scroll>\r\n')
|
||||
out_xml('<Column> 4 </Column>\r\n')
|
||||
|
||||
count_test = 0
|
||||
out_xml('; menu_new_list '+ str(len(menu_new_list))+'\r\n')
|
||||
for spl in menu_new_list:
|
||||
#product_code = s
|
||||
menu_img = spl[7]
|
||||
out_xml( '\t; '+ spl[4] + ' ' + spl[5] + ' ' + spl[6]+ ' \r\n')
|
||||
out_xml( '<Block>\r\n')
|
||||
out_xml('\t<MarginLeft> 33 </MarginLeft>\r\n')
|
||||
out_xml('\t<MarginTop> 22 </MarginTop>\r\n')
|
||||
out_xml('\t<Width> 225 </Width>\r\n')
|
||||
out_xml('\t<Height> 296 </Height>\r\n')
|
||||
out_xml( '\t<State> Flag( \" ' + spl[4] + '.Button,' + spl[5] + '.Button,' + spl[6] + '.Button\") </State> \r\n')
|
||||
|
||||
out_xml( '\t<Button>\r\n')
|
||||
out_xml( '\t<State> "Enable" </State> \r\n')
|
||||
out_xml( '\t<Filename> "' + new_default_dir + '/'+ menu_img +'" </Filename>\r\n')
|
||||
out_xml( '\t<FilenamePress> "' + new_default_dir_press + '/'+ menu_img +'" </FilenamePress>\r\n')
|
||||
out_xml( '\t<FilenameDisable> "' + new_default_dir + '/'+ menu_img +'" </FilenameDisable>\r\n')
|
||||
out_xml( '\t<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>\r\n')
|
||||
out_xml( '\t<Volume> SoundVolume </Volume>\r\n')
|
||||
out_xml( '\t<EventOnClick> \r\n')
|
||||
|
||||
|
||||
|
||||
out_xml( '\t</EventOnClick>\r\n')
|
||||
out_xml( '\t</Button>\r\n')
|
||||
|
||||
|
||||
|
||||
out_xml( '\t<Text>\r\n')
|
||||
out_xml( '\t<X> 16 </X>\r\n')
|
||||
out_xml( '\t<Y> 164 </Y>\r\n')
|
||||
out_xml( '\t<Size> 24 </Size>\r\n')
|
||||
out_xml( '\t<Width>220</Width>\r\n')
|
||||
out_xml( '\t<Mode> "multi2" </Mode>\r\n')
|
||||
out_xml( '\t<Font> KanitMediumTTF </Font>\r\n')
|
||||
out_xml( '\t<Color> 0x322B26 </Color>\r\n')
|
||||
out_xml( '\t<State> showthaiText </State>\r\n')
|
||||
out_xml( '\t<Value> "' + spl[0] + '" </Value>\r\n')
|
||||
out_xml( '\t</Text>\r\n')
|
||||
|
||||
out_xml( '\t<Text>\r\n')
|
||||
out_xml( '\t<X> 16 </X>\r\n')
|
||||
out_xml( '\t<Y> 220 </Y>\r\n')
|
||||
out_xml( '\t<Size> 14 </Size>\r\n')
|
||||
out_xml( '\t<Width>220</Width>\r\n')
|
||||
out_xml( '\t<Font> KanitMediumTTF </Font>\r\n')
|
||||
out_xml( '\t<Color> 0x6F5F51 </Color>\r\n')
|
||||
out_xml( '\t<State> showthaiText </State>\r\n')
|
||||
out_xml( '\t<Value> "' + spl[2] + '" </Value>\r\n')
|
||||
out_xml( '\t</Text>\r\n')
|
||||
|
||||
|
||||
out_xml( '\t<Text>\r\n')
|
||||
out_xml( '\t<X> 16 </X>\r\n')
|
||||
out_xml( '\t<Y> 164 </Y>\r\n')
|
||||
out_xml( '\t<Size> 22 </Size>\r\n')
|
||||
out_xml( '\t<Width>220</Width>\r\n')
|
||||
out_xml( '\t<Mode> "multi2" </Mode>\r\n')
|
||||
out_xml( '\t<Font> KanitMediumTTF </Font>\r\n')
|
||||
out_xml( '\t<Color> 0x322B26 </Color>\r\n')
|
||||
out_xml( '\t<State> showengText </State>\r\n')
|
||||
out_xml( '\t<Value> "' + spl[1] + '" </Value>\r\n')
|
||||
out_xml( '\t</Text>\r\n')
|
||||
|
||||
out_xml( '\t<Text>\r\n')
|
||||
out_xml( '\t<X> 16 </X>\r\n')
|
||||
out_xml( '\t<Y> 220 </Y>\r\n')
|
||||
out_xml( '\t<Size> 14 </Size>\r\n')
|
||||
out_xml( '\t<Width>220</Width>\r\n')
|
||||
out_xml( '\t<Font> KanitMediumTTF </Font>\r\n')
|
||||
out_xml( '\t<Color> 0x6F5F51 </Color>\r\n')
|
||||
out_xml( '\t<State> showengText </State>\r\n')
|
||||
out_xml( '\t<Value> "' + spl[3] + '" </Value>\r\n')
|
||||
out_xml( '\t</Text>\r\n')
|
||||
|
||||
out_xml( '\t<Image>\r\n')
|
||||
out_xml( '\t<X> 16 </X>\r\n')
|
||||
out_xml( '\t<Y> 264 </Y>\r\n')
|
||||
out_xml( '\t<Filename> Var( DirImage2 + "option_deactive.png" ) </Filename>\r\n')
|
||||
out_xml( '\t</Image>\r\n')
|
||||
|
||||
shw = "Enable"
|
||||
if spl[4] == "-" :
|
||||
shw = "Invisible"
|
||||
|
||||
out_xml( '\t<Image>\r\n')
|
||||
out_xml( '\t<X> 16 </X>\r\n')
|
||||
out_xml( '\t<Y> 264 </Y>\r\n')
|
||||
out_xml( '\t<State> "' + shw + '" </State>\r\n')
|
||||
out_xml( '\t<Filename> Var( DirImage2 + "hot.png" ) </Filename>\r\n')
|
||||
out_xml( '\t</Image>\r\n')
|
||||
|
||||
out_xml( '\t<Text>\r\n')
|
||||
out_xml( '\t<X> 50 </X>\r\n')
|
||||
out_xml( '\t<Y> 265 </Y>\r\n')
|
||||
out_xml( '\t<Size> 14 </Size>\r\n')
|
||||
out_xml( '\t<Width>220</Width>\r\n')
|
||||
out_xml( '\t<Font> KanitMediumTTF </Font>\r\n')
|
||||
out_xml( '\t<Color> 0x6F5F51 </Color>\r\n')
|
||||
out_xml( '\t<State> "' + shw + '" </State>\r\n')
|
||||
|
||||
out_xml( '\t<Value> Var( "฿" + $' + spl[4] + '.Price ) </Value>\r\n')
|
||||
out_xml( '\t</Text>\r\n')
|
||||
|
||||
shw = "Enable"
|
||||
if spl[5] == "-" :
|
||||
shw = "Invisible"
|
||||
|
||||
out_xml( '\t<Image>\r\n')
|
||||
out_xml( '\t<X> 81 </X>\r\n')
|
||||
out_xml( '\t<Y> 264 </Y>\r\n')
|
||||
out_xml( '\t<Filename> Var( DirImage2 + "cold.png" ) </Filename>\r\n')
|
||||
out_xml( '\t<State> "' + shw + '" </State>\r\n')
|
||||
out_xml( '\t</Image>\r\n')
|
||||
|
||||
out_xml( '\t<Text>\r\n')
|
||||
out_xml( '\t<X> 115 </X>\r\n')
|
||||
out_xml( '\t<Y> 265 </Y>\r\n')
|
||||
out_xml( '\t<Size> 14 </Size>\r\n')
|
||||
out_xml( '\t<Width>220</Width>\r\n')
|
||||
out_xml( '\t<Font> KanitMediumTTF </Font>\r\n')
|
||||
out_xml( '\t<Color> 0x6F5F51 </Color>\r\n')
|
||||
out_xml( '\t<State> "' + shw + '" </State>\r\n')
|
||||
out_xml( '\t<Value> Var( "฿" + $' + spl[5] + '.Price ) </Value>\r\n')
|
||||
out_xml( '\t</Text>\r\n')
|
||||
|
||||
shw = "Enable"
|
||||
if spl[6] == "-" :
|
||||
shw = "Invisible"
|
||||
|
||||
out_xml( '\t<Image>\r\n')
|
||||
out_xml( '\t<X> 146 </X>\r\n')
|
||||
out_xml( '\t<Y> 264 </Y>\r\n')
|
||||
out_xml( '\t<Filename> Var( DirImage2 + "blend.png" ) </Filename>\r\n')
|
||||
out_xml( '\t<State> "' + shw + '" </State>\r\n')
|
||||
out_xml( '\t</Image>\r\n')
|
||||
|
||||
out_xml( '\t<Text>\r\n')
|
||||
out_xml( '\t<X> 180 </X>\r\n')
|
||||
out_xml( '\t<Y> 265 </Y>\r\n')
|
||||
out_xml( '\t<Size> 14 </Size>\r\n')
|
||||
out_xml( '\t<Width>220</Width>\r\n')
|
||||
out_xml( '\t<Font> KanitMediumTTF </Font>\r\n')
|
||||
out_xml( '\t<Color> 0x6F5F51 </Color>\r\n')
|
||||
out_xml( '\t<State> "' + shw + '" </State>\r\n')
|
||||
out_xml( '\t<Value> Var( "฿" + $' + spl[6] + '.Price ) </Value>\r\n')
|
||||
out_xml( '\t</Text>\r\n')
|
||||
|
||||
out_xml( '</Block>\r\n')
|
||||
count_test = count_test + 1
|
||||
#if count_test > 8 :
|
||||
# break
|
||||
|
||||
|
||||
|
||||
out_xml('</FrameScroll>\r\n')
|
||||
|
||||
|
||||
out_xml('; Cart\r\n')
|
||||
out_xml('<Button>\r\n')
|
||||
out_xml('<X> 915 </X>\r\n')
|
||||
out_xml('<Y> 1769 </Y>\r\n')
|
||||
out_xml('<State> showCart </State>\r\n')
|
||||
out_xml('<Filename> cart_image_bn </Filename>\r\n')
|
||||
out_xml('<FilenamePress> cart_image_bp </FilenamePress>\r\n')
|
||||
out_xml('<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>\r\n')
|
||||
out_xml('<Volume> SoundVolume </Volume>\r\n')
|
||||
out_xml('<EventClick> \r\n')
|
||||
out_xml('\tOpen "ROOT/taobin_project/xml/page_payment_multi.xml"\r\n')
|
||||
out_xml('</EventClick>\r\n')
|
||||
out_xml('</Button>\r\n')
|
||||
|
||||
|
||||
88
xml/page_catalog_group_coffee.skt
Normal file
88
xml/page_catalog_group_coffee.skt
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
<?hurr
|
||||
#include=menu_head.py
|
||||
?>
|
||||
|
||||
<Popup>
|
||||
<Cache> "Enable" </Cache>
|
||||
<Width> 1080 </Width>
|
||||
<Height> 1920 </Height>
|
||||
<Background> "0xeae6e1" </Background>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventOpen>
|
||||
; On open
|
||||
<?hurr
|
||||
#include=menu_catalog_default_init.xml
|
||||
?>
|
||||
If SpiralOnline = "true" Then
|
||||
Var Menu1Selected2 = "PressForever"
|
||||
Else
|
||||
; coffee show
|
||||
Var Menu1Selected = "PressForever"
|
||||
EndIf
|
||||
|
||||
|
||||
|
||||
SAVELOG PreviseXMLFileName2
|
||||
|
||||
Var Timeout = 0
|
||||
|
||||
Var showCart = "Invisible"
|
||||
If MultiPayEnable = "true" Then
|
||||
|
||||
If CART_COUNT = 1 Then
|
||||
Var showCart = "Enable"
|
||||
Var cart_image_bn = DirImageCart + "/bn_cart1.png"
|
||||
Var cart_image_bp = DirImageCart + "/bp_cart1.png"
|
||||
EndIf
|
||||
|
||||
If CART_COUNT = 2 Then
|
||||
Var showCart = "Enable"
|
||||
Var cart_image_bn = DirImageCart + "/bn_cart2.png"
|
||||
Var cart_image_bp = DirImageCart + "/bp_cart2.png"
|
||||
EndIf
|
||||
|
||||
|
||||
|
||||
If CART_COUNT = 3 Then
|
||||
Open "ROOT/taobin_project/xml/page_payment_multi.xml"
|
||||
EndIf
|
||||
|
||||
EndIf
|
||||
|
||||
If show_eng = "true" Then
|
||||
Var DirImage2 = "ROOT/taobin_project/image/drink_option_en/"
|
||||
Else
|
||||
Var DirImage2 = "ROOT/taobin_project/image/drink_option/"
|
||||
EndIf
|
||||
|
||||
</EventOpen>
|
||||
|
||||
|
||||
<?hurr
|
||||
#include=menu_catalog.xml
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<Button>
|
||||
<X> 780 </X>
|
||||
<Y> 500 </Y>
|
||||
<State> buttonRemoveCup </State>
|
||||
;<Color> "0x00BDFF" </Color>
|
||||
<Interval> 500 </Interval>
|
||||
<Filename> "ROOT/taobin_project/image/main_page/bn_remove_cup.png" </Filename>
|
||||
<Filename> "ROOT/taobin_project/image/main_page/bp_remove_cup.png" </Filename>
|
||||
<EventClick>
|
||||
Machine RemoveCup
|
||||
Machine DoorLidOpen
|
||||
</EventClick>
|
||||
</Button>
|
||||
|
||||
|
||||
|
||||
<?hurr
|
||||
#include=menu_new_layout_gen.py
|
||||
?>
|
||||
|
||||
|
||||
</Popup>
|
||||
3935
xml/page_catalog_group_coffee.xml
Normal file
3935
xml/page_catalog_group_coffee.xml
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -185,6 +185,7 @@
|
|||
SAVELOG ExtendData
|
||||
|
||||
If GetPayInfoFlag = 0 Then
|
||||
SaveLog "RoadShow test"
|
||||
If RoadShow = "false" Then
|
||||
;CoinVending ON
|
||||
CoinVending XBILL
|
||||
|
|
|
|||
|
|
@ -43,27 +43,32 @@
|
|||
EndIf
|
||||
EndIf
|
||||
|
||||
DEBUGVAR stop_now
|
||||
DEBUGVAR MachineStage
|
||||
|
||||
If MachineStage = "close-maintenance" Then
|
||||
If stop_now = "true" Then
|
||||
If show_eng = "true" Then
|
||||
Var DirImage = "ROOT/taobin_project/image/vending_error_en/"
|
||||
|
||||
Else
|
||||
Var DirImage = "ROOT/taobin_project/image/vending_error"
|
||||
EndIf
|
||||
Else
|
||||
|
||||
Var show_error_normal = "Enable"
|
||||
Var show_error_sp1 = "Invisible"
|
||||
|
||||
If show_eng = "true" Then
|
||||
Var DirImage = "ROOT/taobin_project/image/close_en/"
|
||||
|
||||
Else
|
||||
Var DirImage = "ROOT/taobin_project/image/close_th"
|
||||
EndIf
|
||||
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
DEBUGVAR DirImage
|
||||
|
||||
If MachineStage = "drink-failed" Then
|
||||
If stop_now = "true" Then
|
||||
If show_eng = "true" Then
|
||||
|
|
@ -94,7 +99,7 @@
|
|||
LED LedDoorLid Off 255 255 255 255
|
||||
EndIf
|
||||
|
||||
Var MaintenanceCard = 16
|
||||
Var MaintenanceCard = 20
|
||||
Random MaintenanceCard
|
||||
Var index = 1 + MaintenanceCard
|
||||
|
||||
|
|
@ -111,6 +116,7 @@
|
|||
DEBUGVAR DoorLidPosition
|
||||
DEBUGVAR EmergencyStop
|
||||
|
||||
Var TimeOut = 0
|
||||
</EventOpen>
|
||||
<Timeout> 5000 </Timeout>
|
||||
<EventTimeout>
|
||||
|
|
@ -158,6 +164,13 @@
|
|||
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
Var TimeOut = TimeOut + 1
|
||||
If TimeOut > 12 Then
|
||||
Var TimeOut = 0
|
||||
Open "ROOT/taobin_project/xml/page_show_error.xml"
|
||||
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue