add popup page for input_select (add nextion2text)

This commit is contained in:
joBr99
2022-10-25 17:08:39 +00:00
committed by github-actions[bot]
parent b9c50001af
commit a8746d935d
24 changed files with 6734 additions and 84 deletions

View File

@@ -1927,6 +1927,10 @@ Hotspot m2
{ {
page popupFan page popupFan
} }
if(type3.txt=="input_sel")
{
page popupInSel
}
Hotspot m1 Hotspot m1
Attributes Attributes
@@ -1963,6 +1967,10 @@ Hotspot m1
{ {
page popupFan page popupFan
} }
if(type2.txt=="input_sel")
{
page popupInSel
}
Hotspot m0 Hotspot m0
Attributes Attributes
@@ -1999,6 +2007,10 @@ Hotspot m0
{ {
page popupFan page popupFan
} }
if(type1.txt=="input_sel")
{
page popupInSel
}
Hotspot m3 Hotspot m3
Attributes Attributes
@@ -2035,6 +2047,10 @@ Hotspot m3
{ {
page popupFan page popupFan
} }
if(type4.txt=="input_sel")
{
page popupInSel
}
Hotspot mSwipeNext Hotspot mSwipeNext
Attributes Attributes
@@ -2295,7 +2311,7 @@ Timer tmSerial
// get Text (optional Value) // get Text (optional Value)
spstr strCommand.txt,bText1.txt,"~",8 spstr strCommand.txt,bText1.txt,"~",8
} }
if(type1.txt=="button") if(type1.txt=="button"||type1.txt=="input_sel")
{ {
vis bUp1,0 vis bUp1,0
vis bStop1,0 vis bStop1,0
@@ -2444,7 +2460,7 @@ Timer tmSerial
// get Text (optional Value) // get Text (optional Value)
spstr strCommand.txt,bText2.txt,"~",14 spstr strCommand.txt,bText2.txt,"~",14
} }
if(type2.txt=="button") if(type2.txt=="button"||type2.txt=="i")
{ {
vis bUp2,0 vis bUp2,0
vis bStop2,0 vis bStop2,0
@@ -2593,7 +2609,7 @@ Timer tmSerial
// get Text (optional Value) // get Text (optional Value)
spstr strCommand.txt,bText3.txt,"~",20 spstr strCommand.txt,bText3.txt,"~",20
} }
if(type3.txt=="button") if(type3.txt=="button"||type3.txt=="input_sel")
{ {
vis bUp3,0 vis bUp3,0
vis bStop3,0 vis bStop3,0
@@ -2742,7 +2758,7 @@ Timer tmSerial
// get Text (optional Value) // get Text (optional Value)
spstr strCommand.txt,bText4.txt,"~",26 spstr strCommand.txt,bText4.txt,"~",26
} }
if(type4.txt=="button") if(type4.txt=="button"||type4.txt=="input_sel")
{ {
vis bUp4,0 vis bUp4,0
vis bStop4,0 vis bStop4,0

View File

@@ -1391,6 +1391,10 @@ Timer tmLP
{ {
page popupFan page popupFan
} }
if(tTmp.txt=="input_sel")
{
page popupInSel
}
TouchCap tc0 TouchCap tc0
Attributes Attributes

View File

@@ -34,10 +34,14 @@ pageTest
14 Component(s) 14 Component(s)
14 Line(s) of event code 14 Line(s) of event code
14 Unique line(s) of event code 14 Unique line(s) of event code
popupThermo
44 Component(s)
515 Line(s) of event code
272 Unique line(s) of event code
cardGrid cardGrid
42 Component(s) 42 Component(s)
474 Line(s) of event code 478 Line(s) of event code
281 Unique line(s) of event code 283 Unique line(s) of event code
cardAlarm cardAlarm
40 Component(s) 40 Component(s)
427 Line(s) of event code 427 Line(s) of event code
@@ -46,6 +50,10 @@ screensaver
38 Component(s) 38 Component(s)
350 Line(s) of event code 350 Line(s) of event code
266 Unique line(s) of event code 266 Unique line(s) of event code
popupInSel
34 Component(s)
476 Line(s) of event code
222 Unique line(s) of event code
cardQR cardQR
32 Component(s) 32 Component(s)
409 Line(s) of event code 409 Line(s) of event code
@@ -54,21 +62,17 @@ cardPower
43 Component(s) 43 Component(s)
423 Line(s) of event code 423 Line(s) of event code
293 Unique line(s) of event code 293 Unique line(s) of event code
popupThermo
44 Component(s)
515 Line(s) of event code
272 Unique line(s) of event code
cardThermo cardThermo
53 Component(s) 53 Component(s)
596 Line(s) of event code 596 Line(s) of event code
313 Unique line(s) of event code 313 Unique line(s) of event code
cardEntities cardEntities
65 Component(s) 65 Component(s)
1137 Line(s) of event code 1153 Line(s) of event code
522 Unique line(s) of event code 527 Unique line(s) of event code
Total Total
16 Page(s) 17 Page(s)
529 Component(s) 563 Component(s)
6307 Line(s) of event code 6803 Line(s) of event code
1676 Unique line(s) of event code 1736 Unique line(s) of event code

File diff suppressed because it is too large Load Diff

View File

@@ -207,7 +207,7 @@ Text tEntity
Disable release event after dragging: 0 Disable release event after dragging: 0
Send Component ID : disabled Send Component ID : disabled
Opacity : 127 Opacity : 127
x coordinate : 92 x coordinate : 109
y coordinate : 21 y coordinate : 21
Width : 263 Width : 263
Height : 30 Height : 30
@@ -237,7 +237,7 @@ Text tIcon1
Disable release event after dragging: 0 Disable release event after dragging: 0
Send Component ID : disabled Send Component ID : disabled
Opacity : 127 Opacity : 127
x coordinate : 11 x coordinate : 28
y coordinate : 21 y coordinate : 21
Width : 45 Width : 45
Height : 30 Height : 30
@@ -267,7 +267,7 @@ Text heading1
Disable release event after dragging: 0 Disable release event after dragging: 0
Send Component ID : disabled Send Component ID : disabled
Opacity : 127 Opacity : 127
x coordinate : 11 x coordinate : 28
y coordinate : 69 y coordinate : 69
Width : 262 Width : 262
Height : 30 Height : 30
@@ -297,7 +297,7 @@ Text heading2
Disable release event after dragging: 0 Disable release event after dragging: 0
Send Component ID : disabled Send Component ID : disabled
Opacity : 127 Opacity : 127
x coordinate : 11 x coordinate : 28
y coordinate : 155 y coordinate : 155
Width : 262 Width : 262
Height : 30 Height : 30
@@ -327,7 +327,7 @@ Text heading3
Disable release event after dragging: 0 Disable release event after dragging: 0
Send Component ID : disabled Send Component ID : disabled
Opacity : 127 Opacity : 127
x coordinate : 11 x coordinate : 28
y coordinate : 236 y coordinate : 236
Width : 262 Width : 262
Height : 30 Height : 30
@@ -374,7 +374,7 @@ Button b0
Disable release event after dragging: 0 Disable release event after dragging: 0
Send Component ID : disabled Send Component ID : disabled
Opacity : 127 Opacity : 127
x coordinate : 397 x coordinate : 414
y coordinate : 8 y coordinate : 8
Width : 50 Width : 50
Height : 50 Height : 50
@@ -421,7 +421,7 @@ Button bMode1
Disable release event after dragging: 0 Disable release event after dragging: 0
Send Component ID : disabled Send Component ID : disabled
Opacity : 127 Opacity : 127
x coordinate : 11 x coordinate : 28
y coordinate : 101 y coordinate : 101
Width : 120 Width : 120
Height : 35 Height : 35
@@ -473,7 +473,7 @@ Button bMode3
Disable release event after dragging: 0 Disable release event after dragging: 0
Send Component ID : disabled Send Component ID : disabled
Opacity : 127 Opacity : 127
x coordinate : 259 x coordinate : 276
y coordinate : 101 y coordinate : 101
Width : 120 Width : 120
Height : 35 Height : 35
@@ -525,7 +525,7 @@ Button bMode2
Disable release event after dragging: 0 Disable release event after dragging: 0
Send Component ID : disabled Send Component ID : disabled
Opacity : 127 Opacity : 127
x coordinate : 135 x coordinate : 152
y coordinate : 101 y coordinate : 101
Width : 120 Width : 120
Height : 35 Height : 35
@@ -577,7 +577,7 @@ Button bModeNext
Disable release event after dragging: 0 Disable release event after dragging: 0
Send Component ID : disabled Send Component ID : disabled
Opacity : 127 Opacity : 127
x coordinate : 388 x coordinate : 405
y coordinate : 76 y coordinate : 76
Width : 50 Width : 50
Height : 50 Height : 50
@@ -648,7 +648,7 @@ Button cModeNext
Disable release event after dragging: 0 Disable release event after dragging: 0
Send Component ID : disabled Send Component ID : disabled
Opacity : 127 Opacity : 127
x coordinate : 388 x coordinate : 405
y coordinate : 162 y coordinate : 162
Width : 50 Width : 50
Height : 50 Height : 50
@@ -718,7 +718,7 @@ Button cMode3
Disable release event after dragging: 0 Disable release event after dragging: 0
Send Component ID : disabled Send Component ID : disabled
Opacity : 127 Opacity : 127
x coordinate : 259 x coordinate : 276
y coordinate : 187 y coordinate : 187
Width : 120 Width : 120
Height : 35 Height : 35
@@ -770,7 +770,7 @@ Button cMode2
Disable release event after dragging: 0 Disable release event after dragging: 0
Send Component ID : disabled Send Component ID : disabled
Opacity : 127 Opacity : 127
x coordinate : 135 x coordinate : 152
y coordinate : 187 y coordinate : 187
Width : 120 Width : 120
Height : 35 Height : 35
@@ -822,7 +822,7 @@ Button cMode1
Disable release event after dragging: 0 Disable release event after dragging: 0
Send Component ID : disabled Send Component ID : disabled
Opacity : 127 Opacity : 127
x coordinate : 11 x coordinate : 28
y coordinate : 187 y coordinate : 187
Width : 120 Width : 120
Height : 35 Height : 35
@@ -874,7 +874,7 @@ Button dModeNext
Disable release event after dragging: 0 Disable release event after dragging: 0
Send Component ID : disabled Send Component ID : disabled
Opacity : 127 Opacity : 127
x coordinate : 388 x coordinate : 405
y coordinate : 243 y coordinate : 243
Width : 50 Width : 50
Height : 50 Height : 50
@@ -944,7 +944,7 @@ Button dMode3
Disable release event after dragging: 0 Disable release event after dragging: 0
Send Component ID : disabled Send Component ID : disabled
Opacity : 127 Opacity : 127
x coordinate : 259 x coordinate : 276
y coordinate : 268 y coordinate : 268
Width : 120 Width : 120
Height : 35 Height : 35
@@ -996,7 +996,7 @@ Button dMode2
Disable release event after dragging: 0 Disable release event after dragging: 0
Send Component ID : disabled Send Component ID : disabled
Opacity : 127 Opacity : 127
x coordinate : 135 x coordinate : 152
y coordinate : 268 y coordinate : 268
Width : 120 Width : 120
Height : 35 Height : 35
@@ -1048,7 +1048,7 @@ Button dMode1
Disable release event after dragging: 0 Disable release event after dragging: 0
Send Component ID : disabled Send Component ID : disabled
Opacity : 127 Opacity : 127
x coordinate : 11 x coordinate : 28
y coordinate : 268 y coordinate : 268
Width : 120 Width : 120
Height : 35 Height : 35

View File

@@ -1029,6 +1029,10 @@ Hotspot m2
{ {
page popupFan page popupFan
} }
if(type3.txt=="input_sel")
{
page popupInSel
}
Hotspot m1 Hotspot m1
Attributes Attributes
@@ -1056,6 +1060,10 @@ Hotspot m1
{ {
page popupFan page popupFan
} }
if(type2.txt=="input_sel")
{
page popupInSel
}
Hotspot m0 Hotspot m0
Attributes Attributes
@@ -1083,6 +1091,10 @@ Hotspot m0
{ {
page popupFan page popupFan
} }
if(type1.txt=="input_sel")
{
page popupInSel
}
Hotspot m3 Hotspot m3
Attributes Attributes
@@ -1110,6 +1122,10 @@ Hotspot m3
{ {
page popupFan page popupFan
} }
if(type4.txt=="input_sel")
{
page popupInSel
}
Hotspot mSwipeNext Hotspot mSwipeNext
Attributes Attributes
@@ -1342,7 +1358,7 @@ Timer tmSerial
// get Text (optional Value) // get Text (optional Value)
spstr strCommand.txt,bText1.txt,"~",8 spstr strCommand.txt,bText1.txt,"~",8
} }
if(type1.txt=="button") if(type1.txt=="button"||type1.txt=="input_sel")
{ {
vis bUp1,0 vis bUp1,0
vis bStop1,0 vis bStop1,0
@@ -1491,7 +1507,7 @@ Timer tmSerial
// get Text (optional Value) // get Text (optional Value)
spstr strCommand.txt,bText2.txt,"~",14 spstr strCommand.txt,bText2.txt,"~",14
} }
if(type2.txt=="button") if(type2.txt=="button"||type2.txt=="i")
{ {
vis bUp2,0 vis bUp2,0
vis bStop2,0 vis bStop2,0
@@ -1640,7 +1656,7 @@ Timer tmSerial
// get Text (optional Value) // get Text (optional Value)
spstr strCommand.txt,bText3.txt,"~",20 spstr strCommand.txt,bText3.txt,"~",20
} }
if(type3.txt=="button") if(type3.txt=="button"||type3.txt=="input_sel")
{ {
vis bUp3,0 vis bUp3,0
vis bStop3,0 vis bStop3,0
@@ -1789,7 +1805,7 @@ Timer tmSerial
// get Text (optional Value) // get Text (optional Value)
spstr strCommand.txt,bText4.txt,"~",26 spstr strCommand.txt,bText4.txt,"~",26
} }
if(type4.txt=="button") if(type4.txt=="button"||type4.txt=="input_sel")
{ {
vis bUp4,0 vis bUp4,0
vis bStop4,0 vis bStop4,0

View File

@@ -944,6 +944,10 @@ Timer tmLP
{ {
page popupFan page popupFan
} }
if(tTmp.txt=="input_sel")
{
page popupInSel
}
TouchCap tc0 TouchCap tc0
Attributes Attributes

View File

@@ -0,0 +1,886 @@
Page popupInSel
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Events
Preinitialize Event
dim=dimValueNormal
//get entitiy name
tEntity.txt=pageIcons.tTmp1.txt
//get entity id
entn.txt=pageIcons.tTmp2.txt
tIcon1.txt=pageIcons.tTmp3.txt
vis p0,0
vis tSend,0
vis tTmp,0
vis tInstruction,0
vis tId,0
vis bModeNext,0
//page open event
// event,pageOpenDetail,typeOfPage,tEntityName
// craft command
tSend.txt="event,pageOpenDetail,popupInSel,"+entn.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
popupInSel.bco=defaultBcoColor
for(sys0=0;sys0<34;sys0++)
{
if(b[sys0].type==98||b[sys0].type==116)
{
b[sys0].bco=defaultBcoColor
b[sys0].pco=defaultFontColor
}
if(b[sys0].type==53&&defaultBcoColor==0)
{
b[sys0].pic=10
b[sys0].pic2=11
}
}
Variable (string) strCommand
Attributes
Scope : local
Text :
Max. Text Size: 500
Variable (string) entn
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (int32) mode
Attributes
Scope: local
Value: 1
Variable (int32) mode_temp
Attributes
Scope: local
Value: 0
Variable (int32) vaModePos
Attributes
Scope: local
Value: 0
Variable (string) vaModeList
Attributes
Scope : local
Text :
Max. Text Size: 400
Variable (string) vaModeCur
Attributes
Scope : local
Text :
Max. Text Size: 40
Variable (string) tSend
Attributes
Scope : local
Text :
Max. Text Size: 200
Variable (string) tTmp
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) tInstruction
Attributes
Scope : local
Text :
Max. Text Size: 20
Variable (string) tId
Attributes
Scope : local
Text :
Max. Text Size: 20
Variable (string) vaType
Attributes
Scope : local
Text :
Max. Text Size: 20
Text tEntity
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 25
Text tIcon1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Picture p0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Button b0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tSend.txt="event,buttonPress2,popupLight,bExit"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bMode1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
sys2=vaModePos.val-12
covx sys2,tTmp.txt,0,0
tSend.txt+="mode-"+vaType.txt+","+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bMode3
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
sys2=vaModePos.val-10
covx sys2,tTmp.txt,0,0
tSend.txt+="mode-"+vaType.txt+","+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bMode2
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
sys2=vaModePos.val-11
covx sys2,tTmp.txt,0,0
tSend.txt+="mode-"+vaType.txt+","+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bModeNext
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 3
Events
Touch Press Event
spstr vaModeList.txt,tTmp.txt,"?",vaModePos.val
if(tTmp.txt=="")
{
vaModePos.val=0
spstr vaModeList.txt,bMode1.txt,"?",vaModePos.val
spstr vaModeList.txt,bMode2.txt,"?",vaModePos.val+1
spstr vaModeList.txt,bMode3.txt,"?",vaModePos.val+2
}
spstr vaModeList.txt,bMode1.txt,"?",vaModePos.val
spstr vaModeList.txt,bMode2.txt,"?",vaModePos.val+1
spstr vaModeList.txt,bMode3.txt,"?",vaModePos.val+2
spstr vaModeList.txt,bMode4.txt,"?",vaModePos.val+3
spstr vaModeList.txt,bMode5.txt,"?",vaModePos.val+4
spstr vaModeList.txt,bMode6.txt,"?",vaModePos.val+5
spstr vaModeList.txt,bMode7.txt,"?",vaModePos.val+6
spstr vaModeList.txt,bMode8.txt,"?",vaModePos.val+7
spstr vaModeList.txt,bMode9.txt,"?",vaModePos.val+8
spstr vaModeList.txt,bMode10.txt,"?",vaModePos.val+9
spstr vaModeList.txt,bMode11.txt,"?",vaModePos.val+10
spstr vaModeList.txt,bMode12.txt,"?",vaModePos.val+11
vaModePos.val+=12
spstr vaModeList.txt,tTmp.txt,"?",12
if(tTmp.txt=="")
{
vis bModeNext,0
}else
{
vis bModeNext,1
}
bMode1.pco=defaultFontColor
bMode2.pco=defaultFontColor
bMode3.pco=defaultFontColor
bMode4.pco=defaultFontColor
bMode5.pco=defaultFontColor
bMode6.pco=defaultFontColor
bMode7.pco=defaultFontColor
bMode8.pco=defaultFontColor
bMode9.pco=defaultFontColor
bMode10.pco=defaultFontColor
bMode11.pco=defaultFontColor
bMode12.pco=defaultFontColor
if(bMode1.txt==vaModeCur.txt)
{
bMode1.pco=1374
}
if(bMode2.txt==vaModeCur.txt)
{
bMode2.pco=1374
}
if(bMode3.txt==vaModeCur.txt)
{
bMode3.pco=1374
}
if(bMode4.txt==vaModeCur.txt)
{
bMode4.pco=1374
}
if(bMode5.txt==vaModeCur.txt)
{
bMode5.pco=1374
}
if(bMode6.txt==vaModeCur.txt)
{
bMode6.pco=1374
}
if(bMode7.txt==vaModeCur.txt)
{
bMode7.pco=1374
}
if(bMode8.txt==vaModeCur.txt)
{
bMode8.pco=1374
}
if(bMode9.txt==vaModeCur.txt)
{
bMode9.pco=1374
}
if(bMode10.txt==vaModeCur.txt)
{
bMode10.pco=1374
}
if(bMode11.txt==vaModeCur.txt)
{
bMode11.pco=1374
}
if(bMode12.txt==vaModeCur.txt)
{
bMode12.pco=1374
}
Button bMode4
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
sys2=vaModePos.val-9
covx sys2,tTmp.txt,0,0
tSend.txt+="mode-"+vaType.txt+","+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bMode5
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
sys2=vaModePos.val-8
covx sys2,tTmp.txt,0,0
tSend.txt+="mode-"+vaType.txt+","+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bMode6
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
sys2=vaModePos.val-7
covx sys2,tTmp.txt,0,0
tSend.txt+="mode-"+vaType.txt+","+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bMode7
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
sys2=vaModePos.val-6
covx sys2,tTmp.txt,0,0
tSend.txt+="mode-"+vaType.txt+","+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bMode8
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
sys2=vaModePos.val-5
covx sys2,tTmp.txt,0,0
tSend.txt+="mode-"+vaType.txt+","+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bMode9
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
sys2=vaModePos.val-4
covx sys2,tTmp.txt,0,0
tSend.txt+="mode-"+vaType.txt+","+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bMode12
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
sys2=vaModePos.val-1
covx sys2,tTmp.txt,0,0
tSend.txt+="mode-"+vaType.txt+","+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bMode11
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
sys2=vaModePos.val-2
covx sys2,tTmp.txt,0,0
tSend.txt+="mode-"+vaType.txt+","+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bMode10
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
sys2=vaModePos.val-3
covx sys2,tTmp.txt,0,0
tSend.txt+="mode-"+vaType.txt+","+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Timer tmSleep
Attributes
Scope : local
Period (ms): 1000
Enabled : yes
Events
Timer Event
if(sleepTimeout!=0)
{
sleepValue+=1
if(sleepTimeout<=sleepValue)
{
sleepValue=0
click b0,1
click b0,0
}
}
Timer tmSerial
Attributes
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
ucopy payloadLength,2,2,0
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
// calculate crc
crcrest 1,0xFFFF
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
//crcputu 3,u[2]
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
crcputu 0,payloadLength-1
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
// compare crc with recived value
if(crcval==recvCrc)
{
// crc is okay
// here is the location where acual code should be
// write command to variable strCommand
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
spstr strCommand.txt,tTmp.txt,"~",1
if(tInstruction.txt=="entityUpdateDetail"&&entn.txt==tTmp.txt)
{
// change icon
spstr strCommand.txt,tIcon1.txt,"~",2
vis tIcon1,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",3
covx tTmp.txt,sys0,0,0
tIcon1.pco=sys0
//mode 1 type
spstr strCommand.txt,vaType.txt,"~",4
//current mode
spstr strCommand.txt,vaModeCur.txt,"~",5
//mode list
spstr strCommand.txt,vaModeList.txt,"~",6
if(vaModeList.txt=="")
{
vis bMode1,0
vis bMode2,0
vis bMode3,0
vis bModeNext,0
}
if(bMode1.txt=="")
{
click bModeNext,1
click bModeNext,0
}
bMode1.pco=defaultFontColor
bMode2.pco=defaultFontColor
bMode3.pco=defaultFontColor
if(bMode1.txt==vaModeCur.txt)
{
bMode1.pco=1374
}
if(bMode2.txt==vaModeCur.txt)
{
bMode2.pco=1374
}
if(bMode3.txt==vaModeCur.txt)
{
bMode3.pco=1374
}
}
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
// get value normal
spstr strCommand.txt,tTmp.txt,"~",2
covx tTmp.txt,dimValueNormal,0,0
dim=dimValueNormal
// get background color
spstr strCommand.txt,tTmp.txt,"~",3
if(tTmp.txt!="")
{
covx tTmp.txt,defaultBcoColor,0,0
}
// get font color
spstr strCommand.txt,tTmp.txt,"~",4
if(tTmp.txt!="")
{
covx tTmp.txt,defaultFontColor,0,0
}
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="pageType")
{
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
spstr strCommand.txt,pageIcons.tTmp3.txt,"~",4
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="screensaver")
{
page screensaver
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="popupShutter")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupShutter
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardThermo")
{
page cardThermo
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
if(tId.txt=="cardQR")
{
page cardQR
}
if(tId.txt=="cardPower")
{
page cardPower
}
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
}
Timer tmCooldown
Attributes
Scope : local
Period (ms): 100
Enabled : no
Events
Timer Event
tmCooldown.en=0
TouchCap tc0
Attributes
Scope: local
Value: 0
Events
Touch Press Event
sleepValue=0

View File

@@ -326,13 +326,13 @@
│ Disable release event after dragging: 0 │ Disable release event after dragging: 0
│ Send Component ID : disabled │ Send Component ID : disabled
│ @@ -1107,14 +1313,41 @@ │ @@ -1123,14 +1329,45 @@
│ page popupLight
│ }
│ if(type4.txt=="fan")
│ {
│ page popupFan │ page popupFan
│ } │ }
│ if(type4.txt=="input_sel")
│ {
│ page popupInSel
│ }
│ +Hotspot m4 │ +Hotspot m4
│ + Attributes │ + Attributes
@@ -360,6 +360,10 @@
│ + { │ + {
│ + page popupFan │ + page popupFan
│ + } │ + }
│ + if(type5.txt=="input_sel")
│ + {
│ + page popupInSel
│ + }
│ + │ +
│ Hotspot mSwipeNext │ Hotspot mSwipeNext
│ Attributes │ Attributes
@@ -368,7 +372,24 @@
│ Disable release event after dragging: 0 │ Disable release event after dragging: 0
│ Send Component ID : disabled │ Send Component ID : disabled
│ @@ -1826,14 +2059,163 @@ │ @@ -1503,15 +1740,15 @@
│ vis hSlider2,0
│ vis nNum2,0
│ bText2.pco=65535
│ bText2.pco2=65535
│ // get Text (optional Value)
│ spstr strCommand.txt,bText2.txt,"~",14
│ }
│ - if(type2.txt=="button"||type2.txt=="i")
│ + if(type2.txt=="button"||type2.txt=="input_sel")
│ {
│ vis bUp2,0
│ vis bStop2,0
│ vis bDown2,0
│ vis btOnOff2,0
│ vis bText2,1
│ tsw bText2,1
│ @@ -1842,14 +2079,163 @@
│ covx tTmp.txt,sys0,0,0 │ covx tTmp.txt,sys0,0,0
│ hSlider4.minval=sys0 │ hSlider4.minval=sys0
│ //third value is max value │ //third value is max value
@@ -484,7 +505,7 @@
│ + // get Text (optional Value) │ + // get Text (optional Value)
│ + spstr strCommand.txt,bText5.txt,"~",32 │ + spstr strCommand.txt,bText5.txt,"~",32
│ + } │ + }
│ + if(type5.txt=="button") │ + if(type5.txt=="button"||type5.txt=="input_sel")
│ + { │ + {
│ + vis bUp5,0 │ + vis bUp5,0
│ + vis bStop5,0 │ + vis bStop5,0

View File

@@ -1,4 +1,31 @@
+++ /dev/fd/62 2022-10-23 21:58:41.243864067 +0000 +++ /dev/fd/62 2022-10-25 17:08:32.504898978 +0000
+,14 +1329,45 @@
+ page popupFan
+ if(type4.txt=="input_sel")
+ page popupInSel
+ if(type5.txt=="input_sel")
+ {
+ page popupInSel
+ }
+,15 +1740,15 @@
+ vis hSlider2,0
+ vis nNum2,0
+ bText2.pco=65535
+ bText2.pco2=65535
+ // get Text (optional Value)
+ spstr strCommand.txt,bText2.txt,"~",14
+ }
+ if(type2.txt=="button"||type2.txt=="i")
+ if(type2.txt=="button"||type2.txt=="input_sel")
+ {
+ vis bUp2,0
+ vis bStop2,0
+ vis bDown2,0
+ vis btOnOff2,0
+ vis bText2,1
+ tsw bText2,1
+,14 +2079,163 @@
+ if(type5.txt=="button"||type5.txt=="input_sel")
+ tSend.txt+="mode-preset_modes,"+tTmp.txt + tSend.txt+="mode-preset_modes,"+tTmp.txt
+ tSend.txt+="mode-preset_modes,"+tTmp.txt + tSend.txt+="mode-preset_modes,"+tTmp.txt
+reensaver.txt +reensaver.txt

View File

@@ -2317,6 +2317,10 @@ Hotspot m2
{ {
page popupFan page popupFan
} }
if(type3.txt=="input_sel")
{
page popupInSel
}
Hotspot m1 Hotspot m1
Attributes Attributes
@@ -2353,6 +2357,10 @@ Hotspot m1
{ {
page popupFan page popupFan
} }
if(type2.txt=="input_sel")
{
page popupInSel
}
Hotspot m0 Hotspot m0
Attributes Attributes
@@ -2389,6 +2397,10 @@ Hotspot m0
{ {
page popupFan page popupFan
} }
if(type1.txt=="input_sel")
{
page popupInSel
}
Hotspot m3 Hotspot m3
Attributes Attributes
@@ -2425,6 +2437,10 @@ Hotspot m3
{ {
page popupFan page popupFan
} }
if(type4.txt=="input_sel")
{
page popupInSel
}
Hotspot m4 Hotspot m4
Attributes Attributes
@@ -2461,6 +2477,10 @@ Hotspot m4
{ {
page popupFan page popupFan
} }
if(type5.txt=="input_sel")
{
page popupInSel
}
Hotspot mSwipeNext Hotspot mSwipeNext
Attributes Attributes
@@ -2721,7 +2741,7 @@ Timer tmSerial
// get Text (optional Value) // get Text (optional Value)
spstr strCommand.txt,bText1.txt,"~",8 spstr strCommand.txt,bText1.txt,"~",8
} }
if(type1.txt=="button") if(type1.txt=="button"||type1.txt=="input_sel")
{ {
vis bUp1,0 vis bUp1,0
vis bStop1,0 vis bStop1,0
@@ -2870,7 +2890,7 @@ Timer tmSerial
// get Text (optional Value) // get Text (optional Value)
spstr strCommand.txt,bText2.txt,"~",14 spstr strCommand.txt,bText2.txt,"~",14
} }
if(type2.txt=="button") if(type2.txt=="button"||type2.txt=="input_sel")
{ {
vis bUp2,0 vis bUp2,0
vis bStop2,0 vis bStop2,0
@@ -3019,7 +3039,7 @@ Timer tmSerial
// get Text (optional Value) // get Text (optional Value)
spstr strCommand.txt,bText3.txt,"~",20 spstr strCommand.txt,bText3.txt,"~",20
} }
if(type3.txt=="button") if(type3.txt=="button"||type3.txt=="input_sel")
{ {
vis bUp3,0 vis bUp3,0
vis bStop3,0 vis bStop3,0
@@ -3168,7 +3188,7 @@ Timer tmSerial
// get Text (optional Value) // get Text (optional Value)
spstr strCommand.txt,bText4.txt,"~",26 spstr strCommand.txt,bText4.txt,"~",26
} }
if(type4.txt=="button") if(type4.txt=="button"||type4.txt=="input_sel")
{ {
vis bUp4,0 vis bUp4,0
vis bStop4,0 vis bStop4,0
@@ -3317,7 +3337,7 @@ Timer tmSerial
// get Text (optional Value) // get Text (optional Value)
spstr strCommand.txt,bText5.txt,"~",32 spstr strCommand.txt,bText5.txt,"~",32
} }
if(type5.txt=="button") if(type5.txt=="button"||type5.txt=="input_sel")
{ {
vis bUp5,0 vis bUp5,0
vis bStop5,0 vis bStop5,0

View File

@@ -1391,6 +1391,10 @@ Timer tmLP
{ {
page popupFan page popupFan
} }
if(tTmp.txt=="input_sel")
{
page popupInSel
}
TouchCap tc0 TouchCap tc0
Attributes Attributes

View File

@@ -26,10 +26,10 @@ pageStartup
19 Component(s) 19 Component(s)
172 Line(s) of event code 172 Line(s) of event code
125 Unique line(s) of event code 125 Unique line(s) of event code
cardGrid popupInSel
42 Component(s) 34 Component(s)
474 Line(s) of event code 476 Line(s) of event code
281 Unique line(s) of event code 222 Unique line(s) of event code
cardQR cardQR
32 Component(s) 32 Component(s)
409 Line(s) of event code 409 Line(s) of event code
@@ -50,6 +50,10 @@ popupFan
27 Component(s) 27 Component(s)
347 Line(s) of event code 347 Line(s) of event code
202 Unique line(s) of event code 202 Unique line(s) of event code
cardGrid
42 Component(s)
478 Line(s) of event code
283 Unique line(s) of event code
cardAlarm cardAlarm
40 Component(s) 40 Component(s)
427 Line(s) of event code 427 Line(s) of event code
@@ -58,17 +62,17 @@ cardThermo
53 Component(s) 53 Component(s)
596 Line(s) of event code 596 Line(s) of event code
313 Unique line(s) of event code 313 Unique line(s) of event code
cardEntities
77 Component(s)
1359 Line(s) of event code
608 Unique line(s) of event code
popupThermo popupThermo
44 Component(s) 44 Component(s)
515 Line(s) of event code 515 Line(s) of event code
272 Unique line(s) of event code 272 Unique line(s) of event code
cardEntities
77 Component(s)
1379 Line(s) of event code
614 Unique line(s) of event code
Total Total
16 Page(s) 17 Page(s)
541 Component(s) 575 Component(s)
6530 Line(s) of event code 7030 Line(s) of event code
1750 Unique line(s) of event code 1811 Unique line(s) of event code

File diff suppressed because it is too large Load Diff

View File

@@ -1235,6 +1235,10 @@ Hotspot m2
{ {
page popupFan page popupFan
} }
if(type3.txt=="input_sel")
{
page popupInSel
}
Hotspot m1 Hotspot m1
Attributes Attributes
@@ -1262,6 +1266,10 @@ Hotspot m1
{ {
page popupFan page popupFan
} }
if(type2.txt=="input_sel")
{
page popupInSel
}
Hotspot m0 Hotspot m0
Attributes Attributes
@@ -1289,6 +1297,10 @@ Hotspot m0
{ {
page popupFan page popupFan
} }
if(type1.txt=="input_sel")
{
page popupInSel
}
Hotspot m3 Hotspot m3
Attributes Attributes
@@ -1316,6 +1328,10 @@ Hotspot m3
{ {
page popupFan page popupFan
} }
if(type4.txt=="input_sel")
{
page popupInSel
}
Hotspot m4 Hotspot m4
Attributes Attributes
@@ -1343,6 +1359,10 @@ Hotspot m4
{ {
page popupFan page popupFan
} }
if(type5.txt=="input_sel")
{
page popupInSel
}
Hotspot mSwipeNext Hotspot mSwipeNext
Attributes Attributes
@@ -1575,7 +1595,7 @@ Timer tmSerial
// get Text (optional Value) // get Text (optional Value)
spstr strCommand.txt,bText1.txt,"~",8 spstr strCommand.txt,bText1.txt,"~",8
} }
if(type1.txt=="button") if(type1.txt=="button"||type1.txt=="input_sel")
{ {
vis bUp1,0 vis bUp1,0
vis bStop1,0 vis bStop1,0
@@ -1724,7 +1744,7 @@ Timer tmSerial
// get Text (optional Value) // get Text (optional Value)
spstr strCommand.txt,bText2.txt,"~",14 spstr strCommand.txt,bText2.txt,"~",14
} }
if(type2.txt=="button") if(type2.txt=="button"||type2.txt=="input_sel")
{ {
vis bUp2,0 vis bUp2,0
vis bStop2,0 vis bStop2,0
@@ -1873,7 +1893,7 @@ Timer tmSerial
// get Text (optional Value) // get Text (optional Value)
spstr strCommand.txt,bText3.txt,"~",20 spstr strCommand.txt,bText3.txt,"~",20
} }
if(type3.txt=="button") if(type3.txt=="button"||type3.txt=="input_sel")
{ {
vis bUp3,0 vis bUp3,0
vis bStop3,0 vis bStop3,0
@@ -2022,7 +2042,7 @@ Timer tmSerial
// get Text (optional Value) // get Text (optional Value)
spstr strCommand.txt,bText4.txt,"~",26 spstr strCommand.txt,bText4.txt,"~",26
} }
if(type4.txt=="button") if(type4.txt=="button"||type4.txt=="input_sel")
{ {
vis bUp4,0 vis bUp4,0
vis bStop4,0 vis bStop4,0
@@ -2171,7 +2191,7 @@ Timer tmSerial
// get Text (optional Value) // get Text (optional Value)
spstr strCommand.txt,bText5.txt,"~",32 spstr strCommand.txt,bText5.txt,"~",32
} }
if(type5.txt=="button") if(type5.txt=="button"||type5.txt=="input_sel")
{ {
vis bUp5,0 vis bUp5,0
vis bStop5,0 vis bStop5,0

View File

@@ -944,6 +944,10 @@ Timer tmLP
{ {
page popupFan page popupFan
} }
if(tTmp.txt=="input_sel")
{
page popupInSel
}
TouchCap tc0 TouchCap tc0
Attributes Attributes

View File

@@ -0,0 +1,886 @@
Page popupInSel
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Events
Preinitialize Event
dim=dimValueNormal
//get entitiy name
tEntity.txt=pageIcons.tTmp1.txt
//get entity id
entn.txt=pageIcons.tTmp2.txt
tIcon1.txt=pageIcons.tTmp3.txt
vis p0,0
vis tSend,0
vis tTmp,0
vis tInstruction,0
vis tId,0
vis bModeNext,0
//page open event
// event,pageOpenDetail,typeOfPage,tEntityName
// craft command
tSend.txt="event,pageOpenDetail,popupInSel,"+entn.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
popupInSel.bco=defaultBcoColor
for(sys0=0;sys0<34;sys0++)
{
if(b[sys0].type==98||b[sys0].type==116)
{
b[sys0].bco=defaultBcoColor
b[sys0].pco=defaultFontColor
}
if(b[sys0].type==53&&defaultBcoColor==0)
{
b[sys0].pic=10
b[sys0].pic2=11
}
}
Variable (string) strCommand
Attributes
Scope : local
Text :
Max. Text Size: 500
Variable (string) entn
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (int32) mode
Attributes
Scope: local
Value: 1
Variable (int32) mode_temp
Attributes
Scope: local
Value: 0
Variable (int32) vaModePos
Attributes
Scope: local
Value: 0
Variable (string) vaModeList
Attributes
Scope : local
Text :
Max. Text Size: 400
Variable (string) vaModeCur
Attributes
Scope : local
Text :
Max. Text Size: 40
Variable (string) tSend
Attributes
Scope : local
Text :
Max. Text Size: 200
Variable (string) tTmp
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) tInstruction
Attributes
Scope : local
Text :
Max. Text Size: 20
Variable (string) tId
Attributes
Scope : local
Text :
Max. Text Size: 20
Variable (string) vaType
Attributes
Scope : local
Text :
Max. Text Size: 20
Text tEntity
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 25
Text tIcon1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Picture p0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Button b0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tSend.txt="event,buttonPress2,popupLight,bExit"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bMode1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
sys2=vaModePos.val-12
covx sys2,tTmp.txt,0,0
tSend.txt+="mode-"+vaType.txt+","+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bMode3
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
sys2=vaModePos.val-10
covx sys2,tTmp.txt,0,0
tSend.txt+="mode-"+vaType.txt+","+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bMode2
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
sys2=vaModePos.val-11
covx sys2,tTmp.txt,0,0
tSend.txt+="mode-"+vaType.txt+","+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bModeNext
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 3
Events
Touch Press Event
spstr vaModeList.txt,tTmp.txt,"?",vaModePos.val
if(tTmp.txt=="")
{
vaModePos.val=0
spstr vaModeList.txt,bMode1.txt,"?",vaModePos.val
spstr vaModeList.txt,bMode2.txt,"?",vaModePos.val+1
spstr vaModeList.txt,bMode3.txt,"?",vaModePos.val+2
}
spstr vaModeList.txt,bMode1.txt,"?",vaModePos.val
spstr vaModeList.txt,bMode2.txt,"?",vaModePos.val+1
spstr vaModeList.txt,bMode3.txt,"?",vaModePos.val+2
spstr vaModeList.txt,bMode4.txt,"?",vaModePos.val+3
spstr vaModeList.txt,bMode5.txt,"?",vaModePos.val+4
spstr vaModeList.txt,bMode6.txt,"?",vaModePos.val+5
spstr vaModeList.txt,bMode7.txt,"?",vaModePos.val+6
spstr vaModeList.txt,bMode8.txt,"?",vaModePos.val+7
spstr vaModeList.txt,bMode9.txt,"?",vaModePos.val+8
spstr vaModeList.txt,bMode10.txt,"?",vaModePos.val+9
spstr vaModeList.txt,bMode11.txt,"?",vaModePos.val+10
spstr vaModeList.txt,bMode12.txt,"?",vaModePos.val+11
vaModePos.val+=12
spstr vaModeList.txt,tTmp.txt,"?",12
if(tTmp.txt=="")
{
vis bModeNext,0
}else
{
vis bModeNext,1
}
bMode1.pco=defaultFontColor
bMode2.pco=defaultFontColor
bMode3.pco=defaultFontColor
bMode4.pco=defaultFontColor
bMode5.pco=defaultFontColor
bMode6.pco=defaultFontColor
bMode7.pco=defaultFontColor
bMode8.pco=defaultFontColor
bMode9.pco=defaultFontColor
bMode10.pco=defaultFontColor
bMode11.pco=defaultFontColor
bMode12.pco=defaultFontColor
if(bMode1.txt==vaModeCur.txt)
{
bMode1.pco=1374
}
if(bMode2.txt==vaModeCur.txt)
{
bMode2.pco=1374
}
if(bMode3.txt==vaModeCur.txt)
{
bMode3.pco=1374
}
if(bMode4.txt==vaModeCur.txt)
{
bMode4.pco=1374
}
if(bMode5.txt==vaModeCur.txt)
{
bMode5.pco=1374
}
if(bMode6.txt==vaModeCur.txt)
{
bMode6.pco=1374
}
if(bMode7.txt==vaModeCur.txt)
{
bMode7.pco=1374
}
if(bMode8.txt==vaModeCur.txt)
{
bMode8.pco=1374
}
if(bMode9.txt==vaModeCur.txt)
{
bMode9.pco=1374
}
if(bMode10.txt==vaModeCur.txt)
{
bMode10.pco=1374
}
if(bMode11.txt==vaModeCur.txt)
{
bMode11.pco=1374
}
if(bMode12.txt==vaModeCur.txt)
{
bMode12.pco=1374
}
Button bMode4
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
sys2=vaModePos.val-9
covx sys2,tTmp.txt,0,0
tSend.txt+="mode-"+vaType.txt+","+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bMode5
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
sys2=vaModePos.val-8
covx sys2,tTmp.txt,0,0
tSend.txt+="mode-"+vaType.txt+","+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bMode6
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
sys2=vaModePos.val-7
covx sys2,tTmp.txt,0,0
tSend.txt+="mode-"+vaType.txt+","+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bMode7
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
sys2=vaModePos.val-6
covx sys2,tTmp.txt,0,0
tSend.txt+="mode-"+vaType.txt+","+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bMode8
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
sys2=vaModePos.val-5
covx sys2,tTmp.txt,0,0
tSend.txt+="mode-"+vaType.txt+","+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bMode9
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
sys2=vaModePos.val-4
covx sys2,tTmp.txt,0,0
tSend.txt+="mode-"+vaType.txt+","+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bMode12
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
sys2=vaModePos.val-1
covx sys2,tTmp.txt,0,0
tSend.txt+="mode-"+vaType.txt+","+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bMode11
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
sys2=vaModePos.val-2
covx sys2,tTmp.txt,0,0
tSend.txt+="mode-"+vaType.txt+","+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bMode10
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
sys2=vaModePos.val-3
covx sys2,tTmp.txt,0,0
tSend.txt+="mode-"+vaType.txt+","+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Timer tmSleep
Attributes
Scope : local
Period (ms): 1000
Enabled : yes
Events
Timer Event
if(sleepTimeout!=0)
{
sleepValue+=1
if(sleepTimeout<=sleepValue)
{
sleepValue=0
click b0,1
click b0,0
}
}
Timer tmSerial
Attributes
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
ucopy payloadLength,2,2,0
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
// calculate crc
crcrest 1,0xFFFF
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
//crcputu 3,u[2]
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
crcputu 0,payloadLength-1
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
// compare crc with recived value
if(crcval==recvCrc)
{
// crc is okay
// here is the location where acual code should be
// write command to variable strCommand
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
spstr strCommand.txt,tTmp.txt,"~",1
if(tInstruction.txt=="entityUpdateDetail"&&entn.txt==tTmp.txt)
{
// change icon
spstr strCommand.txt,tIcon1.txt,"~",2
vis tIcon1,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",3
covx tTmp.txt,sys0,0,0
tIcon1.pco=sys0
//mode 1 type
spstr strCommand.txt,vaType.txt,"~",4
//current mode
spstr strCommand.txt,vaModeCur.txt,"~",5
//mode list
spstr strCommand.txt,vaModeList.txt,"~",6
if(vaModeList.txt=="")
{
vis bMode1,0
vis bMode2,0
vis bMode3,0
vis bModeNext,0
}
if(bMode1.txt=="")
{
click bModeNext,1
click bModeNext,0
}
bMode1.pco=defaultFontColor
bMode2.pco=defaultFontColor
bMode3.pco=defaultFontColor
if(bMode1.txt==vaModeCur.txt)
{
bMode1.pco=1374
}
if(bMode2.txt==vaModeCur.txt)
{
bMode2.pco=1374
}
if(bMode3.txt==vaModeCur.txt)
{
bMode3.pco=1374
}
}
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
// get value normal
spstr strCommand.txt,tTmp.txt,"~",2
covx tTmp.txt,dimValueNormal,0,0
dim=dimValueNormal
// get background color
spstr strCommand.txt,tTmp.txt,"~",3
if(tTmp.txt!="")
{
covx tTmp.txt,defaultBcoColor,0,0
}
// get font color
spstr strCommand.txt,tTmp.txt,"~",4
if(tTmp.txt!="")
{
covx tTmp.txt,defaultFontColor,0,0
}
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="pageType")
{
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
spstr strCommand.txt,pageIcons.tTmp3.txt,"~",4
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="screensaver")
{
page screensaver
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="popupShutter")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupShutter
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardThermo")
{
page cardThermo
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
if(tId.txt=="cardQR")
{
page cardQR
}
if(tId.txt=="cardPower")
{
page cardPower
}
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
}
Timer tmCooldown
Attributes
Scope : local
Period (ms): 100
Enabled : no
Events
Timer Event
tmCooldown.en=0
TouchCap tc0
Attributes
Scope: local
Value: 0
Events
Touch Press Event
sleepValue=0

View File

@@ -1927,6 +1927,10 @@ Hotspot m2
{ {
page popupFan page popupFan
} }
if(type3.txt=="input_sel")
{
page popupInSel
}
Hotspot m1 Hotspot m1
Attributes Attributes
@@ -1963,6 +1967,10 @@ Hotspot m1
{ {
page popupFan page popupFan
} }
if(type2.txt=="input_sel")
{
page popupInSel
}
Hotspot m0 Hotspot m0
Attributes Attributes
@@ -1999,6 +2007,10 @@ Hotspot m0
{ {
page popupFan page popupFan
} }
if(type1.txt=="input_sel")
{
page popupInSel
}
Hotspot m3 Hotspot m3
Attributes Attributes
@@ -2035,6 +2047,10 @@ Hotspot m3
{ {
page popupFan page popupFan
} }
if(type4.txt=="input_sel")
{
page popupInSel
}
Hotspot mSwipeNext Hotspot mSwipeNext
Attributes Attributes
@@ -2295,7 +2311,7 @@ Timer tmSerial
// get Text (optional Value) // get Text (optional Value)
spstr strCommand.txt,bText1.txt,"~",8 spstr strCommand.txt,bText1.txt,"~",8
} }
if(type1.txt=="button") if(type1.txt=="button"||type1.txt=="input_sel")
{ {
vis bUp1,0 vis bUp1,0
vis bStop1,0 vis bStop1,0
@@ -2444,7 +2460,7 @@ Timer tmSerial
// get Text (optional Value) // get Text (optional Value)
spstr strCommand.txt,bText2.txt,"~",14 spstr strCommand.txt,bText2.txt,"~",14
} }
if(type2.txt=="button") if(type2.txt=="button"||type2.txt=="i")
{ {
vis bUp2,0 vis bUp2,0
vis bStop2,0 vis bStop2,0
@@ -2593,7 +2609,7 @@ Timer tmSerial
// get Text (optional Value) // get Text (optional Value)
spstr strCommand.txt,bText3.txt,"~",20 spstr strCommand.txt,bText3.txt,"~",20
} }
if(type3.txt=="button") if(type3.txt=="button"||type3.txt=="input_sel")
{ {
vis bUp3,0 vis bUp3,0
vis bStop3,0 vis bStop3,0
@@ -2742,7 +2758,7 @@ Timer tmSerial
// get Text (optional Value) // get Text (optional Value)
spstr strCommand.txt,bText4.txt,"~",26 spstr strCommand.txt,bText4.txt,"~",26
} }
if(type4.txt=="button") if(type4.txt=="button"||type4.txt=="input_sel")
{ {
vis bUp4,0 vis bUp4,0
vis bStop4,0 vis bStop4,0

View File

@@ -1391,6 +1391,10 @@ Timer tmLP
{ {
page popupFan page popupFan
} }
if(tTmp.txt=="input_sel")
{
page popupInSel
}
TouchCap tc0 TouchCap tc0
Attributes Attributes

View File

@@ -36,8 +36,8 @@ cardQR
238 Unique line(s) of event code 238 Unique line(s) of event code
cardGrid cardGrid
42 Component(s) 42 Component(s)
474 Line(s) of event code 478 Line(s) of event code
281 Unique line(s) of event code 283 Unique line(s) of event code
cardMedia cardMedia
34 Component(s) 34 Component(s)
394 Line(s) of event code 394 Line(s) of event code
@@ -46,6 +46,10 @@ cardThermo
53 Component(s) 53 Component(s)
596 Line(s) of event code 596 Line(s) of event code
313 Unique line(s) of event code 313 Unique line(s) of event code
popupInSel
34 Component(s)
476 Line(s) of event code
222 Unique line(s) of event code
popupFan popupFan
27 Component(s) 27 Component(s)
347 Line(s) of event code 347 Line(s) of event code
@@ -60,15 +64,15 @@ cardAlarm
258 Unique line(s) of event code 258 Unique line(s) of event code
cardEntities cardEntities
65 Component(s) 65 Component(s)
1137 Line(s) of event code 1153 Line(s) of event code
522 Unique line(s) of event code 527 Unique line(s) of event code
cardPower cardPower
43 Component(s) 43 Component(s)
423 Line(s) of event code 423 Line(s) of event code
293 Unique line(s) of event code 293 Unique line(s) of event code
Total Total
16 Page(s) 17 Page(s)
535 Component(s) 569 Component(s)
6360 Line(s) of event code 6856 Line(s) of event code
1691 Unique line(s) of event code 1751 Unique line(s) of event code

File diff suppressed because it is too large Load Diff

View File

@@ -1029,6 +1029,10 @@ Hotspot m2
{ {
page popupFan page popupFan
} }
if(type3.txt=="input_sel")
{
page popupInSel
}
Hotspot m1 Hotspot m1
Attributes Attributes
@@ -1056,6 +1060,10 @@ Hotspot m1
{ {
page popupFan page popupFan
} }
if(type2.txt=="input_sel")
{
page popupInSel
}
Hotspot m0 Hotspot m0
Attributes Attributes
@@ -1083,6 +1091,10 @@ Hotspot m0
{ {
page popupFan page popupFan
} }
if(type1.txt=="input_sel")
{
page popupInSel
}
Hotspot m3 Hotspot m3
Attributes Attributes
@@ -1110,6 +1122,10 @@ Hotspot m3
{ {
page popupFan page popupFan
} }
if(type4.txt=="input_sel")
{
page popupInSel
}
Hotspot mSwipeNext Hotspot mSwipeNext
Attributes Attributes
@@ -1342,7 +1358,7 @@ Timer tmSerial
// get Text (optional Value) // get Text (optional Value)
spstr strCommand.txt,bText1.txt,"~",8 spstr strCommand.txt,bText1.txt,"~",8
} }
if(type1.txt=="button") if(type1.txt=="button"||type1.txt=="input_sel")
{ {
vis bUp1,0 vis bUp1,0
vis bStop1,0 vis bStop1,0
@@ -1491,7 +1507,7 @@ Timer tmSerial
// get Text (optional Value) // get Text (optional Value)
spstr strCommand.txt,bText2.txt,"~",14 spstr strCommand.txt,bText2.txt,"~",14
} }
if(type2.txt=="button") if(type2.txt=="button"||type2.txt=="i")
{ {
vis bUp2,0 vis bUp2,0
vis bStop2,0 vis bStop2,0
@@ -1640,7 +1656,7 @@ Timer tmSerial
// get Text (optional Value) // get Text (optional Value)
spstr strCommand.txt,bText3.txt,"~",20 spstr strCommand.txt,bText3.txt,"~",20
} }
if(type3.txt=="button") if(type3.txt=="button"||type3.txt=="input_sel")
{ {
vis bUp3,0 vis bUp3,0
vis bStop3,0 vis bStop3,0
@@ -1789,7 +1805,7 @@ Timer tmSerial
// get Text (optional Value) // get Text (optional Value)
spstr strCommand.txt,bText4.txt,"~",26 spstr strCommand.txt,bText4.txt,"~",26
} }
if(type4.txt=="button") if(type4.txt=="button"||type4.txt=="input_sel")
{ {
vis bUp4,0 vis bUp4,0
vis bStop4,0 vis bStop4,0

View File

@@ -944,6 +944,10 @@ Timer tmLP
{ {
page popupFan page popupFan
} }
if(tTmp.txt=="input_sel")
{
page popupInSel
}
TouchCap tc0 TouchCap tc0
Attributes Attributes

886
HMI/n2t-out/popupInSel.txt Normal file
View File

@@ -0,0 +1,886 @@
Page popupInSel
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Events
Preinitialize Event
dim=dimValueNormal
//get entitiy name
tEntity.txt=pageIcons.tTmp1.txt
//get entity id
entn.txt=pageIcons.tTmp2.txt
tIcon1.txt=pageIcons.tTmp3.txt
vis p0,0
vis tSend,0
vis tTmp,0
vis tInstruction,0
vis tId,0
vis bModeNext,0
//page open event
// event,pageOpenDetail,typeOfPage,tEntityName
// craft command
tSend.txt="event,pageOpenDetail,popupInSel,"+entn.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
popupInSel.bco=defaultBcoColor
for(sys0=0;sys0<34;sys0++)
{
if(b[sys0].type==98||b[sys0].type==116)
{
b[sys0].bco=defaultBcoColor
b[sys0].pco=defaultFontColor
}
if(b[sys0].type==53&&defaultBcoColor==0)
{
b[sys0].pic=10
b[sys0].pic2=11
}
}
Variable (string) strCommand
Attributes
Scope : local
Text :
Max. Text Size: 500
Variable (string) entn
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (int32) mode
Attributes
Scope: local
Value: 1
Variable (int32) mode_temp
Attributes
Scope: local
Value: 0
Variable (int32) vaModePos
Attributes
Scope: local
Value: 0
Variable (string) vaModeList
Attributes
Scope : local
Text :
Max. Text Size: 400
Variable (string) vaModeCur
Attributes
Scope : local
Text :
Max. Text Size: 40
Variable (string) tSend
Attributes
Scope : local
Text :
Max. Text Size: 200
Variable (string) tTmp
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) tInstruction
Attributes
Scope : local
Text :
Max. Text Size: 20
Variable (string) tId
Attributes
Scope : local
Text :
Max. Text Size: 20
Variable (string) vaType
Attributes
Scope : local
Text :
Max. Text Size: 20
Text tEntity
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 25
Text tIcon1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Picture p0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Button b0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tSend.txt="event,buttonPress2,popupLight,bExit"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bMode1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
sys2=vaModePos.val-12
covx sys2,tTmp.txt,0,0
tSend.txt+="mode-"+vaType.txt+","+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bMode3
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
sys2=vaModePos.val-10
covx sys2,tTmp.txt,0,0
tSend.txt+="mode-"+vaType.txt+","+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bMode2
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
sys2=vaModePos.val-11
covx sys2,tTmp.txt,0,0
tSend.txt+="mode-"+vaType.txt+","+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bModeNext
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 3
Events
Touch Press Event
spstr vaModeList.txt,tTmp.txt,"?",vaModePos.val
if(tTmp.txt=="")
{
vaModePos.val=0
spstr vaModeList.txt,bMode1.txt,"?",vaModePos.val
spstr vaModeList.txt,bMode2.txt,"?",vaModePos.val+1
spstr vaModeList.txt,bMode3.txt,"?",vaModePos.val+2
}
spstr vaModeList.txt,bMode1.txt,"?",vaModePos.val
spstr vaModeList.txt,bMode2.txt,"?",vaModePos.val+1
spstr vaModeList.txt,bMode3.txt,"?",vaModePos.val+2
spstr vaModeList.txt,bMode4.txt,"?",vaModePos.val+3
spstr vaModeList.txt,bMode5.txt,"?",vaModePos.val+4
spstr vaModeList.txt,bMode6.txt,"?",vaModePos.val+5
spstr vaModeList.txt,bMode7.txt,"?",vaModePos.val+6
spstr vaModeList.txt,bMode8.txt,"?",vaModePos.val+7
spstr vaModeList.txt,bMode9.txt,"?",vaModePos.val+8
spstr vaModeList.txt,bMode10.txt,"?",vaModePos.val+9
spstr vaModeList.txt,bMode11.txt,"?",vaModePos.val+10
spstr vaModeList.txt,bMode12.txt,"?",vaModePos.val+11
vaModePos.val+=12
spstr vaModeList.txt,tTmp.txt,"?",12
if(tTmp.txt=="")
{
vis bModeNext,0
}else
{
vis bModeNext,1
}
bMode1.pco=defaultFontColor
bMode2.pco=defaultFontColor
bMode3.pco=defaultFontColor
bMode4.pco=defaultFontColor
bMode5.pco=defaultFontColor
bMode6.pco=defaultFontColor
bMode7.pco=defaultFontColor
bMode8.pco=defaultFontColor
bMode9.pco=defaultFontColor
bMode10.pco=defaultFontColor
bMode11.pco=defaultFontColor
bMode12.pco=defaultFontColor
if(bMode1.txt==vaModeCur.txt)
{
bMode1.pco=1374
}
if(bMode2.txt==vaModeCur.txt)
{
bMode2.pco=1374
}
if(bMode3.txt==vaModeCur.txt)
{
bMode3.pco=1374
}
if(bMode4.txt==vaModeCur.txt)
{
bMode4.pco=1374
}
if(bMode5.txt==vaModeCur.txt)
{
bMode5.pco=1374
}
if(bMode6.txt==vaModeCur.txt)
{
bMode6.pco=1374
}
if(bMode7.txt==vaModeCur.txt)
{
bMode7.pco=1374
}
if(bMode8.txt==vaModeCur.txt)
{
bMode8.pco=1374
}
if(bMode9.txt==vaModeCur.txt)
{
bMode9.pco=1374
}
if(bMode10.txt==vaModeCur.txt)
{
bMode10.pco=1374
}
if(bMode11.txt==vaModeCur.txt)
{
bMode11.pco=1374
}
if(bMode12.txt==vaModeCur.txt)
{
bMode12.pco=1374
}
Button bMode4
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
sys2=vaModePos.val-9
covx sys2,tTmp.txt,0,0
tSend.txt+="mode-"+vaType.txt+","+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bMode5
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
sys2=vaModePos.val-8
covx sys2,tTmp.txt,0,0
tSend.txt+="mode-"+vaType.txt+","+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bMode6
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
sys2=vaModePos.val-7
covx sys2,tTmp.txt,0,0
tSend.txt+="mode-"+vaType.txt+","+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bMode7
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
sys2=vaModePos.val-6
covx sys2,tTmp.txt,0,0
tSend.txt+="mode-"+vaType.txt+","+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bMode8
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
sys2=vaModePos.val-5
covx sys2,tTmp.txt,0,0
tSend.txt+="mode-"+vaType.txt+","+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bMode9
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
sys2=vaModePos.val-4
covx sys2,tTmp.txt,0,0
tSend.txt+="mode-"+vaType.txt+","+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bMode12
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
sys2=vaModePos.val-1
covx sys2,tTmp.txt,0,0
tSend.txt+="mode-"+vaType.txt+","+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bMode11
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
sys2=vaModePos.val-2
covx sys2,tTmp.txt,0,0
tSend.txt+="mode-"+vaType.txt+","+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bMode10
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
sys2=vaModePos.val-3
covx sys2,tTmp.txt,0,0
tSend.txt+="mode-"+vaType.txt+","+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Timer tmSleep
Attributes
Scope : local
Period (ms): 1000
Enabled : yes
Events
Timer Event
if(sleepTimeout!=0)
{
sleepValue+=1
if(sleepTimeout<=sleepValue)
{
sleepValue=0
click b0,1
click b0,0
}
}
Timer tmSerial
Attributes
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
ucopy payloadLength,2,2,0
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
// calculate crc
crcrest 1,0xFFFF
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
//crcputu 3,u[2]
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
crcputu 0,payloadLength-1
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
// compare crc with recived value
if(crcval==recvCrc)
{
// crc is okay
// here is the location where acual code should be
// write command to variable strCommand
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
spstr strCommand.txt,tTmp.txt,"~",1
if(tInstruction.txt=="entityUpdateDetail"&&entn.txt==tTmp.txt)
{
// change icon
spstr strCommand.txt,tIcon1.txt,"~",2
vis tIcon1,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",3
covx tTmp.txt,sys0,0,0
tIcon1.pco=sys0
//mode 1 type
spstr strCommand.txt,vaType.txt,"~",4
//current mode
spstr strCommand.txt,vaModeCur.txt,"~",5
//mode list
spstr strCommand.txt,vaModeList.txt,"~",6
if(vaModeList.txt=="")
{
vis bMode1,0
vis bMode2,0
vis bMode3,0
vis bModeNext,0
}
if(bMode1.txt=="")
{
click bModeNext,1
click bModeNext,0
}
bMode1.pco=defaultFontColor
bMode2.pco=defaultFontColor
bMode3.pco=defaultFontColor
if(bMode1.txt==vaModeCur.txt)
{
bMode1.pco=1374
}
if(bMode2.txt==vaModeCur.txt)
{
bMode2.pco=1374
}
if(bMode3.txt==vaModeCur.txt)
{
bMode3.pco=1374
}
}
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
// get value normal
spstr strCommand.txt,tTmp.txt,"~",2
covx tTmp.txt,dimValueNormal,0,0
dim=dimValueNormal
// get background color
spstr strCommand.txt,tTmp.txt,"~",3
if(tTmp.txt!="")
{
covx tTmp.txt,defaultBcoColor,0,0
}
// get font color
spstr strCommand.txt,tTmp.txt,"~",4
if(tTmp.txt!="")
{
covx tTmp.txt,defaultFontColor,0,0
}
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="pageType")
{
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
spstr strCommand.txt,pageIcons.tTmp3.txt,"~",4
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="screensaver")
{
page screensaver
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="popupShutter")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupShutter
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardThermo")
{
page cardThermo
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
if(tId.txt=="cardQR")
{
page cardQR
}
if(tId.txt=="cardPower")
{
page cardPower
}
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
}
Timer tmCooldown
Attributes
Scope : local
Period (ms): 100
Enabled : no
Events
Timer Event
tmCooldown.en=0
TouchCap tc0
Attributes
Scope: local
Value: 0
Events
Touch Press Event
sleepValue=0