mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2026-03-01 02:20:12 +01:00
start reworking navigation paramters (#644) (add nextion2text)
This commit is contained in:
committed by
github-actions[bot]
parent
f0c5b5b429
commit
f976e7a738
@@ -101,6 +101,20 @@ Variable (string) entn6
|
||||
Text :
|
||||
Max. Text Size: 80
|
||||
|
||||
Variable (string) nent1
|
||||
Attributes
|
||||
ID : 58
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 80
|
||||
|
||||
Variable (string) nent2
|
||||
Attributes
|
||||
ID : 57
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 80
|
||||
|
||||
Variable (string) strCommand
|
||||
Attributes
|
||||
ID : 5
|
||||
@@ -1200,14 +1214,7 @@ Button bNext
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
tSend.txt="event,buttonPress2,cardMedia,"
|
||||
if(bNext.txt=="î")
|
||||
{
|
||||
tSend.txt+="bHome"
|
||||
}else
|
||||
{
|
||||
tSend.txt+="bNext"
|
||||
}
|
||||
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
|
||||
//send calc crc
|
||||
btlen tSend.txt,sys0
|
||||
crcrest 1,0xffff // reset CRC
|
||||
@@ -1254,14 +1261,7 @@ Button bPrev
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
tSend.txt="event,buttonPress2,cardMedia,"
|
||||
if(bPrev.txt=="î¶")
|
||||
{
|
||||
tSend.txt+="bUp"
|
||||
}else
|
||||
{
|
||||
tSend.txt+="bPrev"
|
||||
}
|
||||
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
|
||||
//send calc crc
|
||||
btlen tSend.txt,sys0
|
||||
crcrest 1,0xffff // reset CRC
|
||||
@@ -1419,72 +1419,66 @@ Timer tmSerial
|
||||
{
|
||||
// command format: entityUpd,heading,navigation,[,type,internalName,iconId,iconColor,displayName,optionalValue]x6
|
||||
spstr strCommand.txt,tHeading.txt,"~",1
|
||||
// navigation icons
|
||||
spstr strCommand.txt,tId.txt,"~",2
|
||||
spstr tId.txt,tTmp.txt,"|",0
|
||||
if(tTmp.txt=="0")
|
||||
// navigation icon left
|
||||
spstr strCommand.txt,tTmp.txt,"~",2 //type
|
||||
if(tTmp.txt=="delete"||tTmp.txt=="")
|
||||
{
|
||||
vis bPrev,0
|
||||
tsw mSwipePrev,0
|
||||
tsw mSwipeUp,0
|
||||
}
|
||||
if(tTmp.txt=="1")
|
||||
}else
|
||||
{
|
||||
// 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,1
|
||||
tsw mSwipeUp,0
|
||||
bPrev.txt="î°"
|
||||
}
|
||||
if(tTmp.txt=="2")
|
||||
{
|
||||
vis bPrev,1
|
||||
tsw mSwipePrev,0
|
||||
tsw mSwipeUp,1
|
||||
bPrev.txt="î¶"
|
||||
}
|
||||
spstr tId.txt,tTmp.txt,"|",1
|
||||
if(tTmp.txt=="0")
|
||||
// navigation icon right
|
||||
spstr strCommand.txt,tTmp.txt,"~",8 //type
|
||||
if(tTmp.txt=="delete"||tTmp.txt=="")
|
||||
{
|
||||
vis bNext,0
|
||||
tsw mSwipeNext,0
|
||||
}
|
||||
if(tTmp.txt=="1")
|
||||
}else
|
||||
{
|
||||
// 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
|
||||
tsw mSwipeNext,1
|
||||
bNext.txt="î³"
|
||||
}
|
||||
if(tTmp.txt=="2")
|
||||
{
|
||||
vis bNext,1
|
||||
bNext.txt="î"
|
||||
}
|
||||
//entity name
|
||||
spstr strCommand.txt,entn.txt,"~",3
|
||||
spstr strCommand.txt,entn.txt,"~",14
|
||||
//title
|
||||
spstr strCommand.txt,tTitle.txt,"~",4
|
||||
spstr strCommand.txt,tTitle.txt,"~",15
|
||||
//title farbe
|
||||
spstr strCommand.txt,tTmp.txt,"~",5
|
||||
spstr strCommand.txt,tTmp.txt,"~",16
|
||||
if(tTmp.txt!="")
|
||||
{
|
||||
covx tTmp.txt,tTitle.pco,0,0
|
||||
}
|
||||
//author
|
||||
spstr strCommand.txt,tAuthor.txt,"~",6
|
||||
spstr strCommand.txt,tAuthor.txt,"~",17
|
||||
//author farbe
|
||||
spstr strCommand.txt,tTmp.txt,"~",7
|
||||
spstr strCommand.txt,tTmp.txt,"~",18
|
||||
if(tTmp.txt!="")
|
||||
{
|
||||
covx tTmp.txt,tAuthor.pco,0,0
|
||||
}
|
||||
//volume
|
||||
spstr strCommand.txt,tTmp.txt,"~",8
|
||||
spstr strCommand.txt,tTmp.txt,"~",19
|
||||
covx tTmp.txt,sys0,0,0
|
||||
hVolume.val=sys0
|
||||
//icon
|
||||
spstr strCommand.txt,tPlayPause.txt,"~",9
|
||||
spstr strCommand.txt,tPlayPause.txt,"~",20
|
||||
// on off button
|
||||
spstr strCommand.txt,tTmp.txt,"~",10
|
||||
spstr strCommand.txt,tTmp.txt,"~",21
|
||||
if(tTmp.txt=="disable")
|
||||
{
|
||||
vis t5,0
|
||||
@@ -1494,7 +1488,7 @@ Timer tmSerial
|
||||
covx tTmp.txt,t5.pco,0,0
|
||||
}
|
||||
// shuffel btn
|
||||
spstr strCommand.txt,tTmp.txt,"~",11
|
||||
spstr strCommand.txt,tTmp.txt,"~",22
|
||||
if(tTmp.txt=="disable")
|
||||
{
|
||||
vis tShuffle,0
|
||||
@@ -1504,9 +1498,9 @@ Timer tmSerial
|
||||
tShuffle.txt=tTmp.txt
|
||||
}
|
||||
// get Type
|
||||
spstr strCommand.txt,type1.txt,"~",12
|
||||
spstr strCommand.txt,type1.txt,"~",23
|
||||
// get internal name
|
||||
spstr strCommand.txt,entn1.txt,"~",13
|
||||
spstr strCommand.txt,entn1.txt,"~",24
|
||||
if(type1.txt=="delete"||type1.txt=="")
|
||||
{
|
||||
vis tEntity1,0
|
||||
@@ -1514,20 +1508,20 @@ Timer tmSerial
|
||||
}else
|
||||
{
|
||||
// change icon
|
||||
spstr strCommand.txt,bEntity1.txt,"~",14
|
||||
spstr strCommand.txt,bEntity1.txt,"~",25
|
||||
vis bEntity1,1
|
||||
// change icon color
|
||||
spstr strCommand.txt,tTmp.txt,"~",15
|
||||
spstr strCommand.txt,tTmp.txt,"~",26
|
||||
covx tTmp.txt,sys0,0,0
|
||||
bEntity1.pco=sys0
|
||||
// set name
|
||||
spstr strCommand.txt,tEntity1.txt,"~",16
|
||||
spstr strCommand.txt,tEntity1.txt,"~",27
|
||||
vis tEntity1,1
|
||||
}
|
||||
// get Type
|
||||
spstr strCommand.txt,type2.txt,"~",18
|
||||
spstr strCommand.txt,type2.txt,"~",29
|
||||
// get internal name
|
||||
spstr strCommand.txt,entn2.txt,"~",19
|
||||
spstr strCommand.txt,entn2.txt,"~",30
|
||||
if(type2.txt=="delete"||type2.txt=="")
|
||||
{
|
||||
vis tEntity2,0
|
||||
@@ -1535,20 +1529,20 @@ Timer tmSerial
|
||||
}else
|
||||
{
|
||||
// change icon
|
||||
spstr strCommand.txt,bEntity2.txt,"~",20
|
||||
spstr strCommand.txt,bEntity2.txt,"~",31
|
||||
vis bEntity2,1
|
||||
// change icon color
|
||||
spstr strCommand.txt,tTmp.txt,"~",21
|
||||
spstr strCommand.txt,tTmp.txt,"~",32
|
||||
covx tTmp.txt,sys0,0,0
|
||||
bEntity2.pco=sys0
|
||||
// set name
|
||||
spstr strCommand.txt,tEntity2.txt,"~",22
|
||||
spstr strCommand.txt,tEntity2.txt,"~",33
|
||||
vis tEntity2,1
|
||||
}
|
||||
// get Type
|
||||
spstr strCommand.txt,type3.txt,"~",24
|
||||
spstr strCommand.txt,type3.txt,"~",35
|
||||
// get internal name
|
||||
spstr strCommand.txt,entn3.txt,"~",25
|
||||
spstr strCommand.txt,entn3.txt,"~",36
|
||||
if(type3.txt=="delete"||type3.txt=="")
|
||||
{
|
||||
vis tEntity3,0
|
||||
@@ -1556,20 +1550,20 @@ Timer tmSerial
|
||||
}else
|
||||
{
|
||||
// change icon
|
||||
spstr strCommand.txt,bEntity3.txt,"~",26
|
||||
spstr strCommand.txt,bEntity3.txt,"~",37
|
||||
vis bEntity3,1
|
||||
// change icon color
|
||||
spstr strCommand.txt,tTmp.txt,"~",27
|
||||
spstr strCommand.txt,tTmp.txt,"~",38
|
||||
covx tTmp.txt,sys0,0,0
|
||||
bEntity3.pco=sys0
|
||||
// set name
|
||||
spstr strCommand.txt,tEntity3.txt,"~",28
|
||||
spstr strCommand.txt,tEntity3.txt,"~",39
|
||||
vis tEntity3,1
|
||||
}
|
||||
// get Type
|
||||
spstr strCommand.txt,type4.txt,"~",30
|
||||
spstr strCommand.txt,type4.txt,"~",41
|
||||
// get internal name
|
||||
spstr strCommand.txt,entn4.txt,"~",31
|
||||
spstr strCommand.txt,entn4.txt,"~",42
|
||||
if(type4.txt=="delete"||type4.txt=="")
|
||||
{
|
||||
vis tEntity4,0
|
||||
@@ -1577,20 +1571,20 @@ Timer tmSerial
|
||||
}else
|
||||
{
|
||||
// change icon
|
||||
spstr strCommand.txt,bEntity4.txt,"~",32
|
||||
spstr strCommand.txt,bEntity4.txt,"~",43
|
||||
vis bEntity4,1
|
||||
// change icon color
|
||||
spstr strCommand.txt,tTmp.txt,"~",33
|
||||
spstr strCommand.txt,tTmp.txt,"~",44
|
||||
covx tTmp.txt,sys0,0,0
|
||||
bEntity4.pco=sys0
|
||||
// set name
|
||||
spstr strCommand.txt,tEntity4.txt,"~",34
|
||||
spstr strCommand.txt,tEntity4.txt,"~",45
|
||||
vis tEntity4,1
|
||||
}
|
||||
// get Type
|
||||
spstr strCommand.txt,type5.txt,"~",36
|
||||
spstr strCommand.txt,type5.txt,"~",47
|
||||
// get internal name
|
||||
spstr strCommand.txt,entn5.txt,"~",37
|
||||
spstr strCommand.txt,entn5.txt,"~",48
|
||||
if(type5.txt=="delete"||type5.txt=="")
|
||||
{
|
||||
vis tEntity5,0
|
||||
@@ -1598,20 +1592,20 @@ Timer tmSerial
|
||||
}else
|
||||
{
|
||||
// change icon
|
||||
spstr strCommand.txt,bEntity5.txt,"~",38
|
||||
spstr strCommand.txt,bEntity5.txt,"~",49
|
||||
vis bEntity5,1
|
||||
// change icon color
|
||||
spstr strCommand.txt,tTmp.txt,"~",39
|
||||
spstr strCommand.txt,tTmp.txt,"~",50
|
||||
covx tTmp.txt,sys0,0,0
|
||||
bEntity5.pco=sys0
|
||||
// set name
|
||||
spstr strCommand.txt,tEntity5.txt,"~",40
|
||||
spstr strCommand.txt,tEntity5.txt,"~",51
|
||||
vis tEntity5,1
|
||||
}
|
||||
// get Type
|
||||
spstr strCommand.txt,type6.txt,"~",42
|
||||
spstr strCommand.txt,type6.txt,"~",53
|
||||
// get internal name
|
||||
spstr strCommand.txt,entn6.txt,"~",43
|
||||
spstr strCommand.txt,entn6.txt,"~",54
|
||||
if(type6.txt=="delete"||type6.txt=="")
|
||||
{
|
||||
vis tEntity6,0
|
||||
@@ -1619,14 +1613,14 @@ Timer tmSerial
|
||||
}else
|
||||
{
|
||||
// change icon
|
||||
spstr strCommand.txt,bEntity6.txt,"~",44
|
||||
spstr strCommand.txt,bEntity6.txt,"~",55
|
||||
vis bEntity6,1
|
||||
// change icon color
|
||||
spstr strCommand.txt,tTmp.txt,"~",45
|
||||
spstr strCommand.txt,tTmp.txt,"~",56
|
||||
covx tTmp.txt,sys0,0,0
|
||||
bEntity6.pco=sys0
|
||||
// set name
|
||||
spstr strCommand.txt,tEntity6.txt,"~",46
|
||||
spstr strCommand.txt,tEntity6.txt,"~",57
|
||||
vis tEntity6,1
|
||||
}
|
||||
}
|
||||
@@ -1694,6 +1688,10 @@ Timer tmSerial
|
||||
{
|
||||
page cardPower
|
||||
}
|
||||
if(tId.txt=="cardChart")
|
||||
{
|
||||
page cardChart
|
||||
}
|
||||
}
|
||||
if(tInstruction.txt=="time")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user