Reorg repo
This commit is contained in:
21
hmi/dev/nspanel_us_code/Program.s.txt
Normal file
21
hmi/dev/nspanel_us_code/Program.s.txt
Normal file
@@ -0,0 +1,21 @@
|
||||
Program.s
|
||||
//The following code is only run once when power on, and is generally used for global variable definition and power on initialization data
|
||||
int sys0=0,sys1=0,sys2=0,swipex=0,swipey=0,swipex2=0,swipey2=0,swipec=0,swipec2=0,swipedx=100,swipedy=100 //At present, the definition of global variable only supports 4-byte signed integer (int), and other types of global quantity declaration are not supported. If you want to use string type, you can use variable control in the page to implement
|
||||
int r=0,g=0,b=0
|
||||
int h=0,s=0,v=0
|
||||
int p=0,q=0,t=0,f=0
|
||||
int back_page_id=0
|
||||
int dimdelta=0
|
||||
int api=0 // 0 = disconnected from HA, 1 = connected to HA
|
||||
int is_entities=0,is_qrcode=0,is_notification=0
|
||||
int brightness=100,brightness_dim=40,brightness_sleep=0
|
||||
int display_mode=2 // 1 = EU, 2 = US, 3 = US landscape, 4 = blank
|
||||
int charset=1 // 1 = International (original), 2 = CJK
|
||||
//bauds=115200//Configure baudrate
|
||||
recmod=0//Serial data parsing mode:0-Passive mode;1-Active mode
|
||||
printh 00 00 00 ff ff ff 88 ff ff ff//Output power on information to serial port
|
||||
if(display_mode==1)
|
||||
{
|
||||
lcd_dev fffb 0002 0000 0020// Fix touch offset for EU Version
|
||||
}
|
||||
page 8//Power on start page boot
|
||||
431
hmi/dev/nspanel_us_code/alarm.txt
Normal file
431
hmi/dev/nspanel_us_code/alarm.txt
Normal file
@@ -0,0 +1,431 @@
|
||||
Page alarm
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Locked : no
|
||||
Swide up page ID : disabled
|
||||
Swide down page ID : disabled
|
||||
Swide left page ID : disabled
|
||||
Swide right page ID: disabled
|
||||
|
||||
Events
|
||||
Preinitialize Event
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
vis bt_home,0
|
||||
vis bt_away,0
|
||||
vis bt_night,0
|
||||
vis bt_vacat,0
|
||||
vis bt_bypass,0
|
||||
}
|
||||
vis unavailable,0
|
||||
|
||||
Postinitialize Event
|
||||
sendme
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 255
|
||||
|
||||
Variable (string) code_format
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 15
|
||||
|
||||
Variable (string) entity
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 100
|
||||
|
||||
Variable (string) code_arm_req
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 1
|
||||
|
||||
Text page_label
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : Alarm Control Panel
|
||||
Max. Text Size : 100
|
||||
|
||||
Text icon_state
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : î’—
|
||||
Max. Text Size : 10
|
||||
|
||||
Text bt_home_text
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Home
|
||||
Max. Text Size : 22
|
||||
|
||||
Text bt_away_text
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Away
|
||||
Max. Text Size : 22
|
||||
|
||||
Text bt_night_text
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Night
|
||||
Max. Text Size : 22
|
||||
|
||||
Text bt_vacat_text
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Vacation
|
||||
Max. Text Size : 22
|
||||
|
||||
Text bt_bypass_text
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Bypass
|
||||
Max. Text Size : 22
|
||||
|
||||
Text bt_disarm_text
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Disarm
|
||||
Max. Text Size : 22
|
||||
|
||||
Text bt_home_icon
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : 
|
||||
Max. Text Size : 3
|
||||
|
||||
Text bt_away_icon
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : 
|
||||
Max. Text Size : 3
|
||||
|
||||
Text bt_night_icon
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : ï §
|
||||
Max. Text Size : 3
|
||||
|
||||
Text bt_vacat_icon
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : 
|
||||
Max. Text Size : 3
|
||||
|
||||
Text bt_bypass_icon
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : î¿
|
||||
Max. Text Size : 3
|
||||
|
||||
Text bt_disarm_icon
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : î¦
|
||||
Max. Text Size : 3
|
||||
|
||||
Text unavailable
|
||||
Attributes
|
||||
ID : 33
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Picture bt_home_pic
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture bt_away_pic
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture bt_night_pic
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture bt_vacat_pic
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture bt_bypass_pic
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture bt_disarm_pic
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 31
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : î…˜
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page back_page_id
|
||||
|
||||
Hotspot bt_home
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
bt_home_pic.pic=44
|
||||
bt_home_text.bco=65024
|
||||
bt_home_text.pco=0
|
||||
bt_home_icon.bco=65024
|
||||
bt_home_icon.pco=0
|
||||
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"alarm\", \"key\": \"home\", \"value\": \"click\", \"mui\": \""+bt_home_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Hotspot bt_away
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
bt_away_pic.pic=44
|
||||
bt_away_text.bco=65024
|
||||
bt_away_text.pco=0
|
||||
bt_away_icon.bco=65024
|
||||
bt_away_icon.pco=0
|
||||
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"alarm\", \"key\": \"away\", \"value\": \"click\", \"mui\": \""+bt_away_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Hotspot bt_night
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
bt_night_pic.pic=44
|
||||
bt_night_text.bco=65024
|
||||
bt_night_text.pco=0
|
||||
bt_night_icon.bco=65024
|
||||
bt_night_icon.pco=0
|
||||
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"alarm\", \"key\": \"night\", \"value\": \"click\", \"mui\": \""+bt_night_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Hotspot bt_vacat
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
bt_vacat_pic.pic=44
|
||||
bt_vacat_text.bco=65024
|
||||
bt_vacat_text.pco=0
|
||||
bt_vacat_icon.bco=65024
|
||||
bt_vacat_icon.pco=0
|
||||
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"alarm\", \"key\": \"vacation\", \"value\": \"click\", \"mui\": \""+bt_vacat_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Hotspot bt_bypass
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
bt_bypass_pic.pic=44
|
||||
bt_bypass_text.bco=65024
|
||||
bt_bypass_text.pco=0
|
||||
bt_bypass_icon.bco=65024
|
||||
bt_bypass_icon.pco=0
|
||||
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"alarm\", \"key\": \"bypass\", \"value\": \"click\", \"mui\": \""+bt_bypass_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Hotspot bt_disarm
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
bt_disarm_pic.pic=44
|
||||
bt_disarm_text.bco=65024
|
||||
bt_disarm_text.pco=0
|
||||
bt_disarm_icon.bco=65024
|
||||
bt_disarm_icon.pco=0
|
||||
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"alarm\", \"key\": \"disarm\", \"value\": \"click\", \"mui\": \""+bt_disarm_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 32
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
223
hmi/dev/nspanel_us_code/boot.txt
Normal file
223
hmi/dev/nspanel_us_code/boot.txt
Normal file
@@ -0,0 +1,223 @@
|
||||
Page boot
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Locked : no
|
||||
Swide up page ID : disabled
|
||||
Swide down page ID : disabled
|
||||
Swide left page ID : disabled
|
||||
Swide right page ID: disabled
|
||||
|
||||
Events
|
||||
Preinitialize Event
|
||||
dim=100
|
||||
covx baud,baud_rate.txt,0,0
|
||||
baud_rate.txt+=" bps"
|
||||
vis unavailable,0
|
||||
|
||||
Postinitialize Event
|
||||
sendme
|
||||
|
||||
Page Exit Event
|
||||
dim=0
|
||||
|
||||
Variable (int32) counter
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (string) aux1
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Text ip_addr
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : Initializing...
|
||||
Max. Text Size : 15
|
||||
|
||||
Text t0
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : Please wait...
|
||||
Max. Text Size : 15
|
||||
|
||||
Text t1
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : The process can take\r\nseveral seconds!
|
||||
Max. Text Size : 50
|
||||
|
||||
Text tft_label
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : TFT:
|
||||
Max. Text Size : 4
|
||||
|
||||
Text esph_label
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : ESPHome:
|
||||
Max. Text Size : 8
|
||||
|
||||
Text bluep_label
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : Blueprint:
|
||||
Max. Text Size : 10
|
||||
|
||||
Text tft_version
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : 4.3dev
|
||||
Max. Text Size : 9
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
if(api==0)
|
||||
{
|
||||
rest
|
||||
}
|
||||
|
||||
Text esph_version
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 9
|
||||
|
||||
Text bluep_version
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 9
|
||||
|
||||
Text baud_rate
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text framework
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text unavailable
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Dual-state Button bt_reboot
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : Reboot
|
||||
Max. Text Size : 6
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
if(api==0)
|
||||
{
|
||||
rest
|
||||
}
|
||||
|
||||
Timer tm_esphome
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Period (ms): 10000
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
counter.val++
|
||||
if(counter.val>30)
|
||||
{
|
||||
rest
|
||||
}
|
||||
sendme
|
||||
printh 91
|
||||
prints "display_mode",0
|
||||
printh 00
|
||||
prints display_mode,0
|
||||
printh FF FF FF
|
||||
printh 91
|
||||
prints "charset",0
|
||||
printh 00
|
||||
prints charset,0
|
||||
printh FF FF FF
|
||||
printh 92
|
||||
prints "tft_version",0
|
||||
printh 00
|
||||
prints tft_version.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
covx counter.val,aux1.txt,0,0
|
||||
esph_version.txt="Retry #"+aux1.txt
|
||||
sys0=counter.val%10
|
||||
if(sys0==0)
|
||||
{
|
||||
bauds=115200
|
||||
}
|
||||
covx baud,baud_rate.txt,0,0
|
||||
baud_rate.txt+=" bps"
|
||||
|
||||
804
hmi/dev/nspanel_us_code/buttonpage01.txt
Normal file
804
hmi/dev/nspanel_us_code/buttonpage01.txt
Normal file
@@ -0,0 +1,804 @@
|
||||
Page buttonpage01
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Locked : no
|
||||
Swide up page ID : disabled
|
||||
Swide down page ID : disabled
|
||||
Swide left page ID : disabled
|
||||
Swide right page ID: disabled
|
||||
|
||||
Events
|
||||
Preinitialize Event
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
vis 255,0
|
||||
vis button_back,1
|
||||
vis page_index,1
|
||||
}
|
||||
|
||||
Postinitialize Event
|
||||
sendme
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 100
|
||||
|
||||
Variable (string) click_comp
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 8
|
||||
|
||||
Variable (string) page_name
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Text : buttonpage01
|
||||
Max. Text Size: 12
|
||||
|
||||
Variable (int32) confirm
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Text page_label
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 100
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : â—â—‹â—‹â—‹
|
||||
Max. Text Size : 12
|
||||
|
||||
Text button01pic
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 0
|
||||
|
||||
Text button02pic
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 0
|
||||
|
||||
Text button03pic
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 0
|
||||
|
||||
Text button04pic
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 0
|
||||
|
||||
Text button05pic
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 0
|
||||
|
||||
Text button06pic
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 0
|
||||
|
||||
Text button07pic
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 0
|
||||
|
||||
Text button08pic
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 0
|
||||
|
||||
Text button01text
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button02text
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button03text
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button04text
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button05text
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button06text
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button07text
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button08text
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button01icon
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button02icon
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button03icon
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button04icon
|
||||
Attributes
|
||||
ID : 31
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button05icon
|
||||
Attributes
|
||||
ID : 32
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button06icon
|
||||
Attributes
|
||||
ID : 33
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button07icon
|
||||
Attributes
|
||||
ID : 34
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button08icon
|
||||
Attributes
|
||||
ID : 35
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button01bri
|
||||
Attributes
|
||||
ID : 36
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button02bri
|
||||
Attributes
|
||||
ID : 37
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button03bri
|
||||
Attributes
|
||||
ID : 38
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button04bri
|
||||
Attributes
|
||||
ID : 39
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button05bri
|
||||
Attributes
|
||||
ID : 40
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button06bri
|
||||
Attributes
|
||||
ID : 41
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button07bri
|
||||
Attributes
|
||||
ID : 42
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button08bri
|
||||
Attributes
|
||||
ID : 43
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text unavailable
|
||||
Attributes
|
||||
ID : 52
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : î…˜
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Hotspot button01
|
||||
Attributes
|
||||
ID : 44
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button01"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&1
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button01text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button02
|
||||
Attributes
|
||||
ID : 45
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button02"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&2
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button02text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button03
|
||||
Attributes
|
||||
ID : 46
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button03"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&4
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button03text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button04
|
||||
Attributes
|
||||
ID : 47
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button04"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&8
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button04text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button05
|
||||
Attributes
|
||||
ID : 48
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button05"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&16
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button05text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button06
|
||||
Attributes
|
||||
ID : 49
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button06"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&32
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button06text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button07
|
||||
Attributes
|
||||
ID : 50
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button07"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&64
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button07text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button08
|
||||
Attributes
|
||||
ID : 51
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button08"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&128
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button08text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer click_timer
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Period (ms): 800
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
click_timer.en=0
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page home
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page buttonpage02
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
804
hmi/dev/nspanel_us_code/buttonpage02.txt
Normal file
804
hmi/dev/nspanel_us_code/buttonpage02.txt
Normal file
@@ -0,0 +1,804 @@
|
||||
Page buttonpage02
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Locked : no
|
||||
Swide up page ID : disabled
|
||||
Swide down page ID : disabled
|
||||
Swide left page ID : disabled
|
||||
Swide right page ID: disabled
|
||||
|
||||
Events
|
||||
Preinitialize Event
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
vis 255,0
|
||||
vis button_back,1
|
||||
vis page_index,1
|
||||
}
|
||||
|
||||
Postinitialize Event
|
||||
sendme
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 100
|
||||
|
||||
Variable (string) click_comp
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 8
|
||||
|
||||
Variable (string) page_name
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Text : buttonpage02
|
||||
Max. Text Size: 12
|
||||
|
||||
Variable (int32) confirm
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Text page_label
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 100
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : â—‹â—â—‹â—‹
|
||||
Max. Text Size : 12
|
||||
|
||||
Text button01pic
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 0
|
||||
|
||||
Text button02pic
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 0
|
||||
|
||||
Text button03pic
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 0
|
||||
|
||||
Text button04pic
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 0
|
||||
|
||||
Text button05pic
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 0
|
||||
|
||||
Text button06pic
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 0
|
||||
|
||||
Text button07pic
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 0
|
||||
|
||||
Text button08pic
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 0
|
||||
|
||||
Text button01text
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button02text
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button03text
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button04text
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button05text
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button06text
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button07text
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button08text
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button01icon
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button02icon
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button03icon
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button04icon
|
||||
Attributes
|
||||
ID : 31
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button05icon
|
||||
Attributes
|
||||
ID : 32
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button06icon
|
||||
Attributes
|
||||
ID : 33
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button07icon
|
||||
Attributes
|
||||
ID : 34
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button08icon
|
||||
Attributes
|
||||
ID : 35
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button01bri
|
||||
Attributes
|
||||
ID : 36
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button02bri
|
||||
Attributes
|
||||
ID : 37
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button03bri
|
||||
Attributes
|
||||
ID : 38
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button04bri
|
||||
Attributes
|
||||
ID : 39
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button05bri
|
||||
Attributes
|
||||
ID : 40
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button06bri
|
||||
Attributes
|
||||
ID : 41
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button07bri
|
||||
Attributes
|
||||
ID : 42
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button08bri
|
||||
Attributes
|
||||
ID : 43
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text unavailable
|
||||
Attributes
|
||||
ID : 52
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : î…˜
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Hotspot button01
|
||||
Attributes
|
||||
ID : 44
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button01"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&1
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button01text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button02
|
||||
Attributes
|
||||
ID : 45
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button02"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&2
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button02text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button03
|
||||
Attributes
|
||||
ID : 46
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button03"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&4
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button03text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button04
|
||||
Attributes
|
||||
ID : 47
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button04"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&8
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button04text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button05
|
||||
Attributes
|
||||
ID : 48
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button05"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&16
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button05text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button06
|
||||
Attributes
|
||||
ID : 49
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button06"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&32
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button06text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button07
|
||||
Attributes
|
||||
ID : 50
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button07"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&64
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button07text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button08
|
||||
Attributes
|
||||
ID : 51
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button08"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&128
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button08text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer click_timer
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Period (ms): 800
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
click_timer.en=0
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page buttonpage01
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page buttonpage03
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
804
hmi/dev/nspanel_us_code/buttonpage03.txt
Normal file
804
hmi/dev/nspanel_us_code/buttonpage03.txt
Normal file
@@ -0,0 +1,804 @@
|
||||
Page buttonpage03
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Locked : no
|
||||
Swide up page ID : disabled
|
||||
Swide down page ID : disabled
|
||||
Swide left page ID : disabled
|
||||
Swide right page ID: disabled
|
||||
|
||||
Events
|
||||
Preinitialize Event
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
vis 255,0
|
||||
vis button_back,1
|
||||
vis page_index,1
|
||||
}
|
||||
|
||||
Postinitialize Event
|
||||
sendme
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 100
|
||||
|
||||
Variable (string) click_comp
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 8
|
||||
|
||||
Variable (string) page_name
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Text : buttonpage03
|
||||
Max. Text Size: 12
|
||||
|
||||
Variable (int32) confirm
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Text page_label
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 100
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : â—‹â—‹â—â—‹
|
||||
Max. Text Size : 12
|
||||
|
||||
Text button01pic
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 0
|
||||
|
||||
Text button02pic
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 0
|
||||
|
||||
Text button03pic
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 0
|
||||
|
||||
Text button04pic
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 0
|
||||
|
||||
Text button05pic
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 0
|
||||
|
||||
Text button06pic
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 0
|
||||
|
||||
Text button07pic
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 0
|
||||
|
||||
Text button08pic
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 0
|
||||
|
||||
Text button01text
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button02text
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button03text
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button04text
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button05text
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button06text
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button07text
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button08text
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button01icon
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button02icon
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button03icon
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button04icon
|
||||
Attributes
|
||||
ID : 31
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button05icon
|
||||
Attributes
|
||||
ID : 32
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button06icon
|
||||
Attributes
|
||||
ID : 33
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button07icon
|
||||
Attributes
|
||||
ID : 34
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button08icon
|
||||
Attributes
|
||||
ID : 35
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button01bri
|
||||
Attributes
|
||||
ID : 36
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button02bri
|
||||
Attributes
|
||||
ID : 37
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button03bri
|
||||
Attributes
|
||||
ID : 38
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button04bri
|
||||
Attributes
|
||||
ID : 39
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button05bri
|
||||
Attributes
|
||||
ID : 40
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button06bri
|
||||
Attributes
|
||||
ID : 41
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button07bri
|
||||
Attributes
|
||||
ID : 42
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button08bri
|
||||
Attributes
|
||||
ID : 43
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text unavailable
|
||||
Attributes
|
||||
ID : 52
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : î…˜
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Hotspot button01
|
||||
Attributes
|
||||
ID : 44
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button01"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&1
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button01text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button02
|
||||
Attributes
|
||||
ID : 45
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button02"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&2
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button02text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button03
|
||||
Attributes
|
||||
ID : 46
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button03"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&4
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button03text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button04
|
||||
Attributes
|
||||
ID : 47
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button04"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&8
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button04text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button05
|
||||
Attributes
|
||||
ID : 48
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button05"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&16
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button05text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button06
|
||||
Attributes
|
||||
ID : 49
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button06"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&32
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button06text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button07
|
||||
Attributes
|
||||
ID : 50
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button07"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&64
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button07text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button08
|
||||
Attributes
|
||||
ID : 51
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button08"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&128
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button08text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer click_timer
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Period (ms): 800
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
click_timer.en=0
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page buttonpage02
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page buttonpage04
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
804
hmi/dev/nspanel_us_code/buttonpage04.txt
Normal file
804
hmi/dev/nspanel_us_code/buttonpage04.txt
Normal file
@@ -0,0 +1,804 @@
|
||||
Page buttonpage04
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Locked : no
|
||||
Swide up page ID : disabled
|
||||
Swide down page ID : disabled
|
||||
Swide left page ID : disabled
|
||||
Swide right page ID: disabled
|
||||
|
||||
Events
|
||||
Preinitialize Event
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
vis 255,0
|
||||
vis button_back,1
|
||||
vis page_index,1
|
||||
}
|
||||
|
||||
Postinitialize Event
|
||||
sendme
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 100
|
||||
|
||||
Variable (string) click_comp
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 8
|
||||
|
||||
Variable (string) page_name
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Text : buttonpage04
|
||||
Max. Text Size: 12
|
||||
|
||||
Variable (int32) confirm
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Text page_label
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 100
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : â—‹â—‹â—‹â—
|
||||
Max. Text Size : 12
|
||||
|
||||
Text button01pic
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 0
|
||||
|
||||
Text button02pic
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 0
|
||||
|
||||
Text button03pic
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 0
|
||||
|
||||
Text button04pic
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 0
|
||||
|
||||
Text button05pic
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 0
|
||||
|
||||
Text button06pic
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 0
|
||||
|
||||
Text button07pic
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 0
|
||||
|
||||
Text button08pic
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 0
|
||||
|
||||
Text button01text
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button02text
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button03text
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button04text
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button05text
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button06text
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button07text
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button08text
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button01icon
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button02icon
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button03icon
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button04icon
|
||||
Attributes
|
||||
ID : 31
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button05icon
|
||||
Attributes
|
||||
ID : 32
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button06icon
|
||||
Attributes
|
||||
ID : 33
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button07icon
|
||||
Attributes
|
||||
ID : 34
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button08icon
|
||||
Attributes
|
||||
ID : 35
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button01bri
|
||||
Attributes
|
||||
ID : 36
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button02bri
|
||||
Attributes
|
||||
ID : 37
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button03bri
|
||||
Attributes
|
||||
ID : 38
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button04bri
|
||||
Attributes
|
||||
ID : 39
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button05bri
|
||||
Attributes
|
||||
ID : 40
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button06bri
|
||||
Attributes
|
||||
ID : 41
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button07bri
|
||||
Attributes
|
||||
ID : 42
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button08bri
|
||||
Attributes
|
||||
ID : 43
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text unavailable
|
||||
Attributes
|
||||
ID : 52
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : î…˜
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Hotspot button01
|
||||
Attributes
|
||||
ID : 44
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button01"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&1
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button01text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button02
|
||||
Attributes
|
||||
ID : 45
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button02"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&2
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button02text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button03
|
||||
Attributes
|
||||
ID : 46
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button03"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&4
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button03text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button04
|
||||
Attributes
|
||||
ID : 47
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button04"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&8
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button04text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button05
|
||||
Attributes
|
||||
ID : 48
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button05"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&16
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button05text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button06
|
||||
Attributes
|
||||
ID : 49
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button06"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&32
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button06text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button07
|
||||
Attributes
|
||||
ID : 50
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button07"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&64
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button07text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button08
|
||||
Attributes
|
||||
ID : 51
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button08"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&128
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button08text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer click_timer
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Period (ms): 800
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
click_timer.en=0
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page buttonpage03
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page home
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
934
hmi/dev/nspanel_us_code/climate.txt
Normal file
934
hmi/dev/nspanel_us_code/climate.txt
Normal file
@@ -0,0 +1,934 @@
|
||||
Page climate
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Locked : no
|
||||
Swide up page ID : disabled
|
||||
Swide down page ID : disabled
|
||||
Swide left page ID : disabled
|
||||
Swide right page ID: disabled
|
||||
|
||||
Events
|
||||
Preinitialize Event
|
||||
if(api==1||embedded.val==1)
|
||||
{
|
||||
vis target_icon,0
|
||||
vis target_high,0
|
||||
vis target_low,0
|
||||
vis current_temp,0
|
||||
vis climateslider,0
|
||||
vis slider_high,0
|
||||
vis slider_low,0
|
||||
vis button01,0
|
||||
vis button02,0
|
||||
vis button03,0
|
||||
vis button04,0
|
||||
vis button05,0
|
||||
vis button06,0
|
||||
vis button07,0
|
||||
}else
|
||||
{
|
||||
page home
|
||||
}
|
||||
vis unavailable,0
|
||||
|
||||
Postinitialize Event
|
||||
sendme
|
||||
|
||||
Page Exit Event
|
||||
covx embedded.val,va2.txt,0,0
|
||||
if(timer0.en==1)
|
||||
{
|
||||
timer0.en=0
|
||||
covx temp_number0.val,va1.txt,0,0
|
||||
climatesetting.txt="{\"page\": \"climate\", \"key\": \"temperature\", \"value\": "+va1.txt+", \"embedded\": "+va2.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints climatesetting.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
if(timer1.en==1)
|
||||
{
|
||||
timer1.en=0
|
||||
covx temp_number1.val,va1.txt,0,0
|
||||
climatesetting.txt="{\"page\": \"climate\", \"key\": \"target_temp_high\", \"value\": "+va1.txt+", \"embedded\": "+va2.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints climatesetting.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
if(timer2.en==1)
|
||||
{
|
||||
timer2.en=0
|
||||
covx temp_number2.val,va1.txt,0,0
|
||||
climatesetting.txt="{\"page\": \"climate\", \"key\": \"target_temp_low\", \"value\": "+va1.txt+", \"embedded\": "+va2.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints climatesetting.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Variable (string) va1
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (string) climatesetting
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 255
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 255
|
||||
|
||||
Variable (int32) temp_offset
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (int32) temp_step
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope: local
|
||||
Value: 1
|
||||
|
||||
Variable (int32) temp_number0
|
||||
Attributes
|
||||
ID : 33
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (int32) va0
|
||||
Attributes
|
||||
ID : 34
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (int32) embedded
|
||||
Attributes
|
||||
ID : 35
|
||||
Scope: global
|
||||
Value: 0
|
||||
|
||||
Variable (string) va2
|
||||
Attributes
|
||||
ID : 36
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (string) click_comp
|
||||
Attributes
|
||||
ID : 38
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 8
|
||||
|
||||
Variable (int32) active_slider
|
||||
Attributes
|
||||
ID : 42
|
||||
Scope: local
|
||||
Value: 1
|
||||
|
||||
Variable (int32) is_temp_range
|
||||
Attributes
|
||||
ID : 44
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (int32) temp_number1
|
||||
Attributes
|
||||
ID : 48
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (int32) temp_number2
|
||||
Attributes
|
||||
ID : 49
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (string) temp_unit
|
||||
Attributes
|
||||
ID : 50
|
||||
Scope : local
|
||||
Text : °
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (int32) temp_low_max
|
||||
Attributes
|
||||
ID : 51
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (int32) temp_high_min
|
||||
Attributes
|
||||
ID : 52
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (int32) temp_gap
|
||||
Attributes
|
||||
ID : 53
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Text current_temp
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 25
|
||||
|
||||
Text page_label
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 100
|
||||
|
||||
Text target_icon
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value01_icon
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value01
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 6
|
||||
|
||||
Text value02_icon
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value02
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 6
|
||||
|
||||
Text value03_icon
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value03
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 6
|
||||
|
||||
Text value04_icon
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value04
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 6
|
||||
|
||||
Text button01
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : îº
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
covx embedded.val,va2.txt,0,0
|
||||
lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"auto\", \"embedded\": "+va2.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text button02
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : î©
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
covx embedded.val,va2.txt,0,0
|
||||
lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"heat_cool\", \"embedded\": "+va2.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text button03
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : 
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
covx embedded.val,va2.txt,0,0
|
||||
lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"heat\", \"embedded\": "+va2.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text button04
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : 
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
covx embedded.val,va2.txt,0,0
|
||||
lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"cool\", \"embedded\": "+va2.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text button05
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : î–
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
covx embedded.val,va2.txt,0,0
|
||||
lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"dry\", \"embedded\": "+va2.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text button06
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : îˆ
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
covx embedded.val,va2.txt,0,0
|
||||
lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"fan_only\", \"embedded\": "+va2.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text button07
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : î¤
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
covx embedded.val,va2.txt,0,0
|
||||
lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"off\", \"embedded\": "+va2.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text button08
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button08"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
lastclick.txt="{\"page\": \"climate\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Text button09
|
||||
Attributes
|
||||
ID : 31
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button09"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
lastclick.txt="{\"page\": \"climate\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Text target_high
|
||||
Attributes
|
||||
ID : 32
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
active_slider.val=is_temp_range.val
|
||||
|
||||
Text target_low
|
||||
Attributes
|
||||
ID : 43
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
active_slider.val=2
|
||||
|
||||
Text unavailable
|
||||
Attributes
|
||||
ID : 54
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Slider slider_high
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
Position : 215
|
||||
Upper range limit: 400
|
||||
Lower range limit: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
temp_gap.val=3*temp_step.val
|
||||
temp_high_min.val=slider_low.val+temp_gap.val
|
||||
|
||||
Touch Release Event
|
||||
if(slider_high.val<temp_high_min.val)
|
||||
{
|
||||
slider_high.val=temp_high_min.val
|
||||
}
|
||||
temp_number1.val=slider_high.val*temp_step.val
|
||||
temp_number1.val+=temp_offset.val
|
||||
va0.val=temp_number1.val/10
|
||||
covx va0.val,target_high.txt,0,0
|
||||
va0.val=temp_number1.val%10
|
||||
covx va0.val,va1.txt,0,0
|
||||
target_high.txt+="."+va1.txt
|
||||
target_high.txt+=temp_unit.txt
|
||||
timer1.en=1
|
||||
active_slider.val=1
|
||||
temp_gap.val=3*temp_step.val
|
||||
temp_low_max.val=slider_high.val-temp_gap.val
|
||||
|
||||
Slider slider_low
|
||||
Attributes
|
||||
ID : 41
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
Position : 185
|
||||
Upper range limit: 400
|
||||
Lower range limit: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
temp_gap.val=3*temp_step.val
|
||||
temp_low_max.val=slider_high.val-temp_gap.val
|
||||
|
||||
Touch Release Event
|
||||
if(slider_low.val>temp_low_max.val)
|
||||
{
|
||||
slider_low.val=temp_low_max.val
|
||||
}
|
||||
temp_number2.val=slider_low.val*temp_step.val
|
||||
temp_number2.val+=temp_offset.val
|
||||
va0.val=temp_number2.val/10
|
||||
covx va0.val,target_low.txt,0,0
|
||||
va0.val=temp_number2.val%10
|
||||
covx va0.val,va1.txt,0,0
|
||||
target_low.txt+="."+va1.txt
|
||||
target_low.txt+=temp_unit.txt
|
||||
timer2.en=1
|
||||
active_slider.val=2
|
||||
temp_gap.val=3*temp_step.val
|
||||
temp_high_min.val=slider_low.val+temp_gap.val
|
||||
|
||||
Slider climateslider
|
||||
Attributes
|
||||
ID : 45
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
Position : 200
|
||||
Upper range limit: 400
|
||||
Lower range limit: 0
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
temp_number0.val=climateslider.val*temp_step.val
|
||||
temp_number0.val+=temp_offset.val
|
||||
va0.val=temp_number0.val/10
|
||||
covx va0.val,target_high.txt,0,0
|
||||
va0.val=temp_number0.val%10
|
||||
covx va0.val,va1.txt,0,0
|
||||
target_high.txt+="."+va1.txt
|
||||
target_high.txt+=temp_unit.txt
|
||||
active_slider.val=0
|
||||
timer0.en=1
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 37
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : î…˜
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page back_page_id
|
||||
|
||||
Hotspot decrease_temp
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
if(active_slider.val==0)
|
||||
{
|
||||
if(climateslider.val>0)
|
||||
{
|
||||
climateslider.val--
|
||||
temp_number0.val=climateslider.val*temp_step.val
|
||||
temp_number0.val+=temp_offset.val
|
||||
va0.val=temp_number0.val/10
|
||||
covx va0.val,target_high.txt,0,0
|
||||
va0.val=temp_number0.val%10
|
||||
covx va0.val,va1.txt,0,0
|
||||
target_high.txt+="."+va1.txt
|
||||
target_high.txt+=temp_unit.txt
|
||||
}
|
||||
}else if(active_slider.val==1)
|
||||
{
|
||||
if(slider_high.val>0)
|
||||
{
|
||||
slider_high.val--
|
||||
temp_number1.val=slider_high.val*temp_step.val
|
||||
temp_number1.val+=temp_offset.val
|
||||
va0.val=temp_number1.val/10
|
||||
covx va0.val,target_high.txt,0,0
|
||||
va0.val=temp_number1.val%10
|
||||
covx va0.val,va1.txt,0,0
|
||||
target_high.txt+="."+va1.txt
|
||||
target_high.txt+=temp_unit.txt
|
||||
}
|
||||
}else if(active_slider.val==2)
|
||||
{
|
||||
if(slider_low.val>0)
|
||||
{
|
||||
slider_low.val--
|
||||
temp_number2.val=slider_low.val*temp_step.val
|
||||
temp_number2.val+=temp_offset.val
|
||||
va0.val=temp_number2.val/10
|
||||
covx va0.val,target_low.txt,0,0
|
||||
va0.val=temp_number2.val%10
|
||||
covx va0.val,va1.txt,0,0
|
||||
target_low.txt+="."+va1.txt
|
||||
target_low.txt+=temp_unit.txt
|
||||
}
|
||||
}
|
||||
|
||||
Touch Release Event
|
||||
if(active_slider.val==0)
|
||||
{
|
||||
timer0.en=1
|
||||
}else if(active_slider.val==1)
|
||||
{
|
||||
timer1.en=1
|
||||
}else if(active_slider.val==2)
|
||||
{
|
||||
timer2.en=1
|
||||
}
|
||||
|
||||
Hotspot increase_temp
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
if(active_slider.val==0)
|
||||
{
|
||||
if(climateslider.val<climateslider.maxval)
|
||||
{
|
||||
climateslider.val++
|
||||
temp_number0.val=climateslider.val*temp_step.val
|
||||
temp_number0.val+=temp_offset.val
|
||||
va0.val=temp_number0.val/10
|
||||
covx va0.val,target_high.txt,0,0
|
||||
va0.val=temp_number0.val%10
|
||||
covx va0.val,va1.txt,0,0
|
||||
target_high.txt+="."+va1.txt
|
||||
target_high.txt+=temp_unit.txt
|
||||
}
|
||||
}else if(active_slider.val==1)
|
||||
{
|
||||
if(slider_high.val<slider_high.maxval)
|
||||
{
|
||||
slider_high.val++
|
||||
temp_number1.val=slider_high.val*temp_step.val
|
||||
temp_number1.val+=temp_offset.val
|
||||
va0.val=temp_number1.val/10
|
||||
covx va0.val,target_high.txt,0,0
|
||||
va0.val=temp_number1.val%10
|
||||
covx va0.val,va1.txt,0,0
|
||||
target_high.txt+="."+va1.txt
|
||||
target_high.txt+=temp_unit.txt
|
||||
}
|
||||
}else if(active_slider.val==2)
|
||||
{
|
||||
if(slider_low.val<slider_low.maxval)
|
||||
{
|
||||
slider_low.val++
|
||||
temp_number2.val=slider_low.val*temp_step.val
|
||||
temp_number2.val+=temp_offset.val
|
||||
va0.val=temp_number2.val/10
|
||||
covx va0.val,target_low.txt,0,0
|
||||
va0.val=temp_number2.val%10
|
||||
covx va0.val,va1.txt,0,0
|
||||
target_low.txt+="."+va1.txt
|
||||
target_low.txt+=temp_unit.txt
|
||||
}
|
||||
}
|
||||
|
||||
Touch Release Event
|
||||
if(active_slider.val==0)
|
||||
{
|
||||
timer0.en=1
|
||||
}else if(active_slider.val==1)
|
||||
{
|
||||
timer1.en=1
|
||||
}else if(active_slider.val==2)
|
||||
{
|
||||
timer2.en=1
|
||||
}
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer timer0
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Period (ms): 1000
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
timer0.en=0
|
||||
covx embedded.val,va2.txt,0,0
|
||||
covx temp_number0.val,va1.txt,0,0
|
||||
climatesetting.txt="{\"page\": \"climate\", \"key\": \"temperature\", \"value\": "+va1.txt+", \"embedded\": "+va2.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints climatesetting.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Timer click_timer
|
||||
Attributes
|
||||
ID : 39
|
||||
Scope : local
|
||||
Period (ms): 800
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
lastclick.txt="{\"page\": \"climate\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
click_timer.en=0
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 40
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
Timer timer1
|
||||
Attributes
|
||||
ID : 46
|
||||
Scope : local
|
||||
Period (ms): 1000
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
timer1.en=0
|
||||
covx embedded.val,va2.txt,0,0
|
||||
covx temp_number1.val,va1.txt,0,0
|
||||
climatesetting.txt="{\"page\": \"climate\", \"key\": \"target_temp_high\", \"value\": "+va1.txt+", \"embedded\": "+va2.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints climatesetting.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Timer timer2
|
||||
Attributes
|
||||
ID : 47
|
||||
Scope : local
|
||||
Period (ms): 1000
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
timer2.en=0
|
||||
covx embedded.val,va2.txt,0,0
|
||||
covx temp_number2.val,va1.txt,0,0
|
||||
climatesetting.txt="{\"page\": \"climate\", \"key\": \"target_temp_low\", \"value\": "+va1.txt+", \"embedded\": "+va2.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints climatesetting.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
162
hmi/dev/nspanel_us_code/confirm.txt
Normal file
162
hmi/dev/nspanel_us_code/confirm.txt
Normal file
@@ -0,0 +1,162 @@
|
||||
Page confirm
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Locked : no
|
||||
Swide up page ID : disabled
|
||||
Swide down page ID : disabled
|
||||
Swide left page ID : disabled
|
||||
Swide right page ID: disabled
|
||||
|
||||
Events
|
||||
Preinitialize Event
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}
|
||||
vis unavailable,0
|
||||
|
||||
Postinitialize Event
|
||||
sendme
|
||||
|
||||
Variable (int32) page_id
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope: global
|
||||
Value: 0
|
||||
|
||||
Variable (string) aux
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 255
|
||||
|
||||
Variable (string) page_name
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : global
|
||||
Text :
|
||||
Max. Text Size: 12
|
||||
|
||||
Variable (string) component
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : global
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Text t0
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text title
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : Please confirm
|
||||
Max. Text Size : 100
|
||||
|
||||
Text body
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : Please confirm
|
||||
Max. Text Size : 255
|
||||
|
||||
Text unavailable
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Button bclose
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : î…˜
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
page page_id.val
|
||||
|
||||
Button bt_accept
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : î—
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
aux.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+component.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints aux.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
page page_id.val
|
||||
|
||||
Button bt_clear
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : î…™
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
page page_id.val
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
213
hmi/dev/nspanel_us_code/cover.txt
Normal file
213
hmi/dev/nspanel_us_code/cover.txt
Normal file
@@ -0,0 +1,213 @@
|
||||
Page cover
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Locked : no
|
||||
Swide up page ID : disabled
|
||||
Swide down page ID : disabled
|
||||
Swide left page ID : disabled
|
||||
Swide right page ID: disabled
|
||||
|
||||
Events
|
||||
Preinitialize Event
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}
|
||||
vis unavailable,0
|
||||
|
||||
Postinitialize Event
|
||||
sendme
|
||||
|
||||
Variable (string) va1
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Text : newtxt
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (string) coversetting
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 255
|
||||
|
||||
Text battery_value
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text cover_value
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_label
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 100
|
||||
|
||||
Text icon_state
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text battery_icon
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text unavailable
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Slider coverslider
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
Position : 0
|
||||
Upper range limit: 100
|
||||
Lower range limit: 0
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
covx coverslider.val,va1.txt,0,0
|
||||
cover_value.txt=va1.txt+"%"
|
||||
coversetting.txt="{\"page\": \"cover\", \"key\": \"position\", \"value\": "+va1.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints coversetting.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Button cover_open
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : ï„
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"cover\", \"key\": \"open_cover\", \"value\": \"press\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Button cover_close
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : ï„›
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"cover\", \"key\": \"close_cover\", \"value\": \"press\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Button cover_stop
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : 
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"cover\", \"key\": \"stop_cover\", \"value\": \"press\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : î…˜
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page back_page_id
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
387
hmi/dev/nspanel_us_code/entitypage01.txt
Normal file
387
hmi/dev/nspanel_us_code/entitypage01.txt
Normal file
@@ -0,0 +1,387 @@
|
||||
Page entitypage01
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Locked : no
|
||||
Swide up page ID : disabled
|
||||
Swide down page ID : disabled
|
||||
Swide left page ID : disabled
|
||||
Swide right page ID: disabled
|
||||
|
||||
Events
|
||||
Preinitialize Event
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}
|
||||
vis unavailable,0
|
||||
|
||||
Postinitialize Event
|
||||
sendme
|
||||
|
||||
Text value01_label
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 60
|
||||
|
||||
Text value05_label
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 60
|
||||
|
||||
Text value04_label
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 60
|
||||
|
||||
Text value02_label
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 60
|
||||
|
||||
Text value03_label
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 60
|
||||
|
||||
Text entity01_label
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 100
|
||||
|
||||
Text value06_label
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 60
|
||||
|
||||
Text value07_label
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 60
|
||||
|
||||
Text value08_label
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 60
|
||||
|
||||
Text value01_icon
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value02_icon
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value03_icon
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value04_icon
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value05_icon
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value06_icon
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value07_icon
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value08_icon
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value01
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text value02
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text value03
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text value04
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text value05
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text value06
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text value07
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text value08
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : â—â—‹â—‹â—‹
|
||||
Max. Text Size : 12
|
||||
|
||||
Text unavailable
|
||||
Attributes
|
||||
ID : 31
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : î…˜
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page entitypage04
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page entitypage02
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
page entitypage03
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
page entitypage04
|
||||
}
|
||||
}
|
||||
|
||||
387
hmi/dev/nspanel_us_code/entitypage02.txt
Normal file
387
hmi/dev/nspanel_us_code/entitypage02.txt
Normal file
@@ -0,0 +1,387 @@
|
||||
Page entitypage02
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Locked : no
|
||||
Swide up page ID : disabled
|
||||
Swide down page ID : disabled
|
||||
Swide left page ID : disabled
|
||||
Swide right page ID: disabled
|
||||
|
||||
Events
|
||||
Preinitialize Event
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}
|
||||
vis unavailable,0
|
||||
|
||||
Postinitialize Event
|
||||
sendme
|
||||
|
||||
Text value01_label
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 60
|
||||
|
||||
Text value05_label
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 60
|
||||
|
||||
Text value04_label
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 60
|
||||
|
||||
Text value02_label
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 60
|
||||
|
||||
Text value03_label
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 60
|
||||
|
||||
Text entity02_label
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 100
|
||||
|
||||
Text value06_label
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 60
|
||||
|
||||
Text value07_label
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 60
|
||||
|
||||
Text value08_label
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 60
|
||||
|
||||
Text value01_icon
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value02_icon
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value03_icon
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value04_icon
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value05_icon
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value06_icon
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value07_icon
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value08_icon
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value01
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text value02
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text value03
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text value04
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text value05
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text value06
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text value07
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text value08
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : â—‹â—â—‹â—‹
|
||||
Max. Text Size : 12
|
||||
|
||||
Text unavailable
|
||||
Attributes
|
||||
ID : 31
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : î…˜
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page entitypage01
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page entitypage03
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
387
hmi/dev/nspanel_us_code/entitypage03.txt
Normal file
387
hmi/dev/nspanel_us_code/entitypage03.txt
Normal file
@@ -0,0 +1,387 @@
|
||||
Page entitypage03
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Locked : no
|
||||
Swide up page ID : disabled
|
||||
Swide down page ID : disabled
|
||||
Swide left page ID : disabled
|
||||
Swide right page ID: disabled
|
||||
|
||||
Events
|
||||
Preinitialize Event
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}
|
||||
vis unavailable,0
|
||||
|
||||
Postinitialize Event
|
||||
sendme
|
||||
|
||||
Text value01_label
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 60
|
||||
|
||||
Text value05_label
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 60
|
||||
|
||||
Text value04_label
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 60
|
||||
|
||||
Text value02_label
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 60
|
||||
|
||||
Text value03_label
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 60
|
||||
|
||||
Text entity03_label
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 100
|
||||
|
||||
Text value06_label
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 60
|
||||
|
||||
Text value07_label
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 60
|
||||
|
||||
Text value08_label
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 60
|
||||
|
||||
Text value01_icon
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value02_icon
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value03_icon
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value04_icon
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value05_icon
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value06_icon
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value07_icon
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value08_icon
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value01
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text value02
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text value03
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text value04
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text value05
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text value06
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text value07
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text value08
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : â—‹â—‹â—â—‹
|
||||
Max. Text Size : 12
|
||||
|
||||
Text unavailable
|
||||
Attributes
|
||||
ID : 31
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : î…˜
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page entitypage02
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page entitypage04
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
page entitypage01
|
||||
}
|
||||
}
|
||||
|
||||
387
hmi/dev/nspanel_us_code/entitypage04.txt
Normal file
387
hmi/dev/nspanel_us_code/entitypage04.txt
Normal file
@@ -0,0 +1,387 @@
|
||||
Page entitypage04
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Locked : no
|
||||
Swide up page ID : disabled
|
||||
Swide down page ID : disabled
|
||||
Swide left page ID : disabled
|
||||
Swide right page ID: disabled
|
||||
|
||||
Events
|
||||
Preinitialize Event
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}
|
||||
vis unavailable,0
|
||||
|
||||
Postinitialize Event
|
||||
sendme
|
||||
|
||||
Text value01_label
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 60
|
||||
|
||||
Text value05_label
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 60
|
||||
|
||||
Text value04_label
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 60
|
||||
|
||||
Text value02_label
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 60
|
||||
|
||||
Text value03_label
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 60
|
||||
|
||||
Text entity04_label
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 100
|
||||
|
||||
Text value06_label
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 60
|
||||
|
||||
Text value07_label
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 60
|
||||
|
||||
Text value08_label
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 60
|
||||
|
||||
Text value01_icon
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value02_icon
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value03_icon
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value04_icon
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value05_icon
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value06_icon
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value07_icon
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value08_icon
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value01
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text value02
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text value03
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text value04
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text value05
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text value06
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text value07
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text value08
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : â—‹â—‹â—‹â—
|
||||
Max. Text Size : 12
|
||||
|
||||
Text unavailable
|
||||
Attributes
|
||||
ID : 31
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : î…˜
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page entitypage03
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page entitypage01
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
page entitypage01
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
388
hmi/dev/nspanel_us_code/fan.txt
Normal file
388
hmi/dev/nspanel_us_code/fan.txt
Normal file
@@ -0,0 +1,388 @@
|
||||
Page fan
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Locked : no
|
||||
Swide up page ID : disabled
|
||||
Swide down page ID : disabled
|
||||
Swide left page ID : disabled
|
||||
Swide right page ID: disabled
|
||||
|
||||
Events
|
||||
Preinitialize Event
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}
|
||||
vis unavailable,0
|
||||
|
||||
Postinitialize Event
|
||||
sendme
|
||||
|
||||
Variable (string) fansetting
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 255
|
||||
|
||||
Variable (string) va0
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Text fan_value
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_label
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 100
|
||||
|
||||
Text icon_state
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text unavailable
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Slider fanslider
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
Position : 0
|
||||
Upper range limit: 4
|
||||
Lower range limit: 0
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
sys0=100*fanslider.val/fanslider.maxval
|
||||
covx sys0,va0.txt,0,0
|
||||
fan_value.txt=va0.txt+"%"
|
||||
if(fanslider.val>fanslider.minval)
|
||||
{
|
||||
button_off.pco=59164
|
||||
button_down.pco=59164
|
||||
}else
|
||||
{
|
||||
button_off.pco=10597
|
||||
button_down.pco=10597
|
||||
}
|
||||
if(fanslider.val<fanslider.maxval)
|
||||
{
|
||||
button_up.pco=59164
|
||||
}else
|
||||
{
|
||||
button_up.pco=10597
|
||||
}
|
||||
timer0.en=1
|
||||
|
||||
Button button_up
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : ï‘
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
if(fanslider.val<fanslider.maxval)
|
||||
{
|
||||
fanslider.val++
|
||||
sys0=100*fanslider.val/fanslider.maxval
|
||||
covx sys0,va0.txt,0,0
|
||||
fan_value.txt=va0.txt+"%"
|
||||
}
|
||||
if(fanslider.val>fanslider.minval)
|
||||
{
|
||||
button_off.pco=59164
|
||||
button_down.pco=59164
|
||||
}else
|
||||
{
|
||||
button_off.pco=10597
|
||||
button_down.pco=10597
|
||||
}
|
||||
if(fanslider.val<fanslider.maxval)
|
||||
{
|
||||
button_up.pco=59164
|
||||
}else
|
||||
{
|
||||
button_up.pco=10597
|
||||
}
|
||||
|
||||
Touch Release Event
|
||||
timer0.en=1
|
||||
|
||||
Button button_on
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : îˆ
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
fanslider.val=fanslider.maxval/2
|
||||
sys0=fanslider.maxval*5
|
||||
sys0%=10
|
||||
if(sys0>=5)
|
||||
{
|
||||
fanslider.val++
|
||||
}
|
||||
sys0=100*fanslider.val/fanslider.maxval
|
||||
covx sys0,va0.txt,0,0
|
||||
fan_value.txt=va0.txt+"%"
|
||||
if(fanslider.val>fanslider.minval)
|
||||
{
|
||||
button_off.pco=59164
|
||||
button_down.pco=59164
|
||||
}else
|
||||
{
|
||||
button_off.pco=10597
|
||||
button_down.pco=10597
|
||||
}
|
||||
if(fanslider.val<fanslider.maxval)
|
||||
{
|
||||
button_up.pco=59164
|
||||
}else
|
||||
{
|
||||
button_up.pco=10597
|
||||
}
|
||||
|
||||
Touch Release Event
|
||||
timer0.en=1
|
||||
|
||||
Button button_down
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : 
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
if(fanslider.val>fanslider.minval)
|
||||
{
|
||||
fanslider.val--
|
||||
sys0=100*fanslider.val/fanslider.maxval
|
||||
covx sys0,va0.txt,0,0
|
||||
fan_value.txt=va0.txt+"%"
|
||||
}
|
||||
if(fanslider.val>fanslider.minval)
|
||||
{
|
||||
button_off.pco=59164
|
||||
button_down.pco=59164
|
||||
}else
|
||||
{
|
||||
button_off.pco=10597
|
||||
button_down.pco=10597
|
||||
}
|
||||
if(fanslider.val<fanslider.maxval)
|
||||
{
|
||||
button_up.pco=59164
|
||||
}else
|
||||
{
|
||||
button_up.pco=10597
|
||||
}
|
||||
|
||||
Touch Release Event
|
||||
timer0.en=1
|
||||
|
||||
Button button_off
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : î œ
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
fanslider.val=fanslider.minval
|
||||
sys0=100*fanslider.val/fanslider.maxval
|
||||
covx sys0,va0.txt,0,0
|
||||
fan_value.txt=va0.txt+"%"
|
||||
fansetting.txt="{\"page\": \"fan\", \"key\": \"stop\", \"value\": "+va0.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints fansetting.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
if(fanslider.val>fanslider.minval)
|
||||
{
|
||||
button_off.pco=59164
|
||||
button_down.pco=59164
|
||||
}else
|
||||
{
|
||||
button_off.pco=10597
|
||||
button_down.pco=10597
|
||||
}
|
||||
if(fanslider.val<fanslider.maxval)
|
||||
{
|
||||
button_up.pco=59164
|
||||
}else
|
||||
{
|
||||
button_up.pco=10597
|
||||
}
|
||||
|
||||
Touch Release Event
|
||||
timer0.en=0
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : î…˜
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page back_page_id
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer timer0
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Period (ms): 1000
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
timer0.en=0
|
||||
sys0=100*fanslider.val/fanslider.maxval
|
||||
covx sys0,va0.txt,0,0
|
||||
fan_value.txt=va0.txt+"%"
|
||||
fansetting.txt="{\"page\": \"fan\", \"key\": \"percentage\", \"value\": "+va0.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints fansetting.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
736
hmi/dev/nspanel_us_code/home.txt
Normal file
736
hmi/dev/nspanel_us_code/home.txt
Normal file
@@ -0,0 +1,736 @@
|
||||
Page home
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Locked : no
|
||||
Swide up page ID : disabled
|
||||
Swide down page ID : disabled
|
||||
Swide left page ID : disabled
|
||||
Swide right page ID: disabled
|
||||
|
||||
Events
|
||||
Preinitialize Event
|
||||
back_page_id=0
|
||||
vis bt_notific,is_notification
|
||||
vis bt_qrcode,is_qrcode
|
||||
vis bt_entities,is_entities
|
||||
if(display_mode==3)
|
||||
{
|
||||
vis left_bt_text,0
|
||||
vis right_bt_text,0
|
||||
}
|
||||
vis unavailable,0
|
||||
|
||||
Postinitialize Event
|
||||
sendme
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 33
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 100
|
||||
|
||||
Variable (string) click_comp
|
||||
Attributes
|
||||
ID : 41
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 8
|
||||
|
||||
Text time
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
settings_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
settings_timer.en=0
|
||||
|
||||
Text indr_temp
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 8
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"home\", \"component\": \"climate\", \"event\": \"click\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text outdoor_temp
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 8
|
||||
|
||||
Text date
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 25
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
settings_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
settings_timer.en=0
|
||||
|
||||
Text value01
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text left_bt_text
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text right_bt_text
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text chip_relay1
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Text chip_relay2
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Text chip_climate
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Text chip01
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Text chip02
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Text chip03
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Text chip04
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Text chip05
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Text chip06
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Text chip07
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Text value01_icon
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Text value03
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value03_icon
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Text value02_icon
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Text value02
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text wifi_icon
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
settings_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
settings_timer.en=0
|
||||
|
||||
Text indr_temp_icon
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"home\", \"component\": \"climate\", \"event\": \"click\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text bt_notific
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
if(api==1)
|
||||
{
|
||||
page notification
|
||||
}
|
||||
|
||||
Text bt_qrcode
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
page qrcode
|
||||
|
||||
Text bt_entities
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
if(api==1)
|
||||
{
|
||||
page entitypage01
|
||||
}
|
||||
|
||||
Text button07
|
||||
Attributes
|
||||
ID : 31
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button07"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
lastclick.txt="{\"page\": \"home\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Text meridiem
|
||||
Attributes
|
||||
ID : 32
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 6
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
settings_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
settings_timer.en=0
|
||||
|
||||
Text button01
|
||||
Attributes
|
||||
ID : 38
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button01"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
lastclick.txt="{\"page\": \"home\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Text button02
|
||||
Attributes
|
||||
ID : 39
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button02"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
lastclick.txt="{\"page\": \"home\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Text button03
|
||||
Attributes
|
||||
ID : 40
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button03"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
lastclick.txt="{\"page\": \"home\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Text button04
|
||||
Attributes
|
||||
ID : 43
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button04"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
lastclick.txt="{\"page\": \"home\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Text button05
|
||||
Attributes
|
||||
ID : 44
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button05"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
lastclick.txt="{\"page\": \"home\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Text button06
|
||||
Attributes
|
||||
ID : 45
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button06"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
lastclick.txt="{\"page\": \"home\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Text unavailable
|
||||
Attributes
|
||||
ID : 46
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Picture weather
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
if(api==1)
|
||||
{
|
||||
page weather01
|
||||
}
|
||||
|
||||
Dual-state Button left_bt_pic
|
||||
Attributes
|
||||
ID : 35
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 0
|
||||
|
||||
Dual-state Button right_bt_pic
|
||||
Attributes
|
||||
ID : 36
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 0
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer settings_timer
|
||||
Attributes
|
||||
ID : 34
|
||||
Scope : local
|
||||
Period (ms): 1000
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
page settings
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 37
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=25
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
Timer click_timer
|
||||
Attributes
|
||||
ID : 42
|
||||
Scope : local
|
||||
Period (ms): 800
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
lastclick.txt="{\"page\": \"home\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
click_timer.en=0
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
wakeup_timer.en=1 // Set brightness to saved value (from HA)
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx&&api==1)
|
||||
{
|
||||
page buttonpage04
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2&&api==1)
|
||||
{
|
||||
page buttonpage01
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100&&api==1)
|
||||
{
|
||||
page buttonpage02
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100&&api==1)
|
||||
{
|
||||
page buttonpage03
|
||||
}
|
||||
}
|
||||
|
||||
328
hmi/dev/nspanel_us_code/keyb_num.txt
Normal file
328
hmi/dev/nspanel_us_code/keyb_num.txt
Normal file
@@ -0,0 +1,328 @@
|
||||
Page keyb_num
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Locked : no
|
||||
Swide up page ID : disabled
|
||||
Swide down page ID : disabled
|
||||
Swide left page ID : disabled
|
||||
Swide right page ID: disabled
|
||||
|
||||
Events
|
||||
Preinitialize Event
|
||||
if(api==0)
|
||||
{
|
||||
page page_id.val
|
||||
}
|
||||
vis unavailable,0
|
||||
|
||||
Postinitialize Event
|
||||
sendme
|
||||
|
||||
Variable (int32) page_id
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (string) key
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (string) domain
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Text : alarm
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (string) aux
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 255
|
||||
|
||||
Variable (string) value
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Text t0
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text pin
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 60
|
||||
|
||||
Text title
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : Alarm
|
||||
Max. Text Size : 30
|
||||
|
||||
Text unavailable
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Button b1
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : 1
|
||||
Max. Text Size : 1
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
pin.txt+=b1.txt
|
||||
|
||||
Button bclose
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : î…˜
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
page page_id.val
|
||||
|
||||
Button b2
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : 2
|
||||
Max. Text Size : 1
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
pin.txt+=b2.txt
|
||||
|
||||
Button b3
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press
|
||||
State : unpressed
|
||||
Text : 3
|
||||
Max. Text Size : 1
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
pin.txt+=b3.txt
|
||||
|
||||
Button b4
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : 4
|
||||
Max. Text Size : 1
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
pin.txt+=b4.txt
|
||||
|
||||
Button b5
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : 5
|
||||
Max. Text Size : 1
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
pin.txt+=b5.txt
|
||||
|
||||
Button b6
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : 6
|
||||
Max. Text Size : 1
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
pin.txt+=b6.txt
|
||||
|
||||
Button b7
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : 7
|
||||
Max. Text Size : 1
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
pin.txt+=b7.txt
|
||||
|
||||
Button b8
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : 8
|
||||
Max. Text Size : 1
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
pin.txt+=b8.txt
|
||||
|
||||
Button b9
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press
|
||||
State : unpressed
|
||||
Text : 9
|
||||
Max. Text Size : 1
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
pin.txt+=b9.txt
|
||||
|
||||
Button bclear
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : î™
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
pin.txt=""
|
||||
|
||||
Button b0
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : 0
|
||||
Max. Text Size : 1
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
pin.txt+=b0.txt
|
||||
|
||||
Button benter
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : î„«
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
aux.txt="{\"page\": \"keyb_num\", \"key\": \""+key.txt+"\", \"value\": \""+value.txt+"\", \"pin\": \""+pin.txt+"\", \"base_domain\": \""+domain.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints aux.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Button bview
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : 
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
if(pin.pw==1)
|
||||
{
|
||||
pin.pw=0
|
||||
}else
|
||||
{
|
||||
pin.pw=1
|
||||
}
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
681
hmi/dev/nspanel_us_code/light.txt
Normal file
681
hmi/dev/nspanel_us_code/light.txt
Normal file
@@ -0,0 +1,681 @@
|
||||
Page light
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Locked : no
|
||||
Swide up page ID : disabled
|
||||
Swide down page ID : disabled
|
||||
Swide left page ID : disabled
|
||||
Swide right page ID: disabled
|
||||
|
||||
Events
|
||||
Preinitialize Event
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
vis light_b_press,1
|
||||
vis lightslider,1
|
||||
vis light_value,1
|
||||
// #### OFF Button #####
|
||||
vis temp_b_press,0
|
||||
vis color_b_pres,0
|
||||
// #### OFF Value #####
|
||||
vis temp_value,0
|
||||
vis light_value_2,0
|
||||
// #### OFF Slider #####
|
||||
vis tempslider,0
|
||||
vis colorwheel,0
|
||||
// #### Hide color & temp buttons #####
|
||||
vis temp_touch,0
|
||||
vis temp_value_2,0
|
||||
vis temp_button,0
|
||||
vis color_touch,0
|
||||
vis color_button,0
|
||||
}
|
||||
vis unavailable,0
|
||||
|
||||
Postinitialize Event
|
||||
sendme
|
||||
|
||||
Variable (int32) rgb565
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (string) va1
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Text : newtxt
|
||||
Max. Text Size: 20
|
||||
|
||||
Variable (string) va2
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Text : newtxt
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (string) va3
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Text : newtxt
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (int32) currenttab
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (string) lightsetting
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 255
|
||||
|
||||
Number ring
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Value : 0
|
||||
|
||||
Number field
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Value : 0
|
||||
|
||||
Text light_value
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_label
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 100
|
||||
|
||||
Text temp_value
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text light_value_2
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text temp_value_2
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text icon_state
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text unavailable
|
||||
Attributes
|
||||
ID : 33
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Picture light_button
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture color_button
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture temp_button
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture light_b_press
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture temp_b_press
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture color_b_pres
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture colorwheel
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
// Circular Color Picker for Nextion (c) Max Zuidberg 2022
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
//
|
||||
// Put this code in the touch press or release
|
||||
// event of the pic component with the color wheel.
|
||||
// Requires the two variables field.val and ring.val
|
||||
//
|
||||
// sya0 = x, sya1 = sya1
|
||||
// Note the usage of the hidden sya0, sya1 variables
|
||||
// within event code as local, temporary variable is fine.
|
||||
sya0=tch0
|
||||
sya1=tch1
|
||||
//
|
||||
// Convert absolute coordinates to coordinates relative to
|
||||
// the color wheel center.
|
||||
// sys0 = x_center, sys1 = y_center
|
||||
sys0=colorwheel.w/2
|
||||
sys0+=colorwheel.x
|
||||
sys1=colorwheel.h/2
|
||||
sys1+=colorwheel.y
|
||||
sya0-=sys0
|
||||
sya1-=sys1
|
||||
//
|
||||
// Determine ring
|
||||
ring.val=0
|
||||
// sys0 = r^2 = x^2 + y^2
|
||||
sys0=sya0*sya0
|
||||
sys1=sya1*sya1
|
||||
sys0+=sys1
|
||||
// repeat for all rings
|
||||
if(sys0>=156)
|
||||
{
|
||||
ring.val++
|
||||
}
|
||||
if(sys0>=625)
|
||||
{
|
||||
ring.val++
|
||||
}
|
||||
if(sys0>=1406)
|
||||
{
|
||||
ring.val++
|
||||
}
|
||||
if(sys0>=2500)
|
||||
{
|
||||
ring.val++
|
||||
}
|
||||
if(sys0>=3906)
|
||||
{
|
||||
ring.val++
|
||||
}
|
||||
if(sys0>=5625)
|
||||
{
|
||||
ring.val++
|
||||
}
|
||||
if(sys0>=7656)
|
||||
{
|
||||
ring.val++
|
||||
}
|
||||
//
|
||||
// Determine quadrant (0-3). Note: pixel y coords are inverted
|
||||
// compared to mathematical y coords. But we want math. quadrants.
|
||||
sya1*=-1
|
||||
sys2=0
|
||||
if(sya1<0)
|
||||
{
|
||||
sys2+=2
|
||||
}
|
||||
sys0=sya0*sya1
|
||||
if(sys0<0)
|
||||
{
|
||||
sys2+=1
|
||||
// In this case we also want to swap x and y otherwise the
|
||||
// atan(abs(x/y)) (calculated below) gives values running
|
||||
// "the wrong way" (cw instead of ccw).
|
||||
sys1=sya1
|
||||
sya1=sya0
|
||||
sya0=sys1
|
||||
}
|
||||
//
|
||||
field.val=sys2*6
|
||||
//
|
||||
// x,y sign is not required anymore
|
||||
if(sya0<0)
|
||||
{
|
||||
sya0*=-1
|
||||
}
|
||||
if(sya1<0)
|
||||
{
|
||||
sya1*=-1
|
||||
}
|
||||
//
|
||||
// Determine field in ring quadrant
|
||||
// Factor 100000 chosen more or less arbitrarily.
|
||||
// sys0 = 100000 * tan_a = 100000 * y / x
|
||||
sys0=100000*sya1
|
||||
sys0/=sya0
|
||||
// repeat for all fields
|
||||
if(sys0>=26794)
|
||||
{
|
||||
field.val++
|
||||
}
|
||||
if(sys0>=57735)
|
||||
{
|
||||
field.val++
|
||||
}
|
||||
if(sys0>=99999)
|
||||
{
|
||||
field.val++
|
||||
}
|
||||
if(sys0>=173205)
|
||||
{
|
||||
field.val++
|
||||
}
|
||||
if(sys0>=373205)
|
||||
{
|
||||
field.val++
|
||||
}
|
||||
covx r,va1.txt,0,0
|
||||
covx g,va2.txt,0,0
|
||||
covx b,va3.txt,0,0
|
||||
va1.txt=""
|
||||
va2.txt=""
|
||||
va3.txt=""
|
||||
|
||||
Touch Release Event
|
||||
// Adjust field.val "orientation" and offset to match the h value of the colors in the wheel
|
||||
h=23-field.val// 0 <= field.val <= 23
|
||||
// h is expected to be 0-6*256 (see hsv2rgb)
|
||||
h*=6*256
|
||||
h/=24// Number of fields
|
||||
//
|
||||
// s is expected to be 0-256 (see hsv2rgb)
|
||||
s=ring.val*256
|
||||
s/=8// Number of rings
|
||||
// no "value" selectable; fix it to the maximum (matching the colors in the wheels shown.
|
||||
v=255
|
||||
click hsv2rgb,0
|
||||
click rgb888to565,0
|
||||
//colPreview.bco=rgb565.val
|
||||
covx r,va1.txt,0,0
|
||||
covx g,va2.txt,0,0
|
||||
covx b,va3.txt,0,0
|
||||
lightsetting.txt="{\"page\": \"light\", \"component\": \"rgb_color\", \"value\": ["+va1.txt+", "+va2.txt+", "+va3.txt+"]}"
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
prints lightsetting.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
va1.txt=""
|
||||
va2.txt=""
|
||||
va3.txt=""
|
||||
|
||||
Slider lightslider
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
Position : 0
|
||||
Upper range limit: 100
|
||||
Lower range limit: 0
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
covx lightslider.val,va1.txt,0,0
|
||||
light_value.txt=va1.txt+"%"
|
||||
light_value_2.txt=va1.txt+"%"
|
||||
lightsetting.txt="{\"page\": \"light\", \"key\": \"brightness_pct\", \"value\": "+va1.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lightsetting.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Slider tempslider
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
Position : 0
|
||||
Upper range limit: 500
|
||||
Lower range limit: 153
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
covx tempslider.val,va1.txt,0,0
|
||||
temp_value.txt=va1.txt
|
||||
temp_value_2.txt=va1.txt
|
||||
lightsetting.txt="{\"page\": \"light\", \"key\": \"color_temp\", \"value\": "+va1.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lightsetting.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 31
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : î…˜
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page back_page_id
|
||||
|
||||
Hotspot hsv2rgb
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
// https://de.wikipedia.org/wiki/HSV-Farbraum#Umrechnung_HSV_in_RGB
|
||||
// The values range from 0..255 instead of 0..1
|
||||
// h ranges from 0..(6*256)
|
||||
if(s>=256)
|
||||
{
|
||||
s=255
|
||||
}else if(s<0)
|
||||
{
|
||||
s=0
|
||||
}
|
||||
if(v>=256)
|
||||
{
|
||||
v=255
|
||||
}else if(v<0)
|
||||
{
|
||||
v=0
|
||||
}
|
||||
f=h&0xff
|
||||
p=256-s
|
||||
p*=v
|
||||
p=p>>8// / 256
|
||||
q=s*f// 0-256*256 = 0-65536
|
||||
q=65536-q
|
||||
q*=v
|
||||
q=q>>16
|
||||
t=256-f
|
||||
t*=s
|
||||
t=65536-t
|
||||
t*=v
|
||||
t=t>>16
|
||||
//
|
||||
f=h>>8
|
||||
if(f==1)
|
||||
{
|
||||
r=q
|
||||
g=v
|
||||
b=p
|
||||
}else if(f==2)
|
||||
{
|
||||
r=p
|
||||
g=v
|
||||
b=t
|
||||
}else if(f==3)
|
||||
{
|
||||
r=p
|
||||
g=q
|
||||
b=v
|
||||
}else if(f==4)
|
||||
{
|
||||
r=t
|
||||
g=p
|
||||
b=v
|
||||
}else if(f==5)
|
||||
{
|
||||
r=v
|
||||
g=p
|
||||
b=q
|
||||
}else
|
||||
{
|
||||
r=v
|
||||
g=t
|
||||
b=p
|
||||
}
|
||||
|
||||
Hotspot rgb888to565
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
r=r&0xff
|
||||
g=g&0xff
|
||||
b=b&0xff
|
||||
sys1=r>>3
|
||||
sys2=sys1<<6
|
||||
sys1=g>>2
|
||||
sys2+=sys1
|
||||
sys2=sys2<<5
|
||||
sys1=b>>3
|
||||
sys2+=sys1
|
||||
rgb565.val=sys2
|
||||
|
||||
Hotspot light_touch
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
vis light_b_press,1
|
||||
vis lightslider,1
|
||||
vis light_value,1
|
||||
vis temp_value_2,1
|
||||
// #### OFF Button #####
|
||||
vis temp_b_press,0
|
||||
vis color_b_pres,0
|
||||
// #### OFF Value #####
|
||||
vis temp_value,0
|
||||
vis light_value_2,0
|
||||
// #### OFF Slider #####
|
||||
vis tempslider,0
|
||||
vis colorwheel,0
|
||||
|
||||
Hotspot temp_touch
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
vis temp_b_press,1
|
||||
vis tempslider,1
|
||||
vis temp_value,1
|
||||
vis light_value_2,1
|
||||
// #### OFF Button #####
|
||||
vis light_b_press,0
|
||||
vis color_b_pres,0
|
||||
// #### OFF Value #####
|
||||
vis light_value,0
|
||||
vis temp_value_2,0
|
||||
// #### OFF Slider #####
|
||||
vis lightslider,0
|
||||
vis colorwheel,0
|
||||
|
||||
Hotspot color_touch
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
vis color_b_pres,1
|
||||
vis colorwheel,1
|
||||
vis light_value_2,1
|
||||
// #### OFF Button #####
|
||||
vis light_b_press,0
|
||||
vis temp_b_press,0
|
||||
// #### OFF Value #####
|
||||
vis light_value,0
|
||||
vis temp_value,0
|
||||
vis temp_value_2,0
|
||||
// #### OFF Slider #####
|
||||
vis lightslider,0
|
||||
vis tempslider,0
|
||||
// #### OFF Color #####
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 32
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
433
hmi/dev/nspanel_us_code/media_player.txt
Normal file
433
hmi/dev/nspanel_us_code/media_player.txt
Normal file
@@ -0,0 +1,433 @@
|
||||
Page media_player
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Locked : no
|
||||
Swide up page ID : disabled
|
||||
Swide down page ID : disabled
|
||||
Swide left page ID : disabled
|
||||
Swide right page ID: disabled
|
||||
|
||||
Events
|
||||
Preinitialize Event
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}
|
||||
vis unavailable,0
|
||||
|
||||
Postinitialize Event
|
||||
sendme
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 255
|
||||
|
||||
Variable (string) va0
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (int32) is_muted
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (int32) prg_current
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (int32) prg_total
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Text page_label
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : Media Player
|
||||
Max. Text Size : 100
|
||||
|
||||
Text icon_state
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : î„—
|
||||
Max. Text Size : 10
|
||||
|
||||
Text vol_text
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text bt_vol_down
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : î
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
if(vol_slider.val>0)
|
||||
{
|
||||
vol_slider.val--
|
||||
covx vol_slider.val,va0.txt,0,0
|
||||
vol_text.txt=va0.txt+"%"
|
||||
timer0.en=1
|
||||
}
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text bt_vol_up
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : îœ
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
if(vol_slider.val<100)
|
||||
{
|
||||
vol_slider.val++
|
||||
covx vol_slider.val,va0.txt,0,0
|
||||
vol_text.txt=va0.txt+"%"
|
||||
timer0.en=1
|
||||
}
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text bt_mute
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : îž
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
if(is_muted.val==0)
|
||||
{
|
||||
va0.txt="true"
|
||||
}else
|
||||
{
|
||||
va0.txt="false"
|
||||
}
|
||||
lastclick.txt="{\"page\": \"media_player\", \"key\": \"volume_mute\", \"value\": \""+va0.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text time_current
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text time_total
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text track
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 255
|
||||
|
||||
Text artist
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 150
|
||||
|
||||
Text bt_prev
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : î’
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"media_player\", \"key\": \"media_previous_track\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text bt_play_pause
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : î
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"media_player\", \"key\": \"media_play_pause\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text bt_next
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : î’¬
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"media_player\", \"key\": \"media_next_track\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text bt_on_off
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : î¤
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"media_player\", \"key\": \"toggle\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text unavailable
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Progress Bar time_progress
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
Value : 0
|
||||
|
||||
Slider vol_slider
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
Position : 0
|
||||
Upper range limit: 100
|
||||
Lower range limit: 0
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
covx vol_slider.val,va0.txt,0,0
|
||||
vol_text.txt=va0.txt+"%"
|
||||
timer0.en=1
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on release
|
||||
State : unpressed
|
||||
Text : î…˜
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page back_page_id
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
Timer timer0
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Period (ms): 1000
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
timer0.en=0
|
||||
covx vol_slider.val,va0.txt,0,0
|
||||
vol_text.txt=va0.txt+"%"
|
||||
lastclick.txt="{\"page\": \"media_player\", \"key\": \"volume_set\", \"value\": "+va0.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Timer prg_timer
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Period (ms): 1000
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(prg_current.val<prg_total.val&&prg_total.val>0)
|
||||
{
|
||||
prg_current.val++
|
||||
time_progress.val=100*prg_current.val/prg_total.val
|
||||
covx prg_current.val,time_current.txt,0,0
|
||||
}
|
||||
// Progress - Total
|
||||
sys0=prg_total.val/3600 //hours
|
||||
sys2=prg_total.val%3600 //remainder
|
||||
sys1=sys2/60 //minutes
|
||||
sys2%=60 //seconds
|
||||
time_total.txt=""
|
||||
if(sys0>0)
|
||||
{
|
||||
covx sys0,time_total.txt,0,0
|
||||
time_total.txt+=":"
|
||||
if(sys1<10)
|
||||
{
|
||||
time_total.txt+="0"
|
||||
}
|
||||
}
|
||||
covx sys1,va0.txt,0,0
|
||||
time_total.txt+=va0.txt+":"
|
||||
if(sys2<10)
|
||||
{
|
||||
time_total.txt+="0"
|
||||
}
|
||||
covx sys2,va0.txt,0,0
|
||||
time_total.txt+=va0.txt
|
||||
// Progress - Current
|
||||
sys0=prg_current.val/3600 //hours
|
||||
sys2=prg_current.val%3600 //remainder
|
||||
sys1=sys2/60 //minutes
|
||||
sys2%=60 //seconds
|
||||
time_current.txt=""
|
||||
if(sys0>0)
|
||||
{
|
||||
covx sys0,time_current.txt,0,0
|
||||
time_current.txt+=":"
|
||||
if(sys1<10)
|
||||
{
|
||||
time_current.txt+="0"
|
||||
}
|
||||
}
|
||||
covx sys1,va0.txt,0,0
|
||||
time_current.txt+=va0.txt+":"
|
||||
if(sys2<10)
|
||||
{
|
||||
time_current.txt+="0"
|
||||
}
|
||||
covx sys2,va0.txt,0,0
|
||||
time_current.txt+=va0.txt
|
||||
|
||||
194
hmi/dev/nspanel_us_code/notification.txt
Normal file
194
hmi/dev/nspanel_us_code/notification.txt
Normal file
@@ -0,0 +1,194 @@
|
||||
Page notification
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Locked : no
|
||||
Swide up page ID : disabled
|
||||
Swide down page ID : disabled
|
||||
Swide left page ID : disabled
|
||||
Swide right page ID: disabled
|
||||
|
||||
Events
|
||||
Preinitialize Event
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}
|
||||
vis unavailable,0
|
||||
|
||||
Postinitialize Event
|
||||
sendme
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 100
|
||||
|
||||
Text notifi_text01
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 512
|
||||
|
||||
Text notifi_label
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 100
|
||||
|
||||
Text unavailable
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : î…˜
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Button bt_accept
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : î—
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"notification\", \"component\": \"accept\", \"value\": \"release\"}"
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Button bt_clear
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : î…™
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"notification\", \"component\": \"clear\", \"value\": \"release\"}"
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
98
hmi/dev/nspanel_us_code/nspanel_us_Stats.txt
Normal file
98
hmi/dev/nspanel_us_code/nspanel_us_Stats.txt
Normal file
@@ -0,0 +1,98 @@
|
||||
Program.s
|
||||
0 Component(s)
|
||||
8 Line(s) of event code
|
||||
8 Unique line(s) of event code
|
||||
screensaver
|
||||
3 Component(s)
|
||||
8 Line(s) of event code
|
||||
7 Unique line(s) of event code
|
||||
qrcode
|
||||
6 Component(s)
|
||||
46 Line(s) of event code
|
||||
28 Unique line(s) of event code
|
||||
boot
|
||||
11 Component(s)
|
||||
6 Line(s) of event code
|
||||
5 Unique line(s) of event code
|
||||
settings
|
||||
15 Component(s)
|
||||
65 Line(s) of event code
|
||||
32 Unique line(s) of event code
|
||||
weather05
|
||||
19 Component(s)
|
||||
47 Line(s) of event code
|
||||
29 Unique line(s) of event code
|
||||
coversettings
|
||||
16 Component(s)
|
||||
90 Line(s) of event code
|
||||
35 Unique line(s) of event code
|
||||
weather01
|
||||
19 Component(s)
|
||||
47 Line(s) of event code
|
||||
29 Unique line(s) of event code
|
||||
notification
|
||||
12 Component(s)
|
||||
60 Line(s) of event code
|
||||
31 Unique line(s) of event code
|
||||
weather02
|
||||
19 Component(s)
|
||||
47 Line(s) of event code
|
||||
29 Unique line(s) of event code
|
||||
weather04
|
||||
19 Component(s)
|
||||
47 Line(s) of event code
|
||||
29 Unique line(s) of event code
|
||||
entitypage03
|
||||
29 Component(s)
|
||||
48 Line(s) of event code
|
||||
30 Unique line(s) of event code
|
||||
entitypage04
|
||||
29 Component(s)
|
||||
48 Line(s) of event code
|
||||
29 Unique line(s) of event code
|
||||
entitypage01
|
||||
29 Component(s)
|
||||
49 Line(s) of event code
|
||||
30 Unique line(s) of event code
|
||||
weather03
|
||||
19 Component(s)
|
||||
47 Line(s) of event code
|
||||
29 Unique line(s) of event code
|
||||
climate
|
||||
25 Component(s)
|
||||
391 Line(s) of event code
|
||||
105 Unique line(s) of event code
|
||||
entitypage02
|
||||
29 Component(s)
|
||||
47 Line(s) of event code
|
||||
29 Unique line(s) of event code
|
||||
lightsettings
|
||||
33 Component(s)
|
||||
306 Line(s) of event code
|
||||
164 Unique line(s) of event code
|
||||
buttonpage03
|
||||
46 Component(s)
|
||||
162 Line(s) of event code
|
||||
49 Unique line(s) of event code
|
||||
home
|
||||
55 Component(s)
|
||||
130 Line(s) of event code
|
||||
51 Unique line(s) of event code
|
||||
buttonpage01
|
||||
46 Component(s)
|
||||
161 Line(s) of event code
|
||||
48 Unique line(s) of event code
|
||||
buttonpage02
|
||||
46 Component(s)
|
||||
162 Line(s) of event code
|
||||
49 Unique line(s) of event code
|
||||
buttonpage04
|
||||
46 Component(s)
|
||||
161 Line(s) of event code
|
||||
48 Unique line(s) of event code
|
||||
|
||||
Total
|
||||
22 Page(s)
|
||||
571 Component(s)
|
||||
2183 Line(s) of event code
|
||||
431 Unique line(s) of event code
|
||||
142
hmi/dev/nspanel_us_code/qrcode.txt
Normal file
142
hmi/dev/nspanel_us_code/qrcode.txt
Normal file
@@ -0,0 +1,142 @@
|
||||
Page qrcode
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Locked : no
|
||||
Swide up page ID : disabled
|
||||
Swide down page ID : disabled
|
||||
Swide left page ID : disabled
|
||||
Swide right page ID: disabled
|
||||
|
||||
Events
|
||||
Preinitialize Event
|
||||
vis unavailable,0
|
||||
|
||||
Postinitialize Event
|
||||
sendme
|
||||
|
||||
Text qrcode_label
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 100
|
||||
|
||||
Text unavailable
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
QR Code qrcode_value
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
Text :
|
||||
Max. Text Size : 75
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : î…˜
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
115
hmi/dev/nspanel_us_code/screensaver.txt
Normal file
115
hmi/dev/nspanel_us_code/screensaver.txt
Normal file
@@ -0,0 +1,115 @@
|
||||
Page screensaver
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Locked : no
|
||||
Swide up page ID : disabled
|
||||
Swide down page ID : disabled
|
||||
Swide left page ID : disabled
|
||||
Swide right page ID: disabled
|
||||
|
||||
Events
|
||||
Preinitialize Event
|
||||
vis text,0
|
||||
dim=brightness_sleep
|
||||
vis unavailable,0
|
||||
|
||||
Postinitialize Event
|
||||
sendme
|
||||
|
||||
Touch Release Event
|
||||
page back_page_id
|
||||
|
||||
Text text
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1000
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
page back_page_id
|
||||
|
||||
Text unavailable
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
TouchCap wakeup
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page back_page_id
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx&&api==1)
|
||||
{
|
||||
page buttonpage04
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2&&api==1)
|
||||
{
|
||||
page buttonpage01
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100&&api==1)
|
||||
{
|
||||
page buttonpage02
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100&&api==1)
|
||||
{
|
||||
page buttonpage03
|
||||
}
|
||||
}
|
||||
|
||||
430
hmi/dev/nspanel_us_code/settings.txt
Normal file
430
hmi/dev/nspanel_us_code/settings.txt
Normal file
@@ -0,0 +1,430 @@
|
||||
Page settings
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Locked : no
|
||||
Swide up page ID : disabled
|
||||
Swide down page ID : disabled
|
||||
Swide left page ID : disabled
|
||||
Swide right page ID: disabled
|
||||
|
||||
Events
|
||||
Preinitialize Event
|
||||
covx brightslider.val,bright_text.txt,0,0
|
||||
bright_text.txt+="%"
|
||||
covx dimslider.val,dim_text.txt,0,0
|
||||
dim_text.txt+="%"
|
||||
vis lbl_sleep,0
|
||||
vis bt_sleep,0
|
||||
vis unavailable,0
|
||||
|
||||
Postinitialize Event
|
||||
sendme
|
||||
|
||||
Text bright_text
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : 80%
|
||||
Max. Text Size : 4
|
||||
|
||||
Text dim_text
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : 20%
|
||||
Max. Text Size : 4
|
||||
|
||||
Text lbl_reboot
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : Reboot
|
||||
Max. Text Size : 25
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
tm_boot_page.en=1
|
||||
|
||||
Touch Release Event
|
||||
tm_boot_page.en=0
|
||||
|
||||
Text lbl_sleep
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : Sleep mode
|
||||
Max. Text Size : 25
|
||||
|
||||
Text lbl_bright
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : Bright
|
||||
Max. Text Size : 25
|
||||
|
||||
Text lbl_dim
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : Dim
|
||||
Max. Text Size : 25
|
||||
|
||||
Text lbl_brightness
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : Brightness
|
||||
Max. Text Size : 25
|
||||
|
||||
Text t0
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : î–§
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
if(brightslider.val<100)
|
||||
{
|
||||
brightslider.val++
|
||||
covx brightslider.val,bright_text.txt,0,0
|
||||
bright_text.txt+="%"
|
||||
printh 91
|
||||
prints "brightslider",0
|
||||
printh 00
|
||||
prints brightslider.val,0
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Text t1
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : î–§
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
if(dimslider.val<100)
|
||||
{
|
||||
dimslider.val++
|
||||
covx dimslider.val,dim_text.txt,0,0
|
||||
dim_text.txt+="%"
|
||||
printh 91
|
||||
prints "dimslider",0
|
||||
printh 00
|
||||
prints dimslider.val,0
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Text t2
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : î–§
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
if(dimslider.val>0)
|
||||
{
|
||||
dimslider.val--
|
||||
covx dimslider.val,dim_text.txt,0,0
|
||||
dim_text.txt+="%"
|
||||
printh 91
|
||||
prints "dimslider",0
|
||||
printh 00
|
||||
prints dimslider.val,0
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Text t3
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : î–§
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
if(brightslider.val>0)
|
||||
{
|
||||
brightslider.val--
|
||||
covx brightslider.val,bright_text.txt,0,0
|
||||
bright_text.txt+="%"
|
||||
printh 91
|
||||
prints "brightslider",0
|
||||
printh 00
|
||||
prints brightslider.val,0
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Text unavailable
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Slider brightslider
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
Position : 80
|
||||
Upper range limit: 100
|
||||
Lower range limit: 0
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
if(tm_bright.en==0)
|
||||
{
|
||||
tm_bright.en=1
|
||||
}
|
||||
|
||||
Slider dimslider
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
Position : 20
|
||||
Upper range limit: 100
|
||||
Lower range limit: 0
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
if(tm_dim.en==0)
|
||||
{
|
||||
tm_dim.en=1
|
||||
}
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : î…˜
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Dual-state Button bt_reboot
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : 
|
||||
Max. Text Size : 3
|
||||
|
||||
Dual-state Button bt_sleep
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : 
|
||||
Max. Text Size : 3
|
||||
|
||||
Hotspot bt_bright_down
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
if(brightslider.val>0)
|
||||
{
|
||||
brightslider.val--
|
||||
covx brightslider.val,bright_text.txt,0,0
|
||||
bright_text.txt+="%"
|
||||
printh 91
|
||||
prints "brightslider",0
|
||||
printh 00
|
||||
prints brightslider.val,0
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Hotspot bt_bright_up
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
if(brightslider.val<100)
|
||||
{
|
||||
brightslider.val++
|
||||
covx brightslider.val,bright_text.txt,0,0
|
||||
bright_text.txt+="%"
|
||||
printh 91
|
||||
prints "brightslider",0
|
||||
printh 00
|
||||
prints brightslider.val,0
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Hotspot bt_dim_down
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
if(dimslider.val>0)
|
||||
{
|
||||
dimslider.val--
|
||||
covx dimslider.val,dim_text.txt,0,0
|
||||
dim_text.txt+="%"
|
||||
printh 91
|
||||
prints "dimslider",0
|
||||
printh 00
|
||||
prints dimslider.val,0
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Hotspot bt_dim_up
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
if(dimslider.val<100)
|
||||
{
|
||||
dimslider.val++
|
||||
covx dimslider.val,dim_text.txt,0,0
|
||||
dim_text.txt+="%"
|
||||
printh 91
|
||||
prints "dimslider",0
|
||||
printh 00
|
||||
prints dimslider.val,0
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
Timer tm_bright
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
covx brightslider.val,bright_text.txt,0,0
|
||||
bright_text.txt+="%"
|
||||
printh 91
|
||||
prints "brightslider",0
|
||||
printh 00
|
||||
prints brightslider.val,0
|
||||
printh FF FF FF
|
||||
tm_bright.en=0
|
||||
|
||||
Timer tm_dim
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
covx dimslider.val,dim_text.txt,0,0
|
||||
dim_text.txt+="%"
|
||||
printh 91
|
||||
prints "dimslider",0
|
||||
printh 00
|
||||
prints dimslider.val,0
|
||||
printh FF FF FF
|
||||
tm_dim.en=0
|
||||
|
||||
Timer tm_boot_page
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Period (ms): 1000
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
page boot
|
||||
|
||||
430
hmi/dev/nspanel_us_code/utilities.txt
Normal file
430
hmi/dev/nspanel_us_code/utilities.txt
Normal file
@@ -0,0 +1,430 @@
|
||||
Page utilities
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Locked : no
|
||||
Swide up page ID : disabled
|
||||
Swide down page ID : disabled
|
||||
Swide left page ID : disabled
|
||||
Swide right page ID: disabled
|
||||
|
||||
Events
|
||||
Preinitialize Event
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}
|
||||
vis unavailable,0
|
||||
|
||||
Postinitialize Event
|
||||
sendme
|
||||
|
||||
Text title
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : Power Dashboard
|
||||
Max. Text Size : 100
|
||||
|
||||
Text title_icon
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : 
|
||||
Max. Text Size : 10
|
||||
|
||||
Text unavailable
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Text t1
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : 賈
|
||||
Max. Text Size : 4
|
||||
|
||||
Text t6
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Home
|
||||
Max. Text Size : 10
|
||||
|
||||
Text t15
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : 1.7 kW
|
||||
Max. Text Size : 10
|
||||
|
||||
Text t16
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : 21.7°C
|
||||
Max. Text Size : 10
|
||||
|
||||
Text t0
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : î´½
|
||||
Max. Text Size : 4
|
||||
|
||||
Text t2
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : 
|
||||
Max. Text Size : 4
|
||||
|
||||
Text t4
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Green
|
||||
Max. Text Size : 10
|
||||
|
||||
Text t9
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : 98%
|
||||
Max. Text Size : 10
|
||||
|
||||
Text t3
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : 
|
||||
Max. Text Size : 4
|
||||
|
||||
Text t5
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Fossil
|
||||
Max. Text Size : 10
|
||||
|
||||
Text t10
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : 2%
|
||||
Max. Text Size : 10
|
||||
|
||||
Text t7
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : 全
|
||||
Max. Text Size : 4
|
||||
|
||||
Text t8
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Solar
|
||||
Max. Text Size : 10
|
||||
|
||||
Text t17
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : 1.1 kW
|
||||
Max. Text Size : 10
|
||||
|
||||
Text t20
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : 慎
|
||||
Max. Text Size : 4
|
||||
|
||||
Text t21
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Wind
|
||||
Max. Text Size : 10
|
||||
|
||||
Text t22
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : 1.1 kW
|
||||
Max. Text Size : 10
|
||||
|
||||
Text t11
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : 豈
|
||||
Max. Text Size : 4
|
||||
|
||||
Text t12
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Battery
|
||||
Max. Text Size : 10
|
||||
|
||||
Text t18
|
||||
Attributes
|
||||
ID : 31
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : -2.1 kW
|
||||
Max. Text Size : 10
|
||||
|
||||
Text t23
|
||||
Attributes
|
||||
ID : 32
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : î—°
|
||||
Max. Text Size : 4
|
||||
|
||||
Text t24
|
||||
Attributes
|
||||
ID : 33
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Car
|
||||
Max. Text Size : 10
|
||||
|
||||
Text t25
|
||||
Attributes
|
||||
ID : 35
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : 1.1 kW
|
||||
Max. Text Size : 10
|
||||
|
||||
Text t13
|
||||
Attributes
|
||||
ID : 36
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : 暑
|
||||
Max. Text Size : 4
|
||||
|
||||
Text t14
|
||||
Attributes
|
||||
ID : 37
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Heating
|
||||
Max. Text Size : 10
|
||||
|
||||
Text t19
|
||||
Attributes
|
||||
ID : 39
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : 0.8 kW
|
||||
Max. Text Size : 10
|
||||
|
||||
Slider h0
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
Position : 50
|
||||
Upper range limit: 100
|
||||
Lower range limit: 0
|
||||
|
||||
Slider h1
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
Position : 50
|
||||
Upper range limit: 100
|
||||
Lower range limit: 0
|
||||
|
||||
Slider h2
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
Position : 50
|
||||
Upper range limit: 100
|
||||
Lower range limit: 0
|
||||
|
||||
Slider h3
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
Position : 50
|
||||
Upper range limit: 100
|
||||
Lower range limit: 0
|
||||
|
||||
Slider h6
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
Position : 50
|
||||
Upper range limit: 100
|
||||
Lower range limit: 0
|
||||
|
||||
Slider h4
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
Position : 50
|
||||
Upper range limit: 100
|
||||
Lower range limit: 0
|
||||
|
||||
Slider h7
|
||||
Attributes
|
||||
ID : 34
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
Position : 50
|
||||
Upper range limit: 100
|
||||
Lower range limit: 0
|
||||
|
||||
Slider h5
|
||||
Attributes
|
||||
ID : 38
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
Position : 50
|
||||
Upper range limit: 100
|
||||
Lower range limit: 0
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on release
|
||||
State : unpressed
|
||||
Text : î…˜
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page back_page_id
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
274
hmi/dev/nspanel_us_code/weather01.txt
Normal file
274
hmi/dev/nspanel_us_code/weather01.txt
Normal file
@@ -0,0 +1,274 @@
|
||||
Page weather01
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Locked : no
|
||||
Swide up page ID : disabled
|
||||
Swide down page ID : disabled
|
||||
Swide left page ID : disabled
|
||||
Swide right page ID: disabled
|
||||
|
||||
Events
|
||||
Preinitialize Event
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}
|
||||
vis unavailable,0
|
||||
|
||||
Postinitialize Event
|
||||
sendme
|
||||
|
||||
Text day
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text date
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 25
|
||||
|
||||
Text temperature
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value01
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value05
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value04
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value02
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value03
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value01_icon
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value02_icon
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value03_icon
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value04_icon
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value05_icon
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : â—â—‹â—‹â—‹â—‹
|
||||
Max. Text Size : 15
|
||||
|
||||
Text unavailable
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Picture weather_icon
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : î…˜
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page weather05
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page weather02
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
274
hmi/dev/nspanel_us_code/weather02.txt
Normal file
274
hmi/dev/nspanel_us_code/weather02.txt
Normal file
@@ -0,0 +1,274 @@
|
||||
Page weather02
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Locked : no
|
||||
Swide up page ID : disabled
|
||||
Swide down page ID : disabled
|
||||
Swide left page ID : disabled
|
||||
Swide right page ID: disabled
|
||||
|
||||
Events
|
||||
Preinitialize Event
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}
|
||||
vis unavailable,0
|
||||
|
||||
Postinitialize Event
|
||||
sendme
|
||||
|
||||
Text day
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text date
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 25
|
||||
|
||||
Text temperature
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value01
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value05
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value04
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value02
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value03
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value01_icon
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value02_icon
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value03_icon
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value04_icon
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value05_icon
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : â—‹â—â—‹â—‹â—‹
|
||||
Max. Text Size : 15
|
||||
|
||||
Text unavailable
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Picture weather_icon
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : î…˜
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page weather01
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page weather03
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
274
hmi/dev/nspanel_us_code/weather03.txt
Normal file
274
hmi/dev/nspanel_us_code/weather03.txt
Normal file
@@ -0,0 +1,274 @@
|
||||
Page weather03
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Locked : no
|
||||
Swide up page ID : disabled
|
||||
Swide down page ID : disabled
|
||||
Swide left page ID : disabled
|
||||
Swide right page ID: disabled
|
||||
|
||||
Events
|
||||
Preinitialize Event
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}
|
||||
vis unavailable,0
|
||||
|
||||
Postinitialize Event
|
||||
sendme
|
||||
|
||||
Text day
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text date
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 25
|
||||
|
||||
Text temperature
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value01
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value05
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value04
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value02
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value03
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value01_icon
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value02_icon
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value03_icon
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value04_icon
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value05_icon
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : â—‹â—‹â—â—‹â—‹
|
||||
Max. Text Size : 15
|
||||
|
||||
Text unavailable
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Picture weather_icon
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : î…˜
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page weather02
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page weather04
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
274
hmi/dev/nspanel_us_code/weather04.txt
Normal file
274
hmi/dev/nspanel_us_code/weather04.txt
Normal file
@@ -0,0 +1,274 @@
|
||||
Page weather04
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Locked : no
|
||||
Swide up page ID : disabled
|
||||
Swide down page ID : disabled
|
||||
Swide left page ID : disabled
|
||||
Swide right page ID: disabled
|
||||
|
||||
Events
|
||||
Preinitialize Event
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}
|
||||
vis unavailable,0
|
||||
|
||||
Postinitialize Event
|
||||
sendme
|
||||
|
||||
Text day
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text date
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 25
|
||||
|
||||
Text temperature
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value01
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value05
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value04
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value02
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value03
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value01_icon
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value02_icon
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value03_icon
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value04_icon
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value05_icon
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : â—‹â—‹â—‹â—â—‹
|
||||
Max. Text Size : 15
|
||||
|
||||
Text unavailable
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Picture weather_icon
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : î…˜
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page weather03
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page weather05
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
274
hmi/dev/nspanel_us_code/weather05.txt
Normal file
274
hmi/dev/nspanel_us_code/weather05.txt
Normal file
@@ -0,0 +1,274 @@
|
||||
Page weather05
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Locked : no
|
||||
Swide up page ID : disabled
|
||||
Swide down page ID : disabled
|
||||
Swide left page ID : disabled
|
||||
Swide right page ID: disabled
|
||||
|
||||
Events
|
||||
Preinitialize Event
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}
|
||||
vis unavailable,0
|
||||
|
||||
Postinitialize Event
|
||||
sendme
|
||||
|
||||
Text day
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text date
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 25
|
||||
|
||||
Text temperature
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value01
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value05
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value04
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value02
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value03
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value01_icon
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value02_icon
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value03_icon
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value04_icon
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value05_icon
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : â—‹â—‹â—‹â—‹â—
|
||||
Max. Text Size : 15
|
||||
|
||||
Text unavailable
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Picture weather_icon
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : î…˜
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page weather04
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page weather01
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user