added input boolean to button command (add nextion2text)

This commit is contained in:
joBr99
2022-03-22 22:13:43 +00:00
committed by GitHub Actions
parent 2c401f55ae
commit 58ff0cfcbb
5 changed files with 31 additions and 155 deletions

View File

@@ -632,14 +632,7 @@ Button bEntity1
Touch Release Event Touch Release Event
tmLP.en=0 tmLP.en=0
// event,1,tHeading,tEntityName,1,up tSend.txt="event,buttonPress2,"+entn1.txt+",button"
//craft command
// convert pageNumber and write to tTmp
covx nPage,tTmp.txt,0,0
tSend.txt="event,buttonPress,"+tTmp.txt+","
tSend.txt+=tHeading.txt+","
tSend.txt+=entn1.txt+","
tSend.txt+="1,button"
//send calc crc //send calc crc
btlen tSend.txt,sys0 btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC crcrest 1,0xffff // reset CRC
@@ -697,14 +690,7 @@ Button bEntity2
Touch Release Event Touch Release Event
tmLP.en=0 tmLP.en=0
// event,1,tHeading,tEntityName,1,up tSend.txt="event,buttonPress2,"+entn2.txt+",button"
//craft command
// convert pageNumber and write to tTmp
covx nPage,tTmp.txt,0,0
tSend.txt="event,buttonPress,"+tTmp.txt+","
tSend.txt+=tHeading.txt+","
tSend.txt+=entn2.txt+","
tSend.txt+="1,button"
//send calc crc //send calc crc
btlen tSend.txt,sys0 btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC crcrest 1,0xffff // reset CRC
@@ -762,14 +748,7 @@ Button bEntity3
Touch Release Event Touch Release Event
tmLP.en=0 tmLP.en=0
// event,1,tHeading,tEntityName,1,up tSend.txt="event,buttonPress2,"+entn3.txt+",button"
//craft command
// convert pageNumber and write to tTmp
covx nPage,tTmp.txt,0,0
tSend.txt="event,buttonPress,"+tTmp.txt+","
tSend.txt+=tHeading.txt+","
tSend.txt+=entn3.txt+","
tSend.txt+="1,button"
//send calc crc //send calc crc
btlen tSend.txt,sys0 btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC crcrest 1,0xffff // reset CRC
@@ -827,14 +806,7 @@ Button bEntity4
Touch Release Event Touch Release Event
tmLP.en=0 tmLP.en=0
// event,1,tHeading,tEntityName,1,up tSend.txt="event,buttonPress2,"+entn4.txt+",button"
//craft command
// convert pageNumber and write to tTmp
covx nPage,tTmp.txt,0,0
tSend.txt="event,buttonPress,"+tTmp.txt+","
tSend.txt+=tHeading.txt+","
tSend.txt+=entn4.txt+","
tSend.txt+="1,button"
//send calc crc //send calc crc
btlen tSend.txt,sys0 btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC crcrest 1,0xffff // reset CRC
@@ -892,14 +864,7 @@ Button bEntity5
Touch Release Event Touch Release Event
tmLP.en=0 tmLP.en=0
// event,1,tHeading,tEntityName,1,up tSend.txt="event,buttonPress2,"+entn5.txt+",button"
//craft command
// convert pageNumber and write to tTmp
covx nPage,tTmp.txt,0,0
tSend.txt="event,buttonPress,"+tTmp.txt+","
tSend.txt+=tHeading.txt+","
tSend.txt+=entn5.txt+","
tSend.txt+="1,button"
//send calc crc //send calc crc
btlen tSend.txt,sys0 btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC crcrest 1,0xffff // reset CRC
@@ -957,14 +922,7 @@ Button bEntity6
Touch Release Event Touch Release Event
tmLP.en=0 tmLP.en=0
// event,1,tHeading,tEntityName,1,up tSend.txt="event,buttonPress2,"+entn6.txt+",button"
//craft command
// convert pageNumber and write to tTmp
covx nPage,tTmp.txt,0,0
tSend.txt="event,buttonPress,"+tTmp.txt+","
tSend.txt+=tHeading.txt+","
tSend.txt+=entn6.txt+","
tSend.txt+="1,button"
//send calc crc //send calc crc
btlen tSend.txt,sys0 btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC crcrest 1,0xffff // reset CRC

View File

@@ -10,14 +10,14 @@ pageSerialTest
13 Component(s) 13 Component(s)
48 Line(s) of event code 48 Line(s) of event code
43 Unique line(s) of event code 43 Unique line(s) of event code
popupShutter
19 Component(s)
195 Line(s) of event code
107 Unique line(s) of event code
popupNotify popupNotify
17 Component(s) 17 Component(s)
180 Line(s) of event code 180 Line(s) of event code
119 Unique line(s) of event code 119 Unique line(s) of event code
popupShutter
19 Component(s)
180 Line(s) of event code
103 Unique line(s) of event code
cardMedia cardMedia
22 Component(s) 22 Component(s)
200 Line(s) of event code 200 Line(s) of event code
@@ -26,10 +26,6 @@ pageSwipeTest
18 Component(s) 18 Component(s)
62 Line(s) of event code 62 Line(s) of event code
44 Unique line(s) of event code 44 Unique line(s) of event code
popupLight
26 Component(s)
352 Line(s) of event code
170 Unique line(s) of event code
pageTest pageTest
14 Component(s) 14 Component(s)
14 Line(s) of event code 14 Line(s) of event code
@@ -38,18 +34,22 @@ pageStartup
19 Component(s) 19 Component(s)
146 Line(s) of event code 146 Line(s) of event code
111 Unique line(s) of event code 111 Unique line(s) of event code
popupLight
26 Component(s)
304 Line(s) of event code
167 Unique line(s) of event code
screensaver screensaver
25 Component(s) 25 Component(s)
173 Line(s) of event code 173 Line(s) of event code
124 Unique line(s) of event code 124 Unique line(s) of event code
cardGrid
39 Component(s)
406 Line(s) of event code
224 Unique line(s) of event code
cardThermo cardThermo
42 Component(s) 42 Component(s)
412 Line(s) of event code 412 Line(s) of event code
221 Unique line(s) of event code 221 Unique line(s) of event code
cardGrid
39 Component(s)
382 Line(s) of event code
221 Unique line(s) of event code
cardEntities cardEntities
54 Component(s) 54 Component(s)
808 Line(s) of event code 808 Line(s) of event code
@@ -62,5 +62,5 @@ cardAlarm
Total Total
14 Page(s) 14 Page(s)
349 Component(s) 349 Component(s)
3272 Line(s) of event code 3185 Line(s) of event code
828 Unique line(s) of event code 834 Unique line(s) of event code

View File

@@ -450,12 +450,8 @@ Picture pColorWheel
Events Events
Touch Press Event Touch Press Event
// event,buttonPress,D,nameEntity,internalNameEntity,1,brightnessSlider,50
//craft command //craft command
tSend.txt="event,buttonPress,D," tSend.txt="event,buttonPress2,"+entn.txt+",colorWheel,"
tSend.txt+=tEntity.txt+","
tSend.txt+=entn.txt+","
tSend.txt+="1,colorWheel,"
sys0=tch0 sys0=tch0
sys0=sys0-pColorWheel.x sys0=sys0-pColorWheel.x
covx sys0,tTmp.txt,0,0 covx sys0,tTmp.txt,0,0
@@ -503,34 +499,9 @@ Slider hBrightness
Lower range limit : 0 Lower range limit : 0
Events Events
Touch Press Event
// event,buttonPress,D,nameEntity,internalNameEntity,1,brightnessSlider,50
//craft command
tSend.txt="event,buttonPress,D,"
tSend.txt+=tEntity.txt+","
tSend.txt+=entn.txt+","
tSend.txt+="1,brightnessSlider,"
covx hBrightness.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Touch Release Event Touch Release Event
// event,buttonPress,D,nameEntity,internalNameEntity,1,brightnessSlider,50
//craft command //craft command
tSend.txt="event,buttonPress,D," tSend.txt="event,buttonPress2,"+entn.txt+",brightnessSlider,"
tSend.txt+=tEntity.txt+","
tSend.txt+=entn.txt+","
tSend.txt+="1,brightnessSlider,"
covx hBrightness.val,tTmp.txt,0,0 covx hBrightness.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt tSend.txt+=tTmp.txt
//send calc crc //send calc crc
@@ -571,34 +542,9 @@ Slider hTempSlider
Lower range limit : 0 Lower range limit : 0
Events Events
Touch Press Event
// event,buttonPress,D,nameEntity,internalNameEntity,1,colorTempSlider,50
//craft command
tSend.txt="event,buttonPress,D,"
tSend.txt+=tEntity.txt+","
tSend.txt+=entn.txt+","
tSend.txt+="1,colorTempSlider,"
covx hTempSlider.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Touch Release Event Touch Release Event
// event,buttonPress,D,nameEntity,internalNameEntity,1,colorTempSlider,50
//craft command //craft command
tSend.txt="event,buttonPress,D," tSend.txt="event,buttonPress2,"+entn.txt+",colorTempSlider,"
tSend.txt+=tEntity.txt+","
tSend.txt+=entn.txt+","
tSend.txt+="1,colorTempSlider,"
covx hTempSlider.val,tTmp.txt,0,0 covx hTempSlider.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt tSend.txt+=tTmp.txt
//send calc crc //send calc crc
@@ -752,12 +698,8 @@ Dual-state Button btOnOff1
Events Events
Touch Press Event Touch Press Event
// event,buttonPress,D,nameEntity,internalNameEntity,1,OnOff,1
//craft command //craft command
tSend.txt="event,buttonPress,D," tSend.txt="event,buttonPress2,"+entn.txt+","+"OnOff,"
tSend.txt+=tEntity.txt+","
tSend.txt+=entn.txt+","
tSend.txt+="1,OnOff,"
covx btOnOff1.val,tTmp.txt,0,0 covx btOnOff1.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt tSend.txt+=tTmp.txt
//send calc crc //send calc crc

View File

@@ -332,7 +332,7 @@ Button b2
Touch Press Event Touch Press Event
sleepTimeout=vaOldSleepT.val sleepTimeout=vaOldSleepT.val
//craft command //craft command
tSend.txt="event,buttonPress,D,D,"+entn.txt+",1,notifyAction,yes" tSend.txt="event,buttonPress2,"+entn.txt+",notifyAction,yes"
//send calc crc //send calc crc
btlen tSend.txt,sys0 btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC crcrest 1,0xffff // reset CRC
@@ -381,7 +381,7 @@ Button b1
Touch Press Event Touch Press Event
sleepTimeout=vaOldSleepT.val sleepTimeout=vaOldSleepT.val
//craft command //craft command
tSend.txt="event,buttonPress,D,D,"+entn.txt+",1,notifyAction,no" tSend.txt="event,buttonPress2,"+entn.txt+",notifyAction,no"
//send calc crc //send calc crc
btlen tSend.txt,sys0 btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC crcrest 1,0xffff // reset CRC

View File

@@ -313,12 +313,9 @@ Slider hPosition
Events Events
Touch Release Event Touch Release Event
// event,buttonPress,D,nameEntity,internalNameEntity,1,positionSlider,50 // event,buttonPress,internalNameEntity,positionSlider,50
//craft command //craft command
tSend.txt="event,buttonPress,D," tSend.txt="event,buttonPress2,"+entn.txt+",positionSlider,"
tSend.txt+=tEntity.txt+","
tSend.txt+=entn.txt+","
tSend.txt+="1,positionSlider,"
covx hPosition.val,tTmp.txt,0,0 covx hPosition.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt tSend.txt+=tTmp.txt
//send calc crc //send calc crc
@@ -419,14 +416,7 @@ Button bDown1
Events Events
Touch Press Event Touch Press Event
// event,1,tHeading,tEntityName,1,up tSend.txt="event,buttonPress2,"+entn.txt+",down"
//craft command
// convert pageNumber and write to tTmp
covx nPage,tTmp.txt,0,0
tSend.txt="event,buttonPress,"+tTmp.txt+","
tSend.txt+=tEntity.txt+","
tSend.txt+=entn.txt+","
tSend.txt+="1,down"
//send calc crc //send calc crc
btlen tSend.txt,sys0 btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC crcrest 1,0xffff // reset CRC
@@ -473,14 +463,7 @@ Button bStop1
Events Events
Touch Press Event Touch Press Event
// event,1,tHeading,tEntityName,1,up tSend.txt="event,buttonPress2,"+entn.txt+",stop"
//craft command
// convert pageNumber and write to tTmp
covx nPage,tTmp.txt,0,0
tSend.txt="event,buttonPress,"+tTmp.txt+","
tSend.txt+=tEntity.txt+","
tSend.txt+=entn.txt+","
tSend.txt+="1,stop"
//send calc crc //send calc crc
btlen tSend.txt,sys0 btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC crcrest 1,0xffff // reset CRC
@@ -527,14 +510,7 @@ Button bUp1
Events Events
Touch Press Event Touch Press Event
// event,1,tHeading,tEntityName,1,up tSend.txt="event,buttonPress2,"+entn.txt+",up"
//craft command
// convert pageNumber and write to tTmp
covx nPage,tTmp.txt,0,0
tSend.txt="event,buttonPress,"+tTmp.txt+","
tSend.txt+=tEntity.txt+","
tSend.txt+=entn.txt+","
tSend.txt+="1,up"
//send calc crc //send calc crc
btlen tSend.txt,sys0 btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC crcrest 1,0xffff // reset CRC