- Notification button processed on ESPHome (as all the info is there) - Added word-wrap for main text - Expanded text size - Handling display mode (used to define the number of chars per line on Notifications) - Versioning handling - As a consequence of the previous item.
26 lines
1.3 KiB
Plaintext
26 lines
1.3 KiB
Plaintext
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 api=0 // 0 = disconnected from HA, 1 = connected to HA
|
|
int sleep_mode=0
|
|
int is_alarm=0,is_entities=0,is_qrcode=0,is_notification=0
|
|
int brightness=100,brightness_dim=40
|
|
int display_mode=1 // 1 = EU, 2 = US, 3 = US landscape
|
|
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
|
|
}
|
|
printh 92
|
|
prints "nspanelevent",0
|
|
printh 00
|
|
prints "{\"page\": \"\", \"component\": \"\", \"value\": \"\"}",0
|
|
printh 00
|
|
printh FF FF FF
|
|
page 8//Power on start page boot
|