add page test color
This commit is contained in:
parent
6bd1e91311
commit
164004102c
22 changed files with 286 additions and 0 deletions
269
xml/page_test_color.xml
Normal file
269
xml/page_test_color.xml
Normal file
|
|
@ -0,0 +1,269 @@
|
|||
<Page>
|
||||
<Width> 1080 </Width>
|
||||
<Height> 1312 </Height>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<Background> "0xeae6e1" </Background>
|
||||
|
||||
|
||||
<EventOpen>
|
||||
|
||||
Var TestColorImageDir = "ROOT/taobin_project/image/feature/test_color/"
|
||||
|
||||
Var RedImg = TestColorImageDir + "Red.png"
|
||||
Var OrangeImg = TestColorImageDir + "Orange.png"
|
||||
Var YellowImg = TestColorImageDir + "Yellow.png"
|
||||
Var GreenImg = TestColorImageDir + "Green.png"
|
||||
Var BlueImg = TestColorImageDir + "Blue.png"
|
||||
Var IndigoImg = TestColorImageDir + "Indigo.png"
|
||||
Var VioletImg = TestColorImageDir + "Violet.png"
|
||||
Var WhiteImg = TestColorImageDir + "White.png"
|
||||
|
||||
Var RedPressedImg = TestColorImageDir + "RedP.png"
|
||||
Var OrangePressedImg = TestColorImageDir + "OrangeP.png"
|
||||
Var YellowPressedImg = TestColorImageDir + "YellowP.png"
|
||||
Var GreenPressedImg = TestColorImageDir + "GreenP.png"
|
||||
Var BluePressedImg = TestColorImageDir + "BlueP.png"
|
||||
Var IndigoPressedImg = TestColorImageDir + "IndigoP.png"
|
||||
Var VioletPressedImg = TestColorImageDir + "VioletP.png"
|
||||
Var WhitePressedImg = TestColorImageDir + "WhiteP.png"
|
||||
|
||||
Var bn_on = TestColorImageDir + "bn_on.png"
|
||||
Var bp_on = TestColorImageDir + "bp_on.png"
|
||||
Var bn_off = TestColorImageDir + "bn_off.png"
|
||||
Var bp_off = TestColorImageDir + "bp_off.png"
|
||||
|
||||
SAVELOG "Test Color RGB"
|
||||
Var Timeout = 0
|
||||
|
||||
; 255 0 0
|
||||
Var RedColorValue = "0xFF0000"
|
||||
; 255 127 0
|
||||
Var OrangeColorValue = "0xFF7F00"
|
||||
; 255 255 0
|
||||
Var YellowColorValue = "0xFFFF00"
|
||||
; 0 255 0
|
||||
Var GreenColorValue = "0x00FF00"
|
||||
; 0 0 255
|
||||
Var BlueColorValue = "0x0000FF"
|
||||
; 75 0 130
|
||||
Var IndigoColorValue = "0x4B0082"
|
||||
; 145 0 211
|
||||
Var VioletColorValue = "0x9400D3"
|
||||
; 255 255 255
|
||||
Var WhiteColorValue = "0xFFFFFF"
|
||||
|
||||
Var CurrentColor = ""
|
||||
|
||||
Var TestColorRow1 = 100
|
||||
Var TestColorRow2 = 300
|
||||
Var TestColorRow3 = 500
|
||||
Var TestColorRow4 = 700
|
||||
|
||||
|
||||
Var TestColorCol1X = 100
|
||||
Var TestColorCol2X = 400
|
||||
Var TestColorCol3X = 600
|
||||
|
||||
|
||||
|
||||
</EventOpen>
|
||||
|
||||
<Timeout>1000</Timeout>
|
||||
<EventTimeout>
|
||||
Var Timeout = Timeout + 1
|
||||
|
||||
If Timeout > 60 Then
|
||||
Open "ROOT/taobin_project/xml/vending_info.xml"
|
||||
EndIf
|
||||
|
||||
Refresh
|
||||
TimerReset
|
||||
</EventTimeout>
|
||||
|
||||
|
||||
|
||||
<Button>
|
||||
<X> 19 </X>
|
||||
<Y> 0 </Y>
|
||||
<Filename> "ROOT/taobin_project/image/page2/bn_back_arrow.png" </Filename>
|
||||
<FilenamePress> "ROOT/taobin_project/image/page2/bn_back_arrow.png" </FilenamePress>
|
||||
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventClick>
|
||||
Open "ROOT/taobin_project/xml/vending_info.xml"
|
||||
</EventClick>
|
||||
</Button>
|
||||
|
||||
|
||||
; 3-columns
|
||||
; col-1-4colors
|
||||
; col-2-4colors
|
||||
; col-3-btn-on-off
|
||||
<Button>
|
||||
<X> TestColorCol1X </X>
|
||||
<Y> TestColorRow1 </Y>
|
||||
<Filename> RedImg </Filename>
|
||||
<FilenamePress> RedPressedImg </FilenamePress>
|
||||
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventClick>
|
||||
Var CurrentColor = "Red"
|
||||
</EventClick>
|
||||
</Button>
|
||||
|
||||
<Button>
|
||||
<X> TestColorCol2X </X>
|
||||
<Y> TestColorRow1 </Y>
|
||||
<Filename> BlueImg </Filename>
|
||||
<FilenamePress> BluePressedImg </FilenamePress>
|
||||
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventClick>
|
||||
Var CurrentColor = "Blue"
|
||||
</EventClick>
|
||||
</Button>
|
||||
|
||||
<Button>
|
||||
<X> TestColorCol1X </X>
|
||||
<Y> TestColorRow2 </Y>
|
||||
<Filename> OrangeImg </Filename>
|
||||
<FilenamePress> OrangePressedImg </FilenamePress>
|
||||
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventClick>
|
||||
Var CurrentColor = "Orange"
|
||||
</EventClick>
|
||||
</Button>
|
||||
|
||||
<Button>
|
||||
<X> TestColorCol2X </X>
|
||||
<Y> TestColorRow2 </Y>
|
||||
<Filename> IndigoImg </Filename>
|
||||
<FilenamePress> IndigoPressedImg </FilenamePress>
|
||||
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventClick>
|
||||
Var CurrentColor = "Indigo"
|
||||
</EventClick>
|
||||
</Button>
|
||||
|
||||
<Button>
|
||||
<X> TestColorCol1X </X>
|
||||
<Y> TestColorRow3 </Y>
|
||||
<Filename> YellowImg </Filename>
|
||||
<FilenamePress> YellowPressedImg </FilenamePress>
|
||||
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventClick>
|
||||
Var CurrentColor = "Yellow"
|
||||
</EventClick>
|
||||
</Button>
|
||||
|
||||
<Button>
|
||||
<X> TestColorCol2X </X>
|
||||
<Y> TestColorRow3 </Y>
|
||||
<Filename> VioletImg </Filename>
|
||||
<FilenamePress> VioletPressedImg </FilenamePress>
|
||||
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventClick>
|
||||
Var CurrentColor = "Violet"
|
||||
</EventClick>
|
||||
</Button>
|
||||
|
||||
<Button>
|
||||
<X> TestColorCol1X </X>
|
||||
<Y> TestColorRow4 </Y>
|
||||
<Filename> GreenImg </Filename>
|
||||
<FilenamePress> GreenPressedImg </FilenamePress>
|
||||
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventClick>
|
||||
Var CurrentColor = "Green"
|
||||
</EventClick>
|
||||
</Button>
|
||||
|
||||
<Button>
|
||||
<X> TestColorCol2X </X>
|
||||
<Y> TestColorRow4 </Y>
|
||||
<Filename> WhiteImg </Filename>
|
||||
<FilenamePress> WhitePressedImg </FilenamePress>
|
||||
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventClick>
|
||||
Var CurrentColor = "White"
|
||||
</EventClick>
|
||||
</Button>
|
||||
|
||||
|
||||
<Button>
|
||||
<X> TestColorCol3X </X>
|
||||
<Y> 110 </Y>
|
||||
<Filename> bn_on </Filename>
|
||||
<FilenamePress> bp_on </FilenamePress>
|
||||
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventClick>
|
||||
If CurrentColor = "Red" Then
|
||||
LEDv2 LedDoorCupV2 On 255 0 0 20 6
|
||||
EndIf
|
||||
If CurrentColor = "Orange" Then
|
||||
LEDv2 LedDoorCupV2 On 255 127 0 20 6
|
||||
EndIf
|
||||
If CurrentColor = "Yellow" Then
|
||||
LEDv2 LedDoorCupV2 On 255 255 0 20 6
|
||||
EndIf
|
||||
If CurrentColor = "Green" Then
|
||||
LEDv2 LedDoorCupV2 On 0 255 0 20 6
|
||||
EndIf
|
||||
If CurrentColor = "Blue" Then
|
||||
LEDv2 LedDoorCupV2 On 0 0 255 20 6
|
||||
EndIf
|
||||
If CurrentColor = "Indigo" Then
|
||||
LEDv2 LedDoorCupV2 On 75 0 130 20 6
|
||||
EndIf
|
||||
If CurrentColor = "Violet" Then
|
||||
LEDv2 LedDoorCupV2 On 145 0 211 20 6
|
||||
EndIf
|
||||
If CurrentColor = "White" Then
|
||||
LEDv2 LedDoorCupV2 On 255 255 255 20 6
|
||||
EndIf
|
||||
</EventClick>
|
||||
</Button>
|
||||
|
||||
<Button>
|
||||
<X> TestColorCol3X </X>
|
||||
<Y> 310 </Y>
|
||||
<Filename> bn_off </Filename>
|
||||
<FilenamePress> bp_off </FilenamePress>
|
||||
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventClick>
|
||||
If CurrentColor = "Red" Then
|
||||
LEDv2 LedDoorCupV2 Off 255 0 0 20 6
|
||||
EndIf
|
||||
If CurrentColor = "Orange" Then
|
||||
LEDv2 LedDoorCupV2 Off 255 127 0 20 6
|
||||
EndIf
|
||||
If CurrentColor = "Yellow" Then
|
||||
LEDv2 LedDoorCupV2 Off 255 255 0 20 6
|
||||
EndIf
|
||||
If CurrentColor = "Green" Then
|
||||
LEDv2 LedDoorCupV2 Off 0 255 0 20 6
|
||||
EndIf
|
||||
If CurrentColor = "Blue" Then
|
||||
LEDv2 LedDoorCupV2 Off 0 0 255 20 6
|
||||
EndIf
|
||||
If CurrentColor = "Indigo" Then
|
||||
LEDv2 LedDoorCupV2 Off 75 0 130 20 6
|
||||
EndIf
|
||||
If CurrentColor = "Violet" Then
|
||||
LEDv2 LedDoorCupV2 Off 145 0 211 20 6
|
||||
EndIf
|
||||
If CurrentColor = "White" Then
|
||||
LEDv2 LedDoorCupV2 Off 255 255 255 20 6
|
||||
EndIf
|
||||
</EventClick>
|
||||
</Button>
|
||||
|
||||
</Page>
|
||||
|
|
@ -1037,7 +1037,24 @@
|
|||
</Text>
|
||||
|
||||
|
||||
;Color
|
||||
<Image>
|
||||
<X> info2_startX </X>
|
||||
<Y> info_15Y </Y>
|
||||
<Filename> "ROOT/taobin_project/image/tab_1.png" </Filename>
|
||||
<EventClick>
|
||||
Open "/mnt/sdcard/coffeevending/taobin_project/xml/page_test_color.xml"
|
||||
</EventClick>
|
||||
</Image>
|
||||
|
||||
<Text>
|
||||
<X> info2_text_startX </X>
|
||||
<Y> info_text_15Y </Y>
|
||||
<Size> 30 </Size>
|
||||
<Font> fontType1 </Font>
|
||||
<Color> 0x000000 </Color>
|
||||
<Value> "Test RGB" </Value>
|
||||
</Text>
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue