Fix fan page button_on
Fixing rounding on that button.
This commit is contained in:
BIN
nspanel_eu.tft
BIN
nspanel_eu.tft
Binary file not shown.
BIN
nspanel_us.HMI
BIN
nspanel_us.HMI
Binary file not shown.
BIN
nspanel_us.tft
BIN
nspanel_us.tft
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -20,6 +20,26 @@ Page boot
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Variable (int32) counter
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (string) aux
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (string) nspanelevent
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 100
|
||||
|
||||
Text ip_addr
|
||||
Attributes
|
||||
ID : 1
|
||||
@@ -120,3 +140,23 @@ Dual-state Button a01
|
||||
Text : Reboot
|
||||
Max. Text Size : 6
|
||||
|
||||
Timer timer
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Period (ms): 65534
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
counter.val++
|
||||
covx counter.val,aux.txt,0,0
|
||||
nspanelevent.txt="{\"page\": \"boot\", \"component\": \"timeout\", \"value\": "+aux.txt+"}"
|
||||
bluep_version.txt="Retry: "+aux.txt
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
prints nspanelevent.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
|
||||
@@ -13,14 +13,20 @@ Page cover
|
||||
Events
|
||||
Preinitialize Event
|
||||
dim=home.brightness.val
|
||||
coversetting.txt="{\"page\": \"cover\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}"
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
prints coversetting.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
page_label.txt=home.entity.txt
|
||||
if(home.api.val==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
coversetting.txt="{\"page\": \"cover\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}"
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
prints coversetting.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
page_label.txt=home.entity.txt
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
coversetting.txt="{\"page\": \"cover\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}"
|
||||
|
||||
362
nspanel_us_land_code/entitypage01.txt
Normal file
362
nspanel_us_land_code/entitypage01.txt
Normal file
@@ -0,0 +1,362 @@
|
||||
Page entitypage01
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
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=home.brightness.val
|
||||
if(home.api.val==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"entitypage01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 92
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"entitypage01\", \"component\": \"touchevent\", \"value\": \"press\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 92
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"entitypage01\", \"component\": \"touchevent\", \"value\": \"release\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text value01_label
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value05_label
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value04_label
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value02_label
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value03_label
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text entity01_label
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text value06_label
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value07_label
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value08_label
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value01_pic
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value02_pic
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value03_pic
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value04_pic
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value05_pic
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value06_pic
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value07_pic
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value08_pic
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value01
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value02
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value03
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value04
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value05
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value06
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value07
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value08
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Hotspot entity01_back
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,32 +13,38 @@ Page light
|
||||
Events
|
||||
Preinitialize Event
|
||||
dim=home.brightness.val
|
||||
lightsetting.txt="{\"page\": \"light\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}"
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
prints lightsetting.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
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
|
||||
page_label.txt=home.entity.txt
|
||||
if(home.api.val==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
lightsetting.txt="{\"page\": \"light\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}"
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
prints lightsetting.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
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
|
||||
page_label.txt=home.entity.txt
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
lightsetting.txt="{\"page\": \"light\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}"
|
||||
|
||||
@@ -101,6 +101,20 @@ Hotspot accept
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Hotspot clear
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Hotspot accept_hotspot
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"notification\", \"component\": \"accept\", \"value\": \"release\"}"
|
||||
@@ -111,9 +125,9 @@ Hotspot accept
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Hotspot clear
|
||||
Hotspot clear_hotspot
|
||||
Attributes
|
||||
ID : 7
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
259
nspanel_us_land_code/weather01.txt
Normal file
259
nspanel_us_land_code/weather01.txt
Normal file
@@ -0,0 +1,259 @@
|
||||
Page weather01
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
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=home.brightness.val
|
||||
if(home.api.val==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"weather01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 92
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"weather01\", \"component\": \"touchevent\", \"value\": \"press\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 92
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"weather01\", \"component\": \"touchevent\", \"value\": \"release\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text day
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text date
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 25
|
||||
|
||||
Text temperature
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text loading
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Text value01
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value05
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value04
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value02
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value03
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value01_icon
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value02_icon
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value03_icon
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value04_icon
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value05_icon
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Picture weather_icon
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Hotspot weather_back
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
259
nspanel_us_land_code/weather02.txt
Normal file
259
nspanel_us_land_code/weather02.txt
Normal file
@@ -0,0 +1,259 @@
|
||||
Page weather02
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
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=home.brightness.val
|
||||
if(home.api.val==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"weather02\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 92
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"weather02\", \"component\": \"touchevent\", \"value\": \"press\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 92
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"weather02\", \"component\": \"touchevent\", \"value\": \"release\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text day
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text loading
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Text date
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 25
|
||||
|
||||
Text temperature
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value01
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value05
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value04
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value02
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value03
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value01_icon
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value02_icon
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value03_icon
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value04_icon
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value05_icon
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Picture weather_icon
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Hotspot weather_back
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
259
nspanel_us_land_code/weather03.txt
Normal file
259
nspanel_us_land_code/weather03.txt
Normal file
@@ -0,0 +1,259 @@
|
||||
Page weather03
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
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=home.brightness.val
|
||||
if(home.api.val==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"weather03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 92
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"weather03\", \"component\": \"touchevent\", \"value\": \"press\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 92
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"weather03\", \"component\": \"touchevent\", \"value\": \"release\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text day
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text loading
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Text date
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 25
|
||||
|
||||
Text temperature
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value01
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value05
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value04
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value02
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value03
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value01_icon
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value02_icon
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value03_icon
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value04_icon
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value05_icon
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Picture weather_icon
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Hotspot weather_back
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
259
nspanel_us_land_code/weather04.txt
Normal file
259
nspanel_us_land_code/weather04.txt
Normal file
@@ -0,0 +1,259 @@
|
||||
Page weather04
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
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=home.brightness.val
|
||||
if(home.api.val==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"weather04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 92
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"weather04\", \"component\": \"touchevent\", \"value\": \"press\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 92
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"weather04\", \"component\": \"touchevent\", \"value\": \"release\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text day
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text loading
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Text date
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 25
|
||||
|
||||
Text temperature
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value01
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value05
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value04
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value02
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value03
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value01_icon
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value02_icon
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value03_icon
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value04_icon
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value05_icon
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Picture weather_icon
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Hotspot weather_back
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user