mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2026-02-20 21:24:44 +01:00
Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text)
This commit is contained in:
committed by
github-actions[bot]
parent
bad5a61c12
commit
6a977a543b
@@ -15,332 +15,6 @@
|
||||
│ + // fix touch offset (Removed for US version)
|
||||
│ + //lcd_dev fffb 0002 0000 0020
|
||||
│ page pageStartup
|
||||
│ --- HMI/n2t-out/cardAlarm.txt
|
||||
├── +++ HMI/US/portrait/n2t-out/cardAlarm.txt
|
||||
│ @@ -634,88 +634,94 @@
|
||||
│ ucopy strCommand.txt,4,payloadLength-5,0
|
||||
│ // write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
|
||||
│ spstr strCommand.txt,tInstruction.txt,"~",0
|
||||
│ if(tInstruction.txt=="entityUpd")
|
||||
│ {
|
||||
│ //entn
|
||||
│ spstr strCommand.txt,entn.txt,"~",1
|
||||
│ - // navigation icon left
|
||||
│ - spstr strCommand.txt,tTmp.txt,"~",2 //type
|
||||
│ - if(tTmp.txt=="delete"||tTmp.txt=="")
|
||||
│ + // navigation icons
|
||||
│ + spstr strCommand.txt,tId.txt,"~",2
|
||||
│ + spstr tId.txt,tTmp.txt,"|",0
|
||||
│ + if(tTmp.txt=="0")
|
||||
│ {
|
||||
│ vis bPrev,0
|
||||
│ - }else
|
||||
│ + tsw mSwipePrev,0
|
||||
│ + tsw mSwipeUp,0
|
||||
│ + }
|
||||
│ + if(tTmp.txt=="1")
|
||||
│ + {
|
||||
│ + vis bPrev,1
|
||||
│ + tsw mSwipePrev,1
|
||||
│ + tsw mSwipeUp,0
|
||||
│ + bPrev.txt="î°"
|
||||
│ + }
|
||||
│ + if(tTmp.txt=="2")
|
||||
│ {
|
||||
│ - // get internal name
|
||||
│ - spstr strCommand.txt,nent1.txt,"~",3
|
||||
│ - // change icon
|
||||
│ - spstr strCommand.txt,bPrev.txt,"~",4
|
||||
│ - // change icon color
|
||||
│ - spstr strCommand.txt,tTmp.txt,"~",5
|
||||
│ - covx tTmp.txt,sys0,0,0
|
||||
│ - bPrev.pco=sys0
|
||||
│ vis bPrev,1
|
||||
│ + tsw mSwipePrev,0
|
||||
│ + tsw mSwipeUp,1
|
||||
│ + bPrev.txt="î¶"
|
||||
│ }
|
||||
│ - // navigation icon right
|
||||
│ - spstr strCommand.txt,tTmp.txt,"~",8 //type
|
||||
│ - if(tTmp.txt=="delete"||tTmp.txt=="")
|
||||
│ + spstr tId.txt,tTmp.txt,"|",1
|
||||
│ + if(tTmp.txt=="0")
|
||||
│ {
|
||||
│ vis bNext,0
|
||||
│ - }else
|
||||
│ + tsw mSwipeNext,0
|
||||
│ + }
|
||||
│ + if(tTmp.txt=="1")
|
||||
│ + {
|
||||
│ + vis bNext,1
|
||||
│ + tsw mSwipeNext,1
|
||||
│ + bNext.txt="î³"
|
||||
│ + }
|
||||
│ + if(tTmp.txt=="2")
|
||||
│ {
|
||||
│ - // get internal name
|
||||
│ - spstr strCommand.txt,nent2.txt,"~",9
|
||||
│ - // change icon
|
||||
│ - spstr strCommand.txt,bNext.txt,"~",10
|
||||
│ - // change icon color
|
||||
│ - spstr strCommand.txt,tTmp.txt,"~",11
|
||||
│ - covx tTmp.txt,sys0,0,0
|
||||
│ - bNext.pco=sys0
|
||||
│ vis bNext,1
|
||||
│ + bNext.txt="î"
|
||||
│ }
|
||||
│ //text arm1
|
||||
│ - spstr strCommand.txt,arm1.txt,"~",14
|
||||
│ + spstr strCommand.txt,arm1.txt,"~",3
|
||||
│ if(arm1.txt!="")
|
||||
│ {
|
||||
│ vis arm1,1
|
||||
│ }
|
||||
│ //id arm1
|
||||
│ - spstr strCommand.txt,va1.txt,"~",15
|
||||
│ + spstr strCommand.txt,va1.txt,"~",4
|
||||
│ //text arm2
|
||||
│ - spstr strCommand.txt,arm2.txt,"~",16
|
||||
│ + spstr strCommand.txt,arm2.txt,"~",5
|
||||
│ if(arm2.txt!="")
|
||||
│ {
|
||||
│ vis arm2,1
|
||||
│ }
|
||||
│ //id arm2
|
||||
│ - spstr strCommand.txt,va2.txt,"~",17
|
||||
│ + spstr strCommand.txt,va2.txt,"~",6
|
||||
│ //text arm3
|
||||
│ - spstr strCommand.txt,arm3.txt,"~",18
|
||||
│ + spstr strCommand.txt,arm3.txt,"~",7
|
||||
│ if(arm3.txt!="")
|
||||
│ {
|
||||
│ vis arm3,1
|
||||
│ }
|
||||
│ //id arm3
|
||||
│ - spstr strCommand.txt,va3.txt,"~",19
|
||||
│ + spstr strCommand.txt,va3.txt,"~",8
|
||||
│ //text arm4
|
||||
│ - spstr strCommand.txt,arm4.txt,"~",20
|
||||
│ + spstr strCommand.txt,arm4.txt,"~",9
|
||||
│ if(arm4.txt!="")
|
||||
│ {
|
||||
│ vis arm4,1
|
||||
│ }
|
||||
│ //id arm4
|
||||
│ - spstr strCommand.txt,va4.txt,"~",21
|
||||
│ + spstr strCommand.txt,va4.txt,"~",10
|
||||
│ //icon
|
||||
│ - spstr strCommand.txt,tIcon.txt,"~",22
|
||||
│ + spstr strCommand.txt,tIcon.txt,"~",11
|
||||
│ //icon color
|
||||
│ - spstr strCommand.txt,tTmp.txt,"~",23
|
||||
│ + spstr strCommand.txt,tTmp.txt,"~",12
|
||||
│ covx tTmp.txt,sys0,0,0
|
||||
│ tIcon.pco=sys0
|
||||
│ //numpad status
|
||||
│ - spstr strCommand.txt,tTmp.txt,"~",24
|
||||
│ + spstr strCommand.txt,tTmp.txt,"~",13
|
||||
│ if(tTmp.txt!="disable")
|
||||
│ {
|
||||
│ vis b0,1
|
||||
│ vis b1,1
|
||||
│ vis b2,1
|
||||
│ vis b3,1
|
||||
│ vis b4,1
|
||||
│ @@ -740,30 +746,30 @@
|
||||
│ vis b8,0
|
||||
│ vis b9,0
|
||||
│ vis b10,0
|
||||
│ vis b11,0
|
||||
│ vis tCode,0
|
||||
│ }
|
||||
│ //flashing status
|
||||
│ - spstr strCommand.txt,tTmp.txt,"~",25
|
||||
│ + spstr strCommand.txt,tTmp.txt,"~",14
|
||||
│ if(tTmp.txt=="enable")
|
||||
│ {
|
||||
│ tmFlash.en=1
|
||||
│ }else
|
||||
│ {
|
||||
│ tmFlash.en=0
|
||||
│ }
|
||||
│ // extra button
|
||||
│ - spstr strCommand.txt,b9.txt,"~",26
|
||||
│ + spstr strCommand.txt,b9.txt,"~",15
|
||||
│ if(b9.txt!="")
|
||||
│ {
|
||||
│ vis b9,1
|
||||
│ - spstr strCommand.txt,tTmp.txt,"~",27
|
||||
│ + spstr strCommand.txt,tTmp.txt,"~",16
|
||||
│ covx tTmp.txt,b9.pco,0,0
|
||||
│ - spstr strCommand.txt,vaAddBtn.txt,"~",28
|
||||
│ + spstr strCommand.txt,vaAddBtn.txt,"~",17
|
||||
│ }
|
||||
│ }
|
||||
│ if(tInstruction.txt=="time")
|
||||
│ {
|
||||
│ // get set time to global variable
|
||||
│ spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
|
||||
│ }
|
||||
│ --- HMI/n2t-out/cardChart.txt
|
||||
├── +++ HMI/US/portrait/n2t-out/cardChart.txt
|
||||
│ @@ -393,88 +393,94 @@
|
||||
│ // here is the location where acual code should be
|
||||
│ ucopy strCommand.txt,4,payloadLength-5,0
|
||||
│ // write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
|
||||
│ spstr strCommand.txt,tInstruction.txt,"~",0
|
||||
│ if(tInstruction.txt=="entityUpd")
|
||||
│ {
|
||||
│ spstr strCommand.txt,tHeading.txt,"~",1
|
||||
│ - // navigation icon left
|
||||
│ - spstr strCommand.txt,tTmp.txt,"~",2 //type
|
||||
│ - if(tTmp.txt=="delete"||tTmp.txt=="")
|
||||
│ + // navigation icons
|
||||
│ + spstr strCommand.txt,tId.txt,"~",2
|
||||
│ + spstr tId.txt,tTmp.txt,"|",0
|
||||
│ + if(tTmp.txt=="0")
|
||||
│ {
|
||||
│ vis bPrev,0
|
||||
│ - }else
|
||||
│ + tsw mSwipePrev,0
|
||||
│ + tsw mSwipeUp,0
|
||||
│ + }
|
||||
│ + if(tTmp.txt=="1")
|
||||
│ + {
|
||||
│ + vis bPrev,1
|
||||
│ + tsw mSwipePrev,1
|
||||
│ + tsw mSwipeUp,0
|
||||
│ + bPrev.txt="î°"
|
||||
│ + }
|
||||
│ + if(tTmp.txt=="2")
|
||||
│ {
|
||||
│ - // get internal name
|
||||
│ - spstr strCommand.txt,nent1.txt,"~",3
|
||||
│ - // change icon
|
||||
│ - spstr strCommand.txt,bPrev.txt,"~",4
|
||||
│ - // change icon color
|
||||
│ - spstr strCommand.txt,tTmp.txt,"~",5
|
||||
│ - covx tTmp.txt,sys0,0,0
|
||||
│ - bPrev.pco=sys0
|
||||
│ vis bPrev,1
|
||||
│ + tsw mSwipePrev,0
|
||||
│ + tsw mSwipeUp,1
|
||||
│ + bPrev.txt="î¶"
|
||||
│ }
|
||||
│ - // navigation icon right
|
||||
│ - spstr strCommand.txt,tTmp.txt,"~",8 //type
|
||||
│ - if(tTmp.txt=="delete"||tTmp.txt=="")
|
||||
│ + spstr tId.txt,tTmp.txt,"|",1
|
||||
│ + if(tTmp.txt=="0")
|
||||
│ {
|
||||
│ vis bNext,0
|
||||
│ - }else
|
||||
│ + tsw mSwipeNext,0
|
||||
│ + }
|
||||
│ + if(tTmp.txt=="1")
|
||||
│ + {
|
||||
│ + vis bNext,1
|
||||
│ + tsw mSwipeNext,1
|
||||
│ + bNext.txt="î³"
|
||||
│ + }
|
||||
│ + if(tTmp.txt=="2")
|
||||
│ {
|
||||
│ - // get internal name
|
||||
│ - spstr strCommand.txt,nent2.txt,"~",9
|
||||
│ - // change icon
|
||||
│ - spstr strCommand.txt,bNext.txt,"~",10
|
||||
│ - // change icon color
|
||||
│ - spstr strCommand.txt,tTmp.txt,"~",11
|
||||
│ - covx tTmp.txt,sys0,0,0
|
||||
│ - bNext.pco=sys0
|
||||
│ vis bNext,1
|
||||
│ + bNext.txt="î"
|
||||
│ }
|
||||
│ // extract color
|
||||
│ - spstr strCommand.txt,tTmp.txt,"~",14
|
||||
│ + spstr strCommand.txt,tTmp.txt,"~",3
|
||||
│ covx tTmp.txt,vaColorL.val,0,0
|
||||
│ // prepare dark color
|
||||
│ sys0=vaColorL.val>>11 // red
|
||||
│ vaColorD.val=sys0*8/10<<11 // store and shift
|
||||
│ sys0=vaColorL.val>>5%64 // green
|
||||
│ vaColorD.val=sys0*8/10<<5+vaColorD.val // store and shift
|
||||
│ sys0=vaColorL.val%32
|
||||
│ vaColorD.val=sys0*8/10+vaColorD.val // store and add
|
||||
│ //
|
||||
│ // detect nValues and maxValue
|
||||
│ vNValues.val=0
|
||||
│ - spstr strCommand.txt,tTmp.txt,"~",vNValues.val+17
|
||||
│ + spstr strCommand.txt,tTmp.txt,"~",vNValues.val+6
|
||||
│ strlen tTmp.txt,sya0
|
||||
│ while(sya0>0)
|
||||
│ {
|
||||
│ covx tTmp.txt,sya1,0,0
|
||||
│ if(sya1>vMax.val)
|
||||
│ {
|
||||
│ vMax.val=sya1
|
||||
│ }
|
||||
│ // next
|
||||
│ vNValues.val++
|
||||
│ - spstr strCommand.txt,tTmp.txt,"~",vNValues.val+17
|
||||
│ + spstr strCommand.txt,tTmp.txt,"~",vNValues.val+6
|
||||
│ strlen tTmp.txt,sya0
|
||||
│ }
|
||||
│ //
|
||||
│ // calculate unit width
|
||||
│ sys0=vNValues.val*4
|
||||
│ sys0+=vNValues.val-1
|
||||
│ vaUnit.val=m0.w-25-40*100
|
||||
│ vaUnit.val/=sys0
|
||||
│ vaBottom.val=m0.y+m0.h-24
|
||||
│ vaLeft.val=m0.x+25+40*100
|
||||
│ vaYUnit.val=m0.h-24/vMax.val
|
||||
│ //
|
||||
│ line m0.x+25+40-10,m0.y,m0.x+25+40-10,vaBottom.val+10,14823
|
||||
│ line m0.x+25+40-5,vaBottom.val,m0.x+25+40-15,vaBottom.val,14823
|
||||
│ - spstr strCommand.txt,strTmp.txt,"~",16
|
||||
│ + spstr strCommand.txt,strTmp.txt,"~",5
|
||||
│ sya1=0
|
||||
│ spstr strTmp.txt,tTmp.txt,":",sya1
|
||||
│ strlen tTmp.txt,sya0
|
||||
│ while(sya0>0)
|
||||
│ {
|
||||
│ covx tTmp.txt,sys1,0,0
|
||||
│ if(sys1<=vMax.val)
|
||||
│ @@ -499,15 +505,15 @@
|
||||
│ // next
|
||||
│ sya1++
|
||||
│ spstr strTmp.txt,tTmp.txt,":",sya1
|
||||
│ strlen tTmp.txt,sya0
|
||||
│ }
|
||||
│ //
|
||||
│ // y achis label
|
||||
│ - spstr strCommand.txt,tTmp.txt,"~",15
|
||||
│ + spstr strCommand.txt,tTmp.txt,"~",4
|
||||
│ // tTmp.txt="Gas [kW]"
|
||||
│ strlen tTmp.txt,sys1
|
||||
│ sya1=sys1*12+m0.h-48/2
|
||||
│ for(sys0=0;sys0<sys1;sys0++)
|
||||
│ {
|
||||
│ substr tTmp.txt,strTmp.txt,sys0,1
|
||||
│ xstr m0.x,sys0*-12+m0.y+sya1,30,20,6,defaultFontColor,RED,2,1,3,strTmp.txt
|
||||
│ @@ -515,15 +521,15 @@
|
||||
│ for(sys0=0;sys0<vNValues.val;sys0++)
|
||||
│ {
|
||||
│ if(sys0>0)
|
||||
│ {
|
||||
│ vaValues.txt+="~"
|
||||
│ }
|
||||
│ // extract next entry
|
||||
│ - spstr strCommand.txt,tTmp.txt,"~",sys0+17
|
||||
│ + spstr strCommand.txt,tTmp.txt,"~",sys0+6
|
||||
│ // calculate left
|
||||
│ sys1=sys0*5*vaUnit.val
|
||||
│ sys1+=vaLeft.val
|
||||
│ // if there is a colon in the obtained value we have a label/and gridline
|
||||
│ spstr tTmp.txt,strTmp.txt,"^",1
|
||||
│ strlen strTmp.txt,sya0
|
||||
│ if(sya0>0)
|
||||
│ --- HMI/n2t-out/cardEntities.txt
|
||||
├── +++ HMI/US/portrait/n2t-out/cardEntities.txt
|
||||
│ @@ -61,14 +61,24 @@
|
||||
@@ -1362,23 +1036,6 @@
|
||||
│ spstr strCommand.txt,tId.txt,"~",1
|
||||
│ --- HMI/n2t-out/cardGrid.txt
|
||||
├── +++ HMI/US/portrait/n2t-out/cardGrid.txt
|
||||
│ @@ -94,15 +94,15 @@
|
||||
│ Text :
|
||||
│ Max. Text Size: 80
|
||||
│
|
||||
│ Variable (string) strCommand
|
||||
│ Attributes
|
||||
│ Scope : local
|
||||
│ Text :
|
||||
│ - Max. Text Size: 700
|
||||
│ + Max. Text Size: 500
|
||||
│
|
||||
│ Variable (string) tSend
|
||||
│ Attributes
|
||||
│ Scope : local
|
||||
│ Text :
|
||||
│ Max. Text Size: 200
|
||||
│
|
||||
│ @@ -631,14 +631,18 @@
|
||||
│ {
|
||||
│ page popupLight
|
||||
@@ -1429,228 +1086,6 @@
|
||||
│ Scope : local
|
||||
│ Text :
|
||||
│ Max. Text Size: 20
|
||||
│
|
||||
│ @@ -440,171 +440,177 @@
|
||||
│ // write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
|
||||
│ spstr strCommand.txt,tInstruction.txt,"~",0
|
||||
│ if(tInstruction.txt=="entityUpd")
|
||||
│ {
|
||||
│ // command format: entityUpd,heading,navigation,textQR[,type,internalName,iconId,displayName,optionalValue]x2
|
||||
│ //tHeading
|
||||
│ spstr strCommand.txt,tHeading.txt,"~",1
|
||||
│ - // navigation icon left
|
||||
│ - spstr strCommand.txt,tTmp.txt,"~",2 //type
|
||||
│ - if(tTmp.txt=="delete"||tTmp.txt=="")
|
||||
│ + // navigation icons
|
||||
│ + spstr strCommand.txt,tId.txt,"~",2
|
||||
│ + spstr tId.txt,tTmp.txt,"|",0
|
||||
│ + if(tTmp.txt=="0")
|
||||
│ {
|
||||
│ vis bPrev,0
|
||||
│ - }else
|
||||
│ + tsw mSwipePrev,0
|
||||
│ + tsw mSwipeUp,0
|
||||
│ + }
|
||||
│ + if(tTmp.txt=="1")
|
||||
│ + {
|
||||
│ + vis bPrev,1
|
||||
│ + tsw mSwipePrev,1
|
||||
│ + tsw mSwipeUp,0
|
||||
│ + bPrev.txt="î°"
|
||||
│ + }
|
||||
│ + if(tTmp.txt=="2")
|
||||
│ {
|
||||
│ - // get internal name
|
||||
│ - spstr strCommand.txt,nent1.txt,"~",3
|
||||
│ - // change icon
|
||||
│ - spstr strCommand.txt,bPrev.txt,"~",4
|
||||
│ - // change icon color
|
||||
│ - spstr strCommand.txt,tTmp.txt,"~",5
|
||||
│ - covx tTmp.txt,sys0,0,0
|
||||
│ - bPrev.pco=sys0
|
||||
│ vis bPrev,1
|
||||
│ + tsw mSwipePrev,0
|
||||
│ + tsw mSwipeUp,1
|
||||
│ + bPrev.txt="î¶"
|
||||
│ }
|
||||
│ - // navigation icon right
|
||||
│ - spstr strCommand.txt,tTmp.txt,"~",8 //type
|
||||
│ - if(tTmp.txt=="delete"||tTmp.txt=="")
|
||||
│ + spstr tId.txt,tTmp.txt,"|",1
|
||||
│ + if(tTmp.txt=="0")
|
||||
│ {
|
||||
│ vis bNext,0
|
||||
│ - }else
|
||||
│ + tsw mSwipeNext,0
|
||||
│ + }
|
||||
│ + if(tTmp.txt=="1")
|
||||
│ + {
|
||||
│ + vis bNext,1
|
||||
│ + tsw mSwipeNext,1
|
||||
│ + bNext.txt="î³"
|
||||
│ + }
|
||||
│ + if(tTmp.txt=="2")
|
||||
│ {
|
||||
│ - // get internal name
|
||||
│ - spstr strCommand.txt,nent2.txt,"~",9
|
||||
│ - // change icon
|
||||
│ - spstr strCommand.txt,bNext.txt,"~",10
|
||||
│ - // change icon color
|
||||
│ - spstr strCommand.txt,tTmp.txt,"~",11
|
||||
│ - covx tTmp.txt,sys0,0,0
|
||||
│ - bNext.pco=sys0
|
||||
│ vis bNext,1
|
||||
│ + bNext.txt="î"
|
||||
│ }
|
||||
│ //text qrcode
|
||||
│ - spstr strCommand.txt,vaQR.txt,"~",14
|
||||
│ + spstr strCommand.txt,vaQR.txt,"~",3
|
||||
│ // get Type
|
||||
│ - spstr strCommand.txt,type1.txt,"~",15
|
||||
│ + spstr strCommand.txt,type1.txt,"~",4
|
||||
│ // get internal name
|
||||
│ - spstr strCommand.txt,entn1.txt,"~",16
|
||||
│ + spstr strCommand.txt,entn1.txt,"~",5
|
||||
│ if(type1.txt=="delete"||type1.txt=="")
|
||||
│ {
|
||||
│ vis btOnOff1,0
|
||||
│ vis tEntity1,0
|
||||
│ vis tIcon1,0
|
||||
│ vis bText1,0
|
||||
│ }else
|
||||
│ {
|
||||
│ // change icon
|
||||
│ - spstr strCommand.txt,tIcon1.txt,"~",17
|
||||
│ + spstr strCommand.txt,tIcon1.txt,"~",6
|
||||
│ vis tIcon1,1
|
||||
│ // change icon color
|
||||
│ - spstr strCommand.txt,tTmp.txt,"~",18
|
||||
│ + spstr strCommand.txt,tTmp.txt,"~",7
|
||||
│ covx tTmp.txt,sys0,0,0
|
||||
│ tIcon1.pco=sys0
|
||||
│ // set name
|
||||
│ - spstr strCommand.txt,tEntity1.txt,"~",19
|
||||
│ + spstr strCommand.txt,tEntity1.txt,"~",8
|
||||
│ vis tEntity1,1
|
||||
│ }
|
||||
│ if(type1.txt=="light")
|
||||
│ {
|
||||
│ vis btOnOff1,1
|
||||
│ vis bText1,0
|
||||
│ // get Button State (optional Value)
|
||||
│ - spstr strCommand.txt,tTmp.txt,"~",20
|
||||
│ + spstr strCommand.txt,tTmp.txt,"~",9
|
||||
│ covx tTmp.txt,sys0,0,0
|
||||
│ btOnOff1.val=sys0
|
||||
│ }
|
||||
│ if(type1.txt=="switch")
|
||||
│ {
|
||||
│ vis btOnOff1,1
|
||||
│ vis bText1,0
|
||||
│ // get Button State (optional Value)
|
||||
│ - spstr strCommand.txt,tTmp.txt,"~",20
|
||||
│ + spstr strCommand.txt,tTmp.txt,"~",9
|
||||
│ covx tTmp.txt,sys0,0,0
|
||||
│ btOnOff1.val=sys0
|
||||
│ }
|
||||
│ if(type1.txt=="text")
|
||||
│ {
|
||||
│ vis btOnOff1,0
|
||||
│ vis bText1,1
|
||||
│ tsw bText1,0
|
||||
│ bText1.pco=65535
|
||||
│ bText1.pco2=65535
|
||||
│ // get Text (optional Value)
|
||||
│ - spstr strCommand.txt,bText1.txt,"~",20
|
||||
│ + spstr strCommand.txt,bText1.txt,"~",9
|
||||
│ }
|
||||
│ if(type1.txt=="button")
|
||||
│ {
|
||||
│ vis btOnOff1,0
|
||||
│ vis bText1,1
|
||||
│ tsw bText1,1
|
||||
│ bText1.pco=1374
|
||||
│ bText1.pco2=1374
|
||||
│ // get Text (optional Value)
|
||||
│ - spstr strCommand.txt,bText1.txt,"~",20
|
||||
│ + spstr strCommand.txt,bText1.txt,"~",9
|
||||
│ }
|
||||
│ // get Type
|
||||
│ - spstr strCommand.txt,type2.txt,"~",21
|
||||
│ + spstr strCommand.txt,type2.txt,"~",10
|
||||
│ // get internal name
|
||||
│ - spstr strCommand.txt,entn2.txt,"~",22
|
||||
│ + spstr strCommand.txt,entn2.txt,"~",11
|
||||
│ if(type2.txt=="delete"||type2.txt=="")
|
||||
│ {
|
||||
│ vis btOnOff2,0
|
||||
│ vis tEntity2,0
|
||||
│ vis tIcon2,0
|
||||
│ vis bText2,0
|
||||
│ }else
|
||||
│ {
|
||||
│ // change icon
|
||||
│ - spstr strCommand.txt,tIcon2.txt,"~",23
|
||||
│ + spstr strCommand.txt,tIcon2.txt,"~",12
|
||||
│ vis tIcon2,1
|
||||
│ // change icon color
|
||||
│ - spstr strCommand.txt,tTmp.txt,"~",24
|
||||
│ + spstr strCommand.txt,tTmp.txt,"~",13
|
||||
│ covx tTmp.txt,sys0,0,0
|
||||
│ tIcon2.pco=sys0
|
||||
│ // set name
|
||||
│ - spstr strCommand.txt,tEntity2.txt,"~",25
|
||||
│ + spstr strCommand.txt,tEntity2.txt,"~",14
|
||||
│ vis tEntity2,1
|
||||
│ }
|
||||
│ if(type2.txt=="light")
|
||||
│ {
|
||||
│ vis btOnOff2,1
|
||||
│ vis bText2,0
|
||||
│ // get Button State (optional Value)
|
||||
│ - spstr strCommand.txt,tTmp.txt,"~",26
|
||||
│ + spstr strCommand.txt,tTmp.txt,"~",15
|
||||
│ covx tTmp.txt,sys0,0,0
|
||||
│ btOnOff2.val=sys0
|
||||
│ }
|
||||
│ if(type2.txt=="switch")
|
||||
│ {
|
||||
│ vis btOnOff2,1
|
||||
│ vis bText2,0
|
||||
│ // get Button State (optional Value)
|
||||
│ - spstr strCommand.txt,tTmp.txt,"~",26
|
||||
│ + spstr strCommand.txt,tTmp.txt,"~",15
|
||||
│ covx tTmp.txt,sys0,0,0
|
||||
│ btOnOff2.val=sys0
|
||||
│ }
|
||||
│ if(type2.txt=="text")
|
||||
│ {
|
||||
│ vis btOnOff2,0
|
||||
│ vis bText2,1
|
||||
│ tsw bText2,0
|
||||
│ bText2.pco=65535
|
||||
│ bText2.pco2=65535
|
||||
│ // get Text (optional Value)
|
||||
│ - spstr strCommand.txt,bText2.txt,"~",26
|
||||
│ + spstr strCommand.txt,bText2.txt,"~",15
|
||||
│ }
|
||||
│ if(type2.txt=="button")
|
||||
│ {
|
||||
│ vis btOnOff2,0
|
||||
│ vis bText2,1
|
||||
│ tsw bText2,1
|
||||
│ bText2.pco=1374
|
||||
│ bText2.pco2=1374
|
||||
│ // get Text (optional Value)
|
||||
│ - spstr strCommand.txt,bText2.txt,"~",26
|
||||
│ + spstr strCommand.txt,bText2.txt,"~",15
|
||||
│ }
|
||||
│ if(type2.txt=="delete"||type2.txt=="")
|
||||
│ {
|
||||
│ if(type1.txt=="delete"||type1.txt=="")
|
||||
│ {
|
||||
│ qrcode m1.x,m1.y,200,6371,65535,-1,vaQR.txt
|
||||
│ }
|
||||
│ --- HMI/n2t-out/cardThermo.txt
|
||||
├── +++ HMI/US/portrait/n2t-out/cardThermo.txt
|
||||
│ @@ -829,208 +829,214 @@
|
||||
|
||||
Reference in New Issue
Block a user