Notifications page rebuilt
- 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.
This commit is contained in:
@@ -8,10 +8,14 @@ Program.s
|
||||
int sleep_mode=0
|
||||
int is_alarm=0,is_entities=0,is_qrcode=0,is_notification=0
|
||||
int brightness=100,brightness_dim=40
|
||||
bauds=115200//Configure baudrat
|
||||
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
|
||||
lcd_dev fffb 0002 0000 0020// Fix touch offset for EU Version
|
||||
if(display_mode==1)
|
||||
{
|
||||
lcd_dev fffb 0002 0000 0020// Fix touch offset for EU Version
|
||||
}
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
|
||||
@@ -13,10 +13,12 @@ Page boot
|
||||
Events
|
||||
Preinitialize Event
|
||||
dim=100
|
||||
covx display_mode,aux2.txt,0,0
|
||||
nspanelevent.txt="{\"page\": \"boot\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}"
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"boot\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
||||
prints nspanelevent.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
@@ -26,7 +28,7 @@ Variable (int32) counter
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (string) aux
|
||||
Variable (string) aux1
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
@@ -38,7 +40,14 @@ Variable (string) nspanelevent
|
||||
ID : 14
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 100
|
||||
Max. Text Size: 150
|
||||
|
||||
Variable (string) aux2
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Text ip_addr
|
||||
Attributes
|
||||
@@ -107,7 +116,7 @@ Text tft_version
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : 4.0
|
||||
Text : 4.0dev
|
||||
Max. Text Size : 8
|
||||
|
||||
Text esph_version
|
||||
@@ -150,9 +159,10 @@ Timer timer
|
||||
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
|
||||
covx counter.val,aux1.txt,0,0
|
||||
covx display_mode,aux2.txt,0,0
|
||||
nspanelevent.txt="{\"page\": \"boot\", \"component\": \"timeout\", \"value\": "+aux1.txt+", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}"
|
||||
bluep_version.txt="Retry: "+aux1.txt
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
|
||||
@@ -25,6 +25,11 @@ Page home
|
||||
vis bt_qrcode,is_qrcode
|
||||
vis bt_entities,is_entities
|
||||
vis bt_alarm,is_alarm
|
||||
if(display_mode==3)
|
||||
{
|
||||
vis left_bt_text,0
|
||||
vis right_bt_text,0
|
||||
}
|
||||
|
||||
Variable (int32) disdim
|
||||
Attributes
|
||||
|
||||
Reference in New Issue
Block a user