Files
NSPanel_HA_Blueprint/custom_configuration/nspanel_blank_code/blank.txt
2023-11-30 20:02:58 +01:00

225 lines
5.3 KiB
Plaintext

Page blank
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
printh 92
prints "currentpage",0
printh 00
prints "blank",0
printh 00
printh FF FF FF
dim=100
printh 92
prints "nspanelevent",0
printh 00
prints "{\"page\": \"blank\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"version\": \"2023.11.0\"}",0
printh 00
printh FF FF FF
covx baud,baud_rate.txt,0,0
baud_rate.txt+=" bps"
Touch Press Event
dim=100
tm0.en=1
Touch Release Event
dim=100
tm0.en=1
Variable (string) nspanelevent
Attributes
ID : 10
Scope : local
Text :
Max. Text Size: 150
Text file_name
Attributes
ID : 4
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text : nspanel_blank.tft
Max. Text Size : 20
Events
Touch Press Event
dim=100
tm0.en=1
Touch Release Event
dim=100
tm0.en=1
Text baud_rate
Attributes
ID : 5
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text :
Max. Text Size : 20
Events
Touch Press Event
dim=100
tm0.en=1
Touch Release Event
dim=100
tm0.en=1
Text tft_version
Attributes
ID : 6
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text : TFT: v2023.11.2
Max. Text Size : 20
Events
Touch Press Event
dim=100
tm0.en=1
Touch Release Event
dim=100
tm0.en=1
Text framework
Attributes
ID : 7
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text :
Max. Text Size : 20
Events
Touch Press Event
dim=100
tm0.en=1
Touch Release Event
dim=100
tm0.en=1
Text esp_version
Attributes
ID : 8
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text : ESP: Waiting...
Max. Text Size : 20
Events
Touch Press Event
dim=100
tm0.en=1
Touch Release Event
dim=100
tm0.en=1
QR Code qr0
Attributes
ID : 1
Scope : local
Dragging : 0
Send Component ID: disabled
Text : https://github.com/Blackymas/NSPanel_HA_Blueprint/blob/main/docs/en/nspanel_blank.md#what-to-do-after-installing-nspanel_blanktft
Max. Text Size : 150
Events
Touch Press Event
dim=100
tm0.en=1
Touch Release Event
dim=100
tm0.en=1
Timer tm0
Attributes
ID : 2
Scope : local
Period (ms): 65500
Enabled : yes
Events
Timer Event
if(dim>50)
{
dim=50
}else if(dim>25)
{
dim=25
}else if(dim>10)
{
dim=10
}else
{
dim=0
tm0.en=0
}
Timer tm_esphome
Attributes
ID : 3
Scope : local
Period (ms): 30000
Enabled : yes
Events
Timer Event
if(framework.txt=="")
{
if(baud==115200)
{
bauds=921600
}else
{
bauds=115200
}
covx baud,baud_rate.txt,0,0
baud_rate.txt+=" bps"
}else
{
tm_esphome.en=0
}
Timer tm_pageid
Attributes
ID : 9
Scope : local
Period (ms): 2500
Enabled : yes
Events
Timer Event
nspanelevent.txt="{\"page\": \"blank\", \"event\": \"pagechanged\", \"version\": \""+tft_version.txt+"\"}"
printh 92
prints "localevent",0
printh 00
prints nspanelevent.txt,0
printh 00
printh FF FF FF