Compare commits
1261 Commits
v2.0.1
...
983f3d86a7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
983f3d86a7 | ||
|
|
4a45b8966a | ||
|
|
972dba5774 | ||
|
|
ff46e167df | ||
|
|
12a119e20e | ||
|
|
671b1127ec | ||
|
|
6c23adcf6c | ||
|
|
eadedd1401 | ||
|
|
f282f0203f | ||
|
|
dd014127df | ||
|
|
0ef83e9ba8 | ||
|
|
77bd6addc4 | ||
|
|
970f65092a | ||
|
|
d06a15f132 | ||
|
|
2794bf3c6b | ||
|
|
0fe251f881 | ||
|
|
6bc57455ea | ||
|
|
74ed612c15 | ||
|
|
f480869992 | ||
|
|
022baa8727 | ||
|
|
6af9994c0c | ||
|
|
89e566c932 | ||
|
|
cf79e467b3 | ||
|
|
db814c1ab0 | ||
|
|
1b3ccfb2db | ||
|
|
4f0b3728cb | ||
|
|
83972256ed | ||
|
|
336698cb72 | ||
|
|
ceb669dfc8 | ||
|
|
588de3bc03 | ||
|
|
cd34f1885c | ||
|
|
61d061d69e | ||
|
|
07304a2dcc | ||
|
|
ae6ad884f7 | ||
|
|
65408e3a44 | ||
|
|
5780b7208a | ||
|
|
8541b221ad | ||
|
|
a94d3a19c8 | ||
|
|
c94a8d5f9a | ||
|
|
34d9432651 | ||
|
|
be1c8a264e | ||
|
|
f6d8d069cc | ||
|
|
2909ce6cc8 | ||
|
|
ba6f0264a6 | ||
|
|
15e1976715 | ||
|
|
88bb6ff176 | ||
|
|
cbdc47170f | ||
|
|
5cb2a193c6 | ||
|
|
cf4d0f9393 | ||
|
|
a0a17bcfa1 | ||
|
|
ae40f651be | ||
|
|
3df926cfc1 | ||
|
|
304233218a | ||
|
|
642c680cae | ||
|
|
da4b64ed95 | ||
|
|
0565f5f522 | ||
|
|
7d5b2b8d30 | ||
|
|
019a882fe9 | ||
|
|
978df5ad75 | ||
|
|
02b94979b3 | ||
|
|
c1a513610b | ||
|
|
961b2c3f4d | ||
|
|
bdd1726328 | ||
|
|
f37ae5b1ce | ||
|
|
6a957a9099 | ||
|
|
f7de15d369 | ||
|
|
b5ca2c8b60 | ||
|
|
4be2a84315 | ||
|
|
647c56920e | ||
|
|
f1c5ae505e | ||
|
|
6f857e6077 | ||
|
|
b975869e1f | ||
|
|
29e0e4b8ce | ||
|
|
2c4a366d7b | ||
|
|
cc10cfe0c5 | ||
|
|
98187fe4a4 | ||
|
|
19e4e9d5b6 | ||
|
|
72ab301a2a | ||
|
|
67706293d3 | ||
|
|
99616d4e79 | ||
|
|
bc677e6c21 | ||
|
|
309da77301 | ||
|
|
849e75bb6c | ||
|
|
9de99bcca2 | ||
|
|
7caac2e62c | ||
|
|
1126fa03b4 | ||
|
|
8469c5e6da | ||
|
|
5e9abec9dd | ||
|
|
2b9283b336 | ||
|
|
90a073bb39 | ||
|
|
f357a58b9e | ||
|
|
55f254e7a2 | ||
|
|
58d86aeb86 | ||
|
|
53b3d131b6 | ||
|
|
ec35a07f52 | ||
|
|
d81a15195b | ||
|
|
58cffafefc | ||
|
|
58b82b8a30 | ||
|
|
629bf0aad1 | ||
|
|
a60ad3abd3 | ||
|
|
66c80a490b | ||
|
|
657512a470 | ||
|
|
239406053f | ||
|
|
93050ae34b | ||
|
|
da357eed7a | ||
|
|
ee50d69f03 | ||
|
|
06f145a11c | ||
|
|
819ba1fe04 | ||
|
|
4965c4ce59 | ||
|
|
adf356ae33 | ||
|
|
c4543a73af | ||
|
|
5f688a6949 | ||
|
|
d93199968d | ||
|
|
c7f9fb09a0 | ||
|
|
20e8694566 | ||
|
|
60b14d5315 | ||
|
|
48c5453f0a | ||
|
|
8f3fc8c081 | ||
|
|
578c38c418 | ||
|
|
cb945041be | ||
|
|
4096c1cf67 | ||
|
|
0ecc8ac016 | ||
|
|
0a3b201ee7 | ||
|
|
0584b07275 | ||
|
|
dc6bc5d04f | ||
|
|
8b5d7bfb05 | ||
|
|
18078ca1c0 | ||
|
|
feacca7391 | ||
|
|
c6141b97f6 | ||
|
|
be37fc3941 | ||
|
|
3f9f0c00de | ||
|
|
fc4ff29533 | ||
|
|
12d5d88204 | ||
|
|
47927abc8e | ||
|
|
a34992c61e | ||
|
|
a0bc982d69 | ||
|
|
7dcce35087 | ||
|
|
16d2906ff6 | ||
|
|
dba0aa2ee2 | ||
|
|
c9947bc42c | ||
|
|
3db5b990ce | ||
|
|
04057654f9 | ||
|
|
960157cace | ||
|
|
ec3024d132 | ||
|
|
bddfe706de | ||
|
|
0199e867a8 | ||
|
|
786f7795ed | ||
|
|
9ff6e42e8e | ||
|
|
0bdbb6e736 | ||
|
|
6dcf47f4db | ||
|
|
b259b34768 | ||
|
|
a1d0343352 | ||
|
|
88d047201e | ||
|
|
37e7ff8498 | ||
|
|
67d8d941ba | ||
|
|
17b11937c3 | ||
|
|
5184ed6ccb | ||
|
|
8e9c536b7c | ||
|
|
f0a684d7e1 | ||
|
|
2bfb7c7aab | ||
|
|
cbbc24636c | ||
|
|
118e6874cd | ||
|
|
543005bd37 | ||
|
|
ce68bb730e | ||
|
|
78aa2ee84b | ||
|
|
f349f19550 | ||
|
|
f9ff2edcd6 | ||
|
|
9268961556 | ||
|
|
5e5c1726ed | ||
|
|
7bf9e333c5 | ||
|
|
2656b1709e | ||
|
|
36d1ea7a05 | ||
|
|
6025da2850 | ||
|
|
bd14d7aa42 | ||
|
|
84edfcb8ea | ||
|
|
bf96235054 | ||
|
|
0578c961a1 | ||
|
|
61a62ba452 | ||
|
|
86a35de57c | ||
|
|
528c0814fb | ||
|
|
848db89b1a | ||
|
|
1f5a7c3a5f | ||
|
|
45a8f7f61e | ||
|
|
e2f8a62f44 | ||
|
|
9e24d2d4db | ||
|
|
c93f32837d | ||
|
|
42db0b8502 | ||
|
|
7d2fde6e03 | ||
|
|
7d73841907 | ||
|
|
e68d542ad2 | ||
|
|
bab945b242 | ||
|
|
7cac47d279 | ||
|
|
b9e23bf855 | ||
|
|
a0f749d4ab | ||
|
|
a466d04810 | ||
|
|
42ef838819 | ||
|
|
7f9fd4c819 | ||
|
|
06ac511ae6 | ||
|
|
d6cc901937 | ||
|
|
40282b2e14 | ||
|
|
55b9b9728b | ||
|
|
d549f79aba | ||
|
|
cef5191233 | ||
|
|
ba2df603c3 | ||
|
|
6f4ef58d2b | ||
|
|
7b4f6ac9f0 | ||
|
|
c8cf7b8046 | ||
|
|
035ebd64dc | ||
|
|
1857be65c2 | ||
|
|
69a13a9745 | ||
|
|
25efb93877 | ||
|
|
889aa4fd43 | ||
|
|
eb3a643f76 | ||
|
|
da37740ef3 | ||
|
|
9d06a7f55a | ||
|
|
649c891881 | ||
|
|
860cc815fb | ||
|
|
e03922ef13 | ||
|
|
ea89da4cc6 | ||
|
|
3c3542c7d0 | ||
|
|
0299014ca1 | ||
|
|
f209be7487 | ||
|
|
a8199ee756 | ||
|
|
dab2bb9c55 | ||
|
|
732109ed1f | ||
|
|
ad34c51d9d | ||
|
|
2616e4d5d1 | ||
|
|
e4e4c3f468 | ||
|
|
a59ff2495c | ||
|
|
63903f6d1c | ||
|
|
d2f4e01d30 | ||
|
|
d7a0aa0c04 | ||
|
|
0db04942d6 | ||
|
|
44ab4adc43 | ||
|
|
e439953fdb | ||
|
|
dbc61f9ecb | ||
|
|
6ecf19e935 | ||
|
|
c56f482516 | ||
|
|
65f33e40d5 | ||
|
|
0660ef0228 | ||
|
|
137539e85c | ||
|
|
f0394bb5bc | ||
|
|
bc93bc523f | ||
|
|
85ca25069d | ||
|
|
24d2ff71b2 | ||
|
|
c838216c1f | ||
|
|
eb03d33edd | ||
|
|
3dea13c354 | ||
|
|
e9ba75b967 | ||
|
|
9d32e0d027 | ||
|
|
31560787e3 | ||
|
|
6b9a6dc97f | ||
|
|
5060947d16 | ||
|
|
e434667ad3 | ||
|
|
e3a6368efa | ||
|
|
f85f87f3e6 | ||
|
|
ce814af3d3 | ||
|
|
039e5e56b7 | ||
|
|
b679693203 | ||
|
|
c45ce32742 | ||
|
|
8f128ac6b5 | ||
|
|
8184ada7a1 | ||
|
|
0a26861444 | ||
|
|
fdc8b81fd0 | ||
|
|
94db496d30 | ||
|
|
5a782bbe45 | ||
|
|
a80a2b7985 | ||
|
|
53e4dd7b81 | ||
|
|
955a7fbd8b | ||
|
|
9fa172ef36 | ||
|
|
ffce653d16 | ||
|
|
852ba63038 | ||
|
|
58132cb189 | ||
|
|
e96329f976 | ||
|
|
88cf4af2a7 | ||
|
|
fce2c5e4be | ||
|
|
b105d83b12 | ||
|
|
25cf9f1bb9 | ||
|
|
88f287aa0d | ||
|
|
34142c510f | ||
|
|
4701885a59 | ||
|
|
09275f1414 | ||
|
|
bfc18fd307 | ||
|
|
92d7fd429a | ||
|
|
007a25bb94 | ||
|
|
d27dc1eb4f | ||
|
|
661e2ba8c5 | ||
|
|
5fcb1e0785 | ||
|
|
2a526f3cea | ||
|
|
ff917d663e | ||
|
|
8bf2b9e4cc | ||
|
|
5446400eee | ||
|
|
0f8c2f87be | ||
|
|
9aba74877e | ||
|
|
137229a3ca | ||
|
|
af15ec6b79 | ||
|
|
280f090a67 | ||
|
|
8bdfe1855d | ||
|
|
62e755042c | ||
|
|
a2fab582d5 | ||
|
|
b1b88e75e4 | ||
|
|
4daf567f44 | ||
|
|
6e57a2a316 | ||
|
|
c9ff45f2b9 | ||
|
|
d89aa90d12 | ||
|
|
d9325787a0 | ||
|
|
5a0c04dc69 | ||
|
|
95f321d590 | ||
|
|
ef7b1520ff | ||
|
|
7f0657ae8f | ||
|
|
35394d5d22 | ||
|
|
4d90adc36d | ||
|
|
471684ad8c | ||
|
|
f7bf764458 | ||
|
|
de4bd9dcdd | ||
|
|
a1f1a8a31d | ||
|
|
44b7eee5ee | ||
|
|
6e4e4aff7e | ||
|
|
7ba1265d55 | ||
|
|
297107da28 | ||
|
|
0336390a8e | ||
|
|
b575e77563 | ||
|
|
3a165886c8 | ||
|
|
6ba3706458 | ||
|
|
0b6cf684dc | ||
|
|
290140524e | ||
|
|
ce2fefa5b3 | ||
|
|
03395131d8 | ||
|
|
15cc5b9486 | ||
|
|
f255df3af2 | ||
|
|
b11baf8860 | ||
|
|
954699e87f | ||
|
|
1af0894820 | ||
|
|
f3a17959be | ||
|
|
effc26672f | ||
|
|
2b16753f6b | ||
|
|
ff57a39d24 | ||
|
|
f635e76154 | ||
|
|
119b4a6eb3 | ||
|
|
73aeec2edb | ||
|
|
d5a73a0a60 | ||
|
|
c703b832e2 | ||
|
|
b92d6d459a | ||
|
|
597b1b2abd | ||
|
|
725797b5fa | ||
|
|
5a9f1c1c31 | ||
|
|
b591944a76 | ||
|
|
93194d0f8f | ||
|
|
303f5361ec | ||
|
|
189b3e7dcd | ||
|
|
d7116c0c68 | ||
|
|
742e2a243d | ||
|
|
b6a5ea76c0 | ||
|
|
a7aafdb348 | ||
|
|
dff7e39b07 | ||
|
|
e0a7cd903b | ||
|
|
985d6b5161 | ||
|
|
83fccfe83b | ||
|
|
201428da47 | ||
|
|
4830b58b13 | ||
|
|
fa04f50c9d | ||
|
|
f9a24fc43e | ||
|
|
9283b4561d | ||
|
|
421dc71274 | ||
|
|
5ea3036921 | ||
|
|
0f9c691717 | ||
|
|
853b7d9885 | ||
|
|
f2c6900d7e | ||
|
|
112e52f3d4 | ||
|
|
f72a1038cd | ||
|
|
4c738bbc51 | ||
|
|
d355002da3 | ||
|
|
09630570e6 | ||
|
|
be6df9bb30 | ||
|
|
210ee0c70e | ||
|
|
63d37695e4 | ||
|
|
c0396766ac | ||
|
|
bf56ecdcff | ||
|
|
e61efba78c | ||
|
|
26f67d7792 | ||
|
|
eaea820658 | ||
|
|
a424c8c17b | ||
|
|
a87fc341f2 | ||
|
|
b5d81026cd | ||
|
|
91a1cca29c | ||
|
|
b3a335dedd | ||
|
|
b7cd36fbdf | ||
|
|
610ba939fa | ||
|
|
84d7f71f59 | ||
|
|
b3c0fe3dd0 | ||
|
|
327b40ecd8 | ||
|
|
12f6bd75b5 | ||
|
|
bf05419946 | ||
|
|
4bdfca3b5f | ||
|
|
3029671d53 | ||
|
|
e31362aac4 | ||
|
|
17c14e9ab0 | ||
|
|
1065fe0568 | ||
|
|
6ad844a9d8 | ||
|
|
83baeaacf0 | ||
|
|
b8c2fb9971 | ||
|
|
91a77ae201 | ||
|
|
b7e9f1b1e8 | ||
|
|
05dfd69cda | ||
|
|
eda6852309 | ||
|
|
1096efe312 | ||
|
|
2eefe6c8c6 | ||
|
|
a42feafa8c | ||
|
|
e8b6d155f7 | ||
|
|
06078396c9 | ||
|
|
c375a93d8e | ||
|
|
4b66528894 | ||
|
|
d4d0e19d2f | ||
|
|
a1c4f065a2 | ||
|
|
44aa752e70 | ||
|
|
627e0b63e7 | ||
|
|
c747ea17d5 | ||
|
|
be493eed1f | ||
|
|
aed0fbf45a | ||
|
|
4649924c04 | ||
|
|
25ff9a0267 | ||
|
|
1d4fafd7c5 | ||
|
|
0af0d2fbaf | ||
|
|
67fb8f2eda | ||
|
|
2715d32d15 | ||
|
|
b215f1779d | ||
|
|
d08bddd72e | ||
|
|
88f296c90e | ||
|
|
1a4cb27e01 | ||
|
|
9c4aad8db0 | ||
|
|
6cbe43eb59 | ||
|
|
a653d47e3c | ||
|
|
4a37de57e4 | ||
|
|
5158fa86d3 | ||
|
|
8f6ebd62e1 | ||
|
|
ee5ccd0bff | ||
|
|
8859d8b229 | ||
|
|
61bf1fbcd7 | ||
|
|
88ed2ad2f6 | ||
|
|
8c37001cfc | ||
|
|
0a1a0a811a | ||
|
|
873eef75ca | ||
|
|
8362447dac | ||
|
|
60c47ff82c | ||
|
|
581808a123 | ||
|
|
189cbdd645 | ||
|
|
c279dd7932 | ||
|
|
f9872700d9 | ||
|
|
f705401896 | ||
|
|
30a0404c4a | ||
|
|
00d888817f | ||
|
|
20b672085e | ||
|
|
22ba572d75 | ||
|
|
aeb25f21ff | ||
|
|
c098ea4ecf | ||
|
|
d4f9926079 | ||
|
|
59b5687420 | ||
|
|
813f0c4800 | ||
|
|
1e566ce990 | ||
|
|
cf2d6e7cb3 | ||
|
|
450c5f161c | ||
|
|
b8294b63e0 | ||
|
|
21fb3fc395 | ||
|
|
dd2c360780 | ||
|
|
e8193c2bb7 | ||
|
|
76a9520557 | ||
|
|
c2d94ce183 | ||
|
|
21e099bb5f | ||
|
|
1597a2aaad | ||
|
|
29f9b24592 | ||
|
|
96ae6987cb | ||
|
|
d1638863a4 | ||
|
|
a836462df1 | ||
|
|
95e1bbc439 | ||
|
|
db86e701e4 | ||
|
|
7ba90fe741 | ||
|
|
81d16343a7 | ||
|
|
39a5fcf434 | ||
|
|
e1a078fea5 | ||
|
|
7452dfd2bb | ||
|
|
f1e3dc49e6 | ||
|
|
8129e59250 | ||
|
|
beb123cd19 | ||
|
|
605de42f67 | ||
|
|
591c7aa69b | ||
|
|
796968122b | ||
|
|
6e65ea3d03 | ||
|
|
c1bdd7da54 | ||
|
|
b5bb42c68d | ||
|
|
5ed58d8f24 | ||
|
|
3620113a71 | ||
|
|
43803dab12 | ||
|
|
680d85f1bc | ||
|
|
0af51083b2 | ||
|
|
626aedb18a | ||
|
|
6f51c67828 | ||
|
|
071ee7f39a | ||
|
|
205a8cee2f | ||
|
|
63905025bf | ||
|
|
c632d32b87 | ||
|
|
4fe8633978 | ||
|
|
fec2824464 | ||
|
|
8eaead0ef5 | ||
|
|
c819bbec9c | ||
|
|
f8cf178440 | ||
|
|
79f921e99c | ||
|
|
067c173995 | ||
|
|
f093126726 | ||
|
|
086a30c18a | ||
|
|
e505438203 | ||
|
|
fcddc2778f | ||
|
|
f0c72e663c | ||
|
|
188f565409 | ||
|
|
3a2da38c6f | ||
|
|
4668073522 | ||
|
|
066cd31616 | ||
|
|
1c1cf8e959 | ||
|
|
7097d9bf84 | ||
|
|
7f6b5a7115 | ||
|
|
3523ad8756 | ||
|
|
56f21880ba | ||
|
|
d3098a7f40 | ||
|
|
c2ecffd775 | ||
|
|
ba166ac55b | ||
|
|
d569956ff2 | ||
|
|
1d43f75318 | ||
|
|
0518531f02 | ||
|
|
806883ca34 | ||
|
|
20ef25ecb5 | ||
|
|
9563dba722 | ||
|
|
1dfd0e6f9a | ||
|
|
45eef605ae | ||
|
|
41c3b01769 | ||
|
|
6c7afe5bfe | ||
|
|
5cc19470f7 | ||
|
|
cc9caa7017 | ||
|
|
98da0d4c6e | ||
|
|
b134a37408 | ||
|
|
ef130e4c15 | ||
|
|
4d255c1df4 | ||
|
|
2e33d94955 | ||
|
|
52dddb800c | ||
|
|
0a3babfbce | ||
|
|
0265dd8826 | ||
|
|
f4f80f667b | ||
|
|
3345394bb4 | ||
|
|
836cd1a047 | ||
|
|
ba5db23ae6 | ||
|
|
32b62adc96 | ||
|
|
7642088db0 | ||
|
|
17072c4144 | ||
|
|
204f66a9bf | ||
|
|
960c055fb5 | ||
|
|
646152d3e1 | ||
|
|
b134eaa88a | ||
|
|
4748739155 | ||
|
|
f29eeda845 | ||
|
|
44f233fa26 | ||
|
|
b5614bb3d8 | ||
|
|
97109f4ba5 | ||
|
|
0f49eb2f8c | ||
|
|
46a4b6929e | ||
|
|
15b453c3ab | ||
|
|
8989a65f03 | ||
|
|
62d297c8a5 | ||
|
|
71250e3d92 | ||
|
|
ab99a48f0a | ||
|
|
49b9ebe128 | ||
|
|
1638e2e3af | ||
|
|
99b8b0ac11 | ||
|
|
9cfd27ebf1 | ||
|
|
a907ff5004 | ||
|
|
27fc5c3e89 | ||
|
|
1ad3d7ef4b | ||
|
|
f399d757e5 | ||
|
|
c389c5b20b | ||
|
|
b83c513093 | ||
|
|
2edfeef095 | ||
|
|
3975806078 | ||
|
|
99759008c8 | ||
|
|
e96e342975 | ||
|
|
a339ef3c8f | ||
|
|
be9b189a61 | ||
|
|
d8e181fdda | ||
|
|
ad8e7e09c3 | ||
|
|
10698fa666 | ||
|
|
fcc0477593 | ||
|
|
cb0e2aaa4b | ||
|
|
6964af008b | ||
|
|
a4b201a2fa | ||
|
|
326746552a | ||
|
|
680a5439ff | ||
|
|
9157854799 | ||
|
|
da6d8c1c5e | ||
|
|
186447109b | ||
|
|
eddba39d4a | ||
|
|
96b3a375b0 | ||
|
|
028a8c4a6f | ||
|
|
ebe1e7243e | ||
|
|
1965bedf3a | ||
|
|
e98ca4c8d4 | ||
|
|
62bdb576ab | ||
|
|
9556262880 | ||
|
|
f1456dba3a | ||
|
|
8650b0814c | ||
|
|
55f84b400d | ||
|
|
4971b7518b | ||
|
|
9979058faf | ||
|
|
21822dae37 | ||
|
|
f7fb050e1d | ||
|
|
7ad95a66d8 | ||
|
|
669ead9e79 | ||
|
|
dc787c5b0d | ||
|
|
cab3404645 | ||
|
|
9aa8421117 | ||
|
|
496392a382 | ||
|
|
6ed378b8e0 | ||
|
|
d329d92713 | ||
|
|
2594df56ad | ||
|
|
66e028f950 | ||
|
|
637b7b0477 | ||
|
|
7d607f9936 | ||
|
|
e3efb4dbe5 | ||
|
|
cbf00fec5e | ||
|
|
a118536f4a | ||
|
|
c2ab8caeff | ||
|
|
7104cbf0e9 | ||
|
|
9c3ae7a4f5 | ||
|
|
f25ca0934c | ||
|
|
64659f3794 | ||
|
|
58a4575ab9 | ||
|
|
661e51671a | ||
|
|
d1c1dc018b | ||
|
|
ba8257e958 | ||
|
|
3a95d5916e | ||
|
|
1287ff69ac | ||
|
|
157472ee67 | ||
|
|
ec99b83817 | ||
|
|
8f81311203 | ||
|
|
2f6463b30a | ||
|
|
491472a364 | ||
|
|
3aca4c64d2 | ||
|
|
ec48fbd335 | ||
|
|
3b5fefe9fc | ||
|
|
d018756673 | ||
|
|
ef7f3f1fa8 | ||
|
|
fe3c1ebda1 | ||
|
|
f483a52242 | ||
|
|
822157f2e6 | ||
|
|
2d2b11f4fc | ||
|
|
9c6bcc07ae | ||
|
|
5ff5d35833 | ||
|
|
6dd6397fde | ||
|
|
26e41f0fc2 | ||
|
|
33539e8bbd | ||
|
|
fe7c7ead18 | ||
|
|
2f44dd1d7c | ||
|
|
c211d3f435 | ||
|
|
10da9a65c6 | ||
|
|
47daf651e6 | ||
|
|
f0b52a9e4d | ||
|
|
ae98178075 | ||
|
|
36286bc457 | ||
|
|
a47d8c3fbb | ||
|
|
2b62a770f7 | ||
|
|
e2c17c8716 | ||
|
|
0bce4c79b3 | ||
|
|
913dc39156 | ||
|
|
d722e115a8 | ||
|
|
5cfed28caf | ||
|
|
74c1e22610 | ||
|
|
575bda2955 | ||
|
|
c1ef9eb92b | ||
|
|
4cb8bbe72e | ||
|
|
25f6afcb8f | ||
|
|
b9bf5b95fa | ||
|
|
8c9b135dc1 | ||
|
|
cc1f6999cc | ||
|
|
6219ecdc79 | ||
|
|
0878696b79 | ||
|
|
ab067bd20c | ||
|
|
3b4cc94518 | ||
|
|
94d3157c4d | ||
|
|
0e48d65549 | ||
|
|
89e55a20d4 | ||
|
|
5298a0a032 | ||
|
|
410255ba37 | ||
|
|
5463e54926 | ||
|
|
3e0cd4a9bd | ||
|
|
864abd24fc | ||
|
|
72705d9806 | ||
|
|
14283c0776 | ||
|
|
e5a702e541 | ||
|
|
8f80e1fb84 | ||
|
|
5063b4a4c0 | ||
|
|
f0549e2660 | ||
|
|
d038bcc0d5 | ||
|
|
a28f1fb586 | ||
|
|
8ad3beb72f | ||
|
|
1a46c85e6e | ||
|
|
3a5f562c20 | ||
|
|
70d62f51f8 | ||
|
|
c3acffd829 | ||
|
|
4688608ba1 | ||
|
|
221e3a168f | ||
|
|
bfbd95f9c1 | ||
|
|
45725dc820 | ||
|
|
e55db10b70 | ||
|
|
ba82e08470 | ||
|
|
eee2bb7295 | ||
|
|
91dab53a59 | ||
|
|
15aab73376 | ||
|
|
fc8108fc2c | ||
|
|
0c5940c341 | ||
|
|
666cd14789 | ||
|
|
0370c8143e | ||
|
|
b20e80b840 | ||
|
|
adb4c8c12f | ||
|
|
b856619331 | ||
|
|
3f8b5ad3aa | ||
|
|
8b06ce15aa | ||
|
|
6bb54394a0 | ||
|
|
0bd3200155 | ||
|
|
8d22fdb41c | ||
|
|
3a08cfc583 | ||
|
|
7677934244 | ||
|
|
13726fa08e | ||
|
|
f609e92c0d | ||
|
|
085842a8e9 | ||
|
|
89ad6426ed | ||
|
|
f3cfa2c8ed | ||
|
|
a34f51e6b6 | ||
|
|
222ae92d36 | ||
|
|
b05633aae5 | ||
|
|
32b98e09f6 | ||
|
|
c78ea43ea2 | ||
|
|
355a643ff7 | ||
|
|
a252ddf74e | ||
|
|
8ca88755c1 | ||
|
|
32f297353a | ||
|
|
41d6acdf36 | ||
|
|
19e6374e03 | ||
|
|
374502c6d8 | ||
|
|
f9776463c1 | ||
|
|
f48a58a76a | ||
|
|
d7944855ad | ||
|
|
9ef8287be7 | ||
|
|
c750971b0e | ||
|
|
36a0811776 | ||
|
|
508dbd01a8 | ||
|
|
ebb37b85c8 | ||
|
|
8e04a34e41 | ||
|
|
8a510086b1 | ||
|
|
f01f3d5e4e | ||
|
|
e78b77de9e | ||
|
|
42766724fa | ||
|
|
2cf447f660 | ||
|
|
b18f2848f4 | ||
|
|
a1d1bac49f | ||
|
|
37cda13162 | ||
|
|
1a1b190e5e | ||
|
|
633f58d074 | ||
|
|
624fd832e3 | ||
|
|
60c43e99bd | ||
|
|
cf5829af8f | ||
|
|
6de0c44b14 | ||
|
|
736c2c777a | ||
|
|
eb748457df | ||
|
|
e597ad5c59 | ||
|
|
ec68abb7e3 | ||
|
|
38272052d7 | ||
|
|
d23f53b9d2 | ||
|
|
c031cfee22 | ||
|
|
12200c80c8 | ||
|
|
6e4e5ab817 | ||
|
|
d9de15be10 | ||
|
|
576c08c658 | ||
|
|
d29517c127 | ||
|
|
642a78364a | ||
|
|
2627d993c1 | ||
|
|
9d822e7ee9 | ||
|
|
03c05ff084 | ||
|
|
5604235ded | ||
|
|
53b7d9af6f | ||
|
|
433e83d931 | ||
|
|
5d523eabd6 | ||
|
|
cfb076a01b | ||
|
|
1d2138fefd | ||
|
|
e1b1543a25 | ||
|
|
13d4156ef1 | ||
|
|
877dc316ff | ||
|
|
b0ea3ef63d | ||
|
|
76abf9611d | ||
|
|
27d1846c2b | ||
|
|
56f27d1a86 | ||
|
|
95ff13d831 | ||
|
|
59727e294d | ||
|
|
1ea041c731 | ||
|
|
3134f07671 | ||
|
|
36d2cf2f21 | ||
|
|
adbe6a4dc6 | ||
|
|
6397053d25 | ||
|
|
f5781d48b3 | ||
|
|
cf1ed9aa66 | ||
|
|
03498a2b79 | ||
|
|
cee264d769 | ||
|
|
c931e551c8 | ||
|
|
f4e8d3b006 | ||
|
|
4fc9f98ce8 | ||
|
|
5a0715064d | ||
|
|
124b9d87d5 | ||
|
|
84c9f073bd | ||
|
|
05f68816c6 | ||
|
|
25315afe11 | ||
|
|
fde287199d | ||
|
|
a595600669 | ||
|
|
246eed6df3 | ||
|
|
db4ffb9c17 | ||
|
|
79c2b1533a | ||
|
|
9def80eae6 | ||
|
|
fa2ef5173b | ||
|
|
342a5ae1b8 | ||
|
|
92753d5ca4 | ||
|
|
0eef377ca9 | ||
|
|
a831d189d8 | ||
|
|
2a5f3124d5 | ||
|
|
f871ef84e9 | ||
|
|
383835d710 | ||
|
|
601568b6f0 | ||
|
|
60afcf60cc | ||
|
|
a351eece0b | ||
|
|
10a9e417ea | ||
|
|
787f337220 | ||
|
|
44aaea74ec | ||
|
|
4a346ce2d2 | ||
|
|
4ead4382a2 | ||
|
|
1e64e134f9 | ||
|
|
68190ece4b | ||
|
|
81d0bcf304 | ||
|
|
94364d711e | ||
|
|
2953942fbd | ||
|
|
51173352d2 | ||
|
|
1bec2b1160 | ||
|
|
4921453a1b | ||
|
|
95a4447eeb | ||
|
|
350b3f4ca7 | ||
|
|
a8172a1b06 | ||
|
|
df10d09736 | ||
|
|
4f31326b8e | ||
|
|
f0e557b5e4 | ||
|
|
80d19b1da1 | ||
|
|
df0855862f | ||
|
|
12f22554d8 | ||
|
|
d23fe9616c | ||
|
|
76fee43d3b | ||
|
|
e8fd5e2020 | ||
|
|
89faeb3ec1 | ||
|
|
a006af2654 | ||
|
|
4ea23c7cf5 | ||
|
|
1e7ead8e46 | ||
|
|
d88290474e | ||
|
|
75f17f0d3e | ||
|
|
8a21f88df9 | ||
|
|
5a01431670 | ||
|
|
7c90677d99 | ||
|
|
fe65530eb5 | ||
|
|
ecd806b1c5 | ||
|
|
72e59947b6 | ||
|
|
8869eb2f67 | ||
|
|
c7c54261cb | ||
|
|
27185ea88c | ||
|
|
bfe2c65bfd | ||
|
|
45dafc3d0d | ||
|
|
c9c31bba57 | ||
|
|
485e5cc8d2 | ||
|
|
175c927ee8 | ||
|
|
4392bf251b | ||
|
|
9616ea4c8f | ||
|
|
2a9162e809 | ||
|
|
df976b0a90 | ||
|
|
220b5fb02b | ||
|
|
a0a0d16af7 | ||
|
|
f97b298d00 | ||
|
|
6feba8a56d | ||
|
|
0ff61a2e4a | ||
|
|
aee6e7bb57 | ||
|
|
602a58cc40 | ||
|
|
5e45641687 | ||
|
|
8b2beec50c | ||
|
|
3278de673a | ||
|
|
3cf5fb3eeb | ||
|
|
d53a34b83f | ||
|
|
e4f0dba8fa | ||
|
|
3ea33a6dfa | ||
|
|
6b11ffb7cf | ||
|
|
3047204272 | ||
|
|
61af338a96 | ||
|
|
729414944b | ||
|
|
22dbd2814b | ||
|
|
44836d1e4d | ||
|
|
881c50dd1f | ||
|
|
ce7dfb1423 | ||
|
|
c45bd4057f | ||
|
|
3401340563 | ||
|
|
7f7d496beb | ||
|
|
c7ec9f97b7 | ||
|
|
3c58a29e73 | ||
|
|
7fd5658630 | ||
|
|
81f6783ca1 | ||
|
|
cf430fc1a8 | ||
|
|
7f6c9c696b | ||
|
|
7580a38b4f | ||
|
|
14532444bc | ||
|
|
f2a424027d | ||
|
|
f038eaed87 | ||
|
|
3f00773927 | ||
|
|
7e63a4cb18 | ||
|
|
e6fd475947 | ||
|
|
1869f8023d | ||
|
|
860f5ddbba | ||
|
|
218ef94c9c | ||
|
|
730e0acd99 | ||
|
|
c8afa129b5 | ||
|
|
ee0c21128d | ||
|
|
1aed46b71f | ||
|
|
4e38a928fc | ||
|
|
d58ba87dbb | ||
|
|
640e245cf8 | ||
|
|
f056dace88 | ||
|
|
3211f44770 | ||
|
|
bd5b1303f2 | ||
|
|
8ff0cad379 | ||
|
|
fdcd37c6d0 | ||
|
|
6a464325d7 | ||
|
|
3af0c20670 | ||
|
|
7ee10d4ca6 | ||
|
|
884c8d91e6 | ||
|
|
07b8e99b01 | ||
|
|
d74b70f864 | ||
|
|
e70fcd54eb | ||
|
|
ea5b80e3b8 | ||
|
|
b5cd83240f | ||
|
|
7d241d1400 | ||
|
|
ee2e1d53d2 | ||
|
|
36e0344345 | ||
|
|
eb6eebfd46 | ||
|
|
0de7850c39 | ||
|
|
5f1d2b9d10 | ||
|
|
0abd5531cb | ||
|
|
0fdcd088ec | ||
|
|
29df75263b | ||
|
|
5035b89956 | ||
|
|
9de5abff25 | ||
|
|
a113e0cd43 | ||
|
|
a2f5e69b76 | ||
|
|
0e41a87659 | ||
|
|
f6a6a7adb0 | ||
|
|
8abfee7b54 | ||
|
|
70038014a2 | ||
|
|
268c6a7e23 | ||
|
|
133165e79e | ||
|
|
99f2b2815d | ||
|
|
d6f0958652 | ||
|
|
6704e320da | ||
|
|
d0d09b93a4 | ||
|
|
155ab33086 | ||
|
|
55ed836400 | ||
|
|
6ac6a25803 | ||
|
|
26844cd290 | ||
|
|
7dc0f49809 | ||
|
|
71cd913135 | ||
|
|
dfa3ee901a | ||
|
|
f7131aaca0 | ||
|
|
fefb1374fd | ||
|
|
8f5165bd1b | ||
|
|
94a51da6fe | ||
|
|
e422a158ca | ||
|
|
b43d83291b | ||
|
|
e751938cdd | ||
|
|
b8321807dc | ||
|
|
3a42c12c00 | ||
|
|
d552fb458b | ||
|
|
a7b96d8582 | ||
|
|
18f188bb32 | ||
|
|
f44d3fd8d1 | ||
|
|
a0b8697a4f | ||
|
|
de8f463968 | ||
|
|
6642a46a04 | ||
|
|
0b856cbb83 | ||
|
|
e41c02e883 | ||
|
|
6f3dc4a010 | ||
|
|
d46eecc57c | ||
|
|
7223103905 | ||
|
|
547338c5b1 | ||
|
|
811aca8cfa | ||
|
|
0465a9eb8b | ||
|
|
45907e1ce5 | ||
|
|
3ff82ef8cd | ||
|
|
5f6cc373fe | ||
|
|
4801f6c6b9 | ||
|
|
02b4f6e178 | ||
|
|
b0161d41f8 | ||
|
|
d1702ccacf | ||
|
|
281be927a7 | ||
|
|
c352047991 | ||
|
|
c058fd4fb1 | ||
|
|
e4e5cb0f51 | ||
|
|
da611e384a | ||
|
|
5292bbff8b | ||
|
|
a22311c4e8 | ||
|
|
0d250fb56b | ||
|
|
5ba5d2fb08 | ||
|
|
51170c514d | ||
|
|
53cf4f1371 | ||
|
|
6ab6892f5b | ||
|
|
a38948ad2f | ||
|
|
0f56e859db | ||
|
|
365f863fc2 | ||
|
|
cf2e648a21 | ||
|
|
b7c077faad | ||
|
|
44d65c3cd7 | ||
|
|
069cece05e | ||
|
|
276524686a | ||
|
|
a46b3ad20b | ||
|
|
295096a9d7 | ||
|
|
0c6b994161 | ||
|
|
63e1ab4947 | ||
|
|
9ec2bac284 | ||
|
|
6fdbec1486 | ||
|
|
f11215c097 | ||
|
|
7ec5bb6a04 | ||
|
|
aae9bd8d8a | ||
|
|
cdf980ee8f | ||
|
|
7b23050791 | ||
|
|
faaa698e46 | ||
|
|
4b5c10a68e | ||
|
|
b00720d465 | ||
|
|
c4cf3049b2 | ||
|
|
f7e76bdbd8 | ||
|
|
4294fb39b2 | ||
|
|
eb2f810161 | ||
|
|
17e11063e3 | ||
|
|
70e2f724f7 | ||
|
|
f3787c812a | ||
|
|
a056a13f0b | ||
|
|
13d5b7a1d2 | ||
|
|
2c8a45153b | ||
|
|
be12633af1 | ||
|
|
81e4149b11 | ||
|
|
4b98f4a80a | ||
|
|
d83f37962d | ||
|
|
33b0d0674a | ||
|
|
b7f2c18c85 | ||
|
|
cda0e0c1d6 | ||
|
|
42eb9b5d71 | ||
|
|
35be40fb93 | ||
|
|
1d5c40d7a8 | ||
|
|
c1ea2e1810 | ||
|
|
f9562d495a | ||
|
|
58ad89ee4e | ||
|
|
b4a0800929 | ||
|
|
e27c92ef0e | ||
|
|
936c152ca6 | ||
|
|
fadd725662 | ||
|
|
ab5d30d0ce | ||
|
|
12ecc30e1f | ||
|
|
985cf69f0b | ||
|
|
ffa9deaf54 | ||
|
|
8613208b5f | ||
|
|
7b1bbb704a | ||
|
|
5acbdef022 | ||
|
|
96f855e930 | ||
|
|
c504ade7d4 | ||
|
|
5941b6dab4 | ||
|
|
33416b498c | ||
|
|
beb8941c80 | ||
|
|
33d8487adf | ||
|
|
cb5e9a2afe | ||
|
|
802a089c16 | ||
|
|
edad480e4f | ||
|
|
6181cbca97 | ||
|
|
572fb9e934 | ||
|
|
52dabed6ee | ||
|
|
d12d8fbd86 | ||
|
|
b0d57e63e3 | ||
|
|
baf3ff4e95 | ||
|
|
c061c0bae1 | ||
|
|
797c7d1a32 | ||
|
|
b1b63b11cd | ||
|
|
2ac8305eff | ||
|
|
eb9d9e0f1e | ||
|
|
9a1b447087 | ||
|
|
7fb8480138 | ||
|
|
ad26272524 | ||
|
|
147cf0f497 | ||
|
|
fa08f6b54a | ||
|
|
0f2d5fbd29 | ||
|
|
d645f4c02e | ||
|
|
f0af3f1562 | ||
|
|
b78699c9d5 | ||
|
|
c3f2ddd499 | ||
|
|
6f962ebfd0 | ||
|
|
7f768ced45 | ||
|
|
37e287d253 | ||
|
|
298e67a29d | ||
|
|
f1af69581e | ||
|
|
351b84ad96 | ||
|
|
e050bce77e | ||
|
|
01de27059d | ||
|
|
7407a2841b | ||
|
|
2f1a947cfc | ||
|
|
f26e5e33cc | ||
|
|
5a040cbd8e | ||
|
|
d2c383ef82 | ||
|
|
ffc89d07e9 | ||
|
|
2bae66f6fe | ||
|
|
09aaabf4c5 | ||
|
|
5de8c739f8 | ||
|
|
1220715e9b | ||
|
|
8cb194b3b9 | ||
|
|
dd4f6c3b9e | ||
|
|
1f6eabeeee | ||
|
|
0309dec38d | ||
|
|
143b80f630 | ||
|
|
6001ab425c | ||
|
|
817d187dd8 | ||
|
|
ab0e622dd9 | ||
|
|
1541c07e99 | ||
|
|
a823bf9739 | ||
|
|
ec79ccf008 | ||
|
|
bd5fb7adc6 | ||
|
|
5e80691b3e | ||
|
|
fbbb10b4e8 | ||
|
|
593a9f8592 | ||
|
|
45f3ab2f13 | ||
|
|
3422a49973 | ||
|
|
e70a661f2f | ||
|
|
7380a485fd | ||
|
|
ddbdf6fcab | ||
|
|
e3e7b16b6a | ||
|
|
4fc051acda | ||
|
|
281d284f67 | ||
|
|
f1a0cd3086 | ||
|
|
773b39f7e5 | ||
|
|
8608b3b397 | ||
|
|
8bbeace1b2 | ||
|
|
cb9ba1a2ff | ||
|
|
204d574457 | ||
|
|
21a8598f87 | ||
|
|
53dabf89fe | ||
|
|
512189af4e | ||
|
|
491b5cb23e | ||
|
|
8ae14a4cff | ||
|
|
c3de9950ac | ||
|
|
3b32ae3754 | ||
|
|
471eab4e93 | ||
|
|
d44ced1cd5 | ||
|
|
2d0212b2f8 | ||
|
|
b018c22922 | ||
|
|
bacfe4bec9 | ||
|
|
8295284b65 | ||
|
|
03842f1a42 | ||
|
|
9363ee3b48 | ||
|
|
42ed489a1c | ||
|
|
4993695a73 | ||
|
|
a56db0170c | ||
|
|
0ac19e4096 | ||
|
|
14328846a7 | ||
|
|
b3648e947d | ||
|
|
ca736ac139 | ||
|
|
cf7f943d82 | ||
|
|
e6e286edd0 | ||
|
|
6c86ed1f7f | ||
|
|
3a4c3fe37d | ||
|
|
ec67e93af0 | ||
|
|
88472c7de1 | ||
|
|
c0e8a46865 | ||
|
|
a7aa574d8c | ||
|
|
e32df95471 | ||
|
|
c19cdd3703 | ||
|
|
1fafff21b9 | ||
|
|
bf11e4c6e6 | ||
|
|
37750c642b | ||
|
|
9340e3c6cd | ||
|
|
280f88de2e | ||
|
|
5b8f19b425 | ||
|
|
fe7da90f30 | ||
|
|
2b1cf79f46 | ||
|
|
5513f1d1ab | ||
|
|
fae2f043e7 | ||
|
|
8e9aa4efc1 | ||
|
|
3871a97d8a | ||
|
|
3f634e3eb5 | ||
|
|
e0455e1635 | ||
|
|
71935d37f8 | ||
|
|
34f057dba4 | ||
|
|
7c42431143 | ||
|
|
cd766c2cad | ||
|
|
1d12f87a5e | ||
|
|
1305284855 | ||
|
|
24a415f773 | ||
|
|
d6d8de0b8e | ||
|
|
50e53ae596 | ||
|
|
92f52be4f1 | ||
|
|
3d01355b75 | ||
|
|
fffc70e733 | ||
|
|
79427157a8 | ||
|
|
942bacdc28 | ||
|
|
415465ee62 | ||
|
|
a21dc7524c | ||
|
|
0e417e5e91 | ||
|
|
1a36d9bf36 | ||
|
|
3d7564b003 | ||
|
|
7bebb0e8bf | ||
|
|
34daabcaad | ||
|
|
817aa011cf | ||
|
|
7f2ecd360e | ||
|
|
f259e202bd | ||
|
|
045c1ed939 | ||
|
|
532f0f5ffe | ||
|
|
805317e865 | ||
|
|
a1e420e2cf | ||
|
|
549a978736 | ||
|
|
184f25cb3f | ||
|
|
dd14d6f88c | ||
|
|
7a4f9f6f70 | ||
|
|
e7df0e5099 | ||
|
|
bda5a311c6 | ||
|
|
e5c44c9510 | ||
|
|
387376a36b | ||
|
|
4c53f18d5b | ||
|
|
919a4fe707 | ||
|
|
d30557a3a6 | ||
|
|
bc453a917f | ||
|
|
e0a1117a4a | ||
|
|
62a73ad255 | ||
|
|
55de07ecde | ||
|
|
c60aca7e54 | ||
|
|
d8cf4fbd2b | ||
|
|
795260ccaf | ||
|
|
5d1ab726ae | ||
|
|
c3b4eb8a87 | ||
|
|
46582e3010 | ||
|
|
592200e7d6 | ||
|
|
dcd60b8cc4 | ||
|
|
a63c4f1412 | ||
|
|
b1579c7ea9 | ||
|
|
f5b9b1714a | ||
|
|
95ad152139 | ||
|
|
fbc35f697f | ||
|
|
8513dd20a8 | ||
|
|
97a728d7ab | ||
|
|
86efacc40b | ||
|
|
e2944af7e7 | ||
|
|
9f5acb35ba | ||
|
|
5d6c64943c | ||
|
|
32c4ccbbef | ||
|
|
47ac25b446 | ||
|
|
5804383c2b | ||
|
|
4efeb2d937 | ||
|
|
a19f35262f |
13
.github/FUNDING.yml
vendored
Normal file
13
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
||||
custom: https://www.paypal.com/donate/?hosted_button_id=S974SWQMB8PB2
|
||||
21
.github/workflows/validate_blueprint.yml
vendored
Normal file
21
.github/workflows/validate_blueprint.yml
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
name: Validate Blueprint YAML
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- "nspanel_blueprint.yaml"
|
||||
pull_request:
|
||||
paths:
|
||||
- "nspanel_blueprint.yaml"
|
||||
#schedule:
|
||||
# - cron: "0 0 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
code_scan:
|
||||
name: Validate Blueprint YAML
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.0
|
||||
- name: Validate nspanel_blueprint.yaml
|
||||
run: yamllint -c "./.yamllint/rules.yml" nspanel_blueprint.yaml
|
||||
153
.github/workflows/validate_esphome.yml
vendored
Normal file
153
.github/workflows/validate_esphome.yml
vendored
Normal file
@@ -0,0 +1,153 @@
|
||||
name: Validate ESPHome
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- "nspanel_esphome*.yaml"
|
||||
- "advanced/esphome/nspanel_esphome*.yaml"
|
||||
pull_request:
|
||||
paths:
|
||||
- "nspanel_esphome*.yaml"
|
||||
- "advanced/esphome/nspanel_esphome*.yaml"
|
||||
#schedule:
|
||||
# - cron: "0 0 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
# yamllint disable-line rule:line-length
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
code_scan:
|
||||
name: Code scan (YAML)
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.0
|
||||
- name: Validate nspanel_esphome.yaml
|
||||
run: yamllint -c "./.yamllint/rules.yml" nspanel_esphome.yaml
|
||||
- name: Validate nspanel_esphome_core.yaml
|
||||
run: yamllint -c "./.yamllint/rules.yml" advanced/esphome/nspanel_esphome_core.yaml
|
||||
- name: Validate nspanel_esphome_addon_upload_tft.yaml
|
||||
run: yamllint -c "./.yamllint/rules.yml" advanced/esphome/nspanel_esphome_addon_upload_tft.yaml
|
||||
- name: Validate nspanel_esphome_advanced.yaml
|
||||
run: yamllint -c "./.yamllint/rules.yml" advanced/esphome/nspanel_esphome_advanced.yaml
|
||||
- name: Validate nspanel_esphome_addon_climate_base.yaml
|
||||
run: yamllint -c "./.yamllint/rules.yml" advanced/esphome/nspanel_esphome_addon_climate_base.yaml
|
||||
- name: Validate nspanel_esphome_addon_climate_cool.yaml
|
||||
run: yamllint -c "./.yamllint/rules.yml" nspanel_esphome_addon_climate_cool.yaml
|
||||
- name: Validate nspanel_esphome_addon_climate_heat.yaml
|
||||
run: yamllint -c "./.yamllint/rules.yml" nspanel_esphome_addon_climate_heat.yaml
|
||||
|
||||
build_core:
|
||||
name: Core
|
||||
runs-on: "ubuntu-latest"
|
||||
needs:
|
||||
- code_scan
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.0
|
||||
- name: Build core
|
||||
uses: esphome/build-action@v1.8.0
|
||||
with:
|
||||
yaml_file: "./.test/esphome_core.yaml"
|
||||
|
||||
build_advanced:
|
||||
name: Advanced
|
||||
runs-on: "ubuntu-latest"
|
||||
needs:
|
||||
- build_core
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.0
|
||||
- name: Build core+advanced
|
||||
uses: esphome/build-action@v1.8.0
|
||||
with:
|
||||
yaml_file: "./.test/esphome_advanced.yaml"
|
||||
|
||||
build_climate_heat:
|
||||
name: Climate (heat)
|
||||
runs-on: "ubuntu-latest"
|
||||
needs:
|
||||
- build_core
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.0
|
||||
- name: Build core+climate_heat
|
||||
uses: esphome/build-action@v1.8.0
|
||||
with:
|
||||
yaml_file: "./.test/esphome_climate_heat.yaml"
|
||||
|
||||
build_climate_cool:
|
||||
name: Climate (cool)
|
||||
runs-on: "ubuntu-latest"
|
||||
needs:
|
||||
- build_core
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.0
|
||||
- name: Build core+climate_cool
|
||||
uses: esphome/build-action@v1.8.0
|
||||
with:
|
||||
yaml_file: "./.test/esphome_climate_cool.yaml"
|
||||
|
||||
build_climate_heat_advanced:
|
||||
name: Advanced+climate (heat)
|
||||
runs-on: "ubuntu-latest"
|
||||
needs:
|
||||
- build_climate_heat
|
||||
- build_advanced
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.0
|
||||
- name: Build core+advanced+climate_heat
|
||||
uses: esphome/build-action@v1.8.0
|
||||
with:
|
||||
yaml_file: "./.test/esphome_advanced_climate_heat.yaml"
|
||||
|
||||
build_climate_cool_advanced_esp_idf:
|
||||
name: esp-idf & Bluetooth proxy
|
||||
runs-on: "ubuntu-latest"
|
||||
needs:
|
||||
- build_climate_cool
|
||||
- build_advanced
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.0
|
||||
- name: Build core+advanced+climate_cool+esp_idf
|
||||
uses: esphome/build-action@v1.8.0
|
||||
with:
|
||||
yaml_file: "./.test/esphome_advanced_climate_cool_esp_idf.yaml"
|
||||
|
||||
#build_climate_cool_advanced_esp_idf5:
|
||||
# name: esp-idf v5 & Bluetooth proxy
|
||||
# runs-on: "ubuntu-latest"
|
||||
# needs:
|
||||
# - build_climate_cool_advanced_esp_idf
|
||||
# steps:
|
||||
# - uses: actions/checkout@v4.1.0
|
||||
# - name: Build core+advanced+climate_cool+esp_idf5
|
||||
# uses: esphome/build-action@v1.8.0
|
||||
# with:
|
||||
# yaml_file: "./.test/esphome_advanced_climate_cool_esp_idf5.yaml"
|
||||
|
||||
build_climate_heat_advanced_customization:
|
||||
name: Customizations
|
||||
runs-on: "ubuntu-latest"
|
||||
needs:
|
||||
- build_climate_heat_advanced
|
||||
- build_climate_cool_advanced_esp_idf
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.0
|
||||
- name: Build core+advanced+climate_heat+customizations
|
||||
uses: esphome/build-action@v1.8.0
|
||||
with:
|
||||
yaml_file: "./.test/esphome_advanced_climate_heat_customizations.yaml"
|
||||
|
||||
#build_climate_cool_advanced_esp_idf5:
|
||||
# name: esp-idf v5 & Bluetooth proxy
|
||||
# runs-on: "ubuntu-latest"
|
||||
# needs:
|
||||
# - build_climate_cool
|
||||
# - build_advanced
|
||||
# steps:
|
||||
# - uses: actions/checkout@v4.1.0
|
||||
# - name: Build core+advanced+climate_cool+esp_idf
|
||||
# uses: esphome/build-action@v1.8.0
|
||||
# with:
|
||||
# yaml_file: "./.test/esphome_advanced_climate_cool_esp_idf5.yaml"
|
||||
|
||||
157
.github/workflows/validate_esphome_beta.yml
vendored
Normal file
157
.github/workflows/validate_esphome_beta.yml
vendored
Normal file
@@ -0,0 +1,157 @@
|
||||
name: Validate ESPHome (beta)
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
paths:
|
||||
- "nspanel_esphome*.yaml"
|
||||
- "advanced/esphome/nspanel_esphome*.yaml"
|
||||
#schedule:
|
||||
#- cron: "0 0 * * *"
|
||||
|
||||
concurrency:
|
||||
# yamllint disable-line rule:line-length
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
code_scan:
|
||||
name: Code scan (YAML)
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.0
|
||||
- name: Validate nspanel_esphome.yaml
|
||||
run: yamllint -c "./.yamllint/rules.yml" nspanel_esphome.yaml
|
||||
- name: Validate nspanel_esphome_core.yaml
|
||||
run: yamllint -c "./.yamllint/rules.yml" advanced/esphome/nspanel_esphome_core.yaml
|
||||
- name: Validate nspanel_esphome_addon_upload_tft.yaml
|
||||
run: yamllint -c "./.yamllint/rules.yml" advanced/esphome/nspanel_esphome_addon_upload_tft.yaml
|
||||
- name: Validate nspanel_esphome_advanced.yaml
|
||||
run: yamllint -c "./.yamllint/rules.yml" advanced/esphome/nspanel_esphome_advanced.yaml
|
||||
- name: Validate nspanel_esphome_addon_climate_base.yaml
|
||||
run: yamllint -c "./.yamllint/rules.yml" advanced/esphome/nspanel_esphome_addon_climate_base.yaml
|
||||
- name: Validate nspanel_esphome_addon_climate_cool.yaml
|
||||
run: yamllint -c "./.yamllint/rules.yml" nspanel_esphome_addon_climate_cool.yaml
|
||||
- name: Validate nspanel_esphome_addon_climate_heat.yaml
|
||||
run: yamllint -c "./.yamllint/rules.yml" nspanel_esphome_addon_climate_heat.yaml
|
||||
|
||||
build_core:
|
||||
name: Core
|
||||
runs-on: "ubuntu-latest"
|
||||
needs:
|
||||
- code_scan
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.0
|
||||
- name: Build core
|
||||
uses: esphome/build-action@v1.8.0
|
||||
with:
|
||||
yaml_file: "./.test/esphome_core.yaml"
|
||||
version: beta
|
||||
|
||||
build_advanced:
|
||||
name: Advanced
|
||||
runs-on: "ubuntu-latest"
|
||||
needs:
|
||||
- build_core
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.0
|
||||
- name: Build core+advanced
|
||||
uses: esphome/build-action@v1.8.0
|
||||
with:
|
||||
yaml_file: "./.test/esphome_advanced.yaml"
|
||||
version: beta
|
||||
|
||||
build_climate_heat:
|
||||
name: Climate (heat)
|
||||
runs-on: "ubuntu-latest"
|
||||
needs:
|
||||
- build_core
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.0
|
||||
- name: Build core+climate_heat
|
||||
uses: esphome/build-action@v1.8.0
|
||||
with:
|
||||
yaml_file: "./.test/esphome_climate_heat.yaml"
|
||||
version: beta
|
||||
|
||||
build_climate_cool:
|
||||
name: Climate (cool)
|
||||
runs-on: "ubuntu-latest"
|
||||
needs:
|
||||
- build_core
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.0
|
||||
- name: Build core+climate_cool
|
||||
uses: esphome/build-action@v1.8.0
|
||||
with:
|
||||
yaml_file: "./.test/esphome_climate_cool.yaml"
|
||||
version: beta
|
||||
|
||||
build_climate_heat_advanced:
|
||||
name: Advanced+climate (heat)
|
||||
runs-on: "ubuntu-latest"
|
||||
needs:
|
||||
- build_climate_heat
|
||||
- build_advanced
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.0
|
||||
- name: Build core+advanced+climate_heat
|
||||
uses: esphome/build-action@v1.8.0
|
||||
with:
|
||||
yaml_file: "./.test/esphome_advanced_climate_heat.yaml"
|
||||
version: beta
|
||||
|
||||
build_climate_cool_advanced_esp_idf:
|
||||
name: esp-idf & Bluetooth proxy
|
||||
runs-on: "ubuntu-latest"
|
||||
needs:
|
||||
- build_climate_cool
|
||||
- build_advanced
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.0
|
||||
- name: Build core+advanced+climate_cool+esp_idf
|
||||
uses: esphome/build-action@v1.8.0
|
||||
with:
|
||||
yaml_file: "./.test/esphome_advanced_climate_cool_esp_idf.yaml"
|
||||
version: beta
|
||||
|
||||
#build_climate_cool_advanced_esp_idf5:
|
||||
# name: esp-idf v5 & Bluetooth proxy
|
||||
# runs-on: "ubuntu-latest"
|
||||
# needs:
|
||||
# - build_climate_cool_advanced_esp_idf
|
||||
# steps:
|
||||
# - uses: actions/checkout@v4.1.0
|
||||
# - name: Build core+advanced+climate_cool+esp_idf5
|
||||
# uses: esphome/build-action@v1.8.0
|
||||
# with:
|
||||
# yaml_file: "./.test/esphome_advanced_climate_cool_esp_idf5.yaml"
|
||||
# version: beta
|
||||
|
||||
build_climate_heat_advanced_customization:
|
||||
name: Customizations
|
||||
runs-on: "ubuntu-latest"
|
||||
needs:
|
||||
- build_climate_heat_advanced
|
||||
- build_climate_cool_advanced_esp_idf
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.0
|
||||
- name: Build core+advanced+climate_heat+customizations
|
||||
uses: esphome/build-action@v1.8.0
|
||||
with:
|
||||
yaml_file: "./.test/esphome_advanced_climate_heat_customizations.yaml"
|
||||
version: beta
|
||||
|
||||
#build_climate_cool_advanced_esp_idf5:
|
||||
# name: esp-idf v5 & Bluetooth proxy
|
||||
# runs-on: "ubuntu-latest"
|
||||
# needs:
|
||||
# - build_climate_cool
|
||||
# - build_advanced
|
||||
# steps:
|
||||
# - uses: actions/checkout@v4.1.0
|
||||
# - name: Build core+advanced+climate_cool+esp_idf
|
||||
# uses: esphome/build-action@v1.8.0
|
||||
# with:
|
||||
# yaml_file: "./.test/esphome_advanced_climate_cool_esp_idf5.yaml"
|
||||
# version: beta
|
||||
12
.gitignore
vendored
12
.gitignore
vendored
@@ -1,3 +1,15 @@
|
||||
# Ignore Mac DS_Store files
|
||||
.DS_Store
|
||||
**/.DS_Store
|
||||
|
||||
Nextion2Text.*
|
||||
*.cmd
|
||||
*.bat
|
||||
|
||||
# Ignore IntelliJ IDEA project directory
|
||||
.idea
|
||||
|
||||
# Ignore dev folder
|
||||
dev
|
||||
|
||||
nspanel_esphome_prebuilt.yaml
|
||||
|
||||
11
.test/esphome_advanced.yaml
Normal file
11
.test/esphome_advanced.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
substitutions:
|
||||
device_name: nspanel
|
||||
wifi_ssid: "nspanel"
|
||||
wifi_password: "NSPanel_HA_Blueprint"
|
||||
nextion_update_url: "https://github.com/Blackymas/NSPanel_HA_Blueprint/dummy"
|
||||
|
||||
packages:
|
||||
core_package: !include ../nspanel_esphome.yaml # Core package
|
||||
advanced_package: !include ../advanced/esphome/nspanel_esphome_advanced.yaml
|
||||
#addon_climate_heat: !include ../nspanel_esphome_addon_climate_heat.yaml
|
||||
#addon_climate_cool: !include ../nspanel_esphome_addon_climate_cool.yaml
|
||||
21
.test/esphome_advanced_climate_cool_esp_idf.yaml
Normal file
21
.test/esphome_advanced_climate_cool_esp_idf.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
substitutions:
|
||||
device_name: nspanel
|
||||
wifi_ssid: "nspanel"
|
||||
wifi_password: "NSPanel_HA_Blueprint"
|
||||
nextion_update_url: "https://github.com/Blackymas/NSPanel_HA_Blueprint/dummy"
|
||||
|
||||
packages:
|
||||
core_package: !include ../nspanel_esphome.yaml # Core package
|
||||
advanced_package: !include ../advanced/esphome/nspanel_esphome_advanced.yaml
|
||||
#addon_climate_heat: !include ../nspanel_esphome_addon_climate_heat.yaml
|
||||
addon_climate_cool: !include ../nspanel_esphome_addon_climate_cool.yaml
|
||||
|
||||
esp32:
|
||||
framework:
|
||||
type: esp-idf
|
||||
|
||||
bluetooth_proxy:
|
||||
|
||||
# Set Wi-Fi power save mode to "LIGHT" as required for Bluetooth on ESP32
|
||||
wifi:
|
||||
power_save_mode: LIGHT
|
||||
23
.test/esphome_advanced_climate_cool_esp_idf5.yaml
Normal file
23
.test/esphome_advanced_climate_cool_esp_idf5.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
substitutions:
|
||||
device_name: nspanel
|
||||
wifi_ssid: "nspanel"
|
||||
wifi_password: "NSPanel_HA_Blueprint"
|
||||
nextion_update_url: "https://github.com/Blackymas/NSPanel_HA_Blueprint/dummy"
|
||||
|
||||
packages:
|
||||
core_package: !include ../nspanel_esphome.yaml # Core package
|
||||
advanced_package: !include ../advanced/esphome/nspanel_esphome_advanced.yaml
|
||||
#addon_climate_heat: !include ../nspanel_esphome_addon_climate_heat.yaml
|
||||
addon_climate_cool: !include ../nspanel_esphome_addon_climate_cool.yaml
|
||||
|
||||
esp32:
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.0.2
|
||||
platform_version: 6.3.2
|
||||
|
||||
bluetooth_proxy:
|
||||
|
||||
# Set Wi-Fi power save mode to "LIGHT" as required for Bluetooth on ESP32
|
||||
wifi:
|
||||
power_save_mode: LIGHT
|
||||
11
.test/esphome_advanced_climate_heat.yaml
Normal file
11
.test/esphome_advanced_climate_heat.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
substitutions:
|
||||
device_name: nspanel
|
||||
wifi_ssid: "nspanel"
|
||||
wifi_password: "NSPanel_HA_Blueprint"
|
||||
nextion_update_url: "https://github.com/Blackymas/NSPanel_HA_Blueprint/dummy"
|
||||
|
||||
packages:
|
||||
core_package: !include ../nspanel_esphome.yaml # Core package
|
||||
advanced_package: !include ../advanced/esphome/nspanel_esphome_advanced.yaml
|
||||
addon_climate_heat: !include ../nspanel_esphome_addon_climate_heat.yaml
|
||||
#addon_climate_cold: !include ../nspanel_esphome_addon_climate_cold.yaml
|
||||
270
.test/esphome_advanced_climate_heat_customizations.yaml
Normal file
270
.test/esphome_advanced_climate_heat_customizations.yaml
Normal file
@@ -0,0 +1,270 @@
|
||||
substitutions:
|
||||
device_name: nspanel
|
||||
wifi_ssid: "nspanel"
|
||||
wifi_password: "NSPanel_HA_Blueprint"
|
||||
nextion_update_url: "https://github.com/Blackymas/NSPanel_HA_Blueprint/dummy"
|
||||
nextion_update_blank_url: "http://homeassistant.local:8123/local/nspanel/dev/nspanel_blank.tft"
|
||||
|
||||
packages:
|
||||
core_package: !include ../nspanel_esphome.yaml # Core package
|
||||
advanced_package: !include ../advanced/esphome/nspanel_esphome_advanced.yaml
|
||||
addon_climate_heat: !include ../nspanel_esphome_addon_climate_heat.yaml
|
||||
#addon_climate_cold: !include ../nspanel_esphome_addon_climate_cold.yaml
|
||||
|
||||
##### Customizations from Wiki #####
|
||||
api:
|
||||
# Encrypt the communication between ESPHome and Home Assistant
|
||||
encryption:
|
||||
key: !secret api_encryption_key
|
||||
# Reboot if HA is not connected for 15 minutes
|
||||
reboot_timeout: 15min
|
||||
|
||||
binary_sensor:
|
||||
# Is display awake?
|
||||
- name: ${device_name} Display state
|
||||
id: display_state
|
||||
platform: template
|
||||
lambda: |-
|
||||
return (id(current_page).state != "screensaver");
|
||||
|
||||
# Enable Bluetooth proxy
|
||||
bluetooth_proxy:
|
||||
|
||||
button:
|
||||
##### UPDATE TFT BLANK DISPLAY #####
|
||||
#- name: ${device_name} Update TFT display (blank)
|
||||
# platform: template
|
||||
# icon: mdi:file-sync
|
||||
# id: tft_update_blank
|
||||
# entity_category: config
|
||||
# on_press:
|
||||
# - logger.log: "Button pressed: Update TFT display (blank)"
|
||||
# - binary_sensor.template.publish:
|
||||
# id: nextion_init
|
||||
# state: false
|
||||
# - delay: 16ms
|
||||
# - lambda: |-
|
||||
# id(disp1)->set_tft_url("${nextion_update_blank_url}");
|
||||
# id(disp1).upload_tft();
|
||||
# Adds a button to put the panel to sleep
|
||||
- name: ${device_name} Sleep
|
||||
id: force_sleep
|
||||
platform: template
|
||||
icon: mdi:sleep
|
||||
on_press:
|
||||
then:
|
||||
- logger.log: Button Sleep pressed
|
||||
- lambda: |-
|
||||
if (id(current_page).state != "screensaver") id(disp1).goto_page("screensaver");
|
||||
|
||||
# Adds a button to wake-up the panel (similar to the existing service)
|
||||
- name: ${device_name} Wake-up
|
||||
id: force_wake_up
|
||||
platform: template
|
||||
icon: mdi:alarm
|
||||
on_press:
|
||||
then:
|
||||
- logger.log: Button Wake-up pressed
|
||||
- lambda: |-
|
||||
if (id(current_page).state == "screensaver") id(disp1).goto_page(id(wakeup_page_name).state.c_str());
|
||||
// id(timer_page).execute(id(wakeup_page_name).state.c_str()); // enable this if you want page timeout to be reset
|
||||
id(timer_sleep).execute(id(wakeup_page_name).state.c_str(), int(id(timeout_sleep).state));
|
||||
id(timer_dim).execute(id(wakeup_page_name).state.c_str(), int(id(timeout_dim).state));
|
||||
|
||||
# Add custom presets to your climate (heat in this example)
|
||||
climate:
|
||||
- id: !extend thermostat_embedded
|
||||
heat_deadband: 0.3
|
||||
heat_overrun: 0.0
|
||||
default_preset: "Home"
|
||||
preset:
|
||||
- name: "Off"
|
||||
default_target_temperature_low: ${temp_min} ${temp_units}
|
||||
mode: "off"
|
||||
- name: Home
|
||||
default_target_temperature_low: 21 ${temp_units}
|
||||
mode: "heat"
|
||||
- name: Away
|
||||
default_target_temperature_low: 16.5 ${temp_units}
|
||||
mode: "heat"
|
||||
- name: Sleep
|
||||
default_target_temperature_low: 17.5 ${temp_units}
|
||||
mode: "heat"
|
||||
|
||||
# Change framework to `esp-idf`
|
||||
esp32:
|
||||
framework:
|
||||
type: esp-idf
|
||||
|
||||
esphome:
|
||||
# change OTA password, remove after flashing
|
||||
on_boot:
|
||||
- lambda: |-
|
||||
id(my_ota).set_auth_password("New password");
|
||||
# Limit the amount of resources used for compiling
|
||||
compile_process_limit: 1
|
||||
|
||||
light:
|
||||
# Add the display as a light in Home Assistant
|
||||
- name: ${device_name} Display
|
||||
id: display_light
|
||||
icon: mdi:tablet-dashboard
|
||||
platform: monochromatic
|
||||
output: display_output
|
||||
default_transition_length: 0s
|
||||
on_turn_on:
|
||||
then:
|
||||
- lambda: |-
|
||||
ESP_LOGD("light.display_light", "Turn-on");
|
||||
if (current_page->state == "screensaver") disp1->goto_page(wakeup_page_name->state.c_str());
|
||||
timer_reset_all->execute(wakeup_page_name->state.c_str());
|
||||
on_turn_off:
|
||||
then:
|
||||
- lambda: |-
|
||||
ESP_LOGD("light.display_light", "Turn-off");
|
||||
disp1->goto_page("screensaver");
|
||||
|
||||
logger:
|
||||
# Enable hardware UART serial logging
|
||||
baud_rate: 115200
|
||||
|
||||
ota:
|
||||
# change OTA password, remove after flashing
|
||||
password: !secret wifi_password
|
||||
id: my_ota
|
||||
|
||||
output:
|
||||
# Output required by `display_light` to send the commands to Nextion
|
||||
- id: display_output
|
||||
platform: template
|
||||
type: float
|
||||
write_action:
|
||||
- lambda: |-
|
||||
ESP_LOGV("output.display_output", "state: %f", state);
|
||||
uint8_t current_brightness = int(round(display_light->current_values.is_on() ? (display_light->current_values.get_brightness() * 100.0f) : 0.0));
|
||||
ESP_LOGV("output.display_output", "current_brightness: %i%%", current_brightness);
|
||||
set_brightness->execute(current_brightness);
|
||||
|
||||
script:
|
||||
# Updates the existing `page_changed` script to update the `display_light` status when a page changes
|
||||
- id: !extend page_changed
|
||||
then:
|
||||
- lambda: |-
|
||||
ESP_LOGD("script.page_changed(custom)", "page: %s", page.c_str());
|
||||
ESP_LOGV("script.page_changed(custom)", "is_on(): %s", display_light->current_values.is_on() ? "True" : "False");
|
||||
if (page == "screensaver" and display_light->current_values.is_on()) {
|
||||
auto call = display_light->turn_off();
|
||||
call.perform();
|
||||
} else if (page != "screensaver" and (not display_light->current_values.is_on())) {
|
||||
auto call = display_light->turn_on();
|
||||
call.perform();
|
||||
}
|
||||
|
||||
# Updates the existing `set_brightness` script to update the `display_light` status when a new brightness level is set
|
||||
- id: !extend set_brightness
|
||||
then:
|
||||
- lambda: |-
|
||||
ESP_LOGD("script.set_brightness(custom)", "brightness: %i%%", brightness);
|
||||
uint8_t current_brightness = int(round(display_light->current_values.is_on() ? (display_light->current_values.get_brightness() * 100.0f) : 0.0));
|
||||
ESP_LOGV("script.set_brightness(custom)", "current_brightness: %i%%", current_brightness);
|
||||
if (brightness != current_brightness) {
|
||||
if (current_page->state != "screensaver" and brightness > 0) {
|
||||
auto call = display_light->turn_on();
|
||||
call.set_brightness(static_cast<float>(id(display_last_brightness)) / 100.0f);
|
||||
call.perform();
|
||||
} else if (display_light->current_values.is_on()) {
|
||||
auto call = display_light->turn_off();
|
||||
call.set_brightness(0);
|
||||
call.perform();
|
||||
}
|
||||
}
|
||||
|
||||
time:
|
||||
- id: !extend time_provider
|
||||
timezone: "America/Cancun"
|
||||
# Use my own local network time server
|
||||
platform: sntp
|
||||
servers:
|
||||
- !secret mysntpserver
|
||||
- europe.pool.ntp.org
|
||||
- 0.pool.ntp.org
|
||||
on_time:
|
||||
#- hours: 22
|
||||
# minutes: 0
|
||||
# seconds: 0
|
||||
# then:
|
||||
# - deep_sleep.enter:
|
||||
# sleep_duration: 7h
|
||||
# Scheduled relay
|
||||
- hours: 7
|
||||
minutes: 30
|
||||
seconds: 0
|
||||
then:
|
||||
- switch.turn_on: relay_1
|
||||
- hours: 12
|
||||
minutes: 15
|
||||
seconds: 0
|
||||
then:
|
||||
- switch.turn_off: relay_1
|
||||
- hours: 19
|
||||
minutes: 30
|
||||
seconds: 0
|
||||
then:
|
||||
- switch.turn_on: relay_1
|
||||
- hours: 23
|
||||
minutes: 30
|
||||
seconds: 0
|
||||
then:
|
||||
- switch.turn_off: relay_1
|
||||
# Scheduled climate
|
||||
- hours: 7
|
||||
minutes: 0
|
||||
seconds: 0
|
||||
then:
|
||||
- climate.control:
|
||||
id: thermostat_embedded
|
||||
mode: auto
|
||||
target_temperature: 22°C
|
||||
- hours: 19
|
||||
minutes: 0
|
||||
seconds: 0
|
||||
then:
|
||||
- climate.control:
|
||||
id: thermostat_embedded
|
||||
mode: auto
|
||||
target_temperature: 20°C
|
||||
- hours: 23
|
||||
minutes: 0
|
||||
seconds: 0
|
||||
then:
|
||||
- climate.control:
|
||||
id: thermostat_embedded
|
||||
mode: auto
|
||||
target_temperature: 18°C
|
||||
|
||||
uart:
|
||||
# Set Nextion comms baud rate to 921600 bps
|
||||
- id: !extend tf_uart
|
||||
baud_rate: 9600
|
||||
|
||||
web_server:
|
||||
# Custom web server credentials
|
||||
auth:
|
||||
username: !secret web_server_username
|
||||
password: !secret web_server_password
|
||||
|
||||
wifi:
|
||||
networks:
|
||||
- id: !extend wifi_default
|
||||
# Set IP address manually
|
||||
manual_ip:
|
||||
static_ip: 192.168.0.123
|
||||
gateway: 192.168.0.1
|
||||
subnet: 255.255.255.0
|
||||
# Set dual network
|
||||
priority: 10
|
||||
- ssid: !secret wifi_ssid_backup
|
||||
password: !secret wifi_password_backup
|
||||
priority: 0
|
||||
# Set Wi-Fi power save mode to "LIGHT" as required for Bluetooth on ESP32
|
||||
power_save_mode: LIGHT
|
||||
11
.test/esphome_climate_cool.yaml
Normal file
11
.test/esphome_climate_cool.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
substitutions:
|
||||
device_name: nspanel
|
||||
wifi_ssid: "nspanel"
|
||||
wifi_password: "NSPanel_HA_Blueprint"
|
||||
nextion_update_url: "https://github.com/Blackymas/NSPanel_HA_Blueprint/dummy"
|
||||
|
||||
packages:
|
||||
core_package: !include ../nspanel_esphome.yaml # Core package
|
||||
#advanced_package: !include ../advanced/esphome/nspanel_esphome_advanced.yaml
|
||||
#addon_climate_heat: !include ../nspanel_esphome_addon_climate_heat.yaml
|
||||
addon_climate_cool: !include ../nspanel_esphome_addon_climate_cool.yaml
|
||||
11
.test/esphome_climate_heat.yaml
Normal file
11
.test/esphome_climate_heat.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
substitutions:
|
||||
device_name: nspanel
|
||||
wifi_ssid: "nspanel"
|
||||
wifi_password: "NSPanel_HA_Blueprint"
|
||||
nextion_update_url: "https://github.com/Blackymas/NSPanel_HA_Blueprint/dummy"
|
||||
|
||||
packages:
|
||||
core_package: !include ../nspanel_esphome.yaml # Core package
|
||||
#advanced_package: !include ../advanced/esphome/nspanel_esphome_advanced.yaml
|
||||
addon_climate_heat: !include ../nspanel_esphome_addon_climate_heat.yaml
|
||||
#addon_climate_cool: !include ../nspanel_esphome_addon_climate_cool.yaml
|
||||
11
.test/esphome_core.yaml
Normal file
11
.test/esphome_core.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
substitutions:
|
||||
device_name: nspanel
|
||||
wifi_ssid: "nspanel"
|
||||
wifi_password: "NSPanel_HA_Blueprint"
|
||||
nextion_update_url: "https://github.com/Blackymas/NSPanel_HA_Blueprint/dummy"
|
||||
|
||||
packages:
|
||||
core_package: !include ../nspanel_esphome.yaml # Core package
|
||||
#advanced_package: !include ../advanced/esphome/nspanel_esphome_advanced.yaml
|
||||
#addon_climate_heat: !include ../nspanel_esphome_addon_climate_heat.yaml
|
||||
#addon_climate_cool: !include ../nspanel_esphome_addon_climate_cool.yaml
|
||||
7
.test/secrets.yaml
Normal file
7
.test/secrets.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
api_encryption_key: MSANehPIH8kCp/vGcpPcKPSkYnv3zchyxkXCleXJinM=
|
||||
mysntpserver: 192.168.0.1
|
||||
web_server_password: NotASecret01
|
||||
web_server_username: NotASecret01
|
||||
wifi_password: NotASecret01
|
||||
wifi_password_backup: NotASecret01
|
||||
wifi_ssid_backup: NotASecret01
|
||||
13
.yamllint/rules.yml
Normal file
13
.yamllint/rules.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
# https://yamllint.readthedocs.io/en/stable/configuration.html#default-configuration
|
||||
|
||||
extends: relaxed
|
||||
|
||||
rules:
|
||||
anchors:
|
||||
forbid-undeclared-aliases: true
|
||||
forbid-duplicated-anchors: true
|
||||
|
||||
# 255 chars should be enough, but don't fail if a line is longer
|
||||
line-length:
|
||||
max: 255
|
||||
level: warning
|
||||
263
README.md
263
README.md
@@ -1,170 +1,215 @@
|
||||
# NSPanel Custom with HA Blueprint
|
||||
|
||||
*Are you happy with our version for NSPanel? Please consider supporting us with a donation.*
|
||||
<br>[](https://www.paypal.com/donate/?hosted_button_id=S974SWQMB8PB2)
|
||||
|
||||
[](https://my.home-assistant.io/redirect/blueprint_import/?blueprint_url=https%3A%2F%2Fgithub.com%2FBlackymas%2FNSPanel_HA_Blueprint%2Fblob%2Fmain%2Fnspanel_blueprint.yaml)
|
||||
|
||||
This project allows you to configure your complete NSPanel via a Blueprint with UI.
|
||||
[](https://github.com/Blackymas/NSPanel_HA_Blueprint/actions/workflows/validate_esphome.yml)
|
||||
[](https://github.com/Blackymas/NSPanel_HA_Blueprint/actions/workflows/validate_esphome_beta.yml)
|
||||
|
||||
### *That means you don't have to customize any code or change any lines in the code.*
|
||||
# NSPanel Custom with HA Blueprint
|
||||
|
||||
So you have a nice graphical interface where you can build your NSPanel.
|
||||
And the best thing is, the installation takes only a few minutes.
|
||||
This innovative solution is designed to revolutionize how you interact with your Sonoff NSPanel. Our goal? To make the customization of your NSPanel seamless, intuitive, and completely code-free!
|
||||
|
||||
The goal was to create a version that allows everyone to use the NSpanel fully local without having to deal with programming or reading hours of documentation - *AND YES WE DID IT!!!!* ;)
|
||||
## Table of Contents
|
||||
1. [Project Highlights](#-project-highlights)
|
||||
2. [Documentation & Resources](#-documentation--resources)
|
||||
3. [Features](#-features)
|
||||
4. [Pages Overview](#-pages-overview)
|
||||
5. [Contributing](#-contributing)
|
||||
6. [Community & Support](#-community--support)
|
||||
7. [Acknowledgements](#-acknowledgements)
|
||||
8. [Donations](#-donations)
|
||||
|
||||
📕 Full documentation and installation is available here [NSPanel Configuration, Setup and HowTo](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki).
|
||||
## 🌟 Project Highlights
|
||||
|
||||
🚀 How to create "Issues" when I have a problem [WIKI HowTo](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki/Welcome-to-the-NSPanel_HA_Blueprint-WIKI)
|
||||
- **No Coding Required:** Customize your NSPanel without touching a single line of code. It's all about intuitive, user-friendly experiences!
|
||||
- **Quick Setup:** Get your NSPanel up and running in minutes with our easy-to-follow graphical interface.
|
||||
- **Local Control:** Embrace full local control of your NSPanel, steering clear of cloud dependencies.
|
||||
- **Community-Driven:** A project for the users, by the users. Your contributions shape the future of this project!
|
||||
|
||||
⭐ All Feature Requests can be found here [All Feature Request](https://github.com/Blackymas/NSPanel_HA_Blueprint/labels/new%20feature%20request)
|
||||
## 📚 Documentation & Resources
|
||||
|
||||
🎉 Roadmap Roadmap can be found here [Roadmap](https://github.com/Blackymas/NSPanel_HA_Blueprint/labels/roadmap)
|
||||
- **Getting Started:** Dive into our comprehensive [Documentation and Setup Guide](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki) for detailed instructions.
|
||||
- **Video Tutorial:** Prefer visual learning? Check out our [Step-by-Step Setup Video](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki).
|
||||
- **Troubleshooting:** Encounter an issue? Here's how to report it: [WIKI HowTo](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki).
|
||||
- **Feature Requests:** Got ideas? Share them [here](https://github.com/Blackymas/NSPanel_HA_Blueprint/labels/new%20feature%20request).
|
||||
- **What's Next?:** Discover what's next and what we are working on right now in our [Milestones](https://github.com/Blackymas/NSPanel_HA_Blueprint/milestones?direction=asc&sort=due_date)
|
||||
|
||||
🙋 WE ARE LOOKING FOR YOU! _**We are always looking for people who would like to support this project. We are looking for help with "programming new features, writing documentation or translating documentation to EN. If you are interested then please contact us :)**_
|
||||
## 🚀 Features
|
||||
|
||||
## NSPanel:
|
||||

|
||||

|
||||
|
||||
(Home and Buttonpage)
|
||||
|
||||
|
||||

|
||||

|
||||
|
||||
(Lightsettings - Brightness and TEMP Color)
|
||||
|
||||
|
||||

|
||||

|
||||
|
||||
(Colorwheel and Thermostat)
|
||||
|
||||
|
||||

|
||||

|
||||
|
||||
(Coversetting and Weather Forcast)
|
||||
|
||||
|
||||

|
||||

|
||||
|
||||
(NSPanel Settings and Boot Screen)
|
||||
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
(HA Device Seeting for Example temperature correction)
|
||||
|
||||
|
||||
## Blueprint:
|
||||

|
||||

|
||||
|
||||
|
||||
|
||||
## Features:
|
||||
- easy to use and simple configuration via Blueprint - no change in the code is necessary
|
||||
- Easy to use and simple configuration via Blueprint - no change in the code is necessary
|
||||
- 32 buttons on 4 button pages with long press function for settings (more buttons are also possible)
|
||||
- Button design is automatically generated based on the selected entity
|
||||
- Buttons show current brightness and cover position in the button itself
|
||||
- Buttons label can be assigned via blueprint
|
||||
- Weather + 5 days weather forcast
|
||||
- Thermostat + Touch + Relay control for floor heating
|
||||
- Light control (brightness-slider, colorwheel, TempColor-slider) - via Long Press
|
||||
- Cover control (open, close, position-slider) - via long press
|
||||
- Settings page (display brightness, display dim brightness, auto-dim, sleep mode, reboot NSPanel)
|
||||
- Weather + 5 days weather forecast
|
||||
- Thermostat + Touch + [Relay control for floor heating](/docs/en/addon_climate.md)
|
||||
- Light control (brightness, color and temperature) - via long Press
|
||||
- Cover control (open, close and position) - via long press
|
||||
- Settings page (display brightness, display dim brightness, sleep mode, reboot NSPanel)
|
||||
- Swipe between pages
|
||||
- Top menu with 10 icons for specific states
|
||||
- Heating control (hot water)
|
||||
- modern design - design easy to change via Adobe Express (free + design template)
|
||||
- 2 pysical switches
|
||||
- Modern design - design easy to change via Adobe Express (free + design template)
|
||||
- 2 physical switches with optional fallback mode
|
||||
- and much more ;)
|
||||
|
||||
|
||||
# Pages
|
||||
## 📖 Pages Overview
|
||||
|
||||
## Home
|
||||
- current weather with button to Weather Forcast page
|
||||
|
||||
### Home
|
||||

|
||||
<br>
|
||||

|
||||
|
||||
- Current weather with button to Weather Forcast page
|
||||
- Hardware buttons can be freely assigned
|
||||
- Hardware button label or without label
|
||||
- Blue line indicates on or off of the entity
|
||||
- Temperature outside
|
||||
- Hardware button label (optional)
|
||||
- Blue line indicates the entity's states (`on` or `off`)
|
||||
- Outside temperature
|
||||
- Status icons at the top
|
||||
- Room temperature with button to thermostat page
|
||||
- Room humidity
|
||||
- Hot water temperature
|
||||
- Button to display settings page
|
||||
- Up to 3 user's selectable entities
|
||||
|
||||
|
||||
### Button Page
|
||||

|
||||

|
||||
|
||||
## Button Page
|
||||
- 32 Button
|
||||
- Up to 32 buttons
|
||||
- 4 Button pages
|
||||
- Button design is automatically generated based on the selected entity
|
||||
- Buttons show current brightness and cover position in the button itself
|
||||
- Buttons label can be assigned via blueprint
|
||||
- all buttons with long press function
|
||||
- automatic detection by long press if it is a light or cover for submenu
|
||||
- swipe between all pages
|
||||
- swipe also down and up for fast access to certain pages
|
||||
- All buttons with long press function
|
||||
- Automatic detection by long press if it is a light, cover or climate for submenu
|
||||
- Swipe between all pages
|
||||
- Swipe also down and up for fast access to certain pages
|
||||
|
||||
|
||||
### Light Settings
|
||||

|
||||

|
||||

|
||||
|
||||
## Light Settings
|
||||
- Light current state
|
||||
- Brightness Slider
|
||||
- Colorwheel
|
||||
- TempColor slider
|
||||
- Brightness slider
|
||||
- RGB color wheel
|
||||
- Color temperature slider
|
||||
- Jump back to the right button page
|
||||
|
||||
|
||||
### Cover Settings
|
||||

|
||||
|
||||
## Cover Settings
|
||||
- Open and close cover
|
||||
- Cover position via slider
|
||||
- Cover battery value if available (I use Ikea roller blind)
|
||||
- Cover battery value (when available)
|
||||
- jump back to the right button page
|
||||
|
||||
|
||||
### Thermostat / Climate
|
||||
- Target temperature control slider
|
||||
- Current temperature
|
||||
- 4 user's selectable values (for water and external temperatures, etc.)
|
||||
- All the standard climate controls from Home Assistant (`heat`, `fan`, `cool`, `auto`, `dry`)
|
||||
- 2 user's selectable buttons
|
||||
- [Can be used for local control (even when Wi-Fi is unavailable) when your panel's relays are used to control your cooler/heater](/docs/en/addon_climate.md)
|
||||
|
||||
## Thermostat
|
||||
- Touch Temp control
|
||||
- Outside temperature
|
||||
- Hot water
|
||||
- heating on, off and idle
|
||||
- Hot water button
|
||||
|
||||
### Fan speed
|
||||
- Turn-on and turn-off fan
|
||||
- Set speed via slider or buttons
|
||||
- jump back to the right button page
|
||||
|
||||
|
||||
### Alarm
|
||||
- Arm/disarm an alarm (standard modes supported by Home Assistant)
|
||||
- Support to numeric pin for arming or disarming
|
||||
|
||||
|
||||
## Weather Forcast
|
||||
- 5 days Weather Forcast via swipe (Integration Accuweather - but should also go with another integration)
|
||||
- Lowest and highest temperature outside
|
||||
|
||||
### Weather Forecast
|
||||

|
||||
|
||||
- 5 days weather forecast via swipe (supports most used weather integrations)
|
||||
- Min and max outside temperatures
|
||||
- Date
|
||||
- Rain probability
|
||||
- Sunshine hours
|
||||
- Sun pressure
|
||||
- Thunderstorm probability
|
||||
- Wind speed
|
||||
- Night thunderstorm probability and wind speed
|
||||
- Other weather parameters (when provided by your integration):
|
||||
- Rain probability
|
||||
- Sunshine hours
|
||||
- UV index
|
||||
- Thunderstorm probability
|
||||
- Wind speed
|
||||
|
||||
|
||||
### Display Settings
|
||||
|
||||

|
||||
<br>
|
||||

|
||||
|
||||
## Display Settings
|
||||
- Restart NSPanel
|
||||
- Sleep mode - display off after time X
|
||||
- Display brightness slider
|
||||
- Display dim brightness slider
|
||||
- Status Brightness in %
|
||||
|
||||
### Boot
|
||||

|
||||
<br>
|
||||

|
||||
|
||||
|
||||
## Home Assistant interface
|
||||
|
||||
## Device's page
|
||||
On the device's page under "Devices & Services" you can set the global configuration of your device and see the value of it's sensors and relays:
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
## Automation (Blueprint)
|
||||
In your automations you use the blueprint's inputs to define what will be shown on your panel and how it should behave:
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
|
||||
## Thanks to:
|
||||
SmartHome Yourself: https://www.youtube.com/c/SmarthomeyourselfDe_DIY
|
||||
## 🚀 Contributing
|
||||
|
||||
Masto: https://github.com/masto/NSPanel-Demo-Files
|
||||
- **Pull Requests:** Please direct all pull requests to the `DEV` branch, not the `main` branch.
|
||||
- **Join Our Team:** We're on the lookout for enthusiasts in programming, documentation, and translation. Interested? Please let us know.
|
||||
|
||||
Marcfager: https://github.com/marcfager/nspanel-mf
|
||||
## 🌍 Community & Support
|
||||
|
||||
lovejoy77: https://github.com/lovejoy777/NSpanel
|
||||
Join our vibrant community! Whether you're seeking support, wanting to contribute, or just looking to share your NSPanel journey, we're here for you.
|
||||
|
||||
Hellis81: https://github.com/Hellis81/NS-panel
|
||||
- **[Issues & Feature requests](https://github.com/Blackymas/NSPanel_HA_Blueprint/issues)**
|
||||
- **[Discussion Forum](https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions)**
|
||||
- **[Home Assistant Community](https://community.home-assistant.io/t/sonoff-nspanel-blueprint-configure-your-own-custom-nspanel-easy-via-a-blueprint/500577)**
|
||||
|
||||
## 🎉 Acknowledgements
|
||||
|
||||
A huge thank you to everyone who has contributed to making this project a reality. Your support, feedback, and contributions have been invaluable.
|
||||
|
||||
And special thanks for the other projects which inspired us:
|
||||
- Hellis81: https://github.com/Hellis81/NS-panel
|
||||
- Jimmyboy83: https://github.com/Jimmyboy83/nspanel
|
||||
- joBr99: https://github.com/joBr99/Generate-HASP-Fonts
|
||||
- lovejoy77: https://github.com/lovejoy777/NSpanel
|
||||
- Marcfager: https://github.com/marcfager/nspanel-mf
|
||||
- Masto: https://github.com/masto/NSPanel-Demo-Files
|
||||
- sairon: https://github.com/sairon/esphome-nspanel-lovelace-ui
|
||||
- SmartHome Yourself: https://www.youtube.com/c/SmarthomeyourselfDe_DIY
|
||||
|
||||
|
||||
## 💖 Donations
|
||||
|
||||
Are you happy with our version for NSPanel? Please consider supporting us with a donation.
|
||||
|
||||
[](https://www.paypal.com/donate/?hosted_button_id=S974SWQMB8PB2)
|
||||
|
||||
106
ReleaseNotes.md
Normal file
106
ReleaseNotes.md
Normal file
@@ -0,0 +1,106 @@
|
||||
# v4.2 <= pending update
|
||||
|
||||
## Support this project
|
||||
|
||||
### As always, we would like to thank everyone who donated to this project and remind you that every donation helps to support this project - so if you haven't made a donation yet, now would be a good time ;)
|
||||
|
||||
[](https://www.paypal.com/donate/?hosted_button_id=S974SWQMB8PB2)
|
||||
|
||||
|
||||
## General <= pending update
|
||||
The focus this time was on making easier to transfer the TFT files.
|
||||
|
||||
As this project grows with features, it becomes more hungry of resources from all sides (ESPHome, your Home Assistant server and even the Nextion display) and with that the chances of something going wrong when updating increased.
|
||||
|
||||
So at this release we concentrated on cleaning up de code everywhere and shave some unnecessary elements, making the system easier to install and opening some space for future features. But you still can find a couple of nice new things not related to the cleaning.
|
||||
|
||||
|
||||
## Updating
|
||||
Updates may come with changes on the blueprint inputs and we highly recommend you review your settings and make sure all fields have the correct selection. We did our best to support your legacy settings and avoid breaking your system, but please double check your settings if you see something not working as expected.
|
||||
|
||||
### Files that need to be reloaded:
|
||||
1. nspanel_eu.tft, nspanel_us.tft or nspanel_us_land.tft - v4.2
|
||||
2. nspanel_esphome.yaml - v4.2
|
||||
3. nspanel_blueprint.yaml - v4.2
|
||||
|
||||
####
|
||||
|
||||
### Instructions
|
||||
_You can find the update procedures following here:_
|
||||
- [(EN) How To - All important thing you should know - Update](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki/(EN)-HowTo---All-important-thing-you-should-know#2-update-blueprint)
|
||||
- [(DE) How To - Alle wichtigen Dinge die man wissen sollte - Update](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki/(DE)-HowTo---Alle-wichtigen-Dinge-die-man-wissen-sollte#2-update-blueprint)
|
||||
|
||||
|
||||
## Breaking changes
|
||||
|
||||
1. Service `esphome.xxxxx_set_component_color` parameter `background` is deprecated.
|
||||
2. Due to the additional custom buttons, the other buttons on home page changed their positions.
|
||||
3. The Wi-Fi power save mode is back to "NONE" as default.<br>
|
||||
This was the default until v4.0, but we changed on v4.1 to support Bluetooth components, however as this is not used by the majority of users, we are reverting back to the original setting. You can (and should if you want use Bluetooth) enforce other mode as a customization, like in the example bellow:
|
||||
```yaml
|
||||
##### My customization - Start #####
|
||||
# Enable Bluetooth proxy
|
||||
bluetooth_proxy:
|
||||
# Set Wi-Fi power save mode to "LIGHT" as required for Bluetooth on ESP32
|
||||
wifi:
|
||||
power_save_mode: LIGHT
|
||||
##### My customization - End #####
|
||||
```
|
||||
4. Default baud rate for advanced mode is back to 115200 bps, to avoid issues when creating buttons pages.
|
||||
|
||||
|
||||
## Overview of noteworthy changes
|
||||
1. Standardized entity's icons
|
||||
2. Additional custom buttons on Home page
|
||||
3. Outdoor temperature selectable font size
|
||||
|
||||
|
||||
## Details of noteworthy changes
|
||||
|
||||
### 1. Standardized entity's icons
|
||||
The engine for defining the icons to be shown and it's color was standardize between all the pages, so now you may see a more consistent User's Interface.
|
||||
|
||||
|
||||
### 2. Additional custom buttons on Home page
|
||||
It's that simple, now you have 6 buttons where used to be 3. 😉
|
||||
|
||||
|
||||
### 3. Outdoor temperature selectable font size
|
||||
Now you can select the font size of your outdoor temperature display:
|
||||
|
||||

|
||||
|
||||
> Important: Long text with bigger fonts may exceed the limit of space reserved for this with incomplete information shown.
|
||||
|
||||
|
||||
## Next topics we are currently working on
|
||||
See here: https://github.com/Blackymas/NSPanel_HA_Blueprint/labels/roadmap
|
||||
|
||||
|
||||
## Special thanks to:
|
||||
|
||||
## New Contributors
|
||||
|
||||
## Previous releases
|
||||
- [v4.1.4 - Support to Home Assistant 2023.12.0](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.1.4)
|
||||
- [v4.1.3 - Bug fixes](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.1.3)
|
||||
- [v4.1.2 - Bug fixes and minor enhancements](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.1.2)
|
||||
- [v4.1.1 - UI Enhancements and Reintroduction of `play_rtttl` Service](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.1.1)
|
||||
- [v4.1 - Easier TFT transfer](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.1)
|
||||
- [v4.0.2 - Bug fixes](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.0.2)
|
||||
- [v4.0.1 - Bug fixes](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.0.1)
|
||||
- [v4.0 - Alarm and Media player pages, Climate add-ons and a more robust panel](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.0)
|
||||
- [v3.4.1 - Patch for issues when compiling with ESPHome 2023.7.0](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v3.4.1)
|
||||
- [v3.4 - New climate page and some bug fixes](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v3.4)
|
||||
- [v3.3 - New improvements and some issues fixed](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v.3.3)
|
||||
- [v3.2.2 - fixed some bugs performance improvement](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v3.2.2)
|
||||
- [v3.2.1 - New features and some fixes](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v3.2.1)
|
||||
- [v3.2 - New features and custom configurations](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v.3.2)
|
||||
- [v3.1.0 - New features and US Version](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v.3.1.0)
|
||||
- [v3.0.0 - major update with many features and improvements](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v.3.0.0)
|
||||
- [v2.2.0 - 25 new languages added](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v.2.2.0)
|
||||
- [v2.1.0 - New Domains, Buttons and Button Page Label](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v2.1.0)
|
||||
- [v2.0.2](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v2.0.2)
|
||||
- [v2.0.1 - Bug Fixes](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v2.0.1)
|
||||
- [v2.0.0](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v2.0.0)
|
||||
- [v1.0.1 Blueprint](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/latest)
|
||||
15
advanced/.gitignore
vendored
Normal file
15
advanced/.gitignore
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# Ignore Mac DS_Store files
|
||||
.DS_Store
|
||||
**/.DS_Store
|
||||
|
||||
Nextion2Text.*
|
||||
*.cmd
|
||||
*.bat
|
||||
|
||||
# Ignore IntelliJ IDEA project directory
|
||||
.idea
|
||||
|
||||
# Ignore dev folder
|
||||
dev
|
||||
|
||||
nspanel_esphome_prebuilt.yaml
|
||||
149
advanced/esphome/nspanel_esphome_addon_climate_base.yaml
Normal file
149
advanced/esphome/nspanel_esphome_addon_climate_base.yaml
Normal file
@@ -0,0 +1,149 @@
|
||||
#####################################################################################################
|
||||
##### NSPANEL ESPHOME created by Blackymas - https://github.com/Blackymas/NSPanel_HA_Blueprint #####
|
||||
##### ESPHome Add-on for Climate control - Shared - This will be called by heat/cool #####
|
||||
##### PLEASE only make changes if it is necessary and also the required knowledge is available. #####
|
||||
##### For normal use with the Blueprint, no changes are necessary. #####
|
||||
#####################################################################################################
|
||||
##### ATTENTION: This will add climate elements to the core system and requires the core part. #####
|
||||
#####################################################################################################
|
||||
|
||||
substitutions:
|
||||
### Local thermostat defaults ###
|
||||
# https://esphome.io/components/climate/thermostat.html
|
||||
temp_units: "°C"
|
||||
heater_relay: "0" # Select 1 for "Relay 1", 2 for "Relay 2" or "0" to a dummy switch/disabled
|
||||
cooler_relay: "0" # Select 1 for "Relay 1", 2 for "Relay 2" or "0" to a dummy switch/disabled
|
||||
min_off_time: "300"
|
||||
min_run_time: "300"
|
||||
min_idle_time: "30"
|
||||
# https://esphome.io/components/climate/index.html#base-climate-configuration
|
||||
temp_min: "5"
|
||||
temp_max: "45"
|
||||
temp_step: "0.5"
|
||||
|
||||
##### DO NOT CHANGE THIS #####
|
||||
addon_climate_cool: "false"
|
||||
addon_climate_heat: "false"
|
||||
##############################
|
||||
|
||||
climate:
|
||||
- platform: thermostat
|
||||
name: ${device_name} Thermostat
|
||||
id: thermostat_embedded
|
||||
sensor: temp_nspanel
|
||||
min_idle_time: ${min_idle_time}s
|
||||
visual:
|
||||
min_temperature: ${temp_min} ${temp_units}
|
||||
max_temperature: ${temp_max} ${temp_units}
|
||||
#temperature_step: ${temp_step} ${temp_units}
|
||||
temperature_step:
|
||||
target_temperature: 0.5 #This is hard coded for now as ESPHome isn't supporting a substitution here. In contact with support.
|
||||
current_temperature: 0.1
|
||||
idle_action:
|
||||
- switch.turn_off: relay_${heater_relay}
|
||||
default_preset: "Off"
|
||||
on_boot_restore_from: memory
|
||||
internal: false
|
||||
on_state:
|
||||
- logger.log: Climate state changed - Start
|
||||
- script.execute: addon_climate_update_page_climate
|
||||
- script.execute: addon_climate_update_page_home
|
||||
- logger.log: Climate state changed - End
|
||||
|
||||
globals:
|
||||
##### Is embedded thermostat visible on climate page? #####
|
||||
- id: is_addon_climate_visible
|
||||
type: bool
|
||||
restore_value: false
|
||||
initial_value: 'false'
|
||||
##### Embeded climate friendly name #####
|
||||
- id: addon_climate_friendly_name
|
||||
type: std::string
|
||||
restore_value: false
|
||||
initial_value: '"${device_name} Thermostat"'
|
||||
|
||||
switch:
|
||||
##### PHYSICAL SWITCH 0 (Dummy) - Used when relay is not set #####
|
||||
- name: ${device_name} Relay 0 (dummy)
|
||||
platform: template
|
||||
id: relay_0
|
||||
lambda: !lambda return false;
|
||||
internal: true
|
||||
optimistic: true
|
||||
|
||||
script:
|
||||
- id: !extend addon_climate_update_page_home
|
||||
mode: restart
|
||||
then:
|
||||
- lambda: |-
|
||||
// Update home.climate_entity variable
|
||||
detailed_entity->publish_state((id(is_embedded_thermostat)) ? "embedded_climate" : "");
|
||||
disp1->set_component_value("climate.embedded", (id(is_embedded_thermostat)) ? 1 : 0);
|
||||
// Update chips
|
||||
if (id(is_embedded_thermostat))
|
||||
id(update_climate_icon).execute("home.icon_top_03", int(thermostat_embedded->action), int(thermostat_embedded->mode));
|
||||
|
||||
- id: !extend addon_climate_service_call
|
||||
then:
|
||||
- lambda: |-
|
||||
id(is_addon_climate_visible) = true;
|
||||
disp1->set_component_value("climate.embedded", 1);
|
||||
auto call = thermostat_embedded->make_call();
|
||||
if (key == "set_temperature")
|
||||
call.set_target_temperature(stof(value) / 10);
|
||||
else if (key == "hvac_mode")
|
||||
call.set_mode(value);
|
||||
call.perform();
|
||||
|
||||
- id: !extend addon_climate_set_climate
|
||||
then:
|
||||
- lambda: |-
|
||||
id(is_addon_climate_visible) = embedded_climate;
|
||||
|
||||
- id: !extend addon_climate_update_page_climate
|
||||
then:
|
||||
- lambda: |-
|
||||
if (current_page->state == "climate" and id(is_addon_climate_visible))
|
||||
{
|
||||
disp1->set_component_text_printf("page_label", id(addon_climate_friendly_name).c_str());
|
||||
float temp_step = ${temp_step};
|
||||
float temp_offset = ${temp_min};
|
||||
float temp_max = ${temp_max};
|
||||
float total_steps = (temp_max-temp_offset)/temp_step;
|
||||
set_climate->execute
|
||||
(
|
||||
thermostat_embedded->current_temperature, // current_temp
|
||||
thermostat_embedded->target_temperature, // target_temp
|
||||
int(round(${temp_step}*10)), // temp_step
|
||||
int(round(total_steps)), // total_steps //int(round((10*thermostat_embedded->target_temperature-temp_offset)/temp_step)), // slider_val
|
||||
int(round(${temp_min}*10)), // temp_offset
|
||||
"", // climate_icon
|
||||
true // embedded_climate
|
||||
);
|
||||
|
||||
// Update target temp icon
|
||||
update_climate_icon->execute("climate.target_icon", int(thermostat_embedded->action), int(thermostat_embedded->mode));
|
||||
|
||||
// Update buttons bar
|
||||
// Hide not supported hotspots
|
||||
disp1->hide_component("button01");
|
||||
disp1->hide_component("button02");
|
||||
if (${addon_climate_heat}) disp1->show_component("button03"); else disp1->hide_component("button03"); //Heat
|
||||
if (${addon_climate_cool}) disp1->show_component("button04"); else disp1->hide_component("button04"); //Cool
|
||||
disp1->hide_component("button05");
|
||||
disp1->hide_component("button06");
|
||||
disp1->show_component("button07"); //Off
|
||||
// Set buttons colors
|
||||
disp1->set_component_font_color("climate.button01", 6339);
|
||||
disp1->set_component_font_color("climate.button02", 6339);
|
||||
disp1->set_component_font_color("climate.button03", (thermostat_embedded->mode==climate::CLIMATE_MODE_HEAT) ? 64164 : ((${addon_climate_heat}) ? 48631 : 6339));
|
||||
disp1->set_component_font_color("climate.button04", (thermostat_embedded->mode==climate::CLIMATE_MODE_COOL) ? 1055 : ((${addon_climate_cool}) ? 48631 : 6339));
|
||||
disp1->set_component_font_color("climate.button05", 6339);
|
||||
disp1->set_component_font_color("climate.button06", 6339);
|
||||
disp1->set_component_font_color("climate.button07", (thermostat_embedded->mode==climate::CLIMATE_MODE_OFF) ? 10597 : 35921);
|
||||
}
|
||||
|
||||
- id: !extend addon_climate_set_climate_friendly_name
|
||||
then:
|
||||
- lambda: |-
|
||||
id(addon_climate_friendly_name) = friendly_name;
|
||||
876
advanced/esphome/nspanel_esphome_addon_upload_tft.yaml
Normal file
876
advanced/esphome/nspanel_esphome_addon_upload_tft.yaml
Normal file
@@ -0,0 +1,876 @@
|
||||
#####################################################################################################
|
||||
##### NSPANEL ESPHOME created by Blackymas - https://github.com/Blackymas/NSPanel_HA_Blueprint #####
|
||||
##### TFT Upload engine #####
|
||||
##### PLEASE only make changes if it is necessary and also the required knowledge is available. #####
|
||||
##### For normal use with the Blueprint, no changes are necessary. #####
|
||||
#####################################################################################################
|
||||
##### ATTENTION: This will add advanced elements to the core system and requires the core part. #####
|
||||
#####################################################################################################
|
||||
|
||||
substitutions:
|
||||
|
||||
################## Defaults ##################
|
||||
# Just in case user forgets to set something #
|
||||
nextion_update_url: "http://github.com/Blackymas/NSPanel_HA_Blueprint/raw/main/custom_configuration/nspanel_eu.tft"
|
||||
nextion_blank_url: "http://github.com/Blackymas/NSPanel_HA_Blueprint/raw/main/custom_configuration/nspanel_blank.tft"
|
||||
##############################################
|
||||
|
||||
##### DON'T CHANGE THIS #####
|
||||
upload_tft_chunk_size_max: "32768"
|
||||
#############################
|
||||
|
||||
external_components:
|
||||
- source: github://pr#3256 # adds esp-idf support to http_request
|
||||
components:
|
||||
- http_request
|
||||
# - source: github://pr#5484 # adds exit reparse to Nextion library
|
||||
# components:
|
||||
# - nextion
|
||||
|
||||
##### HTTP REQUEST #####
|
||||
# Enables http client #
|
||||
# for upload_tft. #
|
||||
########################
|
||||
http_request:
|
||||
id: httpclient
|
||||
|
||||
api:
|
||||
services:
|
||||
##### SERVICE TO UPDATE THE TFT FILE from URL #####
|
||||
##### It will use the default url if url is empty or "default"
|
||||
- service: upload_tft_url
|
||||
variables:
|
||||
url: string
|
||||
then:
|
||||
- lambda: |-
|
||||
static const char *const TAG = "service.upload_tft_url";
|
||||
ESP_LOGVV(TAG, "Starting...");
|
||||
|
||||
std::string clean_url = url;
|
||||
// Convert to lowercase
|
||||
std::transform(clean_url.begin(), clean_url.end(), clean_url.begin(),
|
||||
[](unsigned char c){ return std::tolower(c); });
|
||||
// Trim trailing spaces
|
||||
auto endPos = clean_url.find_last_not_of(" \t");
|
||||
if (std::string::npos != endPos) {
|
||||
clean_url = clean_url.substr(0, endPos + 1);
|
||||
}
|
||||
|
||||
if ( clean_url.empty() or clean_url == "default") url = tft_list->state;
|
||||
upload_tft->execute(url.c_str());
|
||||
|
||||
button:
|
||||
##### UPDATE TFT DISPLAY #####
|
||||
- name: ${device_name} Update TFT display
|
||||
platform: template
|
||||
icon: mdi:file-sync
|
||||
id: tft_update
|
||||
entity_category: config
|
||||
on_press:
|
||||
- lambda: |-
|
||||
static const char *const TAG = "button.tft_update.on_press";
|
||||
ESP_LOGD(TAG, "Update TFT display button pressed");
|
||||
upload_tft->execute(tft_list->state.c_str());
|
||||
|
||||
#display:
|
||||
# - id: !extend disp1
|
||||
# tft_url: ${nextion_update_url}
|
||||
|
||||
script:
|
||||
- id: upload_tft_new #NOT IN USE FOR NOW
|
||||
mode: single
|
||||
parameters:
|
||||
url: string
|
||||
then:
|
||||
- lambda: |-
|
||||
static const char *const TAG = "script.upload_tft_new";
|
||||
ESP_LOGVV(TAG, "Starting...");
|
||||
|
||||
nextion_init->state = false;
|
||||
|
||||
auto delay_seconds_ = [](int seconds) {
|
||||
ESP_LOGD(TAG, "Wait %i seconds", seconds);
|
||||
for (int i = 0; i < (seconds*4); i++) {
|
||||
#ifdef ARDUINO
|
||||
delay(250);
|
||||
#elif defined(USE_ESP_IDF)
|
||||
vTaskDelay(pdMS_TO_TICKS(250));
|
||||
#endif
|
||||
App.feed_wdt();
|
||||
}
|
||||
};
|
||||
|
||||
ESP_LOGV(TAG, "Setting TFT url: %s", url.c_str());
|
||||
//disp1->set_tft_url(url.c_str());
|
||||
unsigned int upload_tries = 0;
|
||||
while (upload_tries < 3) {
|
||||
upload_tries++;
|
||||
ESP_LOGD(TAG, "Try #%i", upload_tries);
|
||||
nextion_status->execute();
|
||||
if (!disp1->is_setup()) {
|
||||
ESP_LOGD(TAG, "Setting Nextion protocol reparse mode to passive");
|
||||
exit_reparse->execute();
|
||||
delay_seconds_(5);
|
||||
}
|
||||
ESP_LOGV(TAG, "Calling upload from Nextion component");
|
||||
//if (disp1->upload_tft()) id(restart_nspanel).press();
|
||||
ESP_LOGD(TAG, "Turn off Nextion");
|
||||
screen_power->turn_off();
|
||||
delay_seconds_(3);
|
||||
ESP_LOGD(TAG, "Turn on Nextion");
|
||||
screen_power->turn_on();
|
||||
delay_seconds_(10);
|
||||
}
|
||||
ESP_LOGE(TAG, "TFT upload failed.");
|
||||
ESP_LOGD(TAG, "Turn off Nextion");
|
||||
screen_power->turn_off();
|
||||
delay_seconds_(2);
|
||||
ESP_LOGD(TAG, "Turn on Nextion");
|
||||
screen_power->turn_on();
|
||||
ESP_LOGD(TAG, "Restarting esphome");
|
||||
delay_seconds_(1);
|
||||
restart_nspanel->press();
|
||||
nextion_init->state = true;
|
||||
ESP_LOGV(TAG, "Finished!");
|
||||
|
||||
- id: upload_tft
|
||||
mode: single
|
||||
parameters:
|
||||
url: string
|
||||
then:
|
||||
- lambda: |-
|
||||
static const char *const TAG = "script.upload_tft";
|
||||
ESP_LOGD(TAG, "Starting...");
|
||||
|
||||
auto delay_seconds_ = [](int seconds) {
|
||||
ESP_LOGD(TAG, "Wait %i seconds", seconds);
|
||||
for (int i = 0; i < (seconds*4); i++) {
|
||||
#ifdef ARDUINO
|
||||
delay(250);
|
||||
#elif defined(USE_ESP_IDF)
|
||||
vTaskDelay(pdMS_TO_TICKS(250));
|
||||
#endif
|
||||
App.feed_wdt();
|
||||
}
|
||||
};
|
||||
|
||||
std::string framework = "Unknown";
|
||||
#ifdef ARDUINO
|
||||
framework = "Arduino";
|
||||
#elif defined(ESP_PLATFORM)
|
||||
framework = "ESP-IDF";
|
||||
#endif
|
||||
|
||||
if (disp1->is_setup()) {
|
||||
disp1->set_backlight_brightness(1);
|
||||
disp1->set_component_text_printf("confirm.title", "Upload TFT\\r%s", framework.c_str());
|
||||
disp1->set_component_text_printf("confirm.body", "Preparing...");
|
||||
disp1->goto_page("confirm");
|
||||
disp1->hide_component("bt_close");
|
||||
disp1->hide_component("bt_accept");
|
||||
disp1->hide_component("bt_clear");
|
||||
disp1->hide_component("bt_close");
|
||||
delay_seconds_(1);
|
||||
display_wrapped_text->execute("confirm.body", "Informing the blueprint that panel is unavailable...", 18);
|
||||
disp1->hide_component("bt_close");
|
||||
}
|
||||
nextion_init->publish_state(false);
|
||||
if (disp1->is_setup()) {
|
||||
delay_seconds_(1);
|
||||
display_wrapped_text->execute("confirm.body", "Stopping scripts...", 18);
|
||||
}
|
||||
stop_all->execute();
|
||||
if (disp1->is_setup()) delay_seconds_(1);
|
||||
|
||||
std::vector<uint8_t> buffer_;
|
||||
|
||||
bool is_updating_ = false;
|
||||
|
||||
bool upload_first_chunk_sent_ = false;
|
||||
|
||||
int content_length_ = 0;
|
||||
int tft_size_ = 0;
|
||||
|
||||
auto set_baud_rate_ = [](int baud_rate) {
|
||||
#ifdef USE_ARDUINO
|
||||
auto *uart = reinterpret_cast<uart::ESP32ArduinoUARTComponent *>(tf_uart);
|
||||
#endif
|
||||
#ifdef USE_ESP_IDF
|
||||
auto *uart = reinterpret_cast<uart::IDFUARTComponent *>(tf_uart);
|
||||
#endif
|
||||
uart->set_baud_rate(baud_rate);
|
||||
uart->setup();
|
||||
};
|
||||
|
||||
auto send_nextion_command = [](const std::string &command) -> bool
|
||||
{
|
||||
static const char *const TAG = "script.upload_tft.send_nextion_command";
|
||||
ESP_LOGD(TAG, "Sending: %s", command.c_str());
|
||||
id(tf_uart).write_str(command.c_str());
|
||||
const uint8_t to_send[3] = {0xFF, 0xFF, 0xFF};
|
||||
id(tf_uart).write_array(to_send, sizeof(to_send));
|
||||
return true;
|
||||
};
|
||||
|
||||
auto recv_ret_string_ = [](std::string &response, uint32_t timeout, bool recv_flag) -> uint16_t
|
||||
{
|
||||
static const char *const TAG = "script.upload_tft.recv_ret_string_";
|
||||
uint16_t ret;
|
||||
uint8_t c = 0;
|
||||
uint8_t nr_of_ff_bytes = 0;
|
||||
uint64_t start;
|
||||
bool exit_flag = false;
|
||||
bool ff_flag = false;
|
||||
|
||||
start = millis();
|
||||
|
||||
while ((timeout == 0 && id(tf_uart).available()) || millis() - start <= timeout)
|
||||
{
|
||||
if (!id(tf_uart).available())
|
||||
{
|
||||
App.feed_wdt();
|
||||
continue;
|
||||
}
|
||||
|
||||
id(tf_uart).read_byte(&c);
|
||||
if (c == 0xFF)
|
||||
{
|
||||
nr_of_ff_bytes++;
|
||||
}
|
||||
else
|
||||
{
|
||||
nr_of_ff_bytes = 0;
|
||||
ff_flag = false;
|
||||
}
|
||||
|
||||
if (nr_of_ff_bytes >= 3)
|
||||
ff_flag = true;
|
||||
|
||||
response += (char) c;
|
||||
if (recv_flag)
|
||||
{
|
||||
if (response.find(0x05) != std::string::npos)
|
||||
{
|
||||
exit_flag = true;
|
||||
}
|
||||
}
|
||||
App.feed_wdt();
|
||||
delay(2);
|
||||
|
||||
if (exit_flag || ff_flag)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (ff_flag)
|
||||
response = response.substr(0, response.length() - 3); // Remove last 3 0xFF
|
||||
|
||||
ret = response.length();
|
||||
return ret;
|
||||
};
|
||||
|
||||
auto upload_end_ = [&](bool completed) -> bool
|
||||
{
|
||||
static const char *const TAG = "script.upload_tft.upload_end_";
|
||||
ESP_LOGD(TAG, "Completed: %i", completed ? 1 : 0);
|
||||
//ESP_LOGD(TAG, "Restarting Nextion");
|
||||
//send_nextion_command("rest");
|
||||
#ifdef ARDUINO
|
||||
delay(1500);
|
||||
#elif defined(ESP_PLATFORM)
|
||||
//vTaskDelay(pdMS_TO_TICKS(1500));
|
||||
#endif
|
||||
|
||||
is_updating_ = false;
|
||||
if (!completed) ESP_LOGD(TAG, "Nextion TFT upload will try again");
|
||||
return completed;
|
||||
};
|
||||
|
||||
#ifdef ARDUINO // arduino # To do: Move to Nextion component on ESPHome
|
||||
size_t transfer_buffer_size_ = 0;
|
||||
uint8_t *transfer_buffer_{nullptr};
|
||||
auto upload_by_chunks_arduino = [&](HTTPClient *http, const std::string &url, int range_start) -> int
|
||||
{
|
||||
static const char *const TAG = "script.upload_tft.upload_by_chunks_arduino";
|
||||
int range_end;
|
||||
|
||||
if (range_start == 0 && transfer_buffer_size_ > 16384) { // Start small at the first run in case of a big skip
|
||||
range_end = 16384 - 1;
|
||||
} else {
|
||||
range_end = range_start + transfer_buffer_size_ - 1;
|
||||
}
|
||||
|
||||
if (range_end > tft_size_)
|
||||
range_end = tft_size_;
|
||||
|
||||
char range_header[64];
|
||||
sprintf(range_header, "bytes=%d-%d", range_start, range_end);
|
||||
|
||||
ESP_LOGD(TAG, "Requesting range: %s", range_header);
|
||||
|
||||
int tries = 1;
|
||||
int code;
|
||||
bool begin_status;
|
||||
while (tries <= 10) {
|
||||
begin_status = http->begin(url.c_str());
|
||||
|
||||
++tries;
|
||||
if (!begin_status) {
|
||||
ESP_LOGD(TAG, "Connection failed");
|
||||
delay(1000);
|
||||
continue;
|
||||
};
|
||||
|
||||
http->addHeader("Range", range_header);
|
||||
|
||||
code = http->GET();
|
||||
if (code == 200 || code == 206) {
|
||||
break;
|
||||
}
|
||||
ESP_LOGW(TAG, "HTTP Request failed; URL: %s; Error: %s, retries(%d/10)", url.c_str(),
|
||||
HTTPClient::errorToString(code).c_str(), tries);
|
||||
http->end();
|
||||
delay(1000);
|
||||
}
|
||||
|
||||
if (tries > 10) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
std::string recv_string;
|
||||
size_t size;
|
||||
int fetched = 0;
|
||||
int range = range_end - range_start;
|
||||
int write_len;
|
||||
|
||||
// fetch next segment from HTTP stream
|
||||
while (fetched < range) {
|
||||
size = http->getStreamPtr()->available();
|
||||
if (!size) {
|
||||
App.feed_wdt();
|
||||
delay(2);
|
||||
continue;
|
||||
}
|
||||
int c = http->getStreamPtr()->readBytes(
|
||||
&transfer_buffer_[fetched], ((size > transfer_buffer_size_) ? transfer_buffer_size_ : size));
|
||||
fetched += c;
|
||||
}
|
||||
http->end();
|
||||
ESP_LOGD(TAG, "Fetched %d bytes", fetched);
|
||||
|
||||
// upload fetched segments to the display in 4KB chunks
|
||||
for (int i = 0; i < range; i += 4096) {
|
||||
App.feed_wdt();
|
||||
write_len = content_length_ < 4096 ? content_length_ : 4096;
|
||||
id(tf_uart).write_array(&transfer_buffer_[i], write_len);
|
||||
content_length_ -= write_len;
|
||||
ESP_LOGD(TAG, "Uploaded %0.1f %%, remaining %d bytes, heap: %d",
|
||||
100.0 * (tft_size_ - content_length_) / tft_size_,
|
||||
content_length_, ESP.getFreeHeap());
|
||||
|
||||
if (!upload_first_chunk_sent_) {
|
||||
upload_first_chunk_sent_ = true;
|
||||
delay(500);
|
||||
}
|
||||
|
||||
recv_ret_string_(recv_string, 5000, true);
|
||||
if (recv_string[0] != 0x05) { // 0x05 == "ok"
|
||||
ESP_LOGD(TAG, "recv_string [%s]",
|
||||
format_hex_pretty(reinterpret_cast<const uint8_t *>(recv_string.data()), recv_string.size()).c_str());
|
||||
}
|
||||
|
||||
// handle partial upload request
|
||||
if (recv_string[0] == 0x08 && recv_string.size() == 5) {
|
||||
uint32_t result = 0;
|
||||
for (int j = 0; j < 4; ++j) {
|
||||
result += static_cast<uint8_t>(recv_string[j + 1]) << (8 * j);
|
||||
}
|
||||
if (result > 0) {
|
||||
ESP_LOGD(TAG, "Nextion reported new range %d", result);
|
||||
content_length_ = tft_size_ - result;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
recv_string.clear();
|
||||
}
|
||||
return range_end + 1;
|
||||
};
|
||||
auto upload_tft_ = [&](const std::string &url, unsigned int update_baud_rate_) -> bool
|
||||
{
|
||||
static const char *const TAG = "script.upload_tft.upload_tft_arduino";
|
||||
ESP_LOGD(TAG, "Nextion TFT upload requested");
|
||||
ESP_LOGD(TAG, " url: %s", url.c_str());
|
||||
ESP_LOGD(TAG, " baud_rate: %i", update_baud_rate_);
|
||||
|
||||
if (is_updating_) {
|
||||
ESP_LOGD(TAG, "Currently updating");
|
||||
return upload_end_(false);
|
||||
}
|
||||
|
||||
if (!network::is_connected()) {
|
||||
ESP_LOGD(TAG, "Network is not connected");
|
||||
return upload_end_(false);
|
||||
}
|
||||
|
||||
if (!disp1->is_setup()) {
|
||||
ESP_LOGD(TAG, "Setting Nextion protocol reparse mode to passive");
|
||||
exit_reparse->execute();
|
||||
delay_seconds_(5);
|
||||
}
|
||||
|
||||
is_updating_ = true;
|
||||
|
||||
HTTPClient http;
|
||||
http.setTimeout(15000); // Yes 15 seconds.... Helps 8266s along
|
||||
http.setFollowRedirects(HTTPC_STRICT_FOLLOW_REDIRECTS);
|
||||
bool begin_status = http.begin(url.c_str());
|
||||
if (!begin_status) {
|
||||
is_updating_ = false;
|
||||
ESP_LOGD(TAG, "Connection failed");
|
||||
ExternalRAMAllocator<uint8_t> allocator(ExternalRAMAllocator<uint8_t>::ALLOW_FAILURE);
|
||||
allocator.deallocate(transfer_buffer_, transfer_buffer_size_);
|
||||
return upload_end_(false);
|
||||
} else {
|
||||
ESP_LOGD(TAG, "Connected");
|
||||
}
|
||||
|
||||
http.addHeader("Range", "bytes=0-255");
|
||||
const char *header_names[] = {"Content-Range"};
|
||||
http.collectHeaders(header_names, 1);
|
||||
ESP_LOGD(TAG, "Requesting URL: %s", url.c_str());
|
||||
|
||||
http.setReuse(true);
|
||||
// try up to 5 times. DNS sometimes needs a second try or so
|
||||
int tries = 1;
|
||||
int code = http.GET();
|
||||
delay(100);
|
||||
|
||||
while (code != 200 && code != 206 && tries <= 5) {
|
||||
ESP_LOGW(TAG, "HTTP Request failed; URL: %s; Error: %s, retrying (%d/5)", url.c_str(),
|
||||
HTTPClient::errorToString(code).c_str(), tries);
|
||||
|
||||
delay(250);
|
||||
code = http.GET();
|
||||
++tries;
|
||||
}
|
||||
|
||||
if ((code != 200 && code != 206) || tries > 5) {
|
||||
return upload_end_(false);
|
||||
}
|
||||
|
||||
String content_range_string = http.header("Content-Range");
|
||||
content_range_string.remove(0, 12);
|
||||
content_length_ = content_range_string.toInt();
|
||||
tft_size_ = content_length_;
|
||||
http.end();
|
||||
|
||||
if (content_length_ < 4096) {
|
||||
ESP_LOGE(TAG, "Failed to get file size");
|
||||
return upload_end_(false);
|
||||
}
|
||||
|
||||
ESP_LOGD(TAG, "Updating Nextion");
|
||||
// The Nextion will ignore the update command if it is sleeping
|
||||
|
||||
char command[128];
|
||||
// Tells the Nextion the content length of the tft file and baud rate it will be sent at
|
||||
// Once the Nextion accepts the command it will wait until the file is successfully uploaded
|
||||
// If it fails for any reason a power cycle of the display will be needed
|
||||
sprintf(command, "whmi-wris %d,%d,1", content_length_, update_baud_rate_);
|
||||
|
||||
ESP_LOGD(TAG, "Clear serial receive buffer: %d", id(tf_uart).available());
|
||||
// Clear serial receive buffer
|
||||
uint8_t d;
|
||||
while (id(tf_uart).available()) {
|
||||
id(tf_uart).read_byte(&d);
|
||||
};
|
||||
|
||||
send_nextion_command(command);
|
||||
|
||||
if (update_baud_rate_ != id(tf_uart).get_baud_rate()) {
|
||||
set_baud_rate_(update_baud_rate_);
|
||||
//id(tf_uart).set_baud_rate(update_baud_rate_);
|
||||
//id(tf_uart).setup();
|
||||
//delay_seconds_(2);
|
||||
}
|
||||
|
||||
ESP_LOGD(TAG, "Waiting for upgrade response");
|
||||
std::string response;
|
||||
recv_ret_string_(response, 5000, true); // This can take some time to return
|
||||
// The Nextion display will, if it's ready to accept data, send a 0x05 byte.
|
||||
ESP_LOGD(TAG, "Upgrade response is [%s]",
|
||||
format_hex_pretty(reinterpret_cast<const uint8_t *>(response.data()), response.size()).c_str());
|
||||
|
||||
if (response.find(0x05) != std::string::npos) {
|
||||
ESP_LOGD(TAG, "Preparation for tft update done");
|
||||
} else {
|
||||
ESP_LOGD(TAG, "Preparation for tft update failed %d \"%s\"", response[0], response.c_str());
|
||||
return upload_end_(false);
|
||||
}
|
||||
|
||||
// Nextion wants 4096 bytes at a time. Make chunk_size a multiple of 4096
|
||||
uint32_t chunk_size = 8192;
|
||||
if (ESP.getFreeHeap() > 81920) { // Ensure some FreeHeap to other things and limit chunk size
|
||||
chunk_size = ESP.getFreeHeap() - 65536;
|
||||
chunk_size = int(chunk_size / 4096) * 4096;
|
||||
chunk_size = chunk_size > ${upload_tft_chunk_size_max} ? ${upload_tft_chunk_size_max} : chunk_size;
|
||||
} else if (ESP.getFreeHeap() < 32768) {
|
||||
chunk_size = 4096;
|
||||
}
|
||||
|
||||
if (transfer_buffer_ == nullptr) {
|
||||
ExternalRAMAllocator<uint8_t> allocator(ExternalRAMAllocator<uint8_t>::ALLOW_FAILURE);
|
||||
ESP_LOGD(TAG, "Allocating buffer size %d, Heap size is %" PRIu32, chunk_size, ESP.getFreeHeap());
|
||||
transfer_buffer_ = allocator.allocate(chunk_size);
|
||||
if (transfer_buffer_ == nullptr) { // Try a smaller size
|
||||
ESP_LOGD(TAG, "Could not allocate buffer size: %d trying 4096 instead", chunk_size);
|
||||
chunk_size = 4096;
|
||||
ESP_LOGD(TAG, "Allocating %d buffer", chunk_size);
|
||||
transfer_buffer_ = allocator.allocate(chunk_size);
|
||||
|
||||
if (!transfer_buffer_)
|
||||
{
|
||||
return upload_end_(false);
|
||||
}
|
||||
}
|
||||
|
||||
transfer_buffer_size_ = chunk_size;
|
||||
}
|
||||
|
||||
ESP_LOGD(TAG, "Updating tft from \"%s\" with a file size of %d using %zu chunksize, Heap Size %" PRIu32,
|
||||
url.c_str(), content_length_, transfer_buffer_size_, ESP.getFreeHeap());
|
||||
|
||||
int result = 0;
|
||||
while (content_length_ > 0) {
|
||||
result = upload_by_chunks_arduino(&http, url, result);
|
||||
if (result < 0) {
|
||||
ESP_LOGD(TAG, "Error updating Nextion!");
|
||||
return upload_end_(false);
|
||||
}
|
||||
App.feed_wdt();
|
||||
ESP_LOGD(TAG, "Heap Size %" PRIu32 ", Bytes left %d", ESP.getFreeHeap(), content_length_);
|
||||
}
|
||||
is_updating_ = false;
|
||||
ESP_LOGD(TAG, "Successfully updated Nextion!");
|
||||
|
||||
return upload_end_(true);
|
||||
};
|
||||
#elif defined(ESP_PLATFORM) // esp-idf # To do: Move to Nextion component on ESPHome
|
||||
auto upload_range_esp_idf_ = [&](const std::string &url, int range_start) -> int {
|
||||
static const char *const TAG = "script.upload_tft.upload_range_esp_idf_";
|
||||
ESP_LOGVV(TAG, "url: %s", url.c_str());
|
||||
uint range_size_ = tft_size_ - range_start;
|
||||
ESP_LOGVV(TAG, "tft_size_: %i", tft_size_);
|
||||
ESP_LOGV(TAG, "Available heap: %u", esp_get_free_heap_size());
|
||||
int range_end = (range_start == 0) ? std::min(tft_size_, 16383) : tft_size_;
|
||||
if (range_size_ <= 0 or range_end <= range_start) {
|
||||
ESP_LOGE(TAG, "Invalid range");
|
||||
ESP_LOGD(TAG, "Range start: %i", range_start);
|
||||
ESP_LOGD(TAG, "Range end: %i", range_end);
|
||||
ESP_LOGD(TAG, "Range size: %i", range_size_);
|
||||
return -1;
|
||||
}
|
||||
|
||||
esp_http_client_config_t config = {
|
||||
.url = url.c_str(),
|
||||
.cert_pem = nullptr,
|
||||
};
|
||||
esp_http_client_handle_t client = esp_http_client_init(&config);
|
||||
|
||||
char range_header[64];
|
||||
sprintf(range_header, "bytes=%d-%d", range_start, range_end);
|
||||
ESP_LOGV(TAG, "Requesting range: %s", range_header);
|
||||
esp_http_client_set_header(client, "Range", range_header);
|
||||
ESP_LOGVV(TAG, "Available heap: %u", esp_get_free_heap_size());
|
||||
ESP_LOGV(TAG, "Opening http connetion");
|
||||
esp_err_t err;
|
||||
if ((err = esp_http_client_open(client, 0)) != ESP_OK) {
|
||||
ESP_LOGE(TAG, "Failed to open HTTP connection: %s", esp_err_to_name(err));
|
||||
esp_http_client_cleanup(client);
|
||||
return -1;
|
||||
}
|
||||
|
||||
ESP_LOGV(TAG, "Fetch content length");
|
||||
int content_length = esp_http_client_fetch_headers(client);
|
||||
ESP_LOGV(TAG, "content_length = %d", content_length);
|
||||
if (content_length <= 0) {
|
||||
ESP_LOGE(TAG, "Failed to get content length: %d", content_length);
|
||||
esp_http_client_cleanup(client);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int total_read_len = 0, read_len;
|
||||
|
||||
ESP_LOGV(TAG, "Allocate buffer");
|
||||
uint8_t* buffer = new uint8_t[4096];
|
||||
std::string recv_string;
|
||||
if (buffer == nullptr) {
|
||||
ESP_LOGE(TAG, "Failed to allocate memory for buffer");
|
||||
ESP_LOGV(TAG, "Available heap: %u", esp_get_free_heap_size());
|
||||
} else {
|
||||
ESP_LOGV(TAG, "Memory for buffer allocated successfully");
|
||||
|
||||
while (true) {
|
||||
App.feed_wdt();
|
||||
ESP_LOGVV(TAG, "Available heap: %u", esp_get_free_heap_size());
|
||||
int read_len = esp_http_client_read(client, reinterpret_cast<char*>(buffer), 4096);
|
||||
ESP_LOGVV(TAG, "Read %d bytes from HTTP client, writing to UART", read_len);
|
||||
if (read_len > 0) {
|
||||
tf_uart->write_array(buffer, read_len);
|
||||
ESP_LOGVV(TAG, "Write to UART successful");
|
||||
recv_ret_string_(recv_string, 5000, true);
|
||||
content_length_ -= read_len;
|
||||
ESP_LOGD(TAG, "Uploaded %0.2f %%, remaining %d bytes, heap: %d",
|
||||
100.0 * (tft_size_ - content_length_) / tft_size_,
|
||||
content_length_, esp_get_free_heap_size());
|
||||
if (recv_string[0] != 0x05) { // 0x05 == "ok"
|
||||
ESP_LOGD(TAG, "recv_string [%s]",
|
||||
format_hex_pretty(reinterpret_cast<const uint8_t *>(recv_string.data()), recv_string.size()).c_str());
|
||||
}
|
||||
// handle partial upload request
|
||||
if (recv_string[0] == 0x08 && recv_string.size() == 5) {
|
||||
uint32_t result = 0;
|
||||
for (int j = 0; j < 4; ++j) {
|
||||
result += static_cast<uint8_t>(recv_string[j + 1]) << (8 * j);
|
||||
}
|
||||
if (result > 0) {
|
||||
ESP_LOGI(TAG, "Nextion reported new range %" PRIu32, result);
|
||||
content_length_ = tft_size_ - result;
|
||||
// Deallocate the buffer when done
|
||||
delete[] buffer;
|
||||
ESP_LOGVV(TAG, "Memory for buffer deallocated");
|
||||
esp_http_client_cleanup(client);
|
||||
esp_http_client_close(client);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
recv_string.clear();
|
||||
} else if (read_len == 0) {
|
||||
ESP_LOGV(TAG, "End of HTTP response reached");
|
||||
break; // Exit the loop if there is no more data to read
|
||||
} else {
|
||||
ESP_LOGE(TAG, "Failed to read from HTTP client, error code: %d", read_len);
|
||||
break; // Exit the loop on error
|
||||
}
|
||||
}
|
||||
|
||||
// Deallocate the buffer when done
|
||||
delete[] buffer;
|
||||
ESP_LOGVV(TAG, "Memory for buffer deallocated");
|
||||
}
|
||||
esp_http_client_cleanup(client);
|
||||
esp_http_client_close(client);
|
||||
return range_end + 1;
|
||||
};
|
||||
auto upload_tft_ = [&](const std::string &url, unsigned int update_baud_rate_) -> bool {
|
||||
static const char *const TAG = "script.upload_tft.upload_tft_esp_idf";
|
||||
ESP_LOGD(TAG, "Nextion TFT upload requested");
|
||||
ESP_LOGD(TAG, " url: %s", url.c_str());
|
||||
ESP_LOGD(TAG, " baud_rate: %i", update_baud_rate_);
|
||||
|
||||
if (is_updating_) {
|
||||
ESP_LOGW(TAG, "Currently updating");
|
||||
return upload_end_(false);
|
||||
}
|
||||
|
||||
if (!network::is_connected()) {
|
||||
ESP_LOGE(TAG, "Network is not connected");
|
||||
return upload_end_(false);
|
||||
}
|
||||
|
||||
if (!disp1->is_setup()) {
|
||||
ESP_LOGD(TAG, "Setting Nextion protocol reparse mode to passive");
|
||||
exit_reparse->execute();
|
||||
delay_seconds_(5);
|
||||
}
|
||||
|
||||
is_updating_ = true;
|
||||
|
||||
// Define the configuration for the HTTP client
|
||||
ESP_LOGV(TAG, "Establishing connection to HTTP server");
|
||||
ESP_LOGVV(TAG, "Available heap: %u", esp_get_free_heap_size());
|
||||
esp_http_client_config_t config = {
|
||||
.url = url.c_str(),
|
||||
.cert_pem = nullptr,
|
||||
.method = HTTP_METHOD_HEAD,
|
||||
.timeout_ms = 15000,
|
||||
};
|
||||
|
||||
// Initialize the HTTP client with the configuration
|
||||
ESP_LOGV(TAG, "Initializing HTTP client");
|
||||
ESP_LOGV(TAG, "Available heap: %u", esp_get_free_heap_size());
|
||||
esp_http_client_handle_t http = esp_http_client_init(&config);
|
||||
if (!http) {
|
||||
ESP_LOGE(TAG, "Failed to initialize HTTP client.");
|
||||
return upload_end_(false); // return -1 to indicate an error
|
||||
}
|
||||
|
||||
// Perform the HTTP request
|
||||
ESP_LOGV(TAG, "Check if the client could connect");
|
||||
ESP_LOGV(TAG, "Available heap: %u", esp_get_free_heap_size());
|
||||
esp_err_t err = esp_http_client_perform(http);
|
||||
if (err != ESP_OK) {
|
||||
ESP_LOGE(TAG, "HTTP request failed: %s", esp_err_to_name(err));
|
||||
esp_http_client_cleanup(http);
|
||||
return upload_end_(false);
|
||||
}
|
||||
|
||||
// Check the HTTP Status Code
|
||||
int status_code = esp_http_client_get_status_code(http);
|
||||
ESP_LOGV(TAG, "HTTP Status Code: %d", status_code);
|
||||
size_t tft_file_size = esp_http_client_get_content_length(http);
|
||||
ESP_LOGD(TAG, "TFT file size: %zu", tft_file_size);
|
||||
|
||||
if (tft_file_size < 4096) {
|
||||
ESP_LOGE(TAG, "File size check failed. Size: %zu", tft_file_size);
|
||||
esp_http_client_cleanup(http);
|
||||
return upload_end_(false);
|
||||
} else {
|
||||
ESP_LOGD(TAG, "File size check passed. Proceeding...");
|
||||
}
|
||||
content_length_ = tft_file_size;
|
||||
tft_size_ = tft_file_size;
|
||||
|
||||
ESP_LOGD(TAG, "Updating Nextion");
|
||||
// The Nextion will ignore the update command if it is sleeping
|
||||
|
||||
char command[128];
|
||||
// Tells the Nextion the content length of the tft file and baud rate it will be sent at
|
||||
// Once the Nextion accepts the command it will wait until the file is successfully uploaded
|
||||
// If it fails for any reason a power cycle of the display will be needed
|
||||
sprintf(command, "whmi-wris %d,%d,1", content_length_, update_baud_rate_);
|
||||
|
||||
// Clear serial receive buffer
|
||||
uint8_t d;
|
||||
while (id(tf_uart).available()) {
|
||||
id(tf_uart).read_byte(&d);
|
||||
};
|
||||
|
||||
send_nextion_command(command);
|
||||
|
||||
if (update_baud_rate_ != id(tf_uart).get_baud_rate()) {
|
||||
set_baud_rate_(update_baud_rate_);
|
||||
//id(tf_uart).set_baud_rate(update_baud_rate_);
|
||||
//id(tf_uart).setup();
|
||||
}
|
||||
|
||||
std::string response;
|
||||
ESP_LOGD(TAG, "Waiting for upgrade response");
|
||||
recv_ret_string_(response, 2000, true); // This can take some time to return
|
||||
|
||||
// The Nextion display will, if it's ready to accept data, send a 0x05 byte.
|
||||
ESP_LOGD(TAG, "Upgrade response is [%s]",
|
||||
format_hex_pretty(reinterpret_cast<const uint8_t *>(response.data()), response.size()).c_str());
|
||||
|
||||
if (response.find(0x05) != std::string::npos) {
|
||||
ESP_LOGV(TAG, "Preparation for tft update done");
|
||||
} else {
|
||||
ESP_LOGE(TAG, "Preparation for tft update failed %d \"%s\"", response[0], response.c_str());
|
||||
esp_http_client_cleanup(http);
|
||||
return upload_end_(false);
|
||||
}
|
||||
|
||||
ESP_LOGD(TAG, "Updating tft from \"%s\" with a file size of %d, Heap Size %" PRIu32,
|
||||
url.c_str(), content_length_, esp_get_free_heap_size());
|
||||
|
||||
ESP_LOGV(TAG, "Starting transfer by chunks loop");
|
||||
int result = 0;
|
||||
while (content_length_ > 0) {
|
||||
result = upload_range_esp_idf_(url.c_str(), result);
|
||||
if (result < 0) {
|
||||
ESP_LOGE(TAG, "Error updating Nextion!");
|
||||
esp_http_client_cleanup(http);
|
||||
return upload_end_(false);
|
||||
}
|
||||
App.feed_wdt();
|
||||
ESP_LOGV(TAG, "Heap Size %" PRIu32 ", Bytes left %d", esp_get_free_heap_size(), content_length_);
|
||||
}
|
||||
|
||||
is_updating_ = false;
|
||||
ESP_LOGD(TAG, "Successfully updated Nextion!");
|
||||
|
||||
ESP_LOGD(TAG, "Close HTTP connection");
|
||||
esp_http_client_close(http);
|
||||
esp_http_client_cleanup(http);
|
||||
return upload_end_(true);
|
||||
};
|
||||
#endif
|
||||
|
||||
ESP_LOGD(TAG, "Try #1 at 921600 bps");
|
||||
if (disp1->is_setup()) {
|
||||
display_wrapped_text->execute("confirm.body", "Try #1 at 921600 bps", 18);
|
||||
delay_seconds_(1);
|
||||
}
|
||||
if (upload_tft_(url, 921600)) id(restart_nspanel).press();
|
||||
ESP_LOGW(TAG, "Try #1 failed");
|
||||
if (disp1->is_setup()) display_wrapped_text->execute("confirm.body", "Try #1 failed", 18);
|
||||
delay_seconds_(5);
|
||||
ESP_LOGD(TAG, "Try #2 at 921600 bps");
|
||||
if (disp1->is_setup()) display_wrapped_text->execute("confirm.body", "Try #2 at 921600 bps", 18);
|
||||
if (upload_tft_(url, 921600)) id(restart_nspanel).press();
|
||||
ESP_LOGW(TAG, "Try #2 failed");
|
||||
if (disp1->is_setup()) display_wrapped_text->execute("confirm.body", "Try #2 failed", 18);
|
||||
delay_seconds_(5);
|
||||
ESP_LOGD(TAG, "Try #3 at 115200 bps");
|
||||
if (disp1->is_setup()) display_wrapped_text->execute("confirm.body", "Try #3 at 115200 bps", 18);
|
||||
if (upload_tft_(url, 115200)) id(restart_nspanel).press();
|
||||
ESP_LOGW(TAG, "Try #3 failed");
|
||||
if (disp1->is_setup()) {
|
||||
display_wrapped_text->execute("confirm.body", "Try #3 failed. Restarting display.", 18);
|
||||
delay_seconds_(3);
|
||||
}
|
||||
ESP_LOGD(TAG, "Turn off Nextion");
|
||||
id(screen_power).turn_off();
|
||||
delay_seconds_(2);
|
||||
ESP_LOGD(TAG, "Turn on Nextion");
|
||||
id(screen_power).turn_on();
|
||||
delay_seconds_(10);
|
||||
ESP_LOGD(TAG, "Try #4 at 115200 bps");
|
||||
if (disp1->is_setup()) {
|
||||
disp1->set_backlight_brightness(1);
|
||||
disp1->set_component_text_printf("confirm.title", "Upload TFT\\r%s", framework.c_str());
|
||||
display_wrapped_text->execute("confirm.body", "Try #4 at 115200 bps", 18);
|
||||
disp1->goto_page("confirm");
|
||||
disp1->hide_component("bt_close");
|
||||
disp1->hide_component("bt_accept");
|
||||
disp1->hide_component("bt_clear");
|
||||
disp1->hide_component("bt_close");
|
||||
delay_seconds_(1);
|
||||
}
|
||||
if (upload_tft_(url, 115200)) id(restart_nspanel).press();
|
||||
ESP_LOGE(TAG, "TFT upload failed");
|
||||
if (disp1->is_setup()) display_wrapped_text->execute("confirm.body", "TFT upload failed", 18);
|
||||
if (disp1->is_setup()) delay_seconds_(2);
|
||||
ESP_LOGD(TAG, "Turn off Nextion");
|
||||
if (disp1->is_setup()) display_wrapped_text->execute("confirm.body", "Restarting...", 18);
|
||||
if (disp1->is_setup()) delay_seconds_(2);
|
||||
id(screen_power).turn_off();
|
||||
delay_seconds_(2);
|
||||
ESP_LOGD(TAG, "Turn on Nextion");
|
||||
id(screen_power).turn_on();
|
||||
ESP_LOGD(TAG, "Restarting ESPHome");
|
||||
delay_seconds_(2);
|
||||
id(restart_nspanel).press();
|
||||
|
||||
ESP_LOGD(TAG, "Finished!");
|
||||
|
||||
select:
|
||||
- id: tft_list
|
||||
name: Update TFT display URL
|
||||
platform: template
|
||||
options:
|
||||
- "${nextion_update_url}"
|
||||
- "${nextion_blank_url}"
|
||||
initial_option: "${nextion_update_url}"
|
||||
optimistic: true
|
||||
restore_value: false
|
||||
internal: false
|
||||
entity_category: config
|
||||
icon: mdi:file-arrow-up-down-outline
|
||||
disabled_by_default: true
|
||||
set_action:
|
||||
- lambda: |-
|
||||
static const char *const TAG = "select.tft_list.set_action";
|
||||
ESP_LOGD(TAG, "Selected TFT URL: %s", x.c_str());
|
||||
92
advanced/esphome/nspanel_esphome_advanced.yaml
Normal file
92
advanced/esphome/nspanel_esphome_advanced.yaml
Normal file
@@ -0,0 +1,92 @@
|
||||
#####################################################################################################
|
||||
##### NSPANEL ESPHOME created by Blackymas - https://github.com/Blackymas/NSPanel_HA_Blueprint #####
|
||||
##### ESPHOME ADVANCED #####
|
||||
##### PLEASE only make changes if it is necessary and also the required knowledge is available. #####
|
||||
##### For normal use with the Blueprint, no changes are necessary. #####
|
||||
#####################################################################################################
|
||||
##### ATTENTION: This will add advanced elements to the core system and requires the core part. #####
|
||||
#####################################################################################################
|
||||
|
||||
button:
|
||||
##### EXIT REPARSE TFT DISPLAY #####
|
||||
- name: ${device_name} Exit reparse
|
||||
platform: template
|
||||
icon: mdi:file-sync
|
||||
id: tft_reparse_off
|
||||
entity_category: config
|
||||
on_press:
|
||||
- logger.log: "Button pressed: Exit reparse"
|
||||
- script.execute: exit_reparse
|
||||
|
||||
captive_portal:
|
||||
|
||||
esp32:
|
||||
framework:
|
||||
type: esp-idf
|
||||
|
||||
sensor:
|
||||
##### Uptime Sensors #####
|
||||
- name: ${device_name} Uptime seconds
|
||||
id: uptime_sec
|
||||
platform: uptime
|
||||
internal: true
|
||||
|
||||
- name: ${device_name} API uptime
|
||||
id: api_timestamp
|
||||
platform: template
|
||||
lambda: 'return id(time_provider).now().timestamp;'
|
||||
internal: false
|
||||
device_class: timestamp
|
||||
entity_category: diagnostic
|
||||
accuracy_decimals: 0
|
||||
update_interval: never
|
||||
|
||||
- name: ${device_name} Device uptime
|
||||
id: device_timestamp
|
||||
platform: template
|
||||
lambda: 'return (id(time_provider).now().timestamp - id(uptime_sec).state);'
|
||||
internal: false
|
||||
device_class: timestamp
|
||||
entity_category: diagnostic
|
||||
accuracy_decimals: 0
|
||||
update_interval: never
|
||||
|
||||
##### WIFI Signal stregth
|
||||
- name: ${device_name} RSSI
|
||||
platform: wifi_signal
|
||||
update_interval: 60s
|
||||
on_value:
|
||||
- script.execute:
|
||||
id: refresh_wifi_icon
|
||||
|
||||
text_sensor:
|
||||
##### ESPhome version used to compile the app #####
|
||||
- name: ${device_name} ESPhome Version
|
||||
platform: version
|
||||
disabled_by_default: true
|
||||
|
||||
- platform: wifi_info
|
||||
ip_address:
|
||||
name: ${device_name} IP
|
||||
disabled_by_default: true
|
||||
id: ip_address
|
||||
ssid:
|
||||
name: ${device_name} SSID
|
||||
disabled_by_default: true
|
||||
bssid:
|
||||
name: ${device_name} BSSID
|
||||
disabled_by_default: true
|
||||
|
||||
time:
|
||||
- id: !extend time_provider
|
||||
on_time_sync:
|
||||
then:
|
||||
- component.update: api_timestamp
|
||||
- component.update: device_timestamp
|
||||
|
||||
web_server:
|
||||
id: web_server_std
|
||||
port: 80
|
||||
auth:
|
||||
username: admin
|
||||
password: ${wifi_password}
|
||||
2795
advanced/esphome/nspanel_esphome_core.yaml
Normal file
2795
advanced/esphome/nspanel_esphome_core.yaml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
advanced/hmi/nspanel_blank.HMI
Normal file
BIN
advanced/hmi/nspanel_blank.HMI
Normal file
Binary file not shown.
6
advanced/hmi/nspanel_blank_code/Program.s.txt
Normal file
6
advanced/hmi/nspanel_blank_code/Program.s.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
Program.s
|
||||
//The following code is only run once when power on, and is generally used for global variable definition and power on initialization data
|
||||
dim=100//Configure backlight
|
||||
recmod=0//Serial data parsing mode:0-Passive mode;1-Active mode
|
||||
printh 00 00 00 ff ff ff 88 ff ff ff//Output power on information to serial port
|
||||
page 0 //Power on start page 0
|
||||
218
advanced/hmi/nspanel_blank_code/blank.txt
Normal file
218
advanced/hmi/nspanel_blank_code/blank.txt
Normal file
@@ -0,0 +1,218 @@
|
||||
Page blank
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
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
|
||||
printh 92
|
||||
prints "currentpage",0
|
||||
printh 00
|
||||
prints "blank",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
dim=100
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"blank\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"version\": \"2023.11.1\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
covx baud,baud_rate.txt,0,0
|
||||
baud_rate.txt+=" bps"
|
||||
|
||||
Touch Press Event
|
||||
dim=100
|
||||
tm0.en=1
|
||||
|
||||
Touch Release Event
|
||||
dim=100
|
||||
tm0.en=1
|
||||
|
||||
Variable (string) nspanelevent
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 150
|
||||
|
||||
Text file_name
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : nspanel_blank.tft
|
||||
Max. Text Size : 20
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
dim=100
|
||||
tm0.en=1
|
||||
|
||||
Touch Release Event
|
||||
dim=100
|
||||
tm0.en=1
|
||||
|
||||
Text baud_rate
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
dim=100
|
||||
tm0.en=1
|
||||
|
||||
Touch Release Event
|
||||
dim=100
|
||||
tm0.en=1
|
||||
|
||||
Text tft_version
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : TFT: v2023.11.0
|
||||
Max. Text Size : 20
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
dim=100
|
||||
tm0.en=1
|
||||
|
||||
Touch Release Event
|
||||
dim=100
|
||||
tm0.en=1
|
||||
|
||||
Text framework
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
dim=100
|
||||
tm0.en=1
|
||||
|
||||
Touch Release Event
|
||||
dim=100
|
||||
tm0.en=1
|
||||
|
||||
Text esp_version
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : ESP: Waiting...
|
||||
Max. Text Size : 20
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
dim=100
|
||||
tm0.en=1
|
||||
|
||||
Touch Release Event
|
||||
dim=100
|
||||
tm0.en=1
|
||||
|
||||
QR Code qr0
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
Text : https://github.com/Blackymas/NSPanel_HA_Blueprint/blob/main/docs/en/nspanel_blank.md#what-to-do-after-installing-nspanel_blanktft
|
||||
Max. Text Size : 150
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
dim=100
|
||||
tm0.en=1
|
||||
|
||||
Touch Release Event
|
||||
dim=100
|
||||
tm0.en=1
|
||||
|
||||
Timer tm0
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 65500
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim>50)
|
||||
{
|
||||
dim=50
|
||||
}else if(dim>25)
|
||||
{
|
||||
dim=25
|
||||
}else if(dim>10)
|
||||
{
|
||||
dim=10
|
||||
}else
|
||||
{
|
||||
dim=0
|
||||
tm0.en=0
|
||||
}
|
||||
|
||||
Timer tm_esphome
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Period (ms): 30000
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(baud==115200)
|
||||
{
|
||||
bauds=921600
|
||||
}else
|
||||
{
|
||||
bauds=115200
|
||||
}
|
||||
covx baud,baud_rate.txt,0,0
|
||||
baud_rate.txt+=" bps"
|
||||
|
||||
Timer tm_pageid
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Period (ms): 2500
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
nspanelevent.txt="{\"page\": \"blank\", \"event\": \"pagechanged\", \"version\": \""+tft_version.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints nspanelevent.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
21
advanced/hmi/nspanel_blank_code/page0.txt
Normal file
21
advanced/hmi/nspanel_blank_code/page0.txt
Normal file
@@ -0,0 +1,21 @@
|
||||
Page page0
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
|
||||
QR Code qr0
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
Text : https://github.com/Blackymas/NSPanel_HA_Blueprint
|
||||
Max. Text Size : 50
|
||||
|
||||
31
advanced/hmi/nspanel_blank_code/screensaver.txt
Normal file
31
advanced/hmi/nspanel_blank_code/screensaver.txt
Normal file
@@ -0,0 +1,31 @@
|
||||
Page screensaver
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
printh 92
|
||||
prints "currentpage",0
|
||||
printh 00
|
||||
prints "blank-screensaver",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
dim=0
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"blank-screensaver\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"version\": \"2023.09.19\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Touch Press Event
|
||||
page blank
|
||||
|
||||
BIN
advanced/hmi/nspanel_eu.HMI
Normal file
BIN
advanced/hmi/nspanel_eu.HMI
Normal file
Binary file not shown.
26
advanced/hmi/nspanel_eu_code/Program.s.txt
Normal file
26
advanced/hmi/nspanel_eu_code/Program.s.txt
Normal file
@@ -0,0 +1,26 @@
|
||||
Program.s
|
||||
//The following code is only run once when power on, and is generally used for global variable definition and power on initialization data
|
||||
int sys0=0,sys1=0,sys2=0,swipex=0,swipey=0,swipex2=0,swipey2=0,swipec=0,swipec2=0,swipedx=100,swipedy=100 //At present, the definition of global variable only supports 4-byte signed integer (int), and other types of global quantity declaration are not supported. If you want to use string type, you can use variable control in the page to implement
|
||||
int r=0,g=0,b=0
|
||||
int h=0,s=0,v=0
|
||||
int p=0,q=0,t=0,f=0
|
||||
int dimdelta=0
|
||||
int api=0 // 0 = disconnected from HA, 1 = connected to HA
|
||||
int is_alarm=0,is_entities=0,is_qrcode=0,is_notification=0
|
||||
int brightness=100,brightness_dim=40
|
||||
int display_mode=1 // 1 = EU, 2 = US, 3 = US landscape
|
||||
//bauds=115200//Configure baudrate
|
||||
recmod=0//Serial data parsing mode:0-Passive mode;1-Active mode
|
||||
randset 0,65535//used for touchevent sensor
|
||||
printh 00 00 00 ff ff ff 88 ff ff ff//Output power on information to serial port
|
||||
if(display_mode==1)
|
||||
{
|
||||
lcd_dev fffb 0002 0000 0020// Fix touch offset for EU Version
|
||||
}
|
||||
printh 92
|
||||
prints "currentpage",0
|
||||
printh 00
|
||||
prints "",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
page 8//Power on start page boot
|
||||
447
advanced/hmi/nspanel_eu_code/alarm.txt
Normal file
447
advanced/hmi/nspanel_eu_code/alarm.txt
Normal file
@@ -0,0 +1,447 @@
|
||||
Page alarm
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
vis bt_home,0
|
||||
vis bt_away,0
|
||||
vis bt_night,0
|
||||
vis bt_vacat,0
|
||||
vis bt_bypass,0
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 255
|
||||
|
||||
Variable (string) back_page
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Text : home
|
||||
Max. Text Size: 15
|
||||
|
||||
Variable (string) code_format
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 15
|
||||
|
||||
Variable (string) code_arm_req
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 1
|
||||
|
||||
Text page_label
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Alarm Control Panel
|
||||
Max. Text Size : 25
|
||||
|
||||
Text icon_state
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text bt_home_text
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Home
|
||||
Max. Text Size : 22
|
||||
|
||||
Text bt_away_text
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Away
|
||||
Max. Text Size : 22
|
||||
|
||||
Text bt_night_text
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Night
|
||||
Max. Text Size : 22
|
||||
|
||||
Text bt_vacat_text
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Vacation
|
||||
Max. Text Size : 22
|
||||
|
||||
Text bt_bypass_text
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Bypass
|
||||
Max. Text Size : 22
|
||||
|
||||
Text bt_disarm_text
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Disarm
|
||||
Max. Text Size : 22
|
||||
|
||||
Text bt_home_icon
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text bt_away_icon
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text bt_night_icon
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text bt_vacat_icon
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text bt_bypass_icon
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text bt_disarm_icon
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Picture bt_home_pic
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture bt_away_pic
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture bt_night_pic
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture bt_vacat_pic
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture bt_bypass_pic
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture bt_disarm_pic
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 31
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
if(back_page.txt=="buttonpage01")
|
||||
{
|
||||
page buttonpage01
|
||||
}else if(back_page.txt=="buttonpage02")
|
||||
{
|
||||
page buttonpage02
|
||||
}else if(back_page.txt=="buttonpage03")
|
||||
{
|
||||
page buttonpage03
|
||||
}else if(back_page.txt=="buttonpage04")
|
||||
{
|
||||
page buttonpage04
|
||||
}else
|
||||
{
|
||||
page home
|
||||
}
|
||||
|
||||
Hotspot bt_home
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
bt_home_pic.pic=44
|
||||
bt_home_text.bco=65024
|
||||
bt_home_text.pco=0
|
||||
bt_home_icon.bco=65024
|
||||
bt_home_icon.pco=0
|
||||
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"alarm\", \"key\": \"home\", \"value\": \"click\", \"mui\": \""+bt_home_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Hotspot bt_away
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
bt_away_pic.pic=44
|
||||
bt_away_text.bco=65024
|
||||
bt_away_text.pco=0
|
||||
bt_away_icon.bco=65024
|
||||
bt_away_icon.pco=0
|
||||
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"alarm\", \"key\": \"away\", \"value\": \"click\", \"mui\": \""+bt_away_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Hotspot bt_night
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
bt_night_pic.pic=44
|
||||
bt_night_text.bco=65024
|
||||
bt_night_text.pco=0
|
||||
bt_night_icon.bco=65024
|
||||
bt_night_icon.pco=0
|
||||
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"alarm\", \"key\": \"night\", \"value\": \"click\", \"mui\": \""+bt_night_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Hotspot bt_vacat
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
bt_vacat_pic.pic=44
|
||||
bt_vacat_text.bco=65024
|
||||
bt_vacat_text.pco=0
|
||||
bt_vacat_icon.bco=65024
|
||||
bt_vacat_icon.pco=0
|
||||
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"alarm\", \"key\": \"vacation\", \"value\": \"click\", \"mui\": \""+bt_vacat_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Hotspot bt_bypass
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
bt_bypass_pic.pic=44
|
||||
bt_bypass_text.bco=65024
|
||||
bt_bypass_text.pco=0
|
||||
bt_bypass_icon.bco=65024
|
||||
bt_bypass_icon.pco=0
|
||||
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"alarm\", \"key\": \"bypass\", \"value\": \"click\", \"mui\": \""+bt_bypass_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Hotspot bt_disarm
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
bt_disarm_pic.pic=44
|
||||
bt_disarm_text.bco=65024
|
||||
bt_disarm_text.pco=0
|
||||
bt_disarm_icon.bco=65024
|
||||
bt_disarm_icon.pco=0
|
||||
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"alarm\", \"key\": \"disarm\", \"value\": \"click\", \"mui\": \""+bt_disarm_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 32
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
273
advanced/hmi/nspanel_eu_code/boot.txt
Normal file
273
advanced/hmi/nspanel_eu_code/boot.txt
Normal file
@@ -0,0 +1,273 @@
|
||||
Page boot
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
sendme
|
||||
dim=0
|
||||
vis bt_reboot,0
|
||||
covx baud,baud_rate.txt,0,0
|
||||
baud_rate.txt+=" bps"
|
||||
covx display_mode,aux2.txt,0,0
|
||||
nspanelevent.txt="{\"page\": \"boot\", \"event\": \"pagechanged\", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints nspanelevent.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Page Exit Event
|
||||
dim=0
|
||||
|
||||
Variable (int32) counter
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (string) aux1
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (string) nspanelevent
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 150
|
||||
|
||||
Variable (string) aux2
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Text ip_addr
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Initializing...
|
||||
Max. Text Size : 15
|
||||
|
||||
Text t0
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Please wait...
|
||||
Max. Text Size : 15
|
||||
|
||||
Text t1
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : The process can take several seconds!
|
||||
Max. Text Size : 50
|
||||
|
||||
Text tft_label
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : TFT:
|
||||
Max. Text Size : 4
|
||||
|
||||
Text esph_label
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : ESPHome:
|
||||
Max. Text Size : 8
|
||||
|
||||
Text bluep_label
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Blueprint:
|
||||
Max. Text Size : 10
|
||||
|
||||
Text tft_version
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : 4.2dev
|
||||
Max. Text Size : 9
|
||||
|
||||
Text esph_version
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 9
|
||||
|
||||
Text bluep_version
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 9
|
||||
|
||||
Text baud_rate
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text framework
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Dual-state Button bt_reboot
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : Reboot
|
||||
Max. Text Size : 6
|
||||
|
||||
Timer timer
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Period (ms): 65534
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
counter.val++
|
||||
covx counter.val,aux1.txt,0,0
|
||||
covx display_mode,aux2.txt,0,0
|
||||
nspanelevent.txt="{\"page\": \"boot\", \"event\": \"timeout\", \"value\": "+aux1.txt+", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}"
|
||||
bluep_version.txt="Retry: "+aux1.txt
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
prints nspanelevent.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<100)
|
||||
{
|
||||
dimdelta=100-dim
|
||||
dimdelta/=25
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
Timer tm_esphome
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Period (ms): 30000
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(baud==115200)
|
||||
{
|
||||
bauds=921600
|
||||
}else
|
||||
{
|
||||
bauds=115200
|
||||
}
|
||||
covx baud,baud_rate.txt,0,0
|
||||
baud_rate.txt+=" bps"
|
||||
|
||||
Timer tm_pageid
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Period (ms): 2500
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
covx display_mode,aux2.txt,0,0
|
||||
nspanelevent.txt="{\"page\": \"boot\", \"event\": \"pagechanged\", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints nspanelevent.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
782
advanced/hmi/nspanel_eu_code/buttonpage01.txt
Normal file
782
advanced/hmi/nspanel_eu_code/buttonpage01.txt
Normal file
@@ -0,0 +1,782 @@
|
||||
Page buttonpage01
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
vis 255,0
|
||||
vis button_back,1
|
||||
vis page_index,1
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 44
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 100
|
||||
|
||||
Variable (string) click_comp
|
||||
Attributes
|
||||
ID : 47
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 8
|
||||
|
||||
Variable (string) page_name
|
||||
Attributes
|
||||
ID : 49
|
||||
Scope : local
|
||||
Text : buttonpage01
|
||||
Max. Text Size: 12
|
||||
|
||||
Variable (int32) confirm
|
||||
Attributes
|
||||
ID : 51
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Text button01text
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button01bri
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button02text
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button02bri
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button03text
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button03bri
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button04text
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button04bri
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button05text
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button05bri
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button06text
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button06bri
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button07text
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button07bri
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button08text
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button08bri
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text bpage01_label
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text button01icon
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button02icon
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button03icon
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button04icon
|
||||
Attributes
|
||||
ID : 31
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button05icon
|
||||
Attributes
|
||||
ID : 32
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button06icon
|
||||
Attributes
|
||||
ID : 33
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button07icon
|
||||
Attributes
|
||||
ID : 34
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button08icon
|
||||
Attributes
|
||||
ID : 35
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 45
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Picture button01pic
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button02pic
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button03pic
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button04pic
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button05pic
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button06pic
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button07pic
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button08pic
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 46
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Hotspot button01
|
||||
Attributes
|
||||
ID : 36
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button01"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&1
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button01text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button02
|
||||
Attributes
|
||||
ID : 37
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button02"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&2
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button02text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button03
|
||||
Attributes
|
||||
ID : 38
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button03"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&4
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button03text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button04
|
||||
Attributes
|
||||
ID : 39
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button04"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&8
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button04text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button05
|
||||
Attributes
|
||||
ID : 40
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button05"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&16
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button05text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button06
|
||||
Attributes
|
||||
ID : 41
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button06"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&32
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button06text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button07
|
||||
Attributes
|
||||
ID : 42
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button07"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&64
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button07text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button08
|
||||
Attributes
|
||||
ID : 43
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button08"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&128
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button08text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer click_timer
|
||||
Attributes
|
||||
ID : 48
|
||||
Scope : local
|
||||
Period (ms): 800
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
lastclick.txt="{\"page\": \"buttonpage01\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
click_timer.en=0
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 50
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page home
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page buttonpage02
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
782
advanced/hmi/nspanel_eu_code/buttonpage02.txt
Normal file
782
advanced/hmi/nspanel_eu_code/buttonpage02.txt
Normal file
@@ -0,0 +1,782 @@
|
||||
Page buttonpage02
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
vis 255,0
|
||||
vis button_back,1
|
||||
vis page_index,1
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 44
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 100
|
||||
|
||||
Variable (string) click_comp
|
||||
Attributes
|
||||
ID : 47
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 8
|
||||
|
||||
Variable (string) page_name
|
||||
Attributes
|
||||
ID : 49
|
||||
Scope : local
|
||||
Text : buttonpage02
|
||||
Max. Text Size: 12
|
||||
|
||||
Variable (int32) confirm
|
||||
Attributes
|
||||
ID : 51
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Text button01text
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button01bri
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button02text
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button02bri
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button03text
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button03bri
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button04text
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button04bri
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button05text
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button05bri
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button06text
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button06bri
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button07text
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button07bri
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button08text
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button08bri
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text bpage02_label
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text button01icon
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button02icon
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button03icon
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button04icon
|
||||
Attributes
|
||||
ID : 31
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button05icon
|
||||
Attributes
|
||||
ID : 32
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button06icon
|
||||
Attributes
|
||||
ID : 33
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button07icon
|
||||
Attributes
|
||||
ID : 34
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button08icon
|
||||
Attributes
|
||||
ID : 35
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 46
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Picture button01pic
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button02pic
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button03pic
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button04pic
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button05pic
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button06pic
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button07pic
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button08pic
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 45
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Hotspot button01
|
||||
Attributes
|
||||
ID : 36
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button01"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&1
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button01text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button02
|
||||
Attributes
|
||||
ID : 37
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button02"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&2
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button02text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button03
|
||||
Attributes
|
||||
ID : 38
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button03"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&4
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button03text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button04
|
||||
Attributes
|
||||
ID : 39
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button04"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&8
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button04text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button05
|
||||
Attributes
|
||||
ID : 40
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button05"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&16
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button05text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button06
|
||||
Attributes
|
||||
ID : 41
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button06"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&32
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button06text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button07
|
||||
Attributes
|
||||
ID : 42
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button07"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&64
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button07text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button08
|
||||
Attributes
|
||||
ID : 43
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button08"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&128
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button08text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer click_timer
|
||||
Attributes
|
||||
ID : 48
|
||||
Scope : local
|
||||
Period (ms): 800
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
lastclick.txt="{\"page\": \"buttonpage02\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
click_timer.en=0
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 50
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page buttonpage01
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page buttonpage03
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
page home
|
||||
}
|
||||
}
|
||||
|
||||
782
advanced/hmi/nspanel_eu_code/buttonpage03.txt
Normal file
782
advanced/hmi/nspanel_eu_code/buttonpage03.txt
Normal file
@@ -0,0 +1,782 @@
|
||||
Page buttonpage03
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
vis 255,0
|
||||
vis button_back,1
|
||||
vis page_index,1
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 44
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 100
|
||||
|
||||
Variable (string) click_comp
|
||||
Attributes
|
||||
ID : 47
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 8
|
||||
|
||||
Variable (string) page_name
|
||||
Attributes
|
||||
ID : 49
|
||||
Scope : local
|
||||
Text : buttonpage03
|
||||
Max. Text Size: 12
|
||||
|
||||
Variable (int32) confirm
|
||||
Attributes
|
||||
ID : 51
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Text button01text
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button01bri
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button02text
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button02bri
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button03text
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button03bri
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button04text
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button04bri
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button05text
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button05bri
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button06text
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button06bri
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button07text
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button07bri
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button08text
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button08bri
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text bpage03_label
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text button01icon
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button02icon
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button03icon
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button04icon
|
||||
Attributes
|
||||
ID : 31
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button05icon
|
||||
Attributes
|
||||
ID : 32
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button06icon
|
||||
Attributes
|
||||
ID : 33
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button07icon
|
||||
Attributes
|
||||
ID : 34
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button08icon
|
||||
Attributes
|
||||
ID : 35
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 46
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Picture button01pic
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button02pic
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button03pic
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button04pic
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button05pic
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button06pic
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button07pic
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button08pic
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 45
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Hotspot button01
|
||||
Attributes
|
||||
ID : 36
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button01"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&1
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button01text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button02
|
||||
Attributes
|
||||
ID : 37
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button02"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&2
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button02text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button03
|
||||
Attributes
|
||||
ID : 38
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button03"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&4
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button03text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button04
|
||||
Attributes
|
||||
ID : 39
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button04"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&8
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button04text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button05
|
||||
Attributes
|
||||
ID : 40
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button05"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&16
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button05text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button06
|
||||
Attributes
|
||||
ID : 41
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button06"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&32
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button06text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button07
|
||||
Attributes
|
||||
ID : 42
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button07"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&64
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button07text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button08
|
||||
Attributes
|
||||
ID : 43
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button08"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&128
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button08text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer click_timer
|
||||
Attributes
|
||||
ID : 48
|
||||
Scope : local
|
||||
Period (ms): 800
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
lastclick.txt="{\"page\": \"buttonpage03\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
click_timer.en=0
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 50
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page buttonpage02
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page buttonpage04
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
page home
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
782
advanced/hmi/nspanel_eu_code/buttonpage04.txt
Normal file
782
advanced/hmi/nspanel_eu_code/buttonpage04.txt
Normal file
@@ -0,0 +1,782 @@
|
||||
Page buttonpage04
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
vis 255,0
|
||||
vis button_back,1
|
||||
vis page_index,1
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 44
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 100
|
||||
|
||||
Variable (string) click_comp
|
||||
Attributes
|
||||
ID : 47
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 8
|
||||
|
||||
Variable (string) page_name
|
||||
Attributes
|
||||
ID : 49
|
||||
Scope : local
|
||||
Text : buttonpage04
|
||||
Max. Text Size: 12
|
||||
|
||||
Variable (int32) confirm
|
||||
Attributes
|
||||
ID : 51
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Text button01text
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button01bri
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button02text
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button02bri
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button03text
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button03bri
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button04text
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button04bri
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button05text
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button05bri
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button06text
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button06bri
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button07text
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button07bri
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button08text
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button08bri
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text bpage04_label
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text button01icon
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button02icon
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button03icon
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button04icon
|
||||
Attributes
|
||||
ID : 31
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button05icon
|
||||
Attributes
|
||||
ID : 32
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button06icon
|
||||
Attributes
|
||||
ID : 33
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button07icon
|
||||
Attributes
|
||||
ID : 34
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button08icon
|
||||
Attributes
|
||||
ID : 35
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 46
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Picture button01pic
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button02pic
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button03pic
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button04pic
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button05pic
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button06pic
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button07pic
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button08pic
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 45
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Hotspot button01
|
||||
Attributes
|
||||
ID : 36
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button01"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&1
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button01text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button02
|
||||
Attributes
|
||||
ID : 37
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button02"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&2
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button02text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button03
|
||||
Attributes
|
||||
ID : 38
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button03"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&4
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button03text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button04
|
||||
Attributes
|
||||
ID : 39
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button04"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&8
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button04text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button05
|
||||
Attributes
|
||||
ID : 40
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button05"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&16
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button05text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button06
|
||||
Attributes
|
||||
ID : 41
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button06"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&32
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button06text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button07
|
||||
Attributes
|
||||
ID : 42
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button07"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&64
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button07text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button08
|
||||
Attributes
|
||||
ID : 43
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button08"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&128
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button08text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer click_timer
|
||||
Attributes
|
||||
ID : 48
|
||||
Scope : local
|
||||
Period (ms): 800
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
lastclick.txt="{\"page\": \"buttonpage04\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
click_timer.en=0
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 50
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page buttonpage03
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page home
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
933
advanced/hmi/nspanel_eu_code/climate.txt
Normal file
933
advanced/hmi/nspanel_eu_code/climate.txt
Normal file
@@ -0,0 +1,933 @@
|
||||
Page climate
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==1||embedded.val==1)
|
||||
{
|
||||
sendme
|
||||
vis target_icon,0
|
||||
vis target_high,0
|
||||
vis target_low,0
|
||||
vis current_temp,0
|
||||
vis current_icon,0
|
||||
vis slider_high,0
|
||||
vis slider_low,0
|
||||
vis button01,0
|
||||
vis button02,0
|
||||
vis button03,0
|
||||
vis button04,0
|
||||
vis button05,0
|
||||
vis button06,0
|
||||
vis button07,0
|
||||
}else
|
||||
{
|
||||
page home
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Page Exit Event
|
||||
if(timer01.en==1)
|
||||
{
|
||||
timer01.en=0
|
||||
covx temp_number.val,va1.txt,0,0
|
||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climate_position\", \"value\": "+va1.txt+"}"
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
prints climatesetting.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Variable (string) va1
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (string) climatesetting
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 255
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 255
|
||||
|
||||
Variable (int32) temp_offset
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (int32) temp_step
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (int32) temp_number
|
||||
Attributes
|
||||
ID : 34
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (int32) va0
|
||||
Attributes
|
||||
ID : 35
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (string) back_page
|
||||
Attributes
|
||||
ID : 36
|
||||
Scope : local
|
||||
Text : home
|
||||
Max. Text Size: 15
|
||||
|
||||
Variable (int32) embedded
|
||||
Attributes
|
||||
ID : 37
|
||||
Scope: global
|
||||
Value: 0
|
||||
|
||||
Variable (string) va2
|
||||
Attributes
|
||||
ID : 38
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (string) click_comp
|
||||
Attributes
|
||||
ID : 40
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 8
|
||||
|
||||
Variable (int32) single_slider
|
||||
Attributes
|
||||
ID : 44
|
||||
Scope: local
|
||||
Value: 1
|
||||
|
||||
Variable (int32) active_slider
|
||||
Attributes
|
||||
ID : 45
|
||||
Scope: local
|
||||
Value: 1
|
||||
|
||||
Text current_temp
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text page_label
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 100
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text current_icon
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text target_icon
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text value01_icon
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text value01
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 6
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text value02_icon
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text value02
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 6
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text value03_icon
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text value03
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 6
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text value04_icon
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text value04
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 6
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text button01
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
covx embedded.val,va2.txt,0,0
|
||||
lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"auto\", \"embedded\": "+va2.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text button02
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
covx embedded.val,va2.txt,0,0
|
||||
lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"heat_cool\", \"embedded\": "+va2.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text button03
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
covx embedded.val,va2.txt,0,0
|
||||
lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"heat\", \"embedded\": "+va2.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text button04
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
covx embedded.val,va2.txt,0,0
|
||||
lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"cool\", \"embedded\": "+va2.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text button05
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
covx embedded.val,va2.txt,0,0
|
||||
lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"dry\", \"embedded\": "+va2.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text button06
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
covx embedded.val,va2.txt,0,0
|
||||
lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"fan_only\", \"embedded\": "+va2.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text button07
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
covx embedded.val,va2.txt,0,0
|
||||
lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"off\", \"embedded\": "+va2.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text button08
|
||||
Attributes
|
||||
ID : 31
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
click_comp.txt="button08"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
lastclick.txt="{\"page\": \"climate\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Text button09
|
||||
Attributes
|
||||
ID : 32
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
click_comp.txt="button09"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
lastclick.txt="{\"page\": \"climate\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Text target_high
|
||||
Attributes
|
||||
ID : 33
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text target_low
|
||||
Attributes
|
||||
ID : 46
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Slider slider_high
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
Position : 20
|
||||
Upper range limit: 40
|
||||
Lower range limit: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
temp_number.val=slider_high.val*temp_step.val
|
||||
temp_number.val+=temp_offset.val
|
||||
va0.val=temp_number.val/10
|
||||
covx va0.val,target_high.txt,0,0
|
||||
va0.val=temp_number.val%10
|
||||
covx va0.val,va1.txt,0,0
|
||||
target_high.txt+="."+va1.txt
|
||||
timer01.en=1
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Slider slider_low
|
||||
Attributes
|
||||
ID : 43
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
Position : 20
|
||||
Upper range limit: 40
|
||||
Lower range limit: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
temp_number.val=slider_high.val*temp_step.val
|
||||
temp_number.val+=temp_offset.val
|
||||
va0.val=temp_number.val/10
|
||||
covx va0.val,target_high.txt,0,0
|
||||
va0.val=temp_number.val%10
|
||||
covx va0.val,va1.txt,0,0
|
||||
target_high.txt+="."+va1.txt
|
||||
timer01.en=1
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 39
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
if(back_page.txt=="buttonpage01")
|
||||
{
|
||||
page buttonpage01
|
||||
}else if(back_page.txt=="buttonpage02")
|
||||
{
|
||||
page buttonpage02
|
||||
}else if(back_page.txt=="buttonpage03")
|
||||
{
|
||||
page buttonpage03
|
||||
}else if(back_page.txt=="buttonpage04")
|
||||
{
|
||||
page buttonpage04
|
||||
}else
|
||||
{
|
||||
page home
|
||||
}
|
||||
|
||||
Hotspot decrease_temp
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
if(slider_high.val>0)
|
||||
{
|
||||
slider_high.val--
|
||||
temp_number.val=slider_high.val*temp_step.val
|
||||
temp_number.val+=temp_offset.val
|
||||
va0.val=temp_number.val/10
|
||||
covx va0.val,target_high.txt,0,0
|
||||
va0.val=temp_number.val%10
|
||||
covx va0.val,va1.txt,0,0
|
||||
target_high.txt+="."+va1.txt
|
||||
}
|
||||
|
||||
Touch Release Event
|
||||
timer01.en=1
|
||||
|
||||
Hotspot increase_temp
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
if(slider_high.val<slider_high.maxval)
|
||||
{
|
||||
slider_high.val++
|
||||
temp_number.val=slider_high.val*temp_step.val
|
||||
temp_number.val+=temp_offset.val
|
||||
va0.val=temp_number.val/10
|
||||
covx va0.val,target_high.txt,0,0
|
||||
va0.val=temp_number.val%10
|
||||
covx va0.val,va1.txt,0,0
|
||||
target_high.txt+="."+va1.txt
|
||||
}
|
||||
|
||||
Touch Release Event
|
||||
timer01.en=1
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer timer01
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Period (ms): 1000
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
timer01.en=0
|
||||
covx embedded.val,va2.txt,0,0
|
||||
covx temp_number.val,va1.txt,0,0
|
||||
climatesetting.txt="{\"page\": \"climate\", \"key\": \"set_temperature\", \"value\": "+va1.txt+", \"embedded\": "+va2.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints climatesetting.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Timer click_timer
|
||||
Attributes
|
||||
ID : 41
|
||||
Scope : local
|
||||
Period (ms): 800
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
lastclick.txt="{\"page\": \"climate\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
click_timer.en=0
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 42
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
209
advanced/hmi/nspanel_eu_code/confirm.txt
Normal file
209
advanced/hmi/nspanel_eu_code/confirm.txt
Normal file
@@ -0,0 +1,209 @@
|
||||
Page confirm
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Variable (int32) page_id
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope: global
|
||||
Value: 0
|
||||
|
||||
Variable (string) aux
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 255
|
||||
|
||||
Variable (string) page_name
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : global
|
||||
Text :
|
||||
Max. Text Size: 12
|
||||
|
||||
Variable (string) component
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : global
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Text t0
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text title
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Please confirm
|
||||
Max. Text Size : 30
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text body
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Please confirm
|
||||
Max. Text Size : 22
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Button bclose
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
page page_id.val
|
||||
|
||||
Button bt_accept
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
aux.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+component.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints aux.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
page page_id.val
|
||||
|
||||
Button bt_clear
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
page page_id.val
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
238
advanced/hmi/nspanel_eu_code/cover.txt
Normal file
238
advanced/hmi/nspanel_eu_code/cover.txt
Normal file
@@ -0,0 +1,238 @@
|
||||
Page cover
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Variable (string) va1
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Text : newtxt
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (string) coversetting
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 255
|
||||
|
||||
Variable (string) back_page
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Text : home
|
||||
Max. Text Size: 15
|
||||
|
||||
Text battery_value
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text cover_value
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_label
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 25
|
||||
|
||||
Text icon_state
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text battery_icon
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Slider coverslider
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
Position : 0
|
||||
Upper range limit: 100
|
||||
Lower range limit: 0
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
covx coverslider.val,va1.txt,0,0
|
||||
cover_value.txt=va1.txt+"%"
|
||||
coversetting.txt="{\"page\": \"cover\", \"key\": \"position\", \"value\": "+va1.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints coversetting.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Button cover_open
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"cover\", \"key\": \"open_cover\", \"value\": \"press\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Button cover_close
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"cover\", \"key\": \"close_cover\", \"value\": \"press\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Button cover_stop
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"cover\", \"key\": \"stop_cover\", \"value\": \"press\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
if(back_page.txt=="buttonpage01")
|
||||
{
|
||||
page buttonpage01
|
||||
}else if(back_page.txt=="buttonpage02")
|
||||
{
|
||||
page buttonpage02
|
||||
}else if(back_page.txt=="buttonpage03")
|
||||
{
|
||||
page buttonpage03
|
||||
}else if(back_page.txt=="buttonpage04")
|
||||
{
|
||||
page buttonpage04
|
||||
}else
|
||||
{
|
||||
page home
|
||||
}
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
390
advanced/hmi/nspanel_eu_code/entitypage01.txt
Normal file
390
advanced/hmi/nspanel_eu_code/entitypage01.txt
Normal file
@@ -0,0 +1,390 @@
|
||||
Page entitypage01
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text value01_label
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value05_label
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value04_label
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value02_label
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value03_label
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text entity01_label
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text value06_label
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value07_label
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value08_label
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value01_pic
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value02_pic
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value03_pic
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value04_pic
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value05_pic
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value06_pic
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value07_pic
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value08_pic
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value01
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value02
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value03
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value04
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value05
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value06
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value07
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value08
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page entitypage04
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page entitypage02
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
page entitypage03
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
page entitypage04
|
||||
}
|
||||
}
|
||||
|
||||
390
advanced/hmi/nspanel_eu_code/entitypage02.txt
Normal file
390
advanced/hmi/nspanel_eu_code/entitypage02.txt
Normal file
@@ -0,0 +1,390 @@
|
||||
Page entitypage02
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text value01_label
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value05_label
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value04_label
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value02_label
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value03_label
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text entity02_label
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text value06_label
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value07_label
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value08_label
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value01_pic
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value02_pic
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value03_pic
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value04_pic
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value05_pic
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value06_pic
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value07_pic
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value08_pic
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value01
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value02
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value03
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value04
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value05
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value06
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value07
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value08
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page entitypage01
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page entitypage03
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
390
advanced/hmi/nspanel_eu_code/entitypage03.txt
Normal file
390
advanced/hmi/nspanel_eu_code/entitypage03.txt
Normal file
@@ -0,0 +1,390 @@
|
||||
Page entitypage03
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text value01_label
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value05_label
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value04_label
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value02_label
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value03_label
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text entity03_label
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text value06_label
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value07_label
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value08_label
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value01_pic
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value02_pic
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value03_pic
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value04_pic
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value05_pic
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value06_pic
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value07_pic
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value08_pic
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value01
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value02
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value03
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value04
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value05
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value06
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value07
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value08
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page entitypage02
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page entitypage04
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
page entitypage01
|
||||
}
|
||||
}
|
||||
|
||||
390
advanced/hmi/nspanel_eu_code/entitypage04.txt
Normal file
390
advanced/hmi/nspanel_eu_code/entitypage04.txt
Normal file
@@ -0,0 +1,390 @@
|
||||
Page entitypage04
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text value01_label
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value05_label
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value04_label
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value02_label
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value03_label
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text entity04_label
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text value06_label
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value07_label
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value08_label
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value01_pic
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value02_pic
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value03_pic
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value04_pic
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value05_pic
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value06_pic
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value07_pic
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value08_pic
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value01
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value02
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value03
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value04
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value05
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value06
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value07
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value08
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page entitypage03
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page entitypage01
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
page entitypage01
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
418
advanced/hmi/nspanel_eu_code/fan.txt
Normal file
418
advanced/hmi/nspanel_eu_code/fan.txt
Normal file
@@ -0,0 +1,418 @@
|
||||
Page fan
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Variable (string) fansetting
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 255
|
||||
|
||||
Variable (string) back_page
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Text : home
|
||||
Max. Text Size: 15
|
||||
|
||||
Variable (string) va0
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Text fan_value
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_label
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 25
|
||||
|
||||
Text icon_state
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Slider fanslider
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
Position : 0
|
||||
Upper range limit: 4
|
||||
Lower range limit: 0
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
sys0=100*fanslider.val/fanslider.maxval
|
||||
covx sys0,va0.txt,0,0
|
||||
fan_value.txt=va0.txt+"%"
|
||||
if(fanslider.val>fanslider.minval)
|
||||
{
|
||||
button_off.pco=59164
|
||||
button_down.pco=59164
|
||||
}else
|
||||
{
|
||||
button_off.pco=10597
|
||||
button_down.pco=10597
|
||||
}
|
||||
if(fanslider.val<fanslider.maxval)
|
||||
{
|
||||
button_up.pco=59164
|
||||
}else
|
||||
{
|
||||
button_up.pco=10597
|
||||
}
|
||||
timer0.en=1
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Button button_up
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
if(fanslider.val<fanslider.maxval)
|
||||
{
|
||||
fanslider.val++
|
||||
sys0=100*fanslider.val/fanslider.maxval
|
||||
covx sys0,va0.txt,0,0
|
||||
fan_value.txt=va0.txt+"%"
|
||||
}
|
||||
if(fanslider.val>fanslider.minval)
|
||||
{
|
||||
button_off.pco=59164
|
||||
button_down.pco=59164
|
||||
}else
|
||||
{
|
||||
button_off.pco=10597
|
||||
button_down.pco=10597
|
||||
}
|
||||
if(fanslider.val<fanslider.maxval)
|
||||
{
|
||||
button_up.pco=59164
|
||||
}else
|
||||
{
|
||||
button_up.pco=10597
|
||||
}
|
||||
|
||||
Touch Release Event
|
||||
timer0.en=1
|
||||
|
||||
Button button_on
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
fanslider.val=fanslider.maxval/2
|
||||
sys0=fanslider.maxval*5
|
||||
sys0%=10
|
||||
if(sys0>=5)
|
||||
{
|
||||
fanslider.val++
|
||||
}
|
||||
sys0=100*fanslider.val/fanslider.maxval
|
||||
covx sys0,va0.txt,0,0
|
||||
fan_value.txt=va0.txt+"%"
|
||||
if(fanslider.val>fanslider.minval)
|
||||
{
|
||||
button_off.pco=59164
|
||||
button_down.pco=59164
|
||||
}else
|
||||
{
|
||||
button_off.pco=10597
|
||||
button_down.pco=10597
|
||||
}
|
||||
if(fanslider.val<fanslider.maxval)
|
||||
{
|
||||
button_up.pco=59164
|
||||
}else
|
||||
{
|
||||
button_up.pco=10597
|
||||
}
|
||||
|
||||
Touch Release Event
|
||||
timer0.en=1
|
||||
|
||||
Button button_down
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
if(fanslider.val>fanslider.minval)
|
||||
{
|
||||
fanslider.val--
|
||||
sys0=100*fanslider.val/fanslider.maxval
|
||||
covx sys0,va0.txt,0,0
|
||||
fan_value.txt=va0.txt+"%"
|
||||
}
|
||||
if(fanslider.val>fanslider.minval)
|
||||
{
|
||||
button_off.pco=59164
|
||||
button_down.pco=59164
|
||||
}else
|
||||
{
|
||||
button_off.pco=10597
|
||||
button_down.pco=10597
|
||||
}
|
||||
if(fanslider.val<fanslider.maxval)
|
||||
{
|
||||
button_up.pco=59164
|
||||
}else
|
||||
{
|
||||
button_up.pco=10597
|
||||
}
|
||||
|
||||
Touch Release Event
|
||||
timer0.en=1
|
||||
|
||||
Button button_off
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
fanslider.val=fanslider.minval
|
||||
sys0=100*fanslider.val/fanslider.maxval
|
||||
covx sys0,va0.txt,0,0
|
||||
fan_value.txt=va0.txt+"%"
|
||||
fansetting.txt="{\"page\": \"fan\", \"key\": \"stop\", \"value\": "+va0.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints fansetting.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
if(fanslider.val>fanslider.minval)
|
||||
{
|
||||
button_off.pco=59164
|
||||
button_down.pco=59164
|
||||
}else
|
||||
{
|
||||
button_off.pco=10597
|
||||
button_down.pco=10597
|
||||
}
|
||||
if(fanslider.val<fanslider.maxval)
|
||||
{
|
||||
button_up.pco=59164
|
||||
}else
|
||||
{
|
||||
button_up.pco=10597
|
||||
}
|
||||
|
||||
Touch Release Event
|
||||
timer0.en=0
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
if(back_page.txt=="buttonpage01")
|
||||
{
|
||||
page buttonpage01
|
||||
}else if(back_page.txt=="buttonpage02")
|
||||
{
|
||||
page buttonpage02
|
||||
}else if(back_page.txt=="buttonpage03")
|
||||
{
|
||||
page buttonpage03
|
||||
}else if(back_page.txt=="buttonpage04")
|
||||
{
|
||||
page buttonpage04
|
||||
}else
|
||||
{
|
||||
page home
|
||||
}
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer timer0
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Period (ms): 1000
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
timer0.en=0
|
||||
sys0=100*fanslider.val/fanslider.maxval
|
||||
covx sys0,va0.txt,0,0
|
||||
fan_value.txt=va0.txt+"%"
|
||||
fansetting.txt="{\"page\": \"fan\", \"key\": \"percentage\", \"value\": "+va0.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints fansetting.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
712
advanced/hmi/nspanel_eu_code/home.txt
Normal file
712
advanced/hmi/nspanel_eu_code/home.txt
Normal file
@@ -0,0 +1,712 @@
|
||||
Page home
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
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
|
||||
sendme
|
||||
vis bt_notific,is_notification
|
||||
vis bt_qrcode,is_qrcode
|
||||
vis bt_entities,is_entities
|
||||
vis bt_alarm,is_alarm
|
||||
if(display_mode==3)
|
||||
{
|
||||
vis left_bt_text,0
|
||||
vis right_bt_text,0
|
||||
}
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 33
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 100
|
||||
|
||||
Variable (string) click_comp
|
||||
Attributes
|
||||
ID : 41
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 8
|
||||
|
||||
Text time
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
settings_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
settings_timer.en=0
|
||||
|
||||
Text current_temp
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 8
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"home\", \"component\": \"climate\", \"event\": \"click\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text outdoor_temp
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 8
|
||||
|
||||
Text date
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 25
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
settings_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
settings_timer.en=0
|
||||
|
||||
Text value01_state
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text left_bt_text
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text right_bt_text
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text icon_top_01
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Text icon_top_02
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Text icon_top_03
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Text icon_top_04
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Text icon_top_05
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Text icon_top_06
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Text icon_top_07
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Text icon_top_08
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Text icon_top_09
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Text icon_top_10
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Text value01_icon
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Text value03_state
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value03_icon
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Text value02_icon
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Text value02_state
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text wifi_icon
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
settings_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
settings_timer.en=0
|
||||
|
||||
Text indoortempicon
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"home\", \"component\": \"climate\", \"event\": \"click\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text bt_notific
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
if(api==1)
|
||||
{
|
||||
page notification
|
||||
}
|
||||
|
||||
Text bt_qrcode
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
page qrcode
|
||||
|
||||
Text bt_entities
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
if(api==1)
|
||||
{
|
||||
page entitypage01
|
||||
}
|
||||
|
||||
Text bt_alarm
|
||||
Attributes
|
||||
ID : 31
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
if(api==1)
|
||||
{
|
||||
page alarm
|
||||
}
|
||||
|
||||
Text meridiem
|
||||
Attributes
|
||||
ID : 32
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
settings_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
settings_timer.en=0
|
||||
|
||||
Text button01
|
||||
Attributes
|
||||
ID : 38
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button01"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
lastclick.txt="{\"page\": \"home\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Text button02
|
||||
Attributes
|
||||
ID : 39
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button02"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
lastclick.txt="{\"page\": \"home\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Text button03
|
||||
Attributes
|
||||
ID : 40
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button03"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
lastclick.txt="{\"page\": \"home\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Text button04
|
||||
Attributes
|
||||
ID : 43
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button04"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
lastclick.txt="{\"page\": \"home\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Text button05
|
||||
Attributes
|
||||
ID : 44
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button05"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
lastclick.txt="{\"page\": \"home\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Text button06
|
||||
Attributes
|
||||
ID : 45
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button06"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
lastclick.txt="{\"page\": \"home\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Picture weather
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
if(api==1)
|
||||
{
|
||||
page weather01
|
||||
}
|
||||
|
||||
Dual-state Button left_bt_pic
|
||||
Attributes
|
||||
ID : 35
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 0
|
||||
|
||||
Dual-state Button right_bt_pic
|
||||
Attributes
|
||||
ID : 36
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 0
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer settings_timer
|
||||
Attributes
|
||||
ID : 34
|
||||
Scope : local
|
||||
Period (ms): 1000
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
page settings
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 37
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=25
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
Timer click_timer
|
||||
Attributes
|
||||
ID : 42
|
||||
Scope : local
|
||||
Period (ms): 800
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
lastclick.txt="{\"page\": \"home\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
click_timer.en=0
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
wakeup_timer.en=1 // Set brightness to saved value (from HA)
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx&&api==1)
|
||||
{
|
||||
page buttonpage04
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2&&api==1)
|
||||
{
|
||||
page buttonpage01
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100&&api==1)
|
||||
{
|
||||
page buttonpage02
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100&&api==1)
|
||||
{
|
||||
page buttonpage03
|
||||
}
|
||||
}
|
||||
|
||||
386
advanced/hmi/nspanel_eu_code/keyb_num.txt
Normal file
386
advanced/hmi/nspanel_eu_code/keyb_num.txt
Normal file
@@ -0,0 +1,386 @@
|
||||
Page keyb_num
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page page_id.val
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Variable (int32) page_id
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (string) key
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (string) domain
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Text : alarm
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (string) aux
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 255
|
||||
|
||||
Variable (string) value
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Text t0
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text pin
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 25
|
||||
|
||||
Text title
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Alarm
|
||||
Max. Text Size : 10
|
||||
|
||||
Button b1
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text : 1
|
||||
Max. Text Size : 1
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
pin.txt+=b1.txt
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Button bclose
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
page page_id.val
|
||||
|
||||
Button b2
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text : 2
|
||||
Max. Text Size : 1
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
pin.txt+=b2.txt
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Button b3
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text : 3
|
||||
Max. Text Size : 1
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
pin.txt+=b3.txt
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Button b4
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text : 4
|
||||
Max. Text Size : 1
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
pin.txt+=b4.txt
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Button b5
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text : 5
|
||||
Max. Text Size : 1
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
pin.txt+=b5.txt
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Button b6
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text : 6
|
||||
Max. Text Size : 1
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
pin.txt+=b6.txt
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Button b7
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text : 7
|
||||
Max. Text Size : 1
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
pin.txt+=b7.txt
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Button b8
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text : 8
|
||||
Max. Text Size : 1
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
pin.txt+=b8.txt
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Button b9
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text : 9
|
||||
Max. Text Size : 1
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
pin.txt+=b9.txt
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Button bclear
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text : <
|
||||
Max. Text Size : 5
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
pin.txt=""
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Button b0
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text : 0
|
||||
Max. Text Size : 1
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
pin.txt+=b0.txt
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Button benter
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text : OK
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
aux.txt="{\"page\": \"keyb_num\", \"key\": \""+key.txt+"\", \"value\": \""+value.txt+"\", \"pin\": \""+pin.txt+"\", \"base_domain\": \""+domain.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints aux.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Button bview
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text : O
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
if(pin.pw==1)
|
||||
{
|
||||
pin.pw=0
|
||||
}else
|
||||
{
|
||||
pin.pw=1
|
||||
}
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
704
advanced/hmi/nspanel_eu_code/light.txt
Normal file
704
advanced/hmi/nspanel_eu_code/light.txt
Normal file
@@ -0,0 +1,704 @@
|
||||
Page light
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
vis light_b_press,1
|
||||
vis lightslider,1
|
||||
vis light_value,1
|
||||
// #### OFF Button #####
|
||||
vis temp_b_press,0
|
||||
vis color_b_pres,0
|
||||
// #### OFF Value #####
|
||||
vis temp_value,0
|
||||
vis light_value_2,0
|
||||
// #### OFF Slider #####
|
||||
vis tempslider,0
|
||||
vis colorwheel,0
|
||||
// #### Hide color & temp buttons #####
|
||||
vis temp_touch,0
|
||||
vis temp_value_2,0
|
||||
vis temp_button,0
|
||||
vis color_touch,0
|
||||
vis color_button,0
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Variable (int32) rgb565
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (string) va1
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Text : newtxt
|
||||
Max. Text Size: 20
|
||||
|
||||
Variable (string) va2
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Text : newtxt
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (string) va3
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Text : newtxt
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (int32) currenttab
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (string) lightsetting
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 255
|
||||
|
||||
Variable (string) back_page
|
||||
Attributes
|
||||
ID : 31
|
||||
Scope : local
|
||||
Text : home
|
||||
Max. Text Size: 15
|
||||
|
||||
Number ring
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Value : 0
|
||||
|
||||
Number field
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Value : 0
|
||||
|
||||
Text light_value
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_label
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 25
|
||||
|
||||
Text temp_value
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text light_value_2
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text temp_value_2
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text icon_state
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Picture light_button
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture color_button
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture temp_button
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture light_b_press
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture temp_b_press
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture color_b_pres
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture colorwheel
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
// Circular Color Picker for Nextion (c) Max Zuidberg 2022
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
//
|
||||
// Put this code in the touch press or release
|
||||
// event of the pic component with the color wheel.
|
||||
// Requires the two variables field.val and ring.val
|
||||
//
|
||||
// sya0 = x, sya1 = sya1
|
||||
// Note the usage of the hidden sya0, sya1 variables
|
||||
// within event code as local, temporary variable is fine.
|
||||
sya0=tch0
|
||||
sya1=tch1
|
||||
//
|
||||
// Convert absolute coordinates to coordinates relative to
|
||||
// the color wheel center.
|
||||
// sys0 = x_center, sys1 = y_center
|
||||
sys0=colorwheel.w/2
|
||||
sys0+=colorwheel.x
|
||||
sys1=colorwheel.h/2
|
||||
sys1+=colorwheel.y
|
||||
sya0-=sys0
|
||||
sya1-=sys1
|
||||
//
|
||||
// Determine ring
|
||||
ring.val=0
|
||||
// sys0 = r^2 = x^2 + y^2
|
||||
sys0=sya0*sya0
|
||||
sys1=sya1*sya1
|
||||
sys0+=sys1
|
||||
// repeat for all rings
|
||||
if(sys0>=156)
|
||||
{
|
||||
ring.val++
|
||||
}
|
||||
if(sys0>=625)
|
||||
{
|
||||
ring.val++
|
||||
}
|
||||
if(sys0>=1406)
|
||||
{
|
||||
ring.val++
|
||||
}
|
||||
if(sys0>=2500)
|
||||
{
|
||||
ring.val++
|
||||
}
|
||||
if(sys0>=3906)
|
||||
{
|
||||
ring.val++
|
||||
}
|
||||
if(sys0>=5625)
|
||||
{
|
||||
ring.val++
|
||||
}
|
||||
if(sys0>=7656)
|
||||
{
|
||||
ring.val++
|
||||
}
|
||||
//
|
||||
// Determine quadrant (0-3). Note: pixel y coords are inverted
|
||||
// compared to mathematical y coords. But we want math. quadrants.
|
||||
sya1*=-1
|
||||
sys2=0
|
||||
if(sya1<0)
|
||||
{
|
||||
sys2+=2
|
||||
}
|
||||
sys0=sya0*sya1
|
||||
if(sys0<0)
|
||||
{
|
||||
sys2+=1
|
||||
// In this case we also want to swap x and y otherwise the
|
||||
// atan(abs(x/y)) (calculated below) gives values running
|
||||
// "the wrong way" (cw instead of ccw).
|
||||
sys1=sya1
|
||||
sya1=sya0
|
||||
sya0=sys1
|
||||
}
|
||||
//
|
||||
field.val=sys2*6
|
||||
//
|
||||
// x,y sign is not required anymore
|
||||
if(sya0<0)
|
||||
{
|
||||
sya0*=-1
|
||||
}
|
||||
if(sya1<0)
|
||||
{
|
||||
sya1*=-1
|
||||
}
|
||||
//
|
||||
// Determine field in ring quadrant
|
||||
// Factor 100000 chosen more or less arbitrarily.
|
||||
// sys0 = 100000 * tan_a = 100000 * y / x
|
||||
sys0=100000*sya1
|
||||
sys0/=sya0
|
||||
// repeat for all fields
|
||||
if(sys0>=26794)
|
||||
{
|
||||
field.val++
|
||||
}
|
||||
if(sys0>=57735)
|
||||
{
|
||||
field.val++
|
||||
}
|
||||
if(sys0>=99999)
|
||||
{
|
||||
field.val++
|
||||
}
|
||||
if(sys0>=173205)
|
||||
{
|
||||
field.val++
|
||||
}
|
||||
if(sys0>=373205)
|
||||
{
|
||||
field.val++
|
||||
}
|
||||
covx r,va1.txt,0,0
|
||||
covx g,va2.txt,0,0
|
||||
covx b,va3.txt,0,0
|
||||
va1.txt=""
|
||||
va2.txt=""
|
||||
va3.txt=""
|
||||
|
||||
Touch Release Event
|
||||
// Adjust field.val "orientation" and offset to match the h value of the colors in the wheel
|
||||
h=23-field.val// 0 <= field.val <= 23
|
||||
// h is expected to be 0-6*256 (see hsv2rgb)
|
||||
h*=6*256
|
||||
h/=24// Number of fields
|
||||
//
|
||||
// s is expected to be 0-256 (see hsv2rgb)
|
||||
s=ring.val*256
|
||||
s/=8// Number of rings
|
||||
// no "value" selectable; fix it to the maximum (matching the colors in the wheels shown.
|
||||
v=255
|
||||
click hsv2rgb,0
|
||||
click rgb888to565,0
|
||||
//colPreview.bco=rgb565.val
|
||||
covx r,va1.txt,0,0
|
||||
covx g,va2.txt,0,0
|
||||
covx b,va3.txt,0,0
|
||||
lightsetting.txt="{\"page\": \"light\", \"component\": \"rgb_color\", \"value\": ["+va1.txt+", "+va2.txt+", "+va3.txt+"]}"
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
prints lightsetting.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
va1.txt=""
|
||||
va2.txt=""
|
||||
va3.txt=""
|
||||
|
||||
Slider lightslider
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
Position : 0
|
||||
Upper range limit: 100
|
||||
Lower range limit: 0
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
covx lightslider.val,va1.txt,0,0
|
||||
light_value.txt=va1.txt+"%"
|
||||
light_value_2.txt=va1.txt+"%"
|
||||
lightsetting.txt="{\"page\": \"light\", \"key\": \"brightness_pct\", \"value\": "+va1.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lightsetting.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Slider tempslider
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
Position : 0
|
||||
Upper range limit: 500
|
||||
Lower range limit: 153
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
covx tempslider.val,va1.txt,0,0
|
||||
temp_value.txt=va1.txt
|
||||
temp_value_2.txt=va1.txt
|
||||
lightsetting.txt="{\"page\": \"light\", \"key\": \"color_temp\", \"value\": "+va1.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lightsetting.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 32
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
if(back_page.txt=="buttonpage01")
|
||||
{
|
||||
page buttonpage01
|
||||
}else if(back_page.txt=="buttonpage02")
|
||||
{
|
||||
page buttonpage02
|
||||
}else if(back_page.txt=="buttonpage03")
|
||||
{
|
||||
page buttonpage03
|
||||
}else if(back_page.txt=="buttonpage04")
|
||||
{
|
||||
page buttonpage04
|
||||
}else
|
||||
{
|
||||
page home
|
||||
}
|
||||
|
||||
Hotspot hsv2rgb
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
// https://de.wikipedia.org/wiki/HSV-Farbraum#Umrechnung_HSV_in_RGB
|
||||
// The values range from 0..255 instead of 0..1
|
||||
// h ranges from 0..(6*256)
|
||||
if(s>=256)
|
||||
{
|
||||
s=255
|
||||
}else if(s<0)
|
||||
{
|
||||
s=0
|
||||
}
|
||||
if(v>=256)
|
||||
{
|
||||
v=255
|
||||
}else if(v<0)
|
||||
{
|
||||
v=0
|
||||
}
|
||||
f=h&0xff
|
||||
p=256-s
|
||||
p*=v
|
||||
p=p>>8// / 256
|
||||
q=s*f// 0-256*256 = 0-65536
|
||||
q=65536-q
|
||||
q*=v
|
||||
q=q>>16
|
||||
t=256-f
|
||||
t*=s
|
||||
t=65536-t
|
||||
t*=v
|
||||
t=t>>16
|
||||
//
|
||||
f=h>>8
|
||||
if(f==1)
|
||||
{
|
||||
r=q
|
||||
g=v
|
||||
b=p
|
||||
}else if(f==2)
|
||||
{
|
||||
r=p
|
||||
g=v
|
||||
b=t
|
||||
}else if(f==3)
|
||||
{
|
||||
r=p
|
||||
g=q
|
||||
b=v
|
||||
}else if(f==4)
|
||||
{
|
||||
r=t
|
||||
g=p
|
||||
b=v
|
||||
}else if(f==5)
|
||||
{
|
||||
r=v
|
||||
g=p
|
||||
b=q
|
||||
}else
|
||||
{
|
||||
r=v
|
||||
g=t
|
||||
b=p
|
||||
}
|
||||
|
||||
Hotspot rgb888to565
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
r=r&0xff
|
||||
g=g&0xff
|
||||
b=b&0xff
|
||||
sys1=r>>3
|
||||
sys2=sys1<<6
|
||||
sys1=g>>2
|
||||
sys2+=sys1
|
||||
sys2=sys2<<5
|
||||
sys1=b>>3
|
||||
sys2+=sys1
|
||||
rgb565.val=sys2
|
||||
|
||||
Hotspot light_touch
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
vis light_b_press,1
|
||||
vis lightslider,1
|
||||
vis light_value,1
|
||||
vis temp_value_2,1
|
||||
// #### OFF Button #####
|
||||
vis temp_b_press,0
|
||||
vis color_b_pres,0
|
||||
// #### OFF Value #####
|
||||
vis temp_value,0
|
||||
vis light_value_2,0
|
||||
// #### OFF Slider #####
|
||||
vis tempslider,0
|
||||
vis colorwheel,0
|
||||
|
||||
Hotspot temp_touch
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
vis temp_b_press,1
|
||||
vis tempslider,1
|
||||
vis temp_value,1
|
||||
vis light_value_2,1
|
||||
// #### OFF Button #####
|
||||
vis light_b_press,0
|
||||
vis color_b_pres,0
|
||||
// #### OFF Value #####
|
||||
vis light_value,0
|
||||
vis temp_value_2,0
|
||||
// #### OFF Slider #####
|
||||
vis lightslider,0
|
||||
vis colorwheel,0
|
||||
|
||||
Hotspot color_touch
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
vis color_b_pres,1
|
||||
vis colorwheel,1
|
||||
vis light_value_2,1
|
||||
// #### OFF Button #####
|
||||
vis light_b_press,0
|
||||
vis temp_b_press,0
|
||||
// #### OFF Value #####
|
||||
vis light_value,0
|
||||
vis temp_value,0
|
||||
vis temp_value_2,0
|
||||
// #### OFF Slider #####
|
||||
vis lightslider,0
|
||||
vis tempslider,0
|
||||
// #### OFF Color #####
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 33
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
625
advanced/hmi/nspanel_eu_code/media_player.txt
Normal file
625
advanced/hmi/nspanel_eu_code/media_player.txt
Normal file
@@ -0,0 +1,625 @@
|
||||
Page media_player
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Variable (string) back_page
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Text : home
|
||||
Max. Text Size: 15
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 255
|
||||
|
||||
Variable (string) va0
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (int32) is_muted
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (int32) prg_current
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (int32) prg_total
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Text page_label
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Media Player
|
||||
Max. Text Size : 25
|
||||
|
||||
Text icon_state
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text vol_text
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text bt_vol_down
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
if(vol_slider.val>0)
|
||||
{
|
||||
vol_slider.val--
|
||||
covx vol_slider.val,va0.txt,0,0
|
||||
vol_text.txt=va0.txt+"%"
|
||||
timer0.en=1
|
||||
}
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text bt_vol_up
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
if(vol_slider.val<100)
|
||||
{
|
||||
vol_slider.val++
|
||||
covx vol_slider.val,va0.txt,0,0
|
||||
vol_text.txt=va0.txt+"%"
|
||||
timer0.en=1
|
||||
}
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text bt_mute
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
if(is_muted.val==0)
|
||||
{
|
||||
va0.txt="true"
|
||||
}else
|
||||
{
|
||||
va0.txt="false"
|
||||
}
|
||||
lastclick.txt="{\"page\": \"media_player\", \"key\": \"volume_mute\", \"value\": \""+va0.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text time_current
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text time_total
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text track
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 50
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text artist
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 50
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text bt_prev
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"media_player\", \"key\": \"media_previous_track\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"media_player\", \"key\": \"media_previous_track\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text bt_play_pause
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"media_player\", \"key\": \"media_play_pause\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text bt_next
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"media_player\", \"key\": \"media_next_track\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text bt_on_off
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"media_player\", \"key\": \"toggle\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Progress Bar time_progress
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
Value : 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Slider vol_slider
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
Position : 0
|
||||
Upper range limit: 100
|
||||
Lower range limit: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
covx vol_slider.val,va0.txt,0,0
|
||||
vol_text.txt=va0.txt+"%"
|
||||
timer0.en=1
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
if(back_page.txt=="buttonpage01")
|
||||
{
|
||||
page buttonpage01
|
||||
}else if(back_page.txt=="buttonpage02")
|
||||
{
|
||||
page buttonpage02
|
||||
}else if(back_page.txt=="buttonpage03")
|
||||
{
|
||||
page buttonpage03
|
||||
}else if(back_page.txt=="buttonpage04")
|
||||
{
|
||||
page buttonpage04
|
||||
}else
|
||||
{
|
||||
page home
|
||||
}
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
Timer timer0
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Period (ms): 1000
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
timer0.en=0
|
||||
covx vol_slider.val,va0.txt,0,0
|
||||
vol_text.txt=va0.txt+"%"
|
||||
lastclick.txt="{\"page\": \"media_player\", \"key\": \"volume_set\", \"value\": "+va0.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Timer prg_timer
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Period (ms): 1000
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(prg_current.val<prg_total.val&&prg_total.val>0)
|
||||
{
|
||||
prg_current.val++
|
||||
time_progress.val=100*prg_current.val/prg_total.val
|
||||
covx prg_current.val,time_current.txt,0,0
|
||||
}
|
||||
// Progress - Total
|
||||
sys0=prg_total.val/3600 //hours
|
||||
sys2=prg_total.val%3600 //remainder
|
||||
sys1=sys2/60 //minutes
|
||||
sys2%=60 //seconds
|
||||
time_total.txt=""
|
||||
if(sys0>0)
|
||||
{
|
||||
covx sys0,time_total.txt,0,0
|
||||
time_total.txt+=":"
|
||||
if(sys1<10)
|
||||
{
|
||||
time_total.txt+="0"
|
||||
}
|
||||
}
|
||||
covx sys1,va0.txt,0,0
|
||||
time_total.txt+=va0.txt+":"
|
||||
if(sys2<10)
|
||||
{
|
||||
time_total.txt+="0"
|
||||
}
|
||||
covx sys2,va0.txt,0,0
|
||||
time_total.txt+=va0.txt
|
||||
// Progress - Current
|
||||
sys0=prg_current.val/3600 //hours
|
||||
sys2=prg_current.val%3600 //remainder
|
||||
sys1=sys2/60 //minutes
|
||||
sys2%=60 //seconds
|
||||
time_current.txt=""
|
||||
if(sys0>0)
|
||||
{
|
||||
covx sys0,time_current.txt,0,0
|
||||
time_current.txt+=":"
|
||||
if(sys1<10)
|
||||
{
|
||||
time_current.txt+="0"
|
||||
}
|
||||
}
|
||||
covx sys1,va0.txt,0,0
|
||||
time_current.txt+=va0.txt+":"
|
||||
if(sys2<10)
|
||||
{
|
||||
time_current.txt+="0"
|
||||
}
|
||||
covx sys2,va0.txt,0,0
|
||||
time_current.txt+=va0.txt
|
||||
|
||||
197
advanced/hmi/nspanel_eu_code/notification.txt
Normal file
197
advanced/hmi/nspanel_eu_code/notification.txt
Normal file
@@ -0,0 +1,197 @@
|
||||
Page notification
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 100
|
||||
|
||||
Text notifi_text01
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 250
|
||||
|
||||
Text notifi_label
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Button bt_accept
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"notification\", \"component\": \"accept\", \"value\": \"release\"}"
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Button bt_clear
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"notification\", \"component\": \"clear\", \"value\": \"release\"}"
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
BIN
advanced/hmi/nspanel_eu_code/pics/SinglePixel.png
Normal file
BIN
advanced/hmi/nspanel_eu_code/pics/SinglePixel.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 120 B |
BIN
advanced/hmi/nspanel_eu_code/power.page
Normal file
BIN
advanced/hmi/nspanel_eu_code/power.page
Normal file
Binary file not shown.
0
advanced/hmi/nspanel_eu_code/power.txt
Normal file
0
advanced/hmi/nspanel_eu_code/power.txt
Normal file
143
advanced/hmi/nspanel_eu_code/qrcode.txt
Normal file
143
advanced/hmi/nspanel_eu_code/qrcode.txt
Normal file
@@ -0,0 +1,143 @@
|
||||
Page qrcode
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
sendme
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text qrcode_label
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
QR Code qrcode_value
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
Text :
|
||||
Max. Text Size : 75
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
36
advanced/hmi/nspanel_eu_code/screensaver.txt
Normal file
36
advanced/hmi/nspanel_eu_code/screensaver.txt
Normal file
@@ -0,0 +1,36 @@
|
||||
Page screensaver
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
sendme
|
||||
dim=0
|
||||
|
||||
Touch Release Event
|
||||
page orign.val
|
||||
|
||||
Variable (int32) orign
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
TouchCap wakeup
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page orign.val
|
||||
|
||||
359
advanced/hmi/nspanel_eu_code/settings.txt
Normal file
359
advanced/hmi/nspanel_eu_code/settings.txt
Normal file
@@ -0,0 +1,359 @@
|
||||
Page settings
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
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
|
||||
sendme
|
||||
covx brightslider.val,bright_text.txt,0,0
|
||||
bright_text.txt+="%"
|
||||
covx dimslider.val,dim_text.txt,0,0
|
||||
dim_text.txt+="%"
|
||||
vis lbl_sleep,0
|
||||
vis bt_sleep,0
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text bright_text
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : 80%
|
||||
Max. Text Size : 4
|
||||
|
||||
Text dim_text
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : 20%
|
||||
Max. Text Size : 4
|
||||
|
||||
Text lbl_reboot
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : Reboot
|
||||
Max. Text Size : 25
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
tm_boot_page.en=1
|
||||
|
||||
Touch Release Event
|
||||
tm_boot_page.en=0
|
||||
|
||||
Text lbl_sleep
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : Sleep mode
|
||||
Max. Text Size : 25
|
||||
|
||||
Text lbl_bright
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : Bright
|
||||
Max. Text Size : 25
|
||||
|
||||
Text lbl_dim
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : Dim
|
||||
Max. Text Size : 25
|
||||
|
||||
Text lbl_brightness
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : Brightness
|
||||
Max. Text Size : 25
|
||||
|
||||
Slider brightslider
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
Position : 80
|
||||
Upper range limit: 100
|
||||
Lower range limit: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
if(tm_bright.en==0)
|
||||
{
|
||||
tm_bright.en=1
|
||||
}
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Slider dimslider
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
Position : 20
|
||||
Upper range limit: 100
|
||||
Lower range limit: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
if(tm_dim.en==0)
|
||||
{
|
||||
tm_dim.en=1
|
||||
}
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Dual-state Button bt_reboot
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Dual-state Button bt_sleep
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Hotspot bt_bright_down
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
if(brightslider.val>0)
|
||||
{
|
||||
brightslider.val--
|
||||
covx brightslider.val,bright_text.txt,0,0
|
||||
bright_text.txt+="%"
|
||||
printh 91
|
||||
prints "brightslider",0
|
||||
printh 00
|
||||
prints brightslider.val,0
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Hotspot bt_bright_up
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
if(brightslider.val<100)
|
||||
{
|
||||
brightslider.val++
|
||||
covx brightslider.val,bright_text.txt,0,0
|
||||
bright_text.txt+="%"
|
||||
printh 91
|
||||
prints "brightslider",0
|
||||
printh 00
|
||||
prints brightslider.val,0
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Hotspot bt_dim_down
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
if(dimslider.val>0)
|
||||
{
|
||||
dimslider.val--
|
||||
covx dimslider.val,dim_text.txt,0,0
|
||||
dim_text.txt+="%"
|
||||
printh 91
|
||||
prints "dimslider",0
|
||||
printh 00
|
||||
prints dimslider.val,0
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Hotspot bt_dim_up
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
if(dimslider.val<100)
|
||||
{
|
||||
dimslider.val++
|
||||
covx dimslider.val,dim_text.txt,0,0
|
||||
dim_text.txt+="%"
|
||||
printh 91
|
||||
prints "dimslider",0
|
||||
printh 00
|
||||
prints dimslider.val,0
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
Timer tm_bright
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
covx brightslider.val,bright_text.txt,0,0
|
||||
bright_text.txt+="%"
|
||||
printh 91
|
||||
prints "brightslider",0
|
||||
printh 00
|
||||
prints brightslider.val,0
|
||||
printh FF FF FF
|
||||
tm_bright.en=0
|
||||
|
||||
Timer tm_dim
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
covx dimslider.val,dim_text.txt,0,0
|
||||
dim_text.txt+="%"
|
||||
printh 91
|
||||
prints "dimslider",0
|
||||
printh 00
|
||||
prints dimslider.val,0
|
||||
printh FF FF FF
|
||||
tm_dim.en=0
|
||||
|
||||
Timer tm_boot_page
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Period (ms): 1000
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
page boot
|
||||
|
||||
287
advanced/hmi/nspanel_eu_code/weather01.txt
Normal file
287
advanced/hmi/nspanel_eu_code/weather01.txt
Normal file
@@ -0,0 +1,287 @@
|
||||
Page weather01
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text day
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text date
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 25
|
||||
|
||||
Text temperature
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text loading
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Text value01
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value05
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value04
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value02
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value03
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value01_icon
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value02_icon
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value03_icon
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value04_icon
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value05_icon
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Picture weather_icon
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page weather05
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page weather02
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
287
advanced/hmi/nspanel_eu_code/weather02.txt
Normal file
287
advanced/hmi/nspanel_eu_code/weather02.txt
Normal file
@@ -0,0 +1,287 @@
|
||||
Page weather02
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text day
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text loading
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Text date
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 25
|
||||
|
||||
Text temperature
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value01
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value05
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value04
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value02
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value03
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value01_icon
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value02_icon
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value03_icon
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value04_icon
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value05_icon
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Picture weather_icon
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page weather01
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page weather03
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
287
advanced/hmi/nspanel_eu_code/weather03.txt
Normal file
287
advanced/hmi/nspanel_eu_code/weather03.txt
Normal file
@@ -0,0 +1,287 @@
|
||||
Page weather03
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text day
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text loading
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Text date
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 25
|
||||
|
||||
Text temperature
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value01
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value05
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value04
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value02
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value03
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value01_icon
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value02_icon
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value03_icon
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value04_icon
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value05_icon
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Picture weather_icon
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page weather02
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page weather04
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
287
advanced/hmi/nspanel_eu_code/weather04.txt
Normal file
287
advanced/hmi/nspanel_eu_code/weather04.txt
Normal file
@@ -0,0 +1,287 @@
|
||||
Page weather04
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text day
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text loading
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Text date
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 25
|
||||
|
||||
Text temperature
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value01
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value05
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value04
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value02
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value03
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value01_icon
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value02_icon
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value03_icon
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value04_icon
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value05_icon
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Picture weather_icon
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page weather03
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page weather05
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
287
advanced/hmi/nspanel_eu_code/weather05.txt
Normal file
287
advanced/hmi/nspanel_eu_code/weather05.txt
Normal file
@@ -0,0 +1,287 @@
|
||||
Page weather05
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text day
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text loading
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Text date
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 25
|
||||
|
||||
Text temperature
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value01
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value05
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value04
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value02
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value03
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value01_icon
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value02_icon
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value03_icon
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value04_icon
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value05_icon
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Picture weather_icon
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page weather04
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page weather01
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
BIN
advanced/hmi/nspanel_us.HMI
Normal file
BIN
advanced/hmi/nspanel_us.HMI
Normal file
Binary file not shown.
26
advanced/hmi/nspanel_us_code/Program.s.txt
Normal file
26
advanced/hmi/nspanel_us_code/Program.s.txt
Normal file
@@ -0,0 +1,26 @@
|
||||
Program.s
|
||||
//The following code is only run once when power on, and is generally used for global variable definition and power on initialization data
|
||||
int sys0=0,sys1=0,sys2=0,swipex=0,swipey=0,swipex2=0,swipey2=0,swipec=0,swipec2=0,swipedx=100,swipedy=100 //At present, the definition of global variable only supports 4-byte signed integer (int), and other types of global quantity declaration are not supported. If you want to use string type, you can use variable control in the page to implement
|
||||
int r=0,g=0,b=0
|
||||
int h=0,s=0,v=0
|
||||
int p=0,q=0,t=0,f=0
|
||||
int dimdelta=0
|
||||
int api=0 // 0 = disconnected from HA, 1 = connected to HA
|
||||
int is_alarm=0,is_entities=0,is_qrcode=0,is_notification=0
|
||||
int brightness=100,brightness_dim=40
|
||||
int display_mode=2 // 1 = EU, 2 = US, 3 = US landscape
|
||||
//bauds=115200//Configure baudrate
|
||||
recmod=0//Serial data parsing mode:0-Passive mode;1-Active mode
|
||||
randset 0,65535//used for touchevent sensor
|
||||
printh 00 00 00 ff ff ff 88 ff ff ff//Output power on information to serial port
|
||||
if(display_mode==1)
|
||||
{
|
||||
lcd_dev fffb 0002 0000 0020// Fix touch offset for EU Version
|
||||
}
|
||||
printh 92
|
||||
prints "currentpage",0
|
||||
printh 00
|
||||
prints "",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
page 8//Power on start page boot
|
||||
454
advanced/hmi/nspanel_us_code/alarm.txt
Normal file
454
advanced/hmi/nspanel_us_code/alarm.txt
Normal file
@@ -0,0 +1,454 @@
|
||||
Page alarm
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
vis bt_home,0
|
||||
vis bt_away,0
|
||||
vis bt_night,0
|
||||
vis bt_vacat,0
|
||||
vis bt_bypass,0
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 255
|
||||
|
||||
Variable (string) back_page
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Text : home
|
||||
Max. Text Size: 15
|
||||
|
||||
Variable (string) code_format
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 15
|
||||
|
||||
Variable (string) entity
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 100
|
||||
|
||||
Variable (string) code_arm_req
|
||||
Attributes
|
||||
ID : 31
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 1
|
||||
|
||||
Text page_label
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Alarm Control Panel
|
||||
Max. Text Size : 25
|
||||
|
||||
Text icon_state
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text bt_home_text
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Home
|
||||
Max. Text Size : 22
|
||||
|
||||
Text bt_away_text
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Away
|
||||
Max. Text Size : 22
|
||||
|
||||
Text bt_night_text
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Night
|
||||
Max. Text Size : 22
|
||||
|
||||
Text bt_vacat_text
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Vacation
|
||||
Max. Text Size : 22
|
||||
|
||||
Text bt_bypass_text
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Bypass
|
||||
Max. Text Size : 22
|
||||
|
||||
Text bt_disarm_text
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Disarm
|
||||
Max. Text Size : 22
|
||||
|
||||
Text bt_home_icon
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text bt_away_icon
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text bt_night_icon
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text bt_vacat_icon
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text bt_bypass_icon
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text bt_disarm_icon
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Picture bt_home_pic
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture bt_away_pic
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture bt_night_pic
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture bt_vacat_pic
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture bt_bypass_pic
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture bt_disarm_pic
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 32
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
if(back_page.txt=="buttonpage01")
|
||||
{
|
||||
page buttonpage01
|
||||
}else if(back_page.txt=="buttonpage02")
|
||||
{
|
||||
page buttonpage02
|
||||
}else if(back_page.txt=="buttonpage03")
|
||||
{
|
||||
page buttonpage03
|
||||
}else if(back_page.txt=="buttonpage04")
|
||||
{
|
||||
page buttonpage04
|
||||
}else
|
||||
{
|
||||
page home
|
||||
}
|
||||
|
||||
Hotspot bt_home
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
bt_home_pic.pic=44
|
||||
bt_home_text.bco=65024
|
||||
bt_home_text.pco=0
|
||||
bt_home_icon.bco=65024
|
||||
bt_home_icon.pco=0
|
||||
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"alarm\", \"key\": \"home\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_home_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Hotspot bt_away
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
bt_away_pic.pic=44
|
||||
bt_away_text.bco=65024
|
||||
bt_away_text.pco=0
|
||||
bt_away_icon.bco=65024
|
||||
bt_away_icon.pco=0
|
||||
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"alarm\", \"key\": \"away\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_away_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Hotspot bt_night
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
bt_night_pic.pic=44
|
||||
bt_night_text.bco=65024
|
||||
bt_night_text.pco=0
|
||||
bt_night_icon.bco=65024
|
||||
bt_night_icon.pco=0
|
||||
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"alarm\", \"key\": \"night\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_night_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Hotspot bt_vacat
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
bt_vacat_pic.pic=44
|
||||
bt_vacat_text.bco=65024
|
||||
bt_vacat_text.pco=0
|
||||
bt_vacat_icon.bco=65024
|
||||
bt_vacat_icon.pco=0
|
||||
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"alarm\", \"key\": \"vacation\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_vacat_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Hotspot bt_bypass
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
bt_bypass_pic.pic=44
|
||||
bt_bypass_text.bco=65024
|
||||
bt_bypass_text.pco=0
|
||||
bt_bypass_icon.bco=65024
|
||||
bt_bypass_icon.pco=0
|
||||
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"alarm\", \"key\": \"bypass\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_bypass_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Hotspot bt_disarm
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
bt_disarm_pic.pic=44
|
||||
bt_disarm_text.bco=65024
|
||||
bt_disarm_text.pco=0
|
||||
bt_disarm_icon.bco=65024
|
||||
bt_disarm_icon.pco=0
|
||||
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"alarm\", \"key\": \"disarm\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_disarm_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 33
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
273
advanced/hmi/nspanel_us_code/boot.txt
Normal file
273
advanced/hmi/nspanel_us_code/boot.txt
Normal file
@@ -0,0 +1,273 @@
|
||||
Page boot
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
sendme
|
||||
dim=0
|
||||
vis bt_reboot,0
|
||||
covx baud,baud_rate.txt,0,0
|
||||
baud_rate.txt+=" bps"
|
||||
covx display_mode,aux2.txt,0,0
|
||||
nspanelevent.txt="{\"page\": \"boot\", \"event\": \"pagechanged\", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints nspanelevent.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Page Exit Event
|
||||
dim=0
|
||||
|
||||
Variable (int32) counter
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (string) aux1
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (string) nspanelevent
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 150
|
||||
|
||||
Variable (string) aux2
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Text ip_addr
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Initializing...
|
||||
Max. Text Size : 15
|
||||
|
||||
Text t0
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Please wait...
|
||||
Max. Text Size : 15
|
||||
|
||||
Text t1
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : The process can take several seconds!
|
||||
Max. Text Size : 50
|
||||
|
||||
Text tft_label
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : TFT:
|
||||
Max. Text Size : 4
|
||||
|
||||
Text esph_label
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : ESPHome:
|
||||
Max. Text Size : 8
|
||||
|
||||
Text bluep_label
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Blueprint:
|
||||
Max. Text Size : 10
|
||||
|
||||
Text tft_version
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : 4.2dev
|
||||
Max. Text Size : 9
|
||||
|
||||
Text esph_version
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 9
|
||||
|
||||
Text bluep_version
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 9
|
||||
|
||||
Text baud_rate
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text framework
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Dual-state Button bt_reboot
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : Reboot
|
||||
Max. Text Size : 6
|
||||
|
||||
Timer timer
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Period (ms): 65534
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
counter.val++
|
||||
covx counter.val,aux1.txt,0,0
|
||||
covx display_mode,aux2.txt,0,0
|
||||
nspanelevent.txt="{\"page\": \"boot\", \"event\": \"timeout\", \"value\": "+aux1.txt+", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}"
|
||||
bluep_version.txt="Retry: "+aux1.txt
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
prints nspanelevent.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<100)
|
||||
{
|
||||
dimdelta=100-dim
|
||||
dimdelta/=25
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
Timer tm_esphome
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Period (ms): 30000
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(baud==115200)
|
||||
{
|
||||
bauds=921600
|
||||
}else
|
||||
{
|
||||
bauds=115200
|
||||
}
|
||||
covx baud,baud_rate.txt,0,0
|
||||
baud_rate.txt+=" bps"
|
||||
|
||||
Timer tm_pageid
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Period (ms): 2500
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
covx display_mode,aux2.txt,0,0
|
||||
nspanelevent.txt="{\"page\": \"boot\", \"event\": \"pagechanged\", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints nspanelevent.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
782
advanced/hmi/nspanel_us_code/buttonpage01.txt
Normal file
782
advanced/hmi/nspanel_us_code/buttonpage01.txt
Normal file
@@ -0,0 +1,782 @@
|
||||
Page buttonpage01
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
vis 255,0
|
||||
vis button_back,1
|
||||
vis page_index,1
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 44
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 100
|
||||
|
||||
Variable (string) click_comp
|
||||
Attributes
|
||||
ID : 47
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 8
|
||||
|
||||
Variable (string) page_name
|
||||
Attributes
|
||||
ID : 49
|
||||
Scope : local
|
||||
Text : buttonpage01
|
||||
Max. Text Size: 12
|
||||
|
||||
Variable (int32) confirm
|
||||
Attributes
|
||||
ID : 51
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Text button01text
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button01bri
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button02text
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button02bri
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button03text
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button03bri
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button04text
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button04bri
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button05text
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button05bri
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button06text
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button06bri
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button07text
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button07bri
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button08text
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button08bri
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text bpage01_label
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text button01icon
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button02icon
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button03icon
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button04icon
|
||||
Attributes
|
||||
ID : 31
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button05icon
|
||||
Attributes
|
||||
ID : 32
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button06icon
|
||||
Attributes
|
||||
ID : 33
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button07icon
|
||||
Attributes
|
||||
ID : 34
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button08icon
|
||||
Attributes
|
||||
ID : 35
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 45
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Picture button01pic
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button02pic
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button03pic
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button04pic
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button05pic
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button06pic
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button07pic
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button08pic
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 46
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Hotspot button01
|
||||
Attributes
|
||||
ID : 36
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button01"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&1
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button01text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button02
|
||||
Attributes
|
||||
ID : 37
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button02"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&2
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button02text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button03
|
||||
Attributes
|
||||
ID : 38
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button03"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&4
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button03text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button04
|
||||
Attributes
|
||||
ID : 39
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button04"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&8
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button04text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button05
|
||||
Attributes
|
||||
ID : 40
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button05"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&16
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button05text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button06
|
||||
Attributes
|
||||
ID : 41
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button06"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&32
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button06text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button07
|
||||
Attributes
|
||||
ID : 42
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button07"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&64
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button07text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button08
|
||||
Attributes
|
||||
ID : 43
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button08"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&128
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button08text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer click_timer
|
||||
Attributes
|
||||
ID : 48
|
||||
Scope : local
|
||||
Period (ms): 800
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
lastclick.txt="{\"page\": \"buttonpage01\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
click_timer.en=0
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 50
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page home
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page buttonpage02
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
782
advanced/hmi/nspanel_us_code/buttonpage02.txt
Normal file
782
advanced/hmi/nspanel_us_code/buttonpage02.txt
Normal file
@@ -0,0 +1,782 @@
|
||||
Page buttonpage02
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
vis 255,0
|
||||
vis button_back,1
|
||||
vis page_index,1
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 44
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 100
|
||||
|
||||
Variable (string) click_comp
|
||||
Attributes
|
||||
ID : 47
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 8
|
||||
|
||||
Variable (string) page_name
|
||||
Attributes
|
||||
ID : 49
|
||||
Scope : local
|
||||
Text : buttonpage02
|
||||
Max. Text Size: 12
|
||||
|
||||
Variable (int32) confirm
|
||||
Attributes
|
||||
ID : 51
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Text button01text
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button01bri
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button02text
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button02bri
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button03text
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button03bri
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button04text
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button04bri
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button05text
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button05bri
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button06text
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button06bri
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button07text
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button07bri
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button08text
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button08bri
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text bpage02_label
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text button01icon
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button02icon
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button03icon
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button04icon
|
||||
Attributes
|
||||
ID : 31
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button05icon
|
||||
Attributes
|
||||
ID : 32
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button06icon
|
||||
Attributes
|
||||
ID : 33
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button07icon
|
||||
Attributes
|
||||
ID : 34
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button08icon
|
||||
Attributes
|
||||
ID : 35
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 46
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Picture button01pic
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button02pic
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button03pic
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button04pic
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button05pic
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button06pic
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button07pic
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button08pic
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 45
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Hotspot button01
|
||||
Attributes
|
||||
ID : 36
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button01"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&1
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button01text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button02
|
||||
Attributes
|
||||
ID : 37
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button02"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&2
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button02text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button03
|
||||
Attributes
|
||||
ID : 38
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button03"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&4
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button03text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button04
|
||||
Attributes
|
||||
ID : 39
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button04"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&8
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button04text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button05
|
||||
Attributes
|
||||
ID : 40
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button05"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&16
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button05text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button06
|
||||
Attributes
|
||||
ID : 41
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button06"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&32
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button06text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button07
|
||||
Attributes
|
||||
ID : 42
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button07"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&64
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button07text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button08
|
||||
Attributes
|
||||
ID : 43
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button08"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&128
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button08text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer click_timer
|
||||
Attributes
|
||||
ID : 48
|
||||
Scope : local
|
||||
Period (ms): 800
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
lastclick.txt="{\"page\": \"buttonpage02\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
click_timer.en=0
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 50
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page buttonpage01
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page buttonpage03
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
page home
|
||||
}
|
||||
}
|
||||
|
||||
782
advanced/hmi/nspanel_us_code/buttonpage03.txt
Normal file
782
advanced/hmi/nspanel_us_code/buttonpage03.txt
Normal file
@@ -0,0 +1,782 @@
|
||||
Page buttonpage03
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
vis 255,0
|
||||
vis button_back,1
|
||||
vis page_index,1
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 44
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 100
|
||||
|
||||
Variable (string) click_comp
|
||||
Attributes
|
||||
ID : 47
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 8
|
||||
|
||||
Variable (string) page_name
|
||||
Attributes
|
||||
ID : 49
|
||||
Scope : local
|
||||
Text : buttonpage03
|
||||
Max. Text Size: 12
|
||||
|
||||
Variable (int32) confirm
|
||||
Attributes
|
||||
ID : 51
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Text button01text
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button01bri
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button02text
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button02bri
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button03text
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button03bri
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button04text
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button04bri
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button05text
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button05bri
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button06text
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button06bri
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button07text
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button07bri
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button08text
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button08bri
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text bpage03_label
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text button01icon
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button02icon
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button03icon
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button04icon
|
||||
Attributes
|
||||
ID : 31
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button05icon
|
||||
Attributes
|
||||
ID : 32
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button06icon
|
||||
Attributes
|
||||
ID : 33
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button07icon
|
||||
Attributes
|
||||
ID : 34
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button08icon
|
||||
Attributes
|
||||
ID : 35
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 46
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Picture button01pic
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button02pic
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button03pic
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button04pic
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button05pic
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button06pic
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button07pic
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button08pic
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 45
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Hotspot button01
|
||||
Attributes
|
||||
ID : 36
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button01"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&1
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button01text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button02
|
||||
Attributes
|
||||
ID : 37
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button02"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&2
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button02text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button03
|
||||
Attributes
|
||||
ID : 38
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button03"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&4
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button03text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button04
|
||||
Attributes
|
||||
ID : 39
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button04"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&8
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button04text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button05
|
||||
Attributes
|
||||
ID : 40
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button05"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&16
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button05text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button06
|
||||
Attributes
|
||||
ID : 41
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button06"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&32
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button06text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button07
|
||||
Attributes
|
||||
ID : 42
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button07"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&64
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button07text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button08
|
||||
Attributes
|
||||
ID : 43
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button08"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&128
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button08text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer click_timer
|
||||
Attributes
|
||||
ID : 48
|
||||
Scope : local
|
||||
Period (ms): 800
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
lastclick.txt="{\"page\": \"buttonpage03\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
click_timer.en=0
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 50
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page buttonpage02
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page buttonpage04
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
page home
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
782
advanced/hmi/nspanel_us_code/buttonpage04.txt
Normal file
782
advanced/hmi/nspanel_us_code/buttonpage04.txt
Normal file
@@ -0,0 +1,782 @@
|
||||
Page buttonpage04
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
vis 255,0
|
||||
vis button_back,1
|
||||
vis page_index,1
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 44
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 100
|
||||
|
||||
Variable (string) click_comp
|
||||
Attributes
|
||||
ID : 47
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 8
|
||||
|
||||
Variable (string) page_name
|
||||
Attributes
|
||||
ID : 49
|
||||
Scope : local
|
||||
Text : buttonpage04
|
||||
Max. Text Size: 12
|
||||
|
||||
Variable (int32) confirm
|
||||
Attributes
|
||||
ID : 51
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Text button01text
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button01bri
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button02text
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button02bri
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button03text
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button03bri
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button04text
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button04bri
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button05text
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button05bri
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button06text
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button06bri
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button07text
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button07bri
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button08text
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button08bri
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text bpage04_label
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text button01icon
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button02icon
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button03icon
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button04icon
|
||||
Attributes
|
||||
ID : 31
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button05icon
|
||||
Attributes
|
||||
ID : 32
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button06icon
|
||||
Attributes
|
||||
ID : 33
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button07icon
|
||||
Attributes
|
||||
ID : 34
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button08icon
|
||||
Attributes
|
||||
ID : 35
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 46
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Picture button01pic
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button02pic
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button03pic
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button04pic
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button05pic
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button06pic
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button07pic
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button08pic
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 45
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Hotspot button01
|
||||
Attributes
|
||||
ID : 36
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button01"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&1
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button01text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button02
|
||||
Attributes
|
||||
ID : 37
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button02"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&2
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button02text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button03
|
||||
Attributes
|
||||
ID : 38
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button03"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&4
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button03text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button04
|
||||
Attributes
|
||||
ID : 39
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button04"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&8
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button04text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button05
|
||||
Attributes
|
||||
ID : 40
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button05"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&16
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button05text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button06
|
||||
Attributes
|
||||
ID : 41
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button06"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&32
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button06text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button07
|
||||
Attributes
|
||||
ID : 42
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button07"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&64
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button07text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button08
|
||||
Attributes
|
||||
ID : 43
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button08"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&128
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button08text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer click_timer
|
||||
Attributes
|
||||
ID : 48
|
||||
Scope : local
|
||||
Period (ms): 800
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
lastclick.txt="{\"page\": \"buttonpage04\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
click_timer.en=0
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 50
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page buttonpage03
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page home
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
946
advanced/hmi/nspanel_us_code/climate.txt
Normal file
946
advanced/hmi/nspanel_us_code/climate.txt
Normal file
@@ -0,0 +1,946 @@
|
||||
Page climate
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==1||embedded.val==1)
|
||||
{
|
||||
sendme
|
||||
vis target_icon,0
|
||||
vis target_high,0
|
||||
vis target_low,0
|
||||
vis current_temp,0
|
||||
vis current_icon,0
|
||||
vis slider_high,0
|
||||
vis slider_low,0
|
||||
vis button01,0
|
||||
vis button02,0
|
||||
vis button03,0
|
||||
vis button04,0
|
||||
vis button05,0
|
||||
vis button06,0
|
||||
vis button07,0
|
||||
}else
|
||||
{
|
||||
page home
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Page Exit Event
|
||||
if(timer01.en==1)
|
||||
{
|
||||
timer01.en=0
|
||||
covx temp_number.val,va1.txt,0,0
|
||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climate_position\", \"value\": "+va1.txt+"}"
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
prints climatesetting.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Variable (string) va1
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (string) climatesetting
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 255
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 255
|
||||
|
||||
Variable (int32) temp_offset
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (int32) temp_step
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope: local
|
||||
Value: 1
|
||||
|
||||
Variable (int32) temp_number
|
||||
Attributes
|
||||
ID : 34
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (int32) va0
|
||||
Attributes
|
||||
ID : 35
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (string) back_page
|
||||
Attributes
|
||||
ID : 36
|
||||
Scope : local
|
||||
Text : home
|
||||
Max. Text Size: 15
|
||||
|
||||
Variable (int32) embedded
|
||||
Attributes
|
||||
ID : 37
|
||||
Scope: global
|
||||
Value: 0
|
||||
|
||||
Variable (string) va2
|
||||
Attributes
|
||||
ID : 38
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (string) click_comp
|
||||
Attributes
|
||||
ID : 40
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 8
|
||||
|
||||
Variable (int32) single_slider
|
||||
Attributes
|
||||
ID : 44
|
||||
Scope: local
|
||||
Value: 1
|
||||
|
||||
Variable (int32) active_slider
|
||||
Attributes
|
||||
ID : 45
|
||||
Scope: local
|
||||
Value: 1
|
||||
|
||||
Text current_temp
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text page_label
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 100
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text current_icon
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text target_icon
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text value01_icon
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text value01
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 6
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text value02_icon
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text value02
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 6
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text value03_icon
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text value03
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 6
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text value04_icon
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text value04
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 6
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text button01
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
covx embedded.val,va2.txt,0,0
|
||||
lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"auto\", \"embedded\": "+va2.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text button02
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
covx embedded.val,va2.txt,0,0
|
||||
lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"heat_cool\", \"embedded\": "+va2.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text button03
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
covx embedded.val,va2.txt,0,0
|
||||
lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"heat\", \"embedded\": "+va2.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text button04
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
covx embedded.val,va2.txt,0,0
|
||||
lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"cool\", \"embedded\": "+va2.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text button05
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
covx embedded.val,va2.txt,0,0
|
||||
lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"dry\", \"embedded\": "+va2.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text button06
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
covx embedded.val,va2.txt,0,0
|
||||
lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"fan_only\", \"embedded\": "+va2.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text button07
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
covx embedded.val,va2.txt,0,0
|
||||
lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"off\", \"embedded\": "+va2.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text button08
|
||||
Attributes
|
||||
ID : 31
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button08"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
lastclick.txt="{\"page\": \"climate\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Text button09
|
||||
Attributes
|
||||
ID : 32
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button09"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
lastclick.txt="{\"page\": \"climate\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Text target_high
|
||||
Attributes
|
||||
ID : 33
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text target_low
|
||||
Attributes
|
||||
ID : 46
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Slider slider_high
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
Position : 200
|
||||
Upper range limit: 400
|
||||
Lower range limit: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
if(single_slider.val==1)
|
||||
{
|
||||
slider_low.val=slider_high.val
|
||||
}
|
||||
temp_number.val=slider_high.val*temp_step.val
|
||||
temp_number.val+=temp_offset.val
|
||||
va0.val=temp_number.val/10
|
||||
covx va0.val,target_high.txt,0,0
|
||||
va0.val=temp_number.val%10
|
||||
covx va0.val,va1.txt,0,0
|
||||
target_high.txt+="."+va1.txt
|
||||
timer01.en=1
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Slider slider_low
|
||||
Attributes
|
||||
ID : 43
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
Position : 200
|
||||
Upper range limit: 400
|
||||
Lower range limit: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
if(single_slider.val==1)
|
||||
{
|
||||
slider_high.val=slider_low.val
|
||||
}
|
||||
temp_number.val=slider_high.val*temp_step.val
|
||||
temp_number.val+=temp_offset.val
|
||||
va0.val=temp_number.val/10
|
||||
covx va0.val,target_high.txt,0,0
|
||||
va0.val=temp_number.val%10
|
||||
covx va0.val,va1.txt,0,0
|
||||
target_high.txt+="."+va1.txt
|
||||
timer01.en=1
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 39
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
if(back_page.txt=="buttonpage01")
|
||||
{
|
||||
page buttonpage01
|
||||
}else if(back_page.txt=="buttonpage02")
|
||||
{
|
||||
page buttonpage02
|
||||
}else if(back_page.txt=="buttonpage03")
|
||||
{
|
||||
page buttonpage03
|
||||
}else if(back_page.txt=="buttonpage04")
|
||||
{
|
||||
page buttonpage04
|
||||
}else
|
||||
{
|
||||
page home
|
||||
}
|
||||
|
||||
Hotspot decrease_temp
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
if(slider_high.val>0)
|
||||
{
|
||||
slider_high.val--
|
||||
temp_number.val=slider_high.val*temp_step.val
|
||||
temp_number.val+=temp_offset.val
|
||||
va0.val=temp_number.val/10
|
||||
covx va0.val,target_high.txt,0,0
|
||||
va0.val=temp_number.val%10
|
||||
covx va0.val,va1.txt,0,0
|
||||
target_high.txt+="."+va1.txt
|
||||
}
|
||||
|
||||
Touch Release Event
|
||||
timer01.en=1
|
||||
|
||||
Hotspot increase_temp
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
if(slider_high.val<slider_high.maxval)
|
||||
{
|
||||
slider_high.val++
|
||||
temp_number.val=slider_high.val*temp_step.val
|
||||
temp_number.val+=temp_offset.val
|
||||
va0.val=temp_number.val/10
|
||||
covx va0.val,target_high.txt,0,0
|
||||
va0.val=temp_number.val%10
|
||||
covx va0.val,va1.txt,0,0
|
||||
target_high.txt+="."+va1.txt
|
||||
}
|
||||
|
||||
Touch Release Event
|
||||
timer01.en=1
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer timer01
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Period (ms): 1000
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
timer01.en=0
|
||||
covx embedded.val,va2.txt,0,0
|
||||
covx temp_number.val,va1.txt,0,0
|
||||
climatesetting.txt="{\"page\": \"climate\", \"key\": \"set_temperature\", \"value\": "+va1.txt+", \"embedded\": "+va2.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints climatesetting.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Timer click_timer
|
||||
Attributes
|
||||
ID : 41
|
||||
Scope : local
|
||||
Period (ms): 800
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
lastclick.txt="{\"page\": \"climate\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
click_timer.en=0
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 42
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
202
advanced/hmi/nspanel_us_code/confirm.txt
Normal file
202
advanced/hmi/nspanel_us_code/confirm.txt
Normal file
@@ -0,0 +1,202 @@
|
||||
Page confirm
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Variable (int32) page_id
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope: global
|
||||
Value: 0
|
||||
|
||||
Variable (string) aux
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 255
|
||||
|
||||
Variable (string) page_name
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : global
|
||||
Text :
|
||||
Max. Text Size: 12
|
||||
|
||||
Variable (string) component
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : global
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Text t0
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text title
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Please confirm
|
||||
Max. Text Size : 30
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text body
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Please confirm
|
||||
Max. Text Size : 22
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Button bclose
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
page page_id.val
|
||||
|
||||
Button bt_accept
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
aux.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+component.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints aux.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
page page_id.val
|
||||
|
||||
Button bt_clear
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
page page_id.val
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
238
advanced/hmi/nspanel_us_code/cover.txt
Normal file
238
advanced/hmi/nspanel_us_code/cover.txt
Normal file
@@ -0,0 +1,238 @@
|
||||
Page cover
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Variable (string) va1
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Text : newtxt
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (string) coversetting
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 255
|
||||
|
||||
Variable (string) back_page
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Text : home
|
||||
Max. Text Size: 15
|
||||
|
||||
Text battery_value
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text cover_value
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_label
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 25
|
||||
|
||||
Text icon_state
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text battery_icon
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Slider coverslider
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
Position : 0
|
||||
Upper range limit: 100
|
||||
Lower range limit: 0
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
covx coverslider.val,va1.txt,0,0
|
||||
cover_value.txt=va1.txt+"%"
|
||||
coversetting.txt="{\"page\": \"cover\", \"key\": \"position\", \"value\": "+va1.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints coversetting.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Button cover_open
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"cover\", \"key\": \"open_cover\", \"value\": \"press\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Button cover_close
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"cover\", \"key\": \"close_cover\", \"value\": \"press\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Button cover_stop
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"cover\", \"key\": \"stop_cover\", \"value\": \"press\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
if(back_page.txt=="buttonpage01")
|
||||
{
|
||||
page buttonpage01
|
||||
}else if(back_page.txt=="buttonpage02")
|
||||
{
|
||||
page buttonpage02
|
||||
}else if(back_page.txt=="buttonpage03")
|
||||
{
|
||||
page buttonpage03
|
||||
}else if(back_page.txt=="buttonpage04")
|
||||
{
|
||||
page buttonpage04
|
||||
}else
|
||||
{
|
||||
page home
|
||||
}
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
390
advanced/hmi/nspanel_us_code/entitypage01.txt
Normal file
390
advanced/hmi/nspanel_us_code/entitypage01.txt
Normal file
@@ -0,0 +1,390 @@
|
||||
Page entitypage01
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text value01_label
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value05_label
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value04_label
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value02_label
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value03_label
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text entity01_label
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text value06_label
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value07_label
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value08_label
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value01_pic
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value02_pic
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value03_pic
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value04_pic
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value05_pic
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value06_pic
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value07_pic
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value08_pic
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value01
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value02
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value03
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value04
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value05
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value06
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value07
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value08
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page entitypage04
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page entitypage02
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
page entitypage03
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
page entitypage04
|
||||
}
|
||||
}
|
||||
|
||||
390
advanced/hmi/nspanel_us_code/entitypage02.txt
Normal file
390
advanced/hmi/nspanel_us_code/entitypage02.txt
Normal file
@@ -0,0 +1,390 @@
|
||||
Page entitypage02
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text value01_label
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value05_label
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value04_label
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value02_label
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value03_label
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text entity02_label
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text value06_label
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value07_label
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value08_label
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value01_pic
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value02_pic
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value03_pic
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value04_pic
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value05_pic
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value06_pic
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value07_pic
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value08_pic
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value01
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value02
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value03
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value04
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value05
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value06
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value07
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value08
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page entitypage01
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page entitypage03
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
390
advanced/hmi/nspanel_us_code/entitypage03.txt
Normal file
390
advanced/hmi/nspanel_us_code/entitypage03.txt
Normal file
@@ -0,0 +1,390 @@
|
||||
Page entitypage03
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text value01_label
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value05_label
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value04_label
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value02_label
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value03_label
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text entity03_label
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text value06_label
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value07_label
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value08_label
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value01_pic
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value02_pic
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value03_pic
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value04_pic
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value05_pic
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value06_pic
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value07_pic
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value08_pic
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value01
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value02
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value03
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value04
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value05
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value06
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value07
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value08
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page entitypage02
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page entitypage04
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
page entitypage01
|
||||
}
|
||||
}
|
||||
|
||||
390
advanced/hmi/nspanel_us_code/entitypage04.txt
Normal file
390
advanced/hmi/nspanel_us_code/entitypage04.txt
Normal file
@@ -0,0 +1,390 @@
|
||||
Page entitypage04
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text value01_label
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value05_label
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value04_label
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value02_label
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value03_label
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text entity04_label
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text value06_label
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value07_label
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value08_label
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text value01_pic
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value02_pic
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value03_pic
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value04_pic
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value05_pic
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value06_pic
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value07_pic
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value08_pic
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text value01
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value02
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value03
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value04
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value05
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value06
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value07
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value08
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page entitypage03
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page entitypage01
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
page entitypage01
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
413
advanced/hmi/nspanel_us_code/fan.txt
Normal file
413
advanced/hmi/nspanel_us_code/fan.txt
Normal file
@@ -0,0 +1,413 @@
|
||||
Page fan
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Variable (string) fansetting
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 255
|
||||
|
||||
Variable (string) back_page
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Text : home
|
||||
Max. Text Size: 15
|
||||
|
||||
Variable (string) va0
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Text fan_value
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_label
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 25
|
||||
|
||||
Text icon_state
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Slider fanslider
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
Position : 0
|
||||
Upper range limit: 4
|
||||
Lower range limit: 0
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
sys0=100*fanslider.val/fanslider.maxval
|
||||
covx sys0,va0.txt,0,0
|
||||
fan_value.txt=va0.txt+"%"
|
||||
if(fanslider.val>fanslider.minval)
|
||||
{
|
||||
button_off.pco=59164
|
||||
button_down.pco=59164
|
||||
}else
|
||||
{
|
||||
button_off.pco=10597
|
||||
button_down.pco=10597
|
||||
}
|
||||
if(fanslider.val<fanslider.maxval)
|
||||
{
|
||||
button_up.pco=59164
|
||||
}else
|
||||
{
|
||||
button_up.pco=10597
|
||||
}
|
||||
timer0.en=1
|
||||
|
||||
Button button_up
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
if(fanslider.val<fanslider.maxval)
|
||||
{
|
||||
fanslider.val++
|
||||
sys0=100*fanslider.val/fanslider.maxval
|
||||
covx sys0,va0.txt,0,0
|
||||
fan_value.txt=va0.txt+"%"
|
||||
}
|
||||
if(fanslider.val>fanslider.minval)
|
||||
{
|
||||
button_off.pco=59164
|
||||
button_down.pco=59164
|
||||
}else
|
||||
{
|
||||
button_off.pco=10597
|
||||
button_down.pco=10597
|
||||
}
|
||||
if(fanslider.val<fanslider.maxval)
|
||||
{
|
||||
button_up.pco=59164
|
||||
}else
|
||||
{
|
||||
button_up.pco=10597
|
||||
}
|
||||
|
||||
Touch Release Event
|
||||
timer0.en=1
|
||||
|
||||
Button button_on
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
fanslider.val=fanslider.maxval/2
|
||||
sys0=fanslider.maxval*5
|
||||
sys0%=10
|
||||
if(sys0>=5)
|
||||
{
|
||||
fanslider.val++
|
||||
}
|
||||
sys0=100*fanslider.val/fanslider.maxval
|
||||
covx sys0,va0.txt,0,0
|
||||
fan_value.txt=va0.txt+"%"
|
||||
if(fanslider.val>fanslider.minval)
|
||||
{
|
||||
button_off.pco=59164
|
||||
button_down.pco=59164
|
||||
}else
|
||||
{
|
||||
button_off.pco=10597
|
||||
button_down.pco=10597
|
||||
}
|
||||
if(fanslider.val<fanslider.maxval)
|
||||
{
|
||||
button_up.pco=59164
|
||||
}else
|
||||
{
|
||||
button_up.pco=10597
|
||||
}
|
||||
|
||||
Touch Release Event
|
||||
timer0.en=1
|
||||
|
||||
Button button_down
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
if(fanslider.val>fanslider.minval)
|
||||
{
|
||||
fanslider.val--
|
||||
sys0=100*fanslider.val/fanslider.maxval
|
||||
covx sys0,va0.txt,0,0
|
||||
fan_value.txt=va0.txt+"%"
|
||||
}
|
||||
if(fanslider.val>fanslider.minval)
|
||||
{
|
||||
button_off.pco=59164
|
||||
button_down.pco=59164
|
||||
}else
|
||||
{
|
||||
button_off.pco=10597
|
||||
button_down.pco=10597
|
||||
}
|
||||
if(fanslider.val<fanslider.maxval)
|
||||
{
|
||||
button_up.pco=59164
|
||||
}else
|
||||
{
|
||||
button_up.pco=10597
|
||||
}
|
||||
|
||||
Touch Release Event
|
||||
timer0.en=1
|
||||
|
||||
Button button_off
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
fanslider.val=fanslider.minval
|
||||
sys0=100*fanslider.val/fanslider.maxval
|
||||
covx sys0,va0.txt,0,0
|
||||
fan_value.txt=va0.txt+"%"
|
||||
fansetting.txt="{\"page\": \"fan\", \"key\": \"stop\", \"value\": "+va0.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints fansetting.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
if(fanslider.val>fanslider.minval)
|
||||
{
|
||||
button_off.pco=59164
|
||||
button_down.pco=59164
|
||||
}else
|
||||
{
|
||||
button_off.pco=10597
|
||||
button_down.pco=10597
|
||||
}
|
||||
if(fanslider.val<fanslider.maxval)
|
||||
{
|
||||
button_up.pco=59164
|
||||
}else
|
||||
{
|
||||
button_up.pco=10597
|
||||
}
|
||||
|
||||
Touch Release Event
|
||||
timer0.en=0
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
if(back_page.txt=="buttonpage01")
|
||||
{
|
||||
page buttonpage01
|
||||
}else if(back_page.txt=="buttonpage02")
|
||||
{
|
||||
page buttonpage02
|
||||
}else if(back_page.txt=="buttonpage03")
|
||||
{
|
||||
page buttonpage03
|
||||
}else if(back_page.txt=="buttonpage04")
|
||||
{
|
||||
page buttonpage04
|
||||
}else
|
||||
{
|
||||
page home
|
||||
}
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer timer0
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Period (ms): 1000
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
timer0.en=0
|
||||
sys0=100*fanslider.val/fanslider.maxval
|
||||
covx sys0,va0.txt,0,0
|
||||
fan_value.txt=va0.txt+"%"
|
||||
fansetting.txt="{\"page\": \"fan\", \"key\": \"percentage\", \"value\": "+va0.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints fansetting.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
712
advanced/hmi/nspanel_us_code/home.txt
Normal file
712
advanced/hmi/nspanel_us_code/home.txt
Normal file
@@ -0,0 +1,712 @@
|
||||
Page home
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
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
|
||||
sendme
|
||||
vis bt_notific,is_notification
|
||||
vis bt_qrcode,is_qrcode
|
||||
vis bt_entities,is_entities
|
||||
vis bt_alarm,is_alarm
|
||||
if(display_mode==3)
|
||||
{
|
||||
vis left_bt_text,0
|
||||
vis right_bt_text,0
|
||||
}
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 33
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 100
|
||||
|
||||
Variable (string) click_comp
|
||||
Attributes
|
||||
ID : 41
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 8
|
||||
|
||||
Text time
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
settings_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
settings_timer.en=0
|
||||
|
||||
Text current_temp
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 8
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"home\", \"component\": \"climate\", \"event\": \"click\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text outdoor_temp
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 8
|
||||
|
||||
Text date
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 25
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
settings_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
settings_timer.en=0
|
||||
|
||||
Text value01_state
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text left_bt_text
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text right_bt_text
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text icon_top_01
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Text icon_top_02
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Text icon_top_03
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Text icon_top_04
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Text icon_top_05
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Text icon_top_06
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Text icon_top_07
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Text icon_top_08
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Text icon_top_09
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Text icon_top_10
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Text value01_icon
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Text value03_state
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value03_icon
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Text value02_icon
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Text value02_state
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text wifi_icon
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
settings_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
settings_timer.en=0
|
||||
|
||||
Text indoortempicon
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"home\", \"component\": \"climate\", \"event\": \"click\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text bt_notific
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
if(api==1)
|
||||
{
|
||||
page notification
|
||||
}
|
||||
|
||||
Text bt_qrcode
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
page qrcode
|
||||
|
||||
Text bt_entities
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
if(api==1)
|
||||
{
|
||||
page entitypage01
|
||||
}
|
||||
|
||||
Text bt_alarm
|
||||
Attributes
|
||||
ID : 31
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
if(api==1)
|
||||
{
|
||||
page alarm
|
||||
}
|
||||
|
||||
Text meridiem
|
||||
Attributes
|
||||
ID : 32
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 2
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
settings_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
settings_timer.en=0
|
||||
|
||||
Text button01
|
||||
Attributes
|
||||
ID : 38
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button01"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
lastclick.txt="{\"page\": \"home\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Text button02
|
||||
Attributes
|
||||
ID : 39
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button02"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
lastclick.txt="{\"page\": \"home\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Text button03
|
||||
Attributes
|
||||
ID : 40
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button03"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
lastclick.txt="{\"page\": \"home\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Text button04
|
||||
Attributes
|
||||
ID : 43
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button04"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
lastclick.txt="{\"page\": \"home\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Text button05
|
||||
Attributes
|
||||
ID : 44
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button05"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
lastclick.txt="{\"page\": \"home\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Text button06
|
||||
Attributes
|
||||
ID : 45
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button06"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
lastclick.txt="{\"page\": \"home\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Picture weather
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
if(api==1)
|
||||
{
|
||||
page weather01
|
||||
}
|
||||
|
||||
Dual-state Button left_bt_pic
|
||||
Attributes
|
||||
ID : 35
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 0
|
||||
|
||||
Dual-state Button right_bt_pic
|
||||
Attributes
|
||||
ID : 36
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 0
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer settings_timer
|
||||
Attributes
|
||||
ID : 34
|
||||
Scope : local
|
||||
Period (ms): 1000
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
page settings
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 37
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=25
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
Timer click_timer
|
||||
Attributes
|
||||
ID : 42
|
||||
Scope : local
|
||||
Period (ms): 800
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
lastclick.txt="{\"page\": \"home\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
click_timer.en=0
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
wakeup_timer.en=1 // Set brightness to saved value (from HA)
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx&&api==1)
|
||||
{
|
||||
page buttonpage04
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2&&api==1)
|
||||
{
|
||||
page buttonpage01
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100&&api==1)
|
||||
{
|
||||
page buttonpage02
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100&&api==1)
|
||||
{
|
||||
page buttonpage03
|
||||
}
|
||||
}
|
||||
|
||||
386
advanced/hmi/nspanel_us_code/keyb_num.txt
Normal file
386
advanced/hmi/nspanel_us_code/keyb_num.txt
Normal file
@@ -0,0 +1,386 @@
|
||||
Page keyb_num
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page page_id.val
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Variable (int32) page_id
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (string) key
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (string) domain
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Text : alarm
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (string) aux
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 255
|
||||
|
||||
Variable (string) value
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Text t0
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text pin
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 25
|
||||
|
||||
Text title
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Alarm
|
||||
Max. Text Size : 10
|
||||
|
||||
Button b1
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text : 1
|
||||
Max. Text Size : 1
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
pin.txt+=b1.txt
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Button bclose
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
page page_id.val
|
||||
|
||||
Button b2
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text : 2
|
||||
Max. Text Size : 1
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
pin.txt+=b2.txt
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Button b3
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text : 3
|
||||
Max. Text Size : 1
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
pin.txt+=b3.txt
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Button b4
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text : 4
|
||||
Max. Text Size : 1
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
pin.txt+=b4.txt
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Button b5
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text : 5
|
||||
Max. Text Size : 1
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
pin.txt+=b5.txt
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Button b6
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text : 6
|
||||
Max. Text Size : 1
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
pin.txt+=b6.txt
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Button b7
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text : 7
|
||||
Max. Text Size : 1
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
pin.txt+=b7.txt
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Button b8
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text : 8
|
||||
Max. Text Size : 1
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
pin.txt+=b8.txt
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Button b9
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text : 9
|
||||
Max. Text Size : 1
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
pin.txt+=b9.txt
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Button bclear
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text : <
|
||||
Max. Text Size : 5
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
pin.txt=""
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Button b0
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text : 0
|
||||
Max. Text Size : 1
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
pin.txt+=b0.txt
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Button benter
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text : OK
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
aux.txt="{\"page\": \"keyb_num\", \"key\": \""+key.txt+"\", \"value\": \""+value.txt+"\", \"pin\": \""+pin.txt+"\", \"base_domain\": \""+domain.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints aux.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Button bview
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text : O
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
if(pin.pw==1)
|
||||
{
|
||||
pin.pw=0
|
||||
}else
|
||||
{
|
||||
pin.pw=1
|
||||
}
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
704
advanced/hmi/nspanel_us_code/light.txt
Normal file
704
advanced/hmi/nspanel_us_code/light.txt
Normal file
@@ -0,0 +1,704 @@
|
||||
Page light
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
vis light_b_press,1
|
||||
vis lightslider,1
|
||||
vis light_value,1
|
||||
// #### OFF Button #####
|
||||
vis temp_b_press,0
|
||||
vis color_b_pres,0
|
||||
// #### OFF Value #####
|
||||
vis temp_value,0
|
||||
vis light_value_2,0
|
||||
// #### OFF Slider #####
|
||||
vis tempslider,0
|
||||
vis colorwheel,0
|
||||
// #### Hide color & temp buttons #####
|
||||
vis temp_touch,0
|
||||
vis temp_value_2,0
|
||||
vis temp_button,0
|
||||
vis color_touch,0
|
||||
vis color_button,0
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Variable (int32) rgb565
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (string) va1
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Text : newtxt
|
||||
Max. Text Size: 20
|
||||
|
||||
Variable (string) va2
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Text : newtxt
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (string) va3
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Text : newtxt
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (int32) currenttab
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (string) lightsetting
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 255
|
||||
|
||||
Variable (string) back_page
|
||||
Attributes
|
||||
ID : 31
|
||||
Scope : local
|
||||
Text : home
|
||||
Max. Text Size: 15
|
||||
|
||||
Number ring
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Value : 0
|
||||
|
||||
Number field
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Value : 0
|
||||
|
||||
Text light_value
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_label
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 25
|
||||
|
||||
Text temp_value
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text light_value_2
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text temp_value_2
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text icon_state
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Picture light_button
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture color_button
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture temp_button
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture light_b_press
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture temp_b_press
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture color_b_pres
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture colorwheel
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
// Circular Color Picker for Nextion (c) Max Zuidberg 2022
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
//
|
||||
// Put this code in the touch press or release
|
||||
// event of the pic component with the color wheel.
|
||||
// Requires the two variables field.val and ring.val
|
||||
//
|
||||
// sya0 = x, sya1 = sya1
|
||||
// Note the usage of the hidden sya0, sya1 variables
|
||||
// within event code as local, temporary variable is fine.
|
||||
sya0=tch0
|
||||
sya1=tch1
|
||||
//
|
||||
// Convert absolute coordinates to coordinates relative to
|
||||
// the color wheel center.
|
||||
// sys0 = x_center, sys1 = y_center
|
||||
sys0=colorwheel.w/2
|
||||
sys0+=colorwheel.x
|
||||
sys1=colorwheel.h/2
|
||||
sys1+=colorwheel.y
|
||||
sya0-=sys0
|
||||
sya1-=sys1
|
||||
//
|
||||
// Determine ring
|
||||
ring.val=0
|
||||
// sys0 = r^2 = x^2 + y^2
|
||||
sys0=sya0*sya0
|
||||
sys1=sya1*sya1
|
||||
sys0+=sys1
|
||||
// repeat for all rings
|
||||
if(sys0>=156)
|
||||
{
|
||||
ring.val++
|
||||
}
|
||||
if(sys0>=625)
|
||||
{
|
||||
ring.val++
|
||||
}
|
||||
if(sys0>=1406)
|
||||
{
|
||||
ring.val++
|
||||
}
|
||||
if(sys0>=2500)
|
||||
{
|
||||
ring.val++
|
||||
}
|
||||
if(sys0>=3906)
|
||||
{
|
||||
ring.val++
|
||||
}
|
||||
if(sys0>=5625)
|
||||
{
|
||||
ring.val++
|
||||
}
|
||||
if(sys0>=7656)
|
||||
{
|
||||
ring.val++
|
||||
}
|
||||
//
|
||||
// Determine quadrant (0-3). Note: pixel y coords are inverted
|
||||
// compared to mathematical y coords. But we want math. quadrants.
|
||||
sya1*=-1
|
||||
sys2=0
|
||||
if(sya1<0)
|
||||
{
|
||||
sys2+=2
|
||||
}
|
||||
sys0=sya0*sya1
|
||||
if(sys0<0)
|
||||
{
|
||||
sys2+=1
|
||||
// In this case we also want to swap x and y otherwise the
|
||||
// atan(abs(x/y)) (calculated below) gives values running
|
||||
// "the wrong way" (cw instead of ccw).
|
||||
sys1=sya1
|
||||
sya1=sya0
|
||||
sya0=sys1
|
||||
}
|
||||
//
|
||||
field.val=sys2*6
|
||||
//
|
||||
// x,y sign is not required anymore
|
||||
if(sya0<0)
|
||||
{
|
||||
sya0*=-1
|
||||
}
|
||||
if(sya1<0)
|
||||
{
|
||||
sya1*=-1
|
||||
}
|
||||
//
|
||||
// Determine field in ring quadrant
|
||||
// Factor 100000 chosen more or less arbitrarily.
|
||||
// sys0 = 100000 * tan_a = 100000 * y / x
|
||||
sys0=100000*sya1
|
||||
sys0/=sya0
|
||||
// repeat for all fields
|
||||
if(sys0>=26794)
|
||||
{
|
||||
field.val++
|
||||
}
|
||||
if(sys0>=57735)
|
||||
{
|
||||
field.val++
|
||||
}
|
||||
if(sys0>=99999)
|
||||
{
|
||||
field.val++
|
||||
}
|
||||
if(sys0>=173205)
|
||||
{
|
||||
field.val++
|
||||
}
|
||||
if(sys0>=373205)
|
||||
{
|
||||
field.val++
|
||||
}
|
||||
covx r,va1.txt,0,0
|
||||
covx g,va2.txt,0,0
|
||||
covx b,va3.txt,0,0
|
||||
va1.txt=""
|
||||
va2.txt=""
|
||||
va3.txt=""
|
||||
|
||||
Touch Release Event
|
||||
// Adjust field.val "orientation" and offset to match the h value of the colors in the wheel
|
||||
h=23-field.val// 0 <= field.val <= 23
|
||||
// h is expected to be 0-6*256 (see hsv2rgb)
|
||||
h*=6*256
|
||||
h/=24// Number of fields
|
||||
//
|
||||
// s is expected to be 0-256 (see hsv2rgb)
|
||||
s=ring.val*256
|
||||
s/=8// Number of rings
|
||||
// no "value" selectable; fix it to the maximum (matching the colors in the wheels shown.
|
||||
v=255
|
||||
click hsv2rgb,0
|
||||
click rgb888to565,0
|
||||
//colPreview.bco=rgb565.val
|
||||
covx r,va1.txt,0,0
|
||||
covx g,va2.txt,0,0
|
||||
covx b,va3.txt,0,0
|
||||
lightsetting.txt="{\"page\": \"light\", \"component\": \"rgb_color\", \"value\": ["+va1.txt+", "+va2.txt+", "+va3.txt+"]}"
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
prints lightsetting.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
va1.txt=""
|
||||
va2.txt=""
|
||||
va3.txt=""
|
||||
|
||||
Slider lightslider
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
Position : 0
|
||||
Upper range limit: 100
|
||||
Lower range limit: 0
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
covx lightslider.val,va1.txt,0,0
|
||||
light_value.txt=va1.txt+"%"
|
||||
light_value_2.txt=va1.txt+"%"
|
||||
lightsetting.txt="{\"page\": \"light\", \"key\": \"brightness_pct\", \"value\": "+va1.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lightsetting.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Slider tempslider
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
Position : 0
|
||||
Upper range limit: 500
|
||||
Lower range limit: 153
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
covx tempslider.val,va1.txt,0,0
|
||||
temp_value.txt=va1.txt
|
||||
temp_value_2.txt=va1.txt
|
||||
lightsetting.txt="{\"page\": \"light\", \"key\": \"color_temp\", \"value\": "+va1.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lightsetting.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 32
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
if(back_page.txt=="buttonpage01")
|
||||
{
|
||||
page buttonpage01
|
||||
}else if(back_page.txt=="buttonpage02")
|
||||
{
|
||||
page buttonpage02
|
||||
}else if(back_page.txt=="buttonpage03")
|
||||
{
|
||||
page buttonpage03
|
||||
}else if(back_page.txt=="buttonpage04")
|
||||
{
|
||||
page buttonpage04
|
||||
}else
|
||||
{
|
||||
page home
|
||||
}
|
||||
|
||||
Hotspot hsv2rgb
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
// https://de.wikipedia.org/wiki/HSV-Farbraum#Umrechnung_HSV_in_RGB
|
||||
// The values range from 0..255 instead of 0..1
|
||||
// h ranges from 0..(6*256)
|
||||
if(s>=256)
|
||||
{
|
||||
s=255
|
||||
}else if(s<0)
|
||||
{
|
||||
s=0
|
||||
}
|
||||
if(v>=256)
|
||||
{
|
||||
v=255
|
||||
}else if(v<0)
|
||||
{
|
||||
v=0
|
||||
}
|
||||
f=h&0xff
|
||||
p=256-s
|
||||
p*=v
|
||||
p=p>>8// / 256
|
||||
q=s*f// 0-256*256 = 0-65536
|
||||
q=65536-q
|
||||
q*=v
|
||||
q=q>>16
|
||||
t=256-f
|
||||
t*=s
|
||||
t=65536-t
|
||||
t*=v
|
||||
t=t>>16
|
||||
//
|
||||
f=h>>8
|
||||
if(f==1)
|
||||
{
|
||||
r=q
|
||||
g=v
|
||||
b=p
|
||||
}else if(f==2)
|
||||
{
|
||||
r=p
|
||||
g=v
|
||||
b=t
|
||||
}else if(f==3)
|
||||
{
|
||||
r=p
|
||||
g=q
|
||||
b=v
|
||||
}else if(f==4)
|
||||
{
|
||||
r=t
|
||||
g=p
|
||||
b=v
|
||||
}else if(f==5)
|
||||
{
|
||||
r=v
|
||||
g=p
|
||||
b=q
|
||||
}else
|
||||
{
|
||||
r=v
|
||||
g=t
|
||||
b=p
|
||||
}
|
||||
|
||||
Hotspot rgb888to565
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
r=r&0xff
|
||||
g=g&0xff
|
||||
b=b&0xff
|
||||
sys1=r>>3
|
||||
sys2=sys1<<6
|
||||
sys1=g>>2
|
||||
sys2+=sys1
|
||||
sys2=sys2<<5
|
||||
sys1=b>>3
|
||||
sys2+=sys1
|
||||
rgb565.val=sys2
|
||||
|
||||
Hotspot light_touch
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
vis light_b_press,1
|
||||
vis lightslider,1
|
||||
vis light_value,1
|
||||
vis temp_value_2,1
|
||||
// #### OFF Button #####
|
||||
vis temp_b_press,0
|
||||
vis color_b_pres,0
|
||||
// #### OFF Value #####
|
||||
vis temp_value,0
|
||||
vis light_value_2,0
|
||||
// #### OFF Slider #####
|
||||
vis tempslider,0
|
||||
vis colorwheel,0
|
||||
|
||||
Hotspot temp_touch
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
vis temp_b_press,1
|
||||
vis tempslider,1
|
||||
vis temp_value,1
|
||||
vis light_value_2,1
|
||||
// #### OFF Button #####
|
||||
vis light_b_press,0
|
||||
vis color_b_pres,0
|
||||
// #### OFF Value #####
|
||||
vis light_value,0
|
||||
vis temp_value_2,0
|
||||
// #### OFF Slider #####
|
||||
vis lightslider,0
|
||||
vis colorwheel,0
|
||||
|
||||
Hotspot color_touch
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
vis color_b_pres,1
|
||||
vis colorwheel,1
|
||||
vis light_value_2,1
|
||||
// #### OFF Button #####
|
||||
vis light_b_press,0
|
||||
vis temp_b_press,0
|
||||
// #### OFF Value #####
|
||||
vis light_value,0
|
||||
vis temp_value,0
|
||||
vis temp_value_2,0
|
||||
// #### OFF Slider #####
|
||||
vis lightslider,0
|
||||
vis tempslider,0
|
||||
// #### OFF Color #####
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 33
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
624
advanced/hmi/nspanel_us_code/media_player.txt
Normal file
624
advanced/hmi/nspanel_us_code/media_player.txt
Normal file
@@ -0,0 +1,624 @@
|
||||
Page media_player
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Variable (string) back_page
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Text : home
|
||||
Max. Text Size: 15
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 255
|
||||
|
||||
Variable (string) va0
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (int32) is_muted
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (int32) prg_current
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (int32) prg_total
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Text page_label
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Media Player
|
||||
Max. Text Size : 25
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text icon_state
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text vol_text
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 5
|
||||
|
||||
Text bt_vol_down
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
if(vol_slider.val>0)
|
||||
{
|
||||
vol_slider.val--
|
||||
covx vol_slider.val,va0.txt,0,0
|
||||
vol_text.txt=va0.txt+"%"
|
||||
timer0.en=1
|
||||
}
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text bt_vol_up
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
if(vol_slider.val<100)
|
||||
{
|
||||
vol_slider.val++
|
||||
covx vol_slider.val,va0.txt,0,0
|
||||
vol_text.txt=va0.txt+"%"
|
||||
timer0.en=1
|
||||
}
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text bt_mute
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
if(is_muted.val==0)
|
||||
{
|
||||
va0.txt="true"
|
||||
}else
|
||||
{
|
||||
va0.txt="false"
|
||||
}
|
||||
lastclick.txt="{\"page\": \"media_player\", \"key\": \"volume_mute\", \"value\": \""+va0.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text time_current
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text time_total
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text track
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 50
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text artist
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 50
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text bt_prev
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"media_player\", \"key\": \"media_previous_track\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text bt_play_pause
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"media_player\", \"key\": \"media_play_pause\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text bt_next
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"media_player\", \"key\": \"media_next_track\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text bt_on_off
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"media_player\", \"key\": \"toggle\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Progress Bar time_progress
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
Value : 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Slider vol_slider
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
Position : 0
|
||||
Upper range limit: 100
|
||||
Lower range limit: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
covx vol_slider.val,va0.txt,0,0
|
||||
vol_text.txt=va0.txt+"%"
|
||||
timer0.en=1
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
if(back_page.txt=="buttonpage01")
|
||||
{
|
||||
page buttonpage01
|
||||
}else if(back_page.txt=="buttonpage02")
|
||||
{
|
||||
page buttonpage02
|
||||
}else if(back_page.txt=="buttonpage03")
|
||||
{
|
||||
page buttonpage03
|
||||
}else if(back_page.txt=="buttonpage04")
|
||||
{
|
||||
page buttonpage04
|
||||
}else
|
||||
{
|
||||
page home
|
||||
}
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
Timer timer0
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Period (ms): 1000
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
timer0.en=0
|
||||
covx vol_slider.val,va0.txt,0,0
|
||||
vol_text.txt=va0.txt+"%"
|
||||
lastclick.txt="{\"page\": \"media_player\", \"key\": \"volume_set\", \"value\": "+va0.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Timer prg_timer
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Period (ms): 1000
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(prg_current.val<prg_total.val&&prg_total.val>0)
|
||||
{
|
||||
prg_current.val++
|
||||
time_progress.val=100*prg_current.val/prg_total.val
|
||||
covx prg_current.val,time_current.txt,0,0
|
||||
}
|
||||
// Progress - Total
|
||||
sys0=prg_total.val/3600 //hours
|
||||
sys2=prg_total.val%3600 //remainder
|
||||
sys1=sys2/60 //minutes
|
||||
sys2%=60 //seconds
|
||||
time_total.txt=""
|
||||
if(sys0>0)
|
||||
{
|
||||
covx sys0,time_total.txt,0,0
|
||||
time_total.txt+=":"
|
||||
if(sys1<10)
|
||||
{
|
||||
time_total.txt+="0"
|
||||
}
|
||||
}
|
||||
covx sys1,va0.txt,0,0
|
||||
time_total.txt+=va0.txt+":"
|
||||
if(sys2<10)
|
||||
{
|
||||
time_total.txt+="0"
|
||||
}
|
||||
covx sys2,va0.txt,0,0
|
||||
time_total.txt+=va0.txt
|
||||
// Progress - Current
|
||||
sys0=prg_current.val/3600 //hours
|
||||
sys2=prg_current.val%3600 //remainder
|
||||
sys1=sys2/60 //minutes
|
||||
sys2%=60 //seconds
|
||||
time_current.txt=""
|
||||
if(sys0>0)
|
||||
{
|
||||
covx sys0,time_current.txt,0,0
|
||||
time_current.txt+=":"
|
||||
if(sys1<10)
|
||||
{
|
||||
time_current.txt+="0"
|
||||
}
|
||||
}
|
||||
covx sys1,va0.txt,0,0
|
||||
time_current.txt+=va0.txt+":"
|
||||
if(sys2<10)
|
||||
{
|
||||
time_current.txt+="0"
|
||||
}
|
||||
covx sys2,va0.txt,0,0
|
||||
time_current.txt+=va0.txt
|
||||
|
||||
207
advanced/hmi/nspanel_us_code/notification.txt
Normal file
207
advanced/hmi/nspanel_us_code/notification.txt
Normal file
@@ -0,0 +1,207 @@
|
||||
Page notification
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 100
|
||||
|
||||
Text notifi_text01
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 250
|
||||
|
||||
Text notifi_label
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text loading
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Button bt_accept
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"notification\", \"component\": \"accept\", \"value\": \"release\"}"
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Button bt_clear
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"notification\", \"component\": \"clear\", \"value\": \"release\"}"
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
98
advanced/hmi/nspanel_us_code/nspanel_us_Stats.txt
Normal file
98
advanced/hmi/nspanel_us_code/nspanel_us_Stats.txt
Normal file
@@ -0,0 +1,98 @@
|
||||
Program.s
|
||||
0 Component(s)
|
||||
8 Line(s) of event code
|
||||
8 Unique line(s) of event code
|
||||
screensaver
|
||||
3 Component(s)
|
||||
8 Line(s) of event code
|
||||
7 Unique line(s) of event code
|
||||
qrcode
|
||||
6 Component(s)
|
||||
46 Line(s) of event code
|
||||
28 Unique line(s) of event code
|
||||
boot
|
||||
11 Component(s)
|
||||
6 Line(s) of event code
|
||||
5 Unique line(s) of event code
|
||||
settings
|
||||
15 Component(s)
|
||||
65 Line(s) of event code
|
||||
32 Unique line(s) of event code
|
||||
weather05
|
||||
19 Component(s)
|
||||
47 Line(s) of event code
|
||||
29 Unique line(s) of event code
|
||||
coversettings
|
||||
16 Component(s)
|
||||
90 Line(s) of event code
|
||||
35 Unique line(s) of event code
|
||||
weather01
|
||||
19 Component(s)
|
||||
47 Line(s) of event code
|
||||
29 Unique line(s) of event code
|
||||
notification
|
||||
12 Component(s)
|
||||
60 Line(s) of event code
|
||||
31 Unique line(s) of event code
|
||||
weather02
|
||||
19 Component(s)
|
||||
47 Line(s) of event code
|
||||
29 Unique line(s) of event code
|
||||
weather04
|
||||
19 Component(s)
|
||||
47 Line(s) of event code
|
||||
29 Unique line(s) of event code
|
||||
entitypage03
|
||||
29 Component(s)
|
||||
48 Line(s) of event code
|
||||
30 Unique line(s) of event code
|
||||
entitypage04
|
||||
29 Component(s)
|
||||
48 Line(s) of event code
|
||||
29 Unique line(s) of event code
|
||||
entitypage01
|
||||
29 Component(s)
|
||||
49 Line(s) of event code
|
||||
30 Unique line(s) of event code
|
||||
weather03
|
||||
19 Component(s)
|
||||
47 Line(s) of event code
|
||||
29 Unique line(s) of event code
|
||||
climate
|
||||
25 Component(s)
|
||||
391 Line(s) of event code
|
||||
105 Unique line(s) of event code
|
||||
entitypage02
|
||||
29 Component(s)
|
||||
47 Line(s) of event code
|
||||
29 Unique line(s) of event code
|
||||
lightsettings
|
||||
33 Component(s)
|
||||
306 Line(s) of event code
|
||||
164 Unique line(s) of event code
|
||||
buttonpage03
|
||||
46 Component(s)
|
||||
162 Line(s) of event code
|
||||
49 Unique line(s) of event code
|
||||
home
|
||||
55 Component(s)
|
||||
130 Line(s) of event code
|
||||
51 Unique line(s) of event code
|
||||
buttonpage01
|
||||
46 Component(s)
|
||||
161 Line(s) of event code
|
||||
48 Unique line(s) of event code
|
||||
buttonpage02
|
||||
46 Component(s)
|
||||
162 Line(s) of event code
|
||||
49 Unique line(s) of event code
|
||||
buttonpage04
|
||||
46 Component(s)
|
||||
161 Line(s) of event code
|
||||
48 Unique line(s) of event code
|
||||
|
||||
Total
|
||||
22 Page(s)
|
||||
571 Component(s)
|
||||
2183 Line(s) of event code
|
||||
431 Unique line(s) of event code
|
||||
143
advanced/hmi/nspanel_us_code/qrcode.txt
Normal file
143
advanced/hmi/nspanel_us_code/qrcode.txt
Normal file
@@ -0,0 +1,143 @@
|
||||
Page qrcode
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
sendme
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text qrcode_label
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
QR Code qrcode_value
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
Text :
|
||||
Max. Text Size : 75
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
36
advanced/hmi/nspanel_us_code/screensaver.txt
Normal file
36
advanced/hmi/nspanel_us_code/screensaver.txt
Normal file
@@ -0,0 +1,36 @@
|
||||
Page screensaver
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
sendme
|
||||
dim=0
|
||||
|
||||
Touch Release Event
|
||||
page orign.val
|
||||
|
||||
Variable (int32) orign
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
TouchCap wakeup
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page orign.val
|
||||
|
||||
453
advanced/hmi/nspanel_us_code/settings.txt
Normal file
453
advanced/hmi/nspanel_us_code/settings.txt
Normal file
@@ -0,0 +1,453 @@
|
||||
Page settings
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
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
|
||||
sendme
|
||||
covx brightslider.val,bright_text.txt,0,0
|
||||
bright_text.txt+="%"
|
||||
covx dimslider.val,dim_text.txt,0,0
|
||||
dim_text.txt+="%"
|
||||
vis lbl_sleep,0
|
||||
vis bt_sleep,0
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text bright_text
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : 80%
|
||||
Max. Text Size : 4
|
||||
|
||||
Text dim_text
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : 20%
|
||||
Max. Text Size : 4
|
||||
|
||||
Text lbl_reboot
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : Reboot
|
||||
Max. Text Size : 25
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
tm_boot_page.en=1
|
||||
|
||||
Touch Release Event
|
||||
tm_boot_page.en=0
|
||||
|
||||
Text lbl_sleep
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : Sleep mode
|
||||
Max. Text Size : 25
|
||||
|
||||
Text lbl_bright
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : Bright
|
||||
Max. Text Size : 25
|
||||
|
||||
Text lbl_dim
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : Dim
|
||||
Max. Text Size : 25
|
||||
|
||||
Text lbl_brightness
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text : Brightness
|
||||
Max. Text Size : 25
|
||||
|
||||
Text t0
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
if(brightslider.val<100)
|
||||
{
|
||||
brightslider.val++
|
||||
covx brightslider.val,bright_text.txt,0,0
|
||||
bright_text.txt+="%"
|
||||
printh 91
|
||||
prints "brightslider",0
|
||||
printh 00
|
||||
prints brightslider.val,0
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Text t1
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
if(dimslider.val<100)
|
||||
{
|
||||
dimslider.val++
|
||||
covx dimslider.val,dim_text.txt,0,0
|
||||
dim_text.txt+="%"
|
||||
printh 91
|
||||
prints "dimslider",0
|
||||
printh 00
|
||||
prints dimslider.val,0
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Text t2
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
if(dimslider.val>0)
|
||||
{
|
||||
dimslider.val--
|
||||
covx dimslider.val,dim_text.txt,0,0
|
||||
dim_text.txt+="%"
|
||||
printh 91
|
||||
prints "dimslider",0
|
||||
printh 00
|
||||
prints dimslider.val,0
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Text t3
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
if(brightslider.val>0)
|
||||
{
|
||||
brightslider.val--
|
||||
covx brightslider.val,bright_text.txt,0,0
|
||||
bright_text.txt+="%"
|
||||
printh 91
|
||||
prints "brightslider",0
|
||||
printh 00
|
||||
prints brightslider.val,0
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Slider brightslider
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
Position : 80
|
||||
Upper range limit: 100
|
||||
Lower range limit: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
if(tm_bright.en==0)
|
||||
{
|
||||
tm_bright.en=1
|
||||
}
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Slider dimslider
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
Position : 20
|
||||
Upper range limit: 100
|
||||
Lower range limit: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
if(tm_dim.en==0)
|
||||
{
|
||||
tm_dim.en=1
|
||||
}
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Dual-state Button bt_reboot
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Dual-state Button bt_sleep
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Hotspot bt_bright_down
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
if(brightslider.val>0)
|
||||
{
|
||||
brightslider.val--
|
||||
covx brightslider.val,bright_text.txt,0,0
|
||||
bright_text.txt+="%"
|
||||
printh 91
|
||||
prints "brightslider",0
|
||||
printh 00
|
||||
prints brightslider.val,0
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Hotspot bt_bright_up
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
if(brightslider.val<100)
|
||||
{
|
||||
brightslider.val++
|
||||
covx brightslider.val,bright_text.txt,0,0
|
||||
bright_text.txt+="%"
|
||||
printh 91
|
||||
prints "brightslider",0
|
||||
printh 00
|
||||
prints brightslider.val,0
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Hotspot bt_dim_down
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
if(dimslider.val>0)
|
||||
{
|
||||
dimslider.val--
|
||||
covx dimslider.val,dim_text.txt,0,0
|
||||
dim_text.txt+="%"
|
||||
printh 91
|
||||
prints "dimslider",0
|
||||
printh 00
|
||||
prints dimslider.val,0
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Hotspot bt_dim_up
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
if(dimslider.val<100)
|
||||
{
|
||||
dimslider.val++
|
||||
covx dimslider.val,dim_text.txt,0,0
|
||||
dim_text.txt+="%"
|
||||
printh 91
|
||||
prints "dimslider",0
|
||||
printh 00
|
||||
prints dimslider.val,0
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
Timer tm_bright
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
printh 92
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"settings\", \"component\": \"touchevent\", \"value\": \"press\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Timer tm_dim
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
covx dimslider.val,dim_text.txt,0,0
|
||||
dim_text.txt+="%"
|
||||
printh 91
|
||||
prints "dimslider",0
|
||||
printh 00
|
||||
prints dimslider.val,0
|
||||
printh FF FF FF
|
||||
tm_dim.en=0
|
||||
|
||||
Timer tm_boot_page
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Period (ms): 1000
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
page boot
|
||||
|
||||
287
advanced/hmi/nspanel_us_code/weather01.txt
Normal file
287
advanced/hmi/nspanel_us_code/weather01.txt
Normal file
@@ -0,0 +1,287 @@
|
||||
Page weather01
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text day
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text date
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 25
|
||||
|
||||
Text temperature
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value01
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value05
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value04
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value02
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value03
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value01_icon
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value02_icon
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value03_icon
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value04_icon
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value05_icon
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text loading
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Picture weather_icon
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page weather05
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page weather02
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
287
advanced/hmi/nspanel_us_code/weather02.txt
Normal file
287
advanced/hmi/nspanel_us_code/weather02.txt
Normal file
@@ -0,0 +1,287 @@
|
||||
Page weather02
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text day
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text loading
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Text date
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 25
|
||||
|
||||
Text temperature
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value01
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value05
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value04
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value02
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value03
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value01_icon
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value02_icon
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value03_icon
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value04_icon
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value05_icon
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Picture weather_icon
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page weather01
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page weather03
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
287
advanced/hmi/nspanel_us_code/weather03.txt
Normal file
287
advanced/hmi/nspanel_us_code/weather03.txt
Normal file
@@ -0,0 +1,287 @@
|
||||
Page weather03
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text day
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text loading
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Text date
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 25
|
||||
|
||||
Text temperature
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value01
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value05
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value04
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value02
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value03
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value01_icon
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value02_icon
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value03_icon
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value04_icon
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value05_icon
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Picture weather_icon
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page weather02
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page weather04
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
287
advanced/hmi/nspanel_us_code/weather04.txt
Normal file
287
advanced/hmi/nspanel_us_code/weather04.txt
Normal file
@@ -0,0 +1,287 @@
|
||||
Page weather04
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text day
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text loading
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Text date
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 25
|
||||
|
||||
Text temperature
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value01
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value05
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value04
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value02
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value03
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value01_icon
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value02_icon
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value03_icon
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value04_icon
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value05_icon
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Picture weather_icon
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page weather03
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page weather05
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
287
advanced/hmi/nspanel_us_code/weather05.txt
Normal file
287
advanced/hmi/nspanel_us_code/weather05.txt
Normal file
@@ -0,0 +1,287 @@
|
||||
Page weather05
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text day
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Text loading
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 1
|
||||
|
||||
Text date
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 25
|
||||
|
||||
Text temperature
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value01
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value05
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value04
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value02
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value03
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 15
|
||||
|
||||
Text value01_icon
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value02_icon
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value03_icon
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value04_icon
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text value05_icon
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Picture weather_icon
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page weather04
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page weather01
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
BIN
advanced/hmi/nspanel_us_land.HMI
Normal file
BIN
advanced/hmi/nspanel_us_land.HMI
Normal file
Binary file not shown.
26
advanced/hmi/nspanel_us_land_code/Program.s.txt
Normal file
26
advanced/hmi/nspanel_us_land_code/Program.s.txt
Normal file
@@ -0,0 +1,26 @@
|
||||
Program.s
|
||||
//The following code is only run once when power on, and is generally used for global variable definition and power on initialization data
|
||||
int sys0=0,sys1=0,sys2=0,swipex=0,swipey=0,swipex2=0,swipey2=0,swipec=0,swipec2=0,swipedx=100,swipedy=100 //At present, the definition of global variable only supports 4-byte signed integer (int), and other types of global quantity declaration are not supported. If you want to use string type, you can use variable control in the page to implement
|
||||
int r=0,g=0,b=0
|
||||
int h=0,s=0,v=0
|
||||
int p=0,q=0,t=0,f=0
|
||||
int dimdelta=0
|
||||
int api=0 // 0 = disconnected from HA, 1 = connected to HA
|
||||
int is_alarm=0,is_entities=0,is_qrcode=0,is_notification=0
|
||||
int brightness=100,brightness_dim=40
|
||||
int display_mode=3 // 1 = EU, 2 = US, 3 = US landscape
|
||||
//bauds=115200//Configure baudrate
|
||||
recmod=0//Serial data parsing mode:0-Passive mode;1-Active mode
|
||||
randset 0,65535//used for touchevent sensor
|
||||
printh 00 00 00 ff ff ff 88 ff ff ff//Output power on information to serial port
|
||||
if(display_mode==1)
|
||||
{
|
||||
lcd_dev fffb 0002 0000 0020// Fix touch offset for EU Version
|
||||
}
|
||||
printh 92
|
||||
prints "currentpage",0
|
||||
printh 00
|
||||
prints "",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
page 8//Power on start page boot
|
||||
447
advanced/hmi/nspanel_us_land_code/alarm.txt
Normal file
447
advanced/hmi/nspanel_us_land_code/alarm.txt
Normal file
@@ -0,0 +1,447 @@
|
||||
Page alarm
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
vis bt_home,0
|
||||
vis bt_away,0
|
||||
vis bt_night,0
|
||||
vis bt_vacat,0
|
||||
vis bt_bypass,0
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 255
|
||||
|
||||
Variable (string) back_page
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Text : home
|
||||
Max. Text Size: 15
|
||||
|
||||
Variable (string) code_format
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 15
|
||||
|
||||
Variable (string) code_arm_req
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 1
|
||||
|
||||
Text page_label
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Alarm Control Panel
|
||||
Max. Text Size : 25
|
||||
|
||||
Text icon_state
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text bt_home_text
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Home
|
||||
Max. Text Size : 22
|
||||
|
||||
Text bt_away_text
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Away
|
||||
Max. Text Size : 22
|
||||
|
||||
Text bt_night_text
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Night
|
||||
Max. Text Size : 22
|
||||
|
||||
Text bt_vacat_text
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Vacation
|
||||
Max. Text Size : 22
|
||||
|
||||
Text bt_bypass_text
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Bypass
|
||||
Max. Text Size : 22
|
||||
|
||||
Text bt_disarm_text
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Disarm
|
||||
Max. Text Size : 22
|
||||
|
||||
Text bt_home_icon
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text bt_away_icon
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text bt_night_icon
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text bt_vacat_icon
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text bt_bypass_icon
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text bt_disarm_icon
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Picture bt_home_pic
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture bt_away_pic
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture bt_night_pic
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture bt_vacat_pic
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture bt_bypass_pic
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture bt_disarm_pic
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 31
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
if(back_page.txt=="buttonpage01")
|
||||
{
|
||||
page buttonpage01
|
||||
}else if(back_page.txt=="buttonpage02")
|
||||
{
|
||||
page buttonpage02
|
||||
}else if(back_page.txt=="buttonpage03")
|
||||
{
|
||||
page buttonpage03
|
||||
}else if(back_page.txt=="buttonpage04")
|
||||
{
|
||||
page buttonpage04
|
||||
}else
|
||||
{
|
||||
page home
|
||||
}
|
||||
|
||||
Hotspot bt_home
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
bt_home_pic.pic=44
|
||||
bt_home_text.bco=65024
|
||||
bt_home_text.pco=0
|
||||
bt_home_icon.bco=65024
|
||||
bt_home_icon.pco=0
|
||||
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"alarm\", \"key\": \"home\", \"value\": \"click\", \"mui\": \""+bt_home_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Hotspot bt_away
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
bt_away_pic.pic=44
|
||||
bt_away_text.bco=65024
|
||||
bt_away_text.pco=0
|
||||
bt_away_icon.bco=65024
|
||||
bt_away_icon.pco=0
|
||||
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"alarm\", \"key\": \"away\", \"value\": \"click\", \"mui\": \""+bt_away_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Hotspot bt_night
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
bt_night_pic.pic=44
|
||||
bt_night_text.bco=65024
|
||||
bt_night_text.pco=0
|
||||
bt_night_icon.bco=65024
|
||||
bt_night_icon.pco=0
|
||||
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"alarm\", \"key\": \"night\", \"value\": \"click\", \"mui\": \""+bt_night_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Hotspot bt_vacat
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
bt_vacat_pic.pic=44
|
||||
bt_vacat_text.bco=65024
|
||||
bt_vacat_text.pco=0
|
||||
bt_vacat_icon.bco=65024
|
||||
bt_vacat_icon.pco=0
|
||||
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"alarm\", \"key\": \"vacation\", \"value\": \"click\", \"mui\": \""+bt_vacat_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Hotspot bt_bypass
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
bt_bypass_pic.pic=44
|
||||
bt_bypass_text.bco=65024
|
||||
bt_bypass_text.pco=0
|
||||
bt_bypass_icon.bco=65024
|
||||
bt_bypass_icon.pco=0
|
||||
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"alarm\", \"key\": \"bypass\", \"value\": \"click\", \"mui\": \""+bt_bypass_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Hotspot bt_disarm
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
bt_disarm_pic.pic=44
|
||||
bt_disarm_text.bco=65024
|
||||
bt_disarm_text.pco=0
|
||||
bt_disarm_icon.bco=65024
|
||||
bt_disarm_icon.pco=0
|
||||
|
||||
Touch Release Event
|
||||
lastclick.txt="{\"page\": \"alarm\", \"key\": \"disarm\", \"value\": \"click\", \"mui\": \""+bt_disarm_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 32
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
273
advanced/hmi/nspanel_us_land_code/boot.txt
Normal file
273
advanced/hmi/nspanel_us_land_code/boot.txt
Normal file
@@ -0,0 +1,273 @@
|
||||
Page boot
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
sendme
|
||||
dim=0
|
||||
vis bt_reboot,0
|
||||
covx baud,baud_rate.txt,0,0
|
||||
baud_rate.txt+=" bps"
|
||||
covx display_mode,aux2.txt,0,0
|
||||
nspanelevent.txt="{\"page\": \"boot\", \"event\": \"pagechanged\", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints nspanelevent.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Page Exit Event
|
||||
dim=0
|
||||
|
||||
Variable (int32) counter
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (string) aux1
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (string) nspanelevent
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 150
|
||||
|
||||
Variable (string) aux2
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Text ip_addr
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Initializing...
|
||||
Max. Text Size : 15
|
||||
|
||||
Text t0
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Please wait...
|
||||
Max. Text Size : 15
|
||||
|
||||
Text t1
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : The process can take several seconds!
|
||||
Max. Text Size : 50
|
||||
|
||||
Text tft_label
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : TFT:
|
||||
Max. Text Size : 4
|
||||
|
||||
Text esph_label
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : ESPHome:
|
||||
Max. Text Size : 8
|
||||
|
||||
Text bluep_label
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Blueprint:
|
||||
Max. Text Size : 10
|
||||
|
||||
Text tft_version
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : 4.2dev
|
||||
Max. Text Size : 9
|
||||
|
||||
Text esph_version
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 9
|
||||
|
||||
Text bluep_version
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 9
|
||||
|
||||
Text baud_rate
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text framework
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Dual-state Button bt_reboot
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press and release
|
||||
State : unpressed
|
||||
Text : Reboot
|
||||
Max. Text Size : 6
|
||||
|
||||
Timer timer
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Period (ms): 65534
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
counter.val++
|
||||
covx counter.val,aux1.txt,0,0
|
||||
covx display_mode,aux2.txt,0,0
|
||||
nspanelevent.txt="{\"page\": \"boot\", \"event\": \"timeout\", \"value\": "+aux1.txt+", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}"
|
||||
bluep_version.txt="Retry: "+aux1.txt
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
prints nspanelevent.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<100)
|
||||
{
|
||||
dimdelta=100-dim
|
||||
dimdelta/=25
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
Timer tm_esphome
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Period (ms): 30000
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(baud==115200)
|
||||
{
|
||||
bauds=921600
|
||||
}else
|
||||
{
|
||||
bauds=115200
|
||||
}
|
||||
covx baud,baud_rate.txt,0,0
|
||||
baud_rate.txt+=" bps"
|
||||
|
||||
Timer tm_pageid
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Period (ms): 2500
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
covx display_mode,aux2.txt,0,0
|
||||
nspanelevent.txt="{\"page\": \"boot\", \"event\": \"pagechanged\", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints nspanelevent.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
782
advanced/hmi/nspanel_us_land_code/buttonpage01.txt
Normal file
782
advanced/hmi/nspanel_us_land_code/buttonpage01.txt
Normal file
@@ -0,0 +1,782 @@
|
||||
Page buttonpage01
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
vis 255,0
|
||||
vis button_back,1
|
||||
vis page_index,1
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 44
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 100
|
||||
|
||||
Variable (string) click_comp
|
||||
Attributes
|
||||
ID : 47
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 8
|
||||
|
||||
Variable (string) page_name
|
||||
Attributes
|
||||
ID : 49
|
||||
Scope : local
|
||||
Text : buttonpage01
|
||||
Max. Text Size: 12
|
||||
|
||||
Variable (int32) confirm
|
||||
Attributes
|
||||
ID : 51
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Text button01text
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button01bri
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button02text
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button02bri
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button03text
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button03bri
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button04text
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button04bri
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button05text
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button05bri
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button06text
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button06bri
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button07text
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button07bri
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button08text
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button08bri
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text bpage01_label
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text button01icon
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button02icon
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button03icon
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button04icon
|
||||
Attributes
|
||||
ID : 31
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button05icon
|
||||
Attributes
|
||||
ID : 32
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button06icon
|
||||
Attributes
|
||||
ID : 33
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button07icon
|
||||
Attributes
|
||||
ID : 34
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button08icon
|
||||
Attributes
|
||||
ID : 35
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 45
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Picture button01pic
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button02pic
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button03pic
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button04pic
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button05pic
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button06pic
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button07pic
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button08pic
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 46
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Hotspot button01
|
||||
Attributes
|
||||
ID : 36
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button01"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&1
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button01text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button02
|
||||
Attributes
|
||||
ID : 37
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button02"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&2
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button02text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button03
|
||||
Attributes
|
||||
ID : 38
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button03"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&4
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button03text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button04
|
||||
Attributes
|
||||
ID : 39
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button04"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&8
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button04text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button05
|
||||
Attributes
|
||||
ID : 40
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button05"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&16
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button05text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button06
|
||||
Attributes
|
||||
ID : 41
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button06"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&32
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button06text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button07
|
||||
Attributes
|
||||
ID : 42
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button07"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&64
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button07text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button08
|
||||
Attributes
|
||||
ID : 43
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button08"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&128
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button08text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer click_timer
|
||||
Attributes
|
||||
ID : 48
|
||||
Scope : local
|
||||
Period (ms): 800
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
lastclick.txt="{\"page\": \"buttonpage01\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
click_timer.en=0
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 50
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page home
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page buttonpage02
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
782
advanced/hmi/nspanel_us_land_code/buttonpage02.txt
Normal file
782
advanced/hmi/nspanel_us_land_code/buttonpage02.txt
Normal file
@@ -0,0 +1,782 @@
|
||||
Page buttonpage02
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
vis 255,0
|
||||
vis button_back,1
|
||||
vis page_index,1
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 44
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 100
|
||||
|
||||
Variable (string) click_comp
|
||||
Attributes
|
||||
ID : 47
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 8
|
||||
|
||||
Variable (string) page_name
|
||||
Attributes
|
||||
ID : 49
|
||||
Scope : local
|
||||
Text : buttonpage02
|
||||
Max. Text Size: 12
|
||||
|
||||
Variable (int32) confirm
|
||||
Attributes
|
||||
ID : 51
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Text button01text
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button01bri
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button02text
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button02bri
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button03text
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button03bri
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button04text
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button04bri
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button05text
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button05bri
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button06text
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button06bri
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button07text
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button07bri
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button08text
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button08bri
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text bpage02_label
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text button01icon
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button02icon
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button03icon
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button04icon
|
||||
Attributes
|
||||
ID : 31
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button05icon
|
||||
Attributes
|
||||
ID : 32
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button06icon
|
||||
Attributes
|
||||
ID : 33
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button07icon
|
||||
Attributes
|
||||
ID : 34
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button08icon
|
||||
Attributes
|
||||
ID : 35
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 46
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Picture button01pic
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button02pic
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button03pic
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button04pic
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button05pic
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button06pic
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button07pic
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button08pic
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 45
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Hotspot button01
|
||||
Attributes
|
||||
ID : 36
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button01"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&1
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button01text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button02
|
||||
Attributes
|
||||
ID : 37
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button02"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&2
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button02text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button03
|
||||
Attributes
|
||||
ID : 38
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button03"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&4
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button03text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button04
|
||||
Attributes
|
||||
ID : 39
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button04"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&8
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button04text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button05
|
||||
Attributes
|
||||
ID : 40
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button05"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&16
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button05text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button06
|
||||
Attributes
|
||||
ID : 41
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button06"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&32
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button06text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button07
|
||||
Attributes
|
||||
ID : 42
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button07"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&64
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button07text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button08
|
||||
Attributes
|
||||
ID : 43
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button08"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&128
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button08text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer click_timer
|
||||
Attributes
|
||||
ID : 48
|
||||
Scope : local
|
||||
Period (ms): 800
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
lastclick.txt="{\"page\": \"buttonpage02\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
click_timer.en=0
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 50
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page buttonpage01
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page buttonpage03
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
page home
|
||||
}
|
||||
}
|
||||
|
||||
782
advanced/hmi/nspanel_us_land_code/buttonpage03.txt
Normal file
782
advanced/hmi/nspanel_us_land_code/buttonpage03.txt
Normal file
@@ -0,0 +1,782 @@
|
||||
Page buttonpage03
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
vis 255,0
|
||||
vis button_back,1
|
||||
vis page_index,1
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 44
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 100
|
||||
|
||||
Variable (string) click_comp
|
||||
Attributes
|
||||
ID : 47
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 8
|
||||
|
||||
Variable (string) page_name
|
||||
Attributes
|
||||
ID : 49
|
||||
Scope : local
|
||||
Text : buttonpage03
|
||||
Max. Text Size: 12
|
||||
|
||||
Variable (int32) confirm
|
||||
Attributes
|
||||
ID : 51
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Text button01text
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button01bri
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button02text
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button02bri
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button03text
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button03bri
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button04text
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button04bri
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button05text
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button05bri
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button06text
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button06bri
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button07text
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button07bri
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button08text
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button08bri
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text bpage03_label
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text button01icon
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button02icon
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button03icon
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button04icon
|
||||
Attributes
|
||||
ID : 31
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button05icon
|
||||
Attributes
|
||||
ID : 32
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button06icon
|
||||
Attributes
|
||||
ID : 33
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button07icon
|
||||
Attributes
|
||||
ID : 34
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button08icon
|
||||
Attributes
|
||||
ID : 35
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 46
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Picture button01pic
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button02pic
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button03pic
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button04pic
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button05pic
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button06pic
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button07pic
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button08pic
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 45
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Hotspot button01
|
||||
Attributes
|
||||
ID : 36
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button01"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&1
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button01text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button02
|
||||
Attributes
|
||||
ID : 37
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button02"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&2
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button02text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button03
|
||||
Attributes
|
||||
ID : 38
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button03"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&4
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button03text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button04
|
||||
Attributes
|
||||
ID : 39
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button04"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&8
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button04text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button05
|
||||
Attributes
|
||||
ID : 40
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button05"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&16
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button05text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button06
|
||||
Attributes
|
||||
ID : 41
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button06"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&32
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button06text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button07
|
||||
Attributes
|
||||
ID : 42
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button07"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&64
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button07text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button08
|
||||
Attributes
|
||||
ID : 43
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button08"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&128
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button08text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer click_timer
|
||||
Attributes
|
||||
ID : 48
|
||||
Scope : local
|
||||
Period (ms): 800
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
lastclick.txt="{\"page\": \"buttonpage03\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
click_timer.en=0
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 50
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page buttonpage02
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page buttonpage04
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
page home
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
782
advanced/hmi/nspanel_us_land_code/buttonpage04.txt
Normal file
782
advanced/hmi/nspanel_us_land_code/buttonpage04.txt
Normal file
@@ -0,0 +1,782 @@
|
||||
Page buttonpage04
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
vis 255,0
|
||||
vis button_back,1
|
||||
vis page_index,1
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 44
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 100
|
||||
|
||||
Variable (string) click_comp
|
||||
Attributes
|
||||
ID : 47
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 8
|
||||
|
||||
Variable (string) page_name
|
||||
Attributes
|
||||
ID : 49
|
||||
Scope : local
|
||||
Text : buttonpage04
|
||||
Max. Text Size: 12
|
||||
|
||||
Variable (int32) confirm
|
||||
Attributes
|
||||
ID : 51
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Text button01text
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button01bri
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button02text
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button02bri
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button03text
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button03bri
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button04text
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button04bri
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button05text
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button05bri
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button06text
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button06bri
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button07text
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button07bri
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text button08text
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 22
|
||||
|
||||
Text button08bri
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 4
|
||||
|
||||
Text bpage04_label
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 30
|
||||
|
||||
Text button01icon
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button02icon
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button03icon
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button04icon
|
||||
Attributes
|
||||
ID : 31
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button05icon
|
||||
Attributes
|
||||
ID : 32
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button06icon
|
||||
Attributes
|
||||
ID : 33
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button07icon
|
||||
Attributes
|
||||
ID : 34
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text button08icon
|
||||
Attributes
|
||||
ID : 35
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_index
|
||||
Attributes
|
||||
ID : 46
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 20
|
||||
|
||||
Picture button01pic
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button02pic
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button03pic
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button04pic
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button05pic
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button06pic
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button07pic
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Picture button08pic
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 45
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
page home
|
||||
|
||||
Hotspot button01
|
||||
Attributes
|
||||
ID : 36
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button01"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&1
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button01text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button02
|
||||
Attributes
|
||||
ID : 37
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button02"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&2
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button02text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button03
|
||||
Attributes
|
||||
ID : 38
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button03"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&4
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button03text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button04
|
||||
Attributes
|
||||
ID : 39
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button04"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&8
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button04text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button05
|
||||
Attributes
|
||||
ID : 40
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: on press
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button05"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&16
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button05text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button06
|
||||
Attributes
|
||||
ID : 41
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button06"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&32
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button06text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button07
|
||||
Attributes
|
||||
ID : 42
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button07"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&64
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button07text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Hotspot button08
|
||||
Attributes
|
||||
ID : 43
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
click_comp.txt="button08"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
sys0=confirm.val&128
|
||||
if(sys0>0)
|
||||
{
|
||||
confirm.body.txt=button08text.txt
|
||||
confirm.page_id.val=dp
|
||||
confirm.page_name.txt=page_name.txt
|
||||
confirm.component.txt=click_comp.txt
|
||||
page confirm
|
||||
}else
|
||||
{
|
||||
lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
}
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer click_timer
|
||||
Attributes
|
||||
ID : 48
|
||||
Scope : local
|
||||
Period (ms): 800
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
lastclick.txt="{\"page\": \"buttonpage04\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
click_timer.en=0
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 50
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
page buttonpage03
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
page home
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
933
advanced/hmi/nspanel_us_land_code/climate.txt
Normal file
933
advanced/hmi/nspanel_us_land_code/climate.txt
Normal file
@@ -0,0 +1,933 @@
|
||||
Page climate
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==1||embedded.val==1)
|
||||
{
|
||||
sendme
|
||||
vis target_icon,0
|
||||
vis target_high,0
|
||||
vis target_low,0
|
||||
vis current_temp,0
|
||||
vis current_icon,0
|
||||
vis slider_high,0
|
||||
vis slider_low,0
|
||||
vis button01,0
|
||||
vis button02,0
|
||||
vis button03,0
|
||||
vis button04,0
|
||||
vis button05,0
|
||||
vis button06,0
|
||||
vis button07,0
|
||||
}else
|
||||
{
|
||||
page home
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Page Exit Event
|
||||
if(timer01.en==1)
|
||||
{
|
||||
timer01.en=0
|
||||
covx temp_number.val,va1.txt,0,0
|
||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climate_position\", \"value\": "+va1.txt+"}"
|
||||
printh 92
|
||||
prints "nspanelevent",0
|
||||
printh 00
|
||||
prints climatesetting.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Variable (string) va1
|
||||
Attributes
|
||||
ID : 25
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (string) climatesetting
|
||||
Attributes
|
||||
ID : 26
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 255
|
||||
|
||||
Variable (string) lastclick
|
||||
Attributes
|
||||
ID : 27
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 255
|
||||
|
||||
Variable (int32) temp_offset
|
||||
Attributes
|
||||
ID : 29
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (int32) temp_step
|
||||
Attributes
|
||||
ID : 30
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (int32) temp_number
|
||||
Attributes
|
||||
ID : 34
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (int32) va0
|
||||
Attributes
|
||||
ID : 35
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Variable (string) back_page
|
||||
Attributes
|
||||
ID : 36
|
||||
Scope : local
|
||||
Text : home
|
||||
Max. Text Size: 15
|
||||
|
||||
Variable (int32) embedded
|
||||
Attributes
|
||||
ID : 37
|
||||
Scope: global
|
||||
Value: 0
|
||||
|
||||
Variable (string) va2
|
||||
Attributes
|
||||
ID : 38
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (string) click_comp
|
||||
Attributes
|
||||
ID : 40
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 8
|
||||
|
||||
Variable (int32) single_slider
|
||||
Attributes
|
||||
ID : 44
|
||||
Scope: local
|
||||
Value: 1
|
||||
|
||||
Variable (int32) active_slider
|
||||
Attributes
|
||||
ID : 45
|
||||
Scope: local
|
||||
Value: 1
|
||||
|
||||
Text current_temp
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text page_label
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 100
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text current_icon
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text target_icon
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text value01_icon
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text value01
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 6
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text value02_icon
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text value02
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 6
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text value03_icon
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text value03
|
||||
Attributes
|
||||
ID : 15
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 6
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text value04_icon
|
||||
Attributes
|
||||
ID : 16
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text value04
|
||||
Attributes
|
||||
ID : 17
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 6
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text button01
|
||||
Attributes
|
||||
ID : 18
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
covx embedded.val,va2.txt,0,0
|
||||
lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"auto\", \"embedded\": "+va2.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text button02
|
||||
Attributes
|
||||
ID : 19
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
covx embedded.val,va2.txt,0,0
|
||||
lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"heat_cool\", \"embedded\": "+va2.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text button03
|
||||
Attributes
|
||||
ID : 20
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
covx embedded.val,va2.txt,0,0
|
||||
lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"heat\", \"embedded\": "+va2.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text button04
|
||||
Attributes
|
||||
ID : 21
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
covx embedded.val,va2.txt,0,0
|
||||
lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"cool\", \"embedded\": "+va2.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text button05
|
||||
Attributes
|
||||
ID : 22
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
covx embedded.val,va2.txt,0,0
|
||||
lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"dry\", \"embedded\": "+va2.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text button06
|
||||
Attributes
|
||||
ID : 23
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
covx embedded.val,va2.txt,0,0
|
||||
lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"fan_only\", \"embedded\": "+va2.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text button07
|
||||
Attributes
|
||||
ID : 24
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
covx embedded.val,va2.txt,0,0
|
||||
lastclick.txt="{\"page\": \"climate\", \"key\": \"hvac_mode\", \"value\": \"off\", \"embedded\": "+va2.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Text button08
|
||||
Attributes
|
||||
ID : 31
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
click_comp.txt="button08"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
lastclick.txt="{\"page\": \"climate\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Text button09
|
||||
Attributes
|
||||
ID : 32
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : on press and release
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
click_comp.txt="button09"
|
||||
click_timer.en=1
|
||||
|
||||
Touch Release Event
|
||||
if(click_timer.en==1)
|
||||
{
|
||||
click_timer.en=0
|
||||
lastclick.txt="{\"page\": \"climate\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
}
|
||||
|
||||
Text target_high
|
||||
Attributes
|
||||
ID : 33
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text target_low
|
||||
Attributes
|
||||
ID : 46
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Slider slider_high
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
Position : 20
|
||||
Upper range limit: 40
|
||||
Lower range limit: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
temp_number.val=slider_high.val*temp_step.val
|
||||
temp_number.val+=temp_offset.val
|
||||
va0.val=temp_number.val/10
|
||||
covx va0.val,target_high.txt,0,0
|
||||
va0.val=temp_number.val%10
|
||||
covx va0.val,va1.txt,0,0
|
||||
target_high.txt+="."+va1.txt
|
||||
timer01.en=1
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Slider slider_low
|
||||
Attributes
|
||||
ID : 43
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
Position : 20
|
||||
Upper range limit: 40
|
||||
Lower range limit: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
temp_number.val=slider_high.val*temp_step.val
|
||||
temp_number.val+=temp_offset.val
|
||||
va0.val=temp_number.val/10
|
||||
covx va0.val,target_high.txt,0,0
|
||||
va0.val=temp_number.val%10
|
||||
covx va0.val,va1.txt,0,0
|
||||
target_high.txt+="."+va1.txt
|
||||
timer01.en=1
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 39
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
if(back_page.txt=="buttonpage01")
|
||||
{
|
||||
page buttonpage01
|
||||
}else if(back_page.txt=="buttonpage02")
|
||||
{
|
||||
page buttonpage02
|
||||
}else if(back_page.txt=="buttonpage03")
|
||||
{
|
||||
page buttonpage03
|
||||
}else if(back_page.txt=="buttonpage04")
|
||||
{
|
||||
page buttonpage04
|
||||
}else
|
||||
{
|
||||
page home
|
||||
}
|
||||
|
||||
Hotspot decrease_temp
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
if(slider_high.val>0)
|
||||
{
|
||||
slider_high.val--
|
||||
temp_number.val=slider_high.val*temp_step.val
|
||||
temp_number.val+=temp_offset.val
|
||||
va0.val=temp_number.val/10
|
||||
covx va0.val,target_high.txt,0,0
|
||||
va0.val=temp_number.val%10
|
||||
covx va0.val,va1.txt,0,0
|
||||
target_high.txt+="."+va1.txt
|
||||
}
|
||||
|
||||
Touch Release Event
|
||||
timer01.en=1
|
||||
|
||||
Hotspot increase_temp
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
if(slider_high.val<slider_high.maxval)
|
||||
{
|
||||
slider_high.val++
|
||||
temp_number.val=slider_high.val*temp_step.val
|
||||
temp_number.val+=temp_offset.val
|
||||
va0.val=temp_number.val/10
|
||||
covx va0.val,target_high.txt,0,0
|
||||
va0.val=temp_number.val%10
|
||||
covx va0.val,va1.txt,0,0
|
||||
target_high.txt+="."+va1.txt
|
||||
}
|
||||
|
||||
Touch Release Event
|
||||
timer01.en=1
|
||||
|
||||
Timer swipestore
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Period (ms): 50
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
swipex=tch0
|
||||
swipey=tch1
|
||||
|
||||
Timer timer01
|
||||
Attributes
|
||||
ID : 28
|
||||
Scope : local
|
||||
Period (ms): 1000
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
timer01.en=0
|
||||
covx embedded.val,va2.txt,0,0
|
||||
covx temp_number.val,va1.txt,0,0
|
||||
climatesetting.txt="{\"page\": \"climate\", \"key\": \"set_temperature\", \"value\": "+va1.txt+", \"embedded\": "+va2.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints climatesetting.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Timer click_timer
|
||||
Attributes
|
||||
ID : 41
|
||||
Scope : local
|
||||
Period (ms): 800
|
||||
Enabled : no
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
lastclick.txt="{\"page\": \"climate\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints lastclick.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
click_timer.en=0
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 42
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
TouchCap swipe
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope: local
|
||||
Value: 0
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
swipestore.en=1 // Start swipestore timer
|
||||
|
||||
Touch Release Event
|
||||
swipestore.en=0
|
||||
// Touch has ended, x
|
||||
if(tch0==0)
|
||||
{
|
||||
swipec=swipex-tch2
|
||||
// From Left to Right
|
||||
if(swipec>swipedx)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Right to Left
|
||||
swipec2=0-swipedx
|
||||
if(swipec<swipec2)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
// Touch has ended, y
|
||||
if(tch1==0)
|
||||
{
|
||||
swipec=swipey-tch3
|
||||
// From Up to Down
|
||||
if(swipec>100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
// Down to Up
|
||||
swipec2=0-swipedy
|
||||
if(swipec<-100)
|
||||
{
|
||||
//page
|
||||
}
|
||||
}
|
||||
|
||||
209
advanced/hmi/nspanel_us_land_code/confirm.txt
Normal file
209
advanced/hmi/nspanel_us_land_code/confirm.txt
Normal file
@@ -0,0 +1,209 @@
|
||||
Page confirm
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Variable (int32) page_id
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope: global
|
||||
Value: 0
|
||||
|
||||
Variable (string) aux
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 255
|
||||
|
||||
Variable (string) page_name
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : global
|
||||
Text :
|
||||
Max. Text Size: 12
|
||||
|
||||
Variable (string) component
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : global
|
||||
Text :
|
||||
Max. Text Size: 10
|
||||
|
||||
Text t0
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text title
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Please confirm
|
||||
Max. Text Size : 30
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Text body
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : global
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text : Please confirm
|
||||
Max. Text Size : 22
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Button bclose
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
page page_id.val
|
||||
|
||||
Button bt_accept
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
aux.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+component.txt+"\"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints aux.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
page page_id.val
|
||||
|
||||
Button bt_clear
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
page page_id.val
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
238
advanced/hmi/nspanel_us_land_code/cover.txt
Normal file
238
advanced/hmi/nspanel_us_land_code/cover.txt
Normal file
@@ -0,0 +1,238 @@
|
||||
Page cover
|
||||
Attributes
|
||||
ID : 0
|
||||
Scope : local
|
||||
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
|
||||
if(api==0)
|
||||
{
|
||||
page home
|
||||
}else
|
||||
{
|
||||
sendme
|
||||
}
|
||||
|
||||
Touch Press Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Touch Release Event
|
||||
printh 91
|
||||
prints "touchevent",0
|
||||
printh 00
|
||||
prints rand,0
|
||||
printh FF FF FF
|
||||
|
||||
Variable (string) va1
|
||||
Attributes
|
||||
ID : 7
|
||||
Scope : local
|
||||
Text : newtxt
|
||||
Max. Text Size: 10
|
||||
|
||||
Variable (string) coversetting
|
||||
Attributes
|
||||
ID : 11
|
||||
Scope : local
|
||||
Text :
|
||||
Max. Text Size: 255
|
||||
|
||||
Variable (string) back_page
|
||||
Attributes
|
||||
ID : 12
|
||||
Scope : local
|
||||
Text : home
|
||||
Max. Text Size: 15
|
||||
|
||||
Text battery_value
|
||||
Attributes
|
||||
ID : 1
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text cover_value
|
||||
Attributes
|
||||
ID : 2
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text page_label
|
||||
Attributes
|
||||
ID : 3
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 25
|
||||
|
||||
Text icon_state
|
||||
Attributes
|
||||
ID : 9
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Text battery_icon
|
||||
Attributes
|
||||
ID : 10
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID : disabled
|
||||
Associated Keyboard: none
|
||||
Text :
|
||||
Max. Text Size : 10
|
||||
|
||||
Slider coverslider
|
||||
Attributes
|
||||
ID : 6
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
Position : 0
|
||||
Upper range limit: 100
|
||||
Lower range limit: 0
|
||||
|
||||
Events
|
||||
Touch Release Event
|
||||
covx coverslider.val,va1.txt,0,0
|
||||
cover_value.txt=va1.txt+"%"
|
||||
coversetting.txt="{\"page\": \"cover\", \"key\": \"position\", \"value\": "+va1.txt+"}"
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints coversetting.txt,0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Button cover_open
|
||||
Attributes
|
||||
ID : 4
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"cover\", \"key\": \"open_cover\", \"value\": \"press\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Button cover_close
|
||||
Attributes
|
||||
ID : 5
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"cover\", \"key\": \"close_cover\", \"value\": \"press\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Button cover_stop
|
||||
Attributes
|
||||
ID : 8
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
printh 92
|
||||
prints "localevent",0
|
||||
printh 00
|
||||
prints "{\"page\": \"cover\", \"key\": \"stop_cover\", \"value\": \"press\"}",0
|
||||
printh 00
|
||||
printh FF FF FF
|
||||
|
||||
Button button_back
|
||||
Attributes
|
||||
ID : 13
|
||||
Scope : local
|
||||
Dragging : 0
|
||||
Send Component ID: disabled
|
||||
State : unpressed
|
||||
Text :
|
||||
Max. Text Size : 3
|
||||
|
||||
Events
|
||||
Touch Press Event
|
||||
if(back_page.txt=="buttonpage01")
|
||||
{
|
||||
page buttonpage01
|
||||
}else if(back_page.txt=="buttonpage02")
|
||||
{
|
||||
page buttonpage02
|
||||
}else if(back_page.txt=="buttonpage03")
|
||||
{
|
||||
page buttonpage03
|
||||
}else if(back_page.txt=="buttonpage04")
|
||||
{
|
||||
page buttonpage04
|
||||
}else
|
||||
{
|
||||
page home
|
||||
}
|
||||
|
||||
Timer wakeup_timer
|
||||
Attributes
|
||||
ID : 14
|
||||
Scope : local
|
||||
Period (ms): 100
|
||||
Enabled : yes
|
||||
|
||||
Events
|
||||
Timer Event
|
||||
if(dim<brightness)
|
||||
{
|
||||
dimdelta=brightness-dim
|
||||
dimdelta/=10
|
||||
if(dimdelta<1)
|
||||
{
|
||||
dimdelta=1
|
||||
}
|
||||
dim+=dimdelta
|
||||
}else
|
||||
{
|
||||
wakeup_timer.en=0
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user