Home buttons new format - QRcode
Modernise the button "QRcode" flow on page Home to improve performance.
This commit is contained in:
@@ -5,7 +5,7 @@ Program.s
|
||||
int h=0,s=0,v=0
|
||||
int p=0,q=0,t=0,f=0
|
||||
int api=0 // 0 = disconnected from HA, 1 = connected to HA
|
||||
int is_alarm=0,is_entities=0
|
||||
int is_alarm=0,is_entities=0,is_qrcode=0
|
||||
bauds=115200//Configure baudrat
|
||||
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
|
||||
|
||||
@@ -23,6 +23,7 @@ Page home
|
||||
printh FF FF FF
|
||||
vis bt_entities,is_entities
|
||||
vis bt_alarm,is_alarm
|
||||
vis bt_qrcode,is_qrcode
|
||||
|
||||
Variable (int32) brightness
|
||||
Attributes
|
||||
@@ -50,14 +51,14 @@ Variable (int32) sleepmodus
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 52
|
||||
ID : 51
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 100
|
||||
|
||||
Variable (string) entity
|
||||
Attributes
|
||||
ID : 53
|
||||
ID : 52
|
||||
Scope : global
|
||||
Text :
|
||||
Max. Text Size: 100
|
||||
@@ -342,7 +343,7 @@ Text button04_icon
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button05_icon
|
||||
Text bt_qrcode
|
||||
Attributes
|
||||
ID : 42
|
||||
Scope : global
|
||||
@@ -352,6 +353,10 @@ Text button05_icon
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
page qrcode
|
||||
|
||||
Text bt_entities
|
||||
Attributes
|
||||
ID : 43
|
||||
@@ -389,7 +394,7 @@ Text bt_alarm
|
||||
|
||||
Text meridiem
|
||||
Attributes
|
||||
ID : 51
|
||||
ID : 50
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
@@ -538,26 +543,9 @@ Hotspot button04
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Hotspot button05
|
||||
Attributes
|
||||
ID : 49
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"home\", \"component\": \"button05\", \"value\": \"release\"}"
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Hotspot settings_click
|
||||
Attributes
|
||||
ID : 50
|
||||
ID : 49
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
@@ -613,7 +601,7 @@ Timer sleeptimer
|
||||
|
||||
Timer settings_timer
|
||||
Attributes
|
||||
ID : 54
|
||||
ID : 53
|
||||
Scope : local
|
||||
Period (ms): 1000
|
||||
Enabled : no
|
||||
|
||||
@@ -13,18 +13,12 @@ Page qrcode
|
||||
Events
|
||||
Preinitialize Event
|
||||
dim=home.brightness.val
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"qrcode\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"qrcode\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Touch Press Event
|
||||
printh 92
|
||||
@@ -45,7 +39,7 @@ Page qrcode
|
||||
Text qrcode_label
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
@@ -55,7 +49,7 @@ Text qrcode_label
|
||||
QR Code qrcode_value
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
Text :
|
||||
|
||||
Reference in New Issue
Block a user