Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui (add nextion2text)

This commit is contained in:
joBr99
2023-01-23 16:53:40 +00:00
committed by github-actions[bot]
parent a481e70976
commit 9e026d8922
19 changed files with 475 additions and 897 deletions

View File

@@ -38,7 +38,7 @@ Page cardAlarm
vis bPrev,0
vis bNext,0
cardAlarm.bco=defaultBcoColor
for(sys0=0;sys0<40;sys0++)
for(sys0=0;sys0<44;sys0++)
{
if(b[sys0].type==98||b[sys0].type==116)
{

View File

@@ -39,7 +39,7 @@ Page cardPower
vis t4Icon,0
vis t5Icon,0
cardPower.bco=defaultBcoColor
for(sys0=0;sys0<43;sys0++)
for(sys0=0;sys0<48;sys0++)
{
if(b[sys0].type==98||b[sys0].type==116)
{
@@ -277,7 +277,7 @@ Text tHome
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 20
Max. Text Size : 10
Text tHome2
Attributes
@@ -287,7 +287,7 @@ Text tHome2
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 20
Max. Text Size : 10
Text tHomeO
Attributes
@@ -297,7 +297,7 @@ Text tHomeO
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 20
Max. Text Size : 10
Text tHomeO2
Attributes
@@ -307,7 +307,7 @@ Text tHomeO2
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 20
Max. Text Size : 10
Picture p0
Attributes
@@ -322,8 +322,8 @@ Slider h0
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Position : 50
Upper range limit : 100
Position : 600
Upper range limit : 1200
Lower range limit : 0
Slider h1
@@ -332,8 +332,8 @@ Slider h1
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Position : 50
Upper range limit : 100
Position : 600
Upper range limit : 1200
Lower range limit : 0
Slider h2
@@ -342,8 +342,8 @@ Slider h2
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Position : 50
Upper range limit : 100
Position : 600
Upper range limit : 1200
Lower range limit : 0
Slider h3
@@ -352,8 +352,8 @@ Slider h3
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Position : 50
Upper range limit : 100
Position : 600
Upper range limit : 1200
Lower range limit : 0
Slider h4
@@ -362,8 +362,8 @@ Slider h4
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Position : 50
Upper range limit : 100
Position : 600
Upper range limit : 1200
Lower range limit : 0
Slider h5
@@ -372,8 +372,8 @@ Slider h5
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Position : 50
Upper range limit : 100
Position : 600
Upper range limit : 1200
Lower range limit : 0
Button bNext
@@ -467,66 +467,84 @@ Timer tm0
Events
Timer Event
sys0=h0.val+t0Speed.val
if(sys0>h0.maxval)
if(t0Speed.val!=0)
{
h0.val=h0.minval
sys0=h0.val+t0Speed.val
if(sys0>h0.maxval)
{
h0.val=h0.minval
}
if(sys0<h0.minval)
{
h0.val=h0.maxval
}
h0.val+=t0Speed.val
}
if(sys0<h0.minval)
if(t1Speed.val!=0)
{
h0.val=h0.maxval
sys0=h1.val+t1Speed.val
if(sys0>h1.maxval)
{
h1.val=h1.minval
}
if(sys0<h1.minval)
{
h1.val=h1.maxval
}
h1.val+=t1Speed.val
}
h0.val+=t0Speed.val
sys0=h1.val+t1Speed.val
if(sys0>h1.maxval)
if(t2Speed.val!=0)
{
h1.val=h1.minval
sys0=h2.val+t2Speed.val
if(sys0>h2.maxval)
{
h2.val=h2.minval
}
if(sys0<h2.minval)
{
h2.val=h2.maxval
}
h2.val+=t2Speed.val
}
if(sys0<h1.minval)
if(t3Speed.val!=0)
{
h1.val=h1.maxval
sys0=h3.val+t3Speed.val
if(sys0>h3.maxval)
{
h3.val=h3.minval
}
if(sys0<h3.minval)
{
h3.val=h3.maxval
}
h3.val+=t3Speed.val
}
h1.val+=t1Speed.val
sys0=h2.val+t2Speed.val
if(sys0>h2.maxval)
if(t4Speed.val!=0)
{
h2.val=h2.minval
sys0=h4.val+t4Speed.val
if(sys0>h4.maxval)
{
h4.val=h4.minval
}
if(sys0<h4.minval)
{
h4.val=h4.maxval
}
h4.val+=t4Speed.val
}
if(sys0<h2.minval)
if(t5Speed.val!=0)
{
h2.val=h2.maxval
sys0=h5.val+t5Speed.val
if(sys0>h5.maxval)
{
h5.val=h5.minval
}
if(sys0<h5.minval)
{
h5.val=h5.maxval
}
h5.val+=t5Speed.val
}
h2.val+=t2Speed.val
sys0=h3.val+t3Speed.val
if(sys0>h3.maxval)
{
h3.val=h3.minval
}
if(sys0<h3.minval)
{
h3.val=h3.maxval
}
h3.val+=t3Speed.val
sys0=h4.val+t4Speed.val
if(sys0>h4.maxval)
{
h4.val=h4.minval
}
if(sys0<h4.minval)
{
h4.val=h4.maxval
}
h4.val+=t4Speed.val
sys0=h5.val+t5Speed.val
if(sys0>h5.maxval)
{
h5.val=h5.minval
}
if(sys0<h5.minval)
{
h5.val=h5.maxval
}
h5.val+=t5Speed.val
Timer tmSerial
Attributes

View File

@@ -12,22 +12,37 @@ Page pageStartup
Events
Preinitialize Event
dim=dimValueNormal
vis p0,0
recmod=1
bauds=115200
vis tSend,0
vis tInstruction,0
vis tTmp,0
vis tId,0
vis bSendStartup,0
vis frame_ptr,0
vis spinner_w,0
vis frapic_w,0
vis usual_cnt,0
vis tMsg2,0
vis tMsg3,0
vis tVersion,0
dim=100
vis t5,0
vis tShuffle,0
vis bPrev,0
vis bNext,0
vis bEntity1,0
vis bEntity2,0
vis bEntity3,0
vis bEntity4,0
vis bEntity5,0
vis bEntity6,0
cardMedia.bco=defaultBcoColor
for(sys0=0;sys0<52;sys0++)
{
if(b[sys0].type==98||b[sys0].type==116)
{
b[sys0].bco=defaultBcoColor
b[sys0].pco=defaultFontColor
}
}
if(defaultBcoColor==0)
{
hVolume.pic=14
hVolume.pic1=13
hVolume.pic2=15
}
Postinitialize Event
//send messages by clicking button
@@ -143,7 +158,7 @@ Text tTmp
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Max. Text Size : 30
Text tVersion
Attributes

View File

@@ -39,6 +39,12 @@ Variable (string) strCommand
Text :
Max. Text Size: 200
Variable (string) strTmp
Attributes
Scope : local
Text :
Max. Text Size: 2
Variable (string) tId
Attributes
Scope : local
@@ -468,6 +474,7 @@ Timer tmSerial
}
if(tInstruction.txt=="time")
{
click m0,1
//get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
spstr pageIcons.vaTime.txt,tTime.txt,"?",0
@@ -591,6 +598,9 @@ Timer tmSerial
tF4Icon.txt=tF3Icon.txt
tF3Icon.txt=tF2Icon.txt
tF2Icon.txt=tF1Icon.txt
tF4Icon.pco=tF3Icon.pco
tF3Icon.pco=tF2Icon.pco
tF2Icon.pco=tF1Icon.pco
}
}
if(tInstruction.txt=="color"&&tNotifyHead.txt==""&&tNotifyText.txt=="")