Compare commits

..

800 Commits

Author SHA1 Message Date
Johannes
8b7d196721 fix doubletap config location 2022-04-03 11:46:25 +02:00
Johannes
aadebf801a added default card after screensaver exit 2022-04-03 11:28:11 +02:00
Johannes
ab74c80ab2 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-04-03 09:53:04 +02:00
Johannes
b9ddb24a6d bump version 2022-04-03 09:49:00 +02:00
Johannes
0df505a0eb fix media page 2022-04-03 09:47:44 +02:00
joBr99
ebafe52f39 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-04-03 07:35:49 +00:00
Johannes
265c95845f Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-04-03 09:35:25 +02:00
Johannes
218148bcfb change msg format media page 2022-04-03 09:35:14 +02:00
joBr99
d46a4ea46f fixed navigation on subpages for cardThermo cardMedia and cardAlarm (add nextion2text) 2022-04-03 07:18:00 +00:00
Johannes
767ed78c40 fixed navigation on subpages for cardThermo cardMedia and cardAlarm 2022-04-03 09:17:33 +02:00
Johannes
89669f68f0 Update README.md 2022-04-02 23:27:36 +02:00
Johannes
18805ccae2 Update README.md 2022-04-02 22:50:32 +02:00
Johannes
c4d920b3b7 Update README.md 2022-04-02 22:50:00 +02:00
Johannes
3ad0408606 fixed page nav after exiting hidden page 2022-04-02 22:18:24 +02:00
Johannes
57039fd31e reg callbacks for hidden page items 2022-04-02 22:01:22 +02:00
Johannes
fb7561df10 reg callbacks for hidden page items 2022-04-02 22:00:08 +02:00
Johannes
cf1e3dfd6d fix external update for hidden pages 2022-04-02 21:49:01 +02:00
Johannes
063a6d16f8 upd pic 2022-04-02 21:31:06 +02:00
Johannes
5fda051e37 Update README.md 2022-04-02 21:29:20 +02:00
Johannes
494a122021 Update README.md 2022-04-02 21:05:47 +02:00
Johannes
f8a4d8e82b Update README.md 2022-04-02 21:02:51 +02:00
Johannes
de5a38b28a Update README.md 2022-04-02 20:59:00 +02:00
Johannes
35fca0f0c4 Update README.md 2022-04-02 20:58:30 +02:00
Johannes
138e8ce809 add some screens from us portrait version 2022-04-02 20:57:42 +02:00
Johannes
bdcbbbc256 fix screensaver navigation 2022-04-02 20:28:22 +02:00
Johannes
131bbc8798 fix sleep 2022-04-02 20:23:02 +02:00
Johannes
e24b337add Update updater.py 2022-04-02 20:15:03 +02:00
Johannes
0ba380a5a3 Update nspanel-lovelace-ui.py 2022-04-02 20:11:58 +02:00
Johannes
644efbaa76 added example for hidden page and navigate 2022-04-02 20:08:10 +02:00
Johannes
83c66d053e Merge pull request #114 from joBr99/newConfigFormat
New config format
2022-04-02 20:07:24 +02:00
Johannes
f4c870c51c fix alert 2022-04-02 20:00:03 +02:00
joBr99
cf756401ca sync changes and bump version (add nextion2text) 2022-04-02 17:52:31 +00:00
Johannes
cb8ad94e84 sync changes and bump version 2022-04-02 19:52:10 +02:00
Johannes
0fe062bba1 fixed nav buttons 2022-04-02 19:48:22 +02:00
Johannes
338f12cb18 fix sleepbrightness 2022-04-02 19:46:34 +02:00
Johannes
a3033a0e6b alternaitve layout screensaver 2022-04-02 19:43:09 +02:00
Johannes
9ace31db1f update docs 2022-04-02 17:40:10 +02:00
Johannes
4c6f9cdfd6 implement subpages 2022-04-02 17:34:34 +02:00
Johannes
f15e508626 upd docs 2022-04-02 16:54:57 +02:00
Johannes
a58cafc124 new config format 2022-04-02 16:45:28 +02:00
Johannes
ac01a75761 started on new config format 2022-04-02 10:54:48 +02:00
Johannes
9fe9f6b5cc removed fahrenheit conversion 2022-04-01 20:53:36 +02:00
Johannes
64b3f45705 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-04-01 20:34:23 +02:00
Johannes
ffd4573d6a changed msg format on update page 2022-04-01 20:34:17 +02:00
Johannes
72bd3f91d4 Update nspanel-lovelace-ui.py 2022-04-01 20:23:40 +02:00
joBr99
d4f78c0293 updated us versions (add nextion2text) 2022-04-01 18:14:34 +00:00
Johannes
1272732bb5 updated us versions 2022-04-01 20:14:10 +02:00
Johannes
351bd7fdfd Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-04-01 19:45:29 +02:00
Johannes
9e7ff10e71 fix some messages 2022-04-01 19:45:24 +02:00
joBr99
9f1014eb5f Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-04-01 17:33:35 +00:00
Johannes
74e3c95b9a Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-04-01 19:33:06 +02:00
Johannes
8518fcfcf4 fix popup light 2022-04-01 19:33:00 +02:00
joBr99
971db97d9e fixed popup pages (add nextion2text) 2022-04-01 17:26:00 +00:00
Johannes
6cb7ad8f3f fixed popup pages 2022-04-01 19:25:37 +02:00
Johannes
98dfab74ef round result 2022-04-01 19:08:55 +02:00
Johannes
73f3ffd586 fix temp 2022-04-01 19:03:09 +02:00
Johannes
9e5f41f2b2 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-04-01 18:56:09 +02:00
Johannes
a59c0e3ddc implemented conversion of temperature 2022-04-01 18:56:03 +02:00
joBr99
744adce373 removed additional delimiter for weather (add nextion2text) 2022-04-01 15:25:02 +00:00
Johannes
20a289eb52 removed additional delimiter for weather 2022-04-01 17:24:40 +02:00
joBr99
2dba199f50 change default delimiter from , to ~ (add nextion2text) 2022-04-01 14:58:13 +00:00
Johannes
7f3a0d257e change default delimiter from , to ~ 2022-04-01 16:57:51 +02:00
Johannes
266caeb3ae added known-good diff 2022-04-01 16:18:01 +02:00
joBr99
77b04f4260 Merge pull request #107 from jmbinette/main (add nextion2text) 2022-04-01 04:54:14 +00:00
Johannes
3203b32936 Merge pull request #107 from jmbinette/main
Screensaver presentation (Portrait)
2022-04-01 06:53:54 +02:00
jmbinette
613dc4f471 Fixed Screensaver for better presentation (add nextion2text) 2022-04-01 01:57:14 +00:00
jmbinette
2262b9a03f Fixed Screensaver for better presentation 2022-03-31 21:56:46 -04:00
jmbinette
b5b3f3d9ae Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) (add nextion2text) 2022-04-01 00:12:30 +00:00
joBr99
e7ec0541bb Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-31 22:36:11 +00:00
Johannes
a36943bc33 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-04-01 00:35:50 +02:00
Johannes
74aeb48b85 decrease memory usage on cardEntities page 2022-04-01 00:35:46 +02:00
joBr99
a5ff50595b Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-31 22:28:27 +00:00
Johannes
c4922eb4b6 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-04-01 00:28:06 +02:00
Johannes
ca907c8e6a serial cardthermo 2022-04-01 00:27:54 +02:00
joBr99
34494ec0da Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-31 22:17:45 +00:00
Johannes
fdea6aa842 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-04-01 00:17:19 +02:00
Johannes
78d353c464 import new screensaver page 2022-04-01 00:17:13 +02:00
joBr99
d543a186ad sync media page serial code (add nextion2text) 2022-03-31 22:04:17 +00:00
Johannes
9023265547 sync media page serial code 2022-04-01 00:03:54 +02:00
joBr99
516f51b803 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-31 21:51:27 +00:00
Johannes
22d0a935e1 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-31 23:51:04 +02:00
Johannes
865edc0e4d increase max date string length 2022-03-31 23:50:55 +02:00
joBr99
ef024faa43 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-31 21:43:27 +00:00
Johannes
3aaf2582ea Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-31 23:43:04 +02:00
Johannes
36c931a89b sync some changes 2022-03-31 23:42:55 +02:00
Johannes
37056983d8 Delete diff-known-good-changes.txt 2022-03-31 23:38:46 +02:00
joBr99
5d867d7d4c Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-31 21:37:35 +00:00
Johannes
dc1afd90aa Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-31 23:37:11 +02:00
Johannes
cd8439f766 add serial code entities 2022-03-31 23:37:05 +02:00
joBr99
e0e7a853f2 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-31 21:34:55 +00:00
Johannes
0d683ddcd5 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-31 23:34:29 +02:00
Johannes
35b05c26cb sync some chanegs 2022-03-31 23:34:22 +02:00
joBr99
9c42ed135c Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-31 21:30:20 +00:00
Johannes
982f281ce5 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-31 23:29:57 +02:00
Johannes
b5879845fd sync some changes 2022-03-31 23:29:43 +02:00
Johannes
70e533e16b Update README.md 2022-03-31 23:17:19 +02:00
joBr99
0ac26e275f add alternative layout for screensaver (add nextion2text) 2022-03-31 20:31:53 +00:00
Johannes
f9cb4c03b6 add alternative layout for screensaver 2022-03-31 22:31:21 +02:00
joBr99
c7b0bc7d82 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-31 18:57:31 +00:00
Johannes
92ee3a18b8 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-31 20:57:02 +02:00
Johannes
b13287754f fix cardalarm 2022-03-31 20:56:53 +02:00
joBr99
0d0c9edced Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-31 18:53:37 +00:00
Johannes
c17b95dca7 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-31 20:53:14 +02:00
Johannes
979c2587bb sync some changes 2022-03-31 20:53:07 +02:00
joBr99
b24405e579 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-31 18:39:22 +00:00
Johannes
7c3b0da36e Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-31 20:38:57 +02:00
Johannes
b27f3bd078 implemented bUp 2022-03-31 20:38:49 +02:00
joBr99
8c0f5db6ec Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-31 18:35:25 +00:00
Johannes
9b42681588 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-31 20:35:03 +02:00
Johannes
324b2f2165 fix dstTemp 2022-03-31 20:34:50 +02:00
joBr99
26bacb26c1 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-31 18:31:21 +00:00
Johannes
d151c58057 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-31 20:30:55 +02:00
Johannes
71dcebf6d2 hide num on alarm page on disable 2022-03-31 20:30:49 +02:00
joBr99
708e5515d1 add navigation on alarm and thermo page (add nextion2text) 2022-03-31 18:20:57 +00:00
Johannes
d74ccfcd64 add navigation on alarm and thermo page 2022-03-31 20:20:27 +02:00
joBr99
067bad12e3 implemented navigation on cardEntities Grid and Thermo (add nextion2text) 2022-03-31 14:19:07 +00:00
Johannes
5ea5c76b57 implemented navigation on cardEntities Grid and Thermo 2022-03-31 16:18:44 +02:00
Johannes
4f4d12759b upd code gen 2022-03-31 14:22:27 +02:00
Johannes
393bcc243b Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-31 12:58:52 +02:00
Johannes
d0d690e748 bump vers 2022-03-31 12:58:45 +02:00
joBr99
7bd3c263cf Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-31 10:58:09 +00:00
Johannes
22563d1cb4 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-31 12:57:42 +02:00
Johannes
52364e05a7 add us-l 2022-03-31 12:57:37 +02:00
Johannes
ab51c44c32 sync diff 2022-03-31 12:50:34 +02:00
joBr99
d908cb7d96 fixed screensaver pagetype (add nextion2text) 2022-03-31 10:46:03 +00:00
Johannes
39c1aa6773 fixed screensaver pagetype 2022-03-31 12:45:35 +02:00
Johannes
037fc104df Update pages.py 2022-03-31 09:48:30 +02:00
Johannes
06464404c4 Update controller.py 2022-03-31 09:39:02 +02:00
joBr99
f3933ab0e2 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-31 07:32:24 +00:00
Johannes
210efd1384 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-31 09:31:55 +02:00
Johannes
13073d2b70 bump to 24 for next release 2022-03-31 09:31:46 +02:00
joBr99
2f43430b2f . (add nextion2text) 2022-03-31 07:13:42 +00:00
Johannes
7ba6fcbbc9 . 2022-03-31 09:13:19 +02:00
joBr99
9ca1e2f717 Update cardEntities.txt (add nextion2text) 2022-03-31 06:59:06 +00:00
Johannes
da7e3c39c7 Update cardEntities.txt 2022-03-31 08:58:49 +02:00
joBr99
37a7a8db4f Update nextion2text.yml (add nextion2text) 2022-03-31 06:52:56 +00:00
Johannes
7773eedd45 Update nextion2text.yml 2022-03-31 08:52:39 +02:00
Johannes
9d82d849c5 Update cardEntities.txt 2022-03-31 08:49:28 +02:00
joBr99
9fdf8635a6 Update nextion2text.yml (add nextion2text) 2022-03-31 06:42:30 +00:00
Johannes
cddc3cf7a0 Update nextion2text.yml 2022-03-31 08:42:11 +02:00
joBr99
2ce12d0c71 ignore parts of cardEntities in diff (add nextion2text) 2022-03-31 06:34:28 +00:00
Johannes
aac014bb09 ignore parts of cardEntities in diff 2022-03-31 08:34:05 +02:00
joBr99
b3cc89f12a Merge pull request #103 from jmbinette/main (add nextion2text) 2022-03-31 06:31:08 +00:00
Johannes
cbf49483eb Merge pull request #103 from jmbinette/main
Updated HMI and TFT following EU mod (Daily update)
2022-03-31 08:30:50 +02:00
Johannes
4c6b3d2dda remove __pycache__ 2022-03-31 08:29:46 +02:00
jmbinette
24e8d6a597 bDown5 and bDown6 typo in Entities (add nextion2text) 2022-03-31 03:33:55 +00:00
jmbinette
c7a3965db4 bDown5 and bDown6 typo in Entities 2022-03-30 23:33:33 -04:00
jmbinette
8e53463d57 Commit (add nextion2text) 2022-03-31 03:13:55 +00:00
jmbinette
6acbe3b088 Commit 2022-03-30 23:13:30 -04:00
jmbinette
12e45e1a3e fix daily date update (add nextion2text) 2022-03-31 01:56:46 +00:00
Johannes
b4075826f3 fix daily date update 2022-03-31 00:28:42 +02:00
Johannes
147b99d254 weather 2022-03-31 00:28:27 +02:00
Johannes
88115cf04d Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-30 23:51:14 +02:00
Johannes
f92afe7bda weather update 2022-03-30 23:51:07 +02:00
joBr99
aa83e955f0 send screensaver on sleepReached (add nextion2text) 2022-03-30 21:36:50 +00:00
Johannes
10b0d75a15 send screensaver on sleepReached 2022-03-30 23:36:20 +02:00
Johannes
19aec4bb55 rename sleepReached 2022-03-30 23:30:11 +02:00
Johannes
b22f5877fd remove screensaver open event 2022-03-30 23:25:24 +02:00
Johannes
3ec432eda1 Merge pull request #101 from gerard33/patch-2
Update weather part of screensaver
2022-03-30 23:20:53 +02:00
Gerard
71804b934d Update apps.yaml 2022-03-30 23:09:02 +02:00
Gerard
fa37924f23 Add weather override examples 2022-03-30 23:08:10 +02:00
Gerard
175f4cb5e4 Update pages.py 2022-03-30 23:05:51 +02:00
joBr99
30b0c5d151 moved time and date to pageicons (add nextion2text) 2022-03-30 20:32:27 +00:00
Johannes
3f3f438a31 moved time and date to pageicons 2022-03-30 22:32:03 +02:00
Johannes
11a9be707b Update README.md 2022-03-30 22:20:32 +02:00
joBr99
3321b993c3 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-30 20:07:59 +00:00
Johannes
75078020f7 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-30 22:07:31 +02:00
Johannes
5009afb9d5 add action for sleepTimeout 2022-03-30 22:07:24 +02:00
Johannes
d3dd890582 moved entering screensaver to event 2022-03-30 22:01:54 +02:00
joBr99
42164508db added fireplace icon (add nextion2text) 2022-03-30 16:55:43 +00:00
Johannes
2996a7e67c added fireplace icon 2022-03-30 18:55:19 +02:00
joBr99
7b7c1b59fa Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-30 16:28:21 +00:00
Johannes
314b4c58ea Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-30 18:27:51 +02:00
Johannes
d67d53f7b1 added some more icons 2022-03-30 18:27:44 +02:00
Johannes
e508e9ad1a Update README.md 2022-03-30 17:36:16 +02:00
Johannes
da85a76a86 Update README.md 2022-03-30 17:35:29 +02:00
joBr99
b9dd24889e added home-export-outline and import icon (add nextion2text) 2022-03-30 15:03:47 +00:00
Johannes
4ee4d0f800 added home-export-outline and import icon 2022-03-30 17:03:21 +02:00
Johannes
df94b33e42 add note for ioBroker users 2022-03-30 14:52:52 +02:00
Johannes
5707fb7085 Delete CODEOWNERS 2022-03-30 14:07:46 +02:00
Johannes
90ab2ebef8 Update README.md 2022-03-30 14:04:50 +02:00
Johannes
2e46fc82d9 Create CODEOWNERS 2022-03-30 13:52:18 +02:00
Johannes
100b8c7f17 Add line for us model in default config 2022-03-30 13:34:10 +02:00
Johannes
2103d00ca9 Add config info for model 2022-03-30 13:31:56 +02:00
Johannes
87bf09665d modified msg 2022-03-30 13:08:52 +02:00
Johannes
16c5eaf1fb fix model 2022-03-30 12:51:56 +02:00
Johannes
4af9600e26 add model info to log 2022-03-30 12:49:06 +02:00
Johannes
754648fc0d fix 2022-03-30 12:36:45 +02:00
Johannes
184662d43e bump des vers 2022-03-30 12:28:42 +02:00
Johannes
3a70557ce3 fix 2022-03-30 12:20:44 +02:00
Johannes
45ccd202d0 added code for model change in config 2022-03-30 12:18:38 +02:00
joBr99
973bcd3baf added model information to startup command from v23 (add nextion2text) 2022-03-30 09:17:14 +00:00
Johannes
21dfcec43a added model information to startup command from v23 2022-03-30 11:16:43 +02:00
Johannes
7056ed0dff added code for us auto update 2022-03-30 11:02:43 +02:00
joBr99
f1c382e028 fix startup screen msg location (add nextion2text) 2022-03-29 23:57:02 +00:00
Johannes
c44a0cee35 fix startup screen msg location 2022-03-30 01:56:37 +02:00
Johannes
3ede687fe6 Update README.md 2022-03-30 01:36:17 +02:00
Johannes
a35165272e Add links for US Versions 2022-03-30 01:35:43 +02:00
joBr99
4ca8ecf7cc Update nextion2text.yml (add nextion2text) 2022-03-29 22:51:46 +00:00
Johannes
ecfab2ed36 Update nextion2text.yml 2022-03-30 00:51:30 +02:00
joBr99
3cd94d398d Update nextion2text.yml (add nextion2text) 2022-03-29 22:45:17 +00:00
Johannes
0b63088703 Update nextion2text.yml 2022-03-30 00:44:58 +02:00
joBr99
c51d68f24a add n2t for landscape us version (add nextion2text) 2022-03-29 22:36:11 +00:00
Johannes
d4a58629a0 add n2t for landscape us version 2022-03-30 00:35:53 +02:00
joBr99
cde479e1cc Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-29 22:31:05 +00:00
Johannes
e12319d487 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-30 00:30:41 +02:00
Johannes
fe92df84aa added landscape US version 2022-03-30 00:30:23 +02:00
joBr99
2e9ec9eff7 add script icon (add nextion2text) 2022-03-29 22:12:24 +00:00
Johannes
0f03809a2e add script icon 2022-03-30 00:11:59 +02:00
Johannes
3385c8f701 added scripts to generate serial code 2022-03-29 23:45:23 +02:00
joBr99
f5b0c2b87d Merge pull request #96 from jmbinette/main (add nextion2text) 2022-03-29 21:37:35 +00:00
Johannes
c4b204092f Merge pull request #96 from jmbinette/main
Added init for Numbers in Entities
2022-03-29 23:37:21 +02:00
jmbinette
a138fc713c Add files via upload 2022-03-29 17:28:34 -04:00
Johannes
85969dffca Update README.md 2022-03-29 20:22:49 +02:00
joBr99
eeba57e354 added script as item (add nextion2text) 2022-03-29 18:16:57 +00:00
Johannes
8e82c81e8f added script as item 2022-03-29 20:16:35 +02:00
joBr99
55f26fa7f9 Run n2t visual also for US Project (add nextion2text) 2022-03-29 15:47:38 +00:00
Johannes
b33a256939 Run n2t visual also for US Project 2022-03-29 17:47:23 +02:00
joBr99
ed37d75af9 Update nextion2text.yml (add nextion2text) 2022-03-29 15:36:03 +00:00
Johannes
58922b9e9a Update nextion2text.yml 2022-03-29 17:35:45 +02:00
joBr99
5d7d70422c Merge pull request #93 from jmbinette/main (add nextion2text) 2022-03-29 15:35:34 +00:00
Johannes
bd27e8a93e Merge pull request #93 from jmbinette/main
Items position, Entity4 touch animation
2022-03-29 17:35:16 +02:00
Johannes
c084508b58 try to fix nextion2text for pull requests 2022-03-29 17:32:16 +02:00
jmbinette
5ab95ad641 Items position, Entity4 touch animation 2022-03-29 11:20:43 -04:00
Johannes
628a097f5b Fix media-OnOff 2022-03-29 16:56:28 +02:00
Johannes
3d5aad77b6 Update pages.py 2022-03-29 16:19:47 +02:00
Johannes
985f217a0e Update pages.py 2022-03-29 16:19:24 +02:00
Johannes
f0bfbc6759 Fix power button on media page 2022-03-29 16:07:33 +02:00
Johannes
7a86c7a75a fix home tracker 2022-03-29 16:01:50 +02:00
Johannes
7b79014ec8 fix add update check 2022-03-29 15:56:25 +02:00
Johannes
5c33689579 fix device tracker callbacks 2022-03-29 15:44:16 +02:00
Johannes
481b26c8b0 ask for berry driver version on screensaver tap 2022-03-29 15:32:47 +02:00
Johannes
8fa93af672 adding an alternative to paypal, as requested 2022-03-29 14:28:41 +02:00
joBr99
b3983f058a Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-29 11:46:12 +00:00
Johannes
912899fb91 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-29 13:45:49 +02:00
Johannes
36db4d82d3 sync us 2022-03-29 13:45:44 +02:00
Johannes
536190458d Update helper.py 2022-03-29 13:29:13 +02:00
Johannes
e9d516c662 update version in updater 2022-03-29 13:20:17 +02:00
Johannes
31a4390a50 Update pages.py 2022-03-29 13:07:09 +02:00
joBr99
1af88ccf5a sync us (add nextion2text) 2022-03-29 11:04:02 +00:00
Johannes
c2b1d9f3e4 sync us 2022-03-29 12:57:46 +02:00
Johannes
e916b35d53 button code #85 2022-03-29 12:46:56 +02:00
joBr99
8e0086e269 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-29 10:42:31 +00:00
Johannes
6401689012 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-29 12:41:53 +02:00
Johannes
a95735b300 bump hmi version to 22 2022-03-29 12:41:48 +02:00
joBr99
cb09d14261 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-29 10:38:26 +00:00
Johannes
c8d02f5111 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-29 12:35:29 +02:00
Johannes
989e65bac9 add rendering of number 2022-03-29 12:35:23 +02:00
joBr99
0a1f359827 add event code for number (add nextion2text) 2022-03-29 10:24:03 +00:00
Johannes
bd81e40040 add event code for number 2022-03-29 12:23:39 +02:00
joBr99
9a0e4982fb fix ignore id file (add nextion2text) 2022-03-29 09:55:01 +00:00
Johannes
0ab91236f2 fix ignore id file 2022-03-29 11:54:43 +02:00
Johannes
ee71ab0fb1 fix base64 cmd 2022-03-29 11:48:00 +02:00
Johannes
8c8fb0ad33 ignore id in eu us diff 2022-03-29 11:46:48 +02:00
joBr99
03c7f249ba Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-29 09:00:46 +00:00
Johannes
b7a092ba04 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-29 11:00:21 +02:00
Johannes
406e4975d1 added number gui element #85 2022-03-29 11:00:14 +02:00
joBr99
29571b5535 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-29 08:35:51 +00:00
Johannes
1827c7df57 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-29 10:35:22 +02:00
Johannes
c525623500 restore 2022-03-29 10:34:47 +02:00
joBr99
1c13df53c2 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-29 08:29:12 +00:00
Johannes
3f1d2e1a2a Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-29 10:28:45 +02:00
Johannes
d6d0fe2a56 fixed exit buttons 2022-03-29 10:28:37 +02:00
joBr99
d80ecc4a14 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-29 08:19:55 +00:00
Johannes
9a6eea3cab Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-29 10:19:30 +02:00
Johannes
c532df614b add sliders 2022-03-29 10:19:18 +02:00
joBr99
2088167e2b Update nextion2text.yml (add nextion2text) 2022-03-29 08:02:34 +00:00
Johannes
8edaa6f1e1 Update nextion2text.yml 2022-03-29 10:02:20 +02:00
joBr99
286a486292 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-29 07:55:25 +00:00
Johannes
5a8b87aab1 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-29 09:54:54 +02:00
Johannes
36bd64836e bumped version 2022-03-29 09:54:48 +02:00
joBr99
9683af77cd remove test from bprev (add nextion2text) 2022-03-29 07:50:33 +00:00
Johannes
f52918364d remove test from bprev 2022-03-29 09:50:10 +02:00
joBr99
aff20c443b swap diff (add nextion2text) 2022-03-29 07:47:32 +00:00
Johannes
8cdfe32679 swap diff 2022-03-29 09:47:15 +02:00
joBr99
ecbc635557 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-29 07:45:16 +00:00
Johannes
7ec528f6e3 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-29 09:44:51 +02:00
Johannes
2d8a571ec7 some more changes from EU version 2022-03-29 09:44:42 +02:00
joBr99
2238015bac Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-29 07:16:05 +00:00
Johannes
3f6a26e7d9 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-29 09:15:39 +02:00
Johannes
593fe33a1b add icons 2022-03-29 09:15:30 +02:00
joBr99
ec43580e7f change entn length (add nextion2text) 2022-03-29 07:14:18 +00:00
Johannes
ca8d393219 change entn length 2022-03-29 09:13:56 +02:00
joBr99
10f56235fe fix file pattern (add nextion2text) 2022-03-29 07:10:48 +00:00
Johannes
ee9dcfb879 fix file pattern 2022-03-29 09:10:33 +02:00
Johannes
e2b97c9261 add some changes from eu version 2022-03-29 09:05:36 +02:00
Johannes
10ef128535 Update nextion2text.yml 2022-03-29 09:00:24 +02:00
Johannes
685d7de399 Update nextion2text.yml 2022-03-29 08:58:30 +02:00
Johannes
f35a633058 Update nextion2text.yml 2022-03-29 08:51:42 +02:00
Johannes
e8b3168ecc Update nextion2text.yml 2022-03-29 08:49:32 +02:00
Johannes
ed2180cdea Update nextion2text.yml 2022-03-29 08:48:55 +02:00
Johannes
d44697cbc6 some changes from eu version 2022-03-29 08:47:09 +02:00
Johannes
b63fc7a8c8 first time us n2t 2022-03-29 08:41:16 +02:00
Johannes
9bc7096399 Update nextion2text.yml 2022-03-29 08:39:07 +02:00
Johannes
b6cb755427 fix n2t 2022-03-29 08:36:17 +02:00
Johannes
eeb0a1d360 fix n2t paths 2022-03-29 08:32:40 +02:00
Johannes
887e883265 Merge pull request #90 from jmbinette/main
Conversion from EU version to US version
2022-03-29 08:30:50 +02:00
Johannes
641f957947 add nextion2text for us version 2022-03-29 08:30:10 +02:00
jmbinette
84665ffeab Add files via upload 2022-03-28 23:46:57 -04:00
Johannes
3eba8dad15 fix screensaver brightness 2022-03-28 23:27:59 +02:00
Johannes
321604dd52 Update README.md 2022-03-28 23:10:21 +02:00
Johannes
df751096d1 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-28 23:03:31 +02:00
Johannes
8325720d44 fix 2022-03-28 23:03:25 +02:00
joBr99
e398736f82 moved heading to entityUpd #86 (add nextion2text) 2022-03-28 21:00:02 +00:00
Johannes
b524169942 moved heading to entityUpd #86 2022-03-28 22:59:43 +02:00
Johannes
34340d2ac4 update docs 2022-03-28 22:36:45 +02:00
Johannes
ca59b35b87 update pic 2022-03-28 22:34:08 +02:00
Johannes
1539149c09 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-28 22:19:52 +02:00
Johannes
2851c80bb5 fix shutter detail page 2022-03-28 22:19:45 +02:00
joBr99
383fc978fd Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-28 20:16:08 +00:00
Johannes
1e57b46f9d Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-28 22:15:44 +02:00
Johannes
2c1868ba29 fix 2022-03-28 22:15:36 +02:00
Johannes
8366555eed bump version for next release 2022-03-28 22:08:58 +02:00
joBr99
6bccd8dd50 added on off button to media page (add nextion2text) 2022-03-28 19:38:22 +00:00
Johannes
6ccc5bafe1 added on off button to media page 2022-03-28 21:37:53 +02:00
Johannes
89174c2bbd Update pages.py 2022-03-28 20:08:35 +02:00
Johannes
f5395153ee Merge pull request #89 from britzelpuf/main
Fixes for version 20
2022-03-28 20:00:13 +02:00
britzelpuf
e9fb5ba32b Resolve changes 2022-03-28 19:56:59 +02:00
britzelpuf
661494b0b5 Fix for Version 20 2022-03-28 19:52:01 +02:00
britzelpuf
ea49bc9d70 Merge branch 'joBr99:main' into main 2022-03-28 19:39:35 +02:00
Johannes
1210838186 Update README.md 2022-03-28 18:12:54 +02:00
joBr99
0c872bfa87 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-28 15:49:36 +00:00
Johannes
e3a30e2da8 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-28 17:47:50 +02:00
Johannes
2a829e7217 added flashing 2022-03-28 17:47:45 +02:00
joBr99
15c79b60fa Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-28 15:32:29 +00:00
Johannes
05e05c7cb5 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-28 17:32:02 +02:00
Johannes
a27bc617a2 implemented buttons #81 and triggered state 2022-03-28 17:31:57 +02:00
joBr99
0a9e174c23 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-28 14:37:51 +00:00
Johannes
4fd2d3b260 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-28 16:37:25 +02:00
Johannes
28a43f46d7 added shield-airplane in HMI #81 2022-03-28 16:37:20 +02:00
joBr99
fffb73e310 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-28 14:35:44 +00:00
Johannes
7aacef87bd Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-28 16:35:17 +02:00
Johannes
1bf01b28a3 added some more alarm states #81 2022-03-28 16:35:13 +02:00
Johannes
0e6ec05056 change layout of alarm page #81 2022-03-28 16:19:02 +02:00
joBr99
2cd39b0abd Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-28 13:59:05 +00:00
Johannes
e3ab0d5594 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-28 15:58:41 +02:00
Johannes
f0bdc3c8ac implemented server side rendering of alarm page content #81 2022-03-28 15:58:37 +02:00
joBr99
e958eabc86 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-28 12:03:50 +00:00
Johannes
a742fbb2ae Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-28 14:03:27 +02:00
Johannes
b3eb283544 hide slider on page load 2022-03-28 14:03:19 +02:00
Johannes
2fa535a888 Update README.md 2022-03-28 13:29:08 +02:00
Johannes
31b8c566ed Update README.md 2022-03-28 12:40:29 +02:00
joBr99
ef6c42d1e0 add gui elements for slider on entities page (add nextion2text) 2022-03-27 21:07:54 +00:00
Johannes
af7edd37ad add gui elements for slider on entities page 2022-03-27 23:07:35 +02:00
Johannes
9525b5ad2c Update controller.py 2022-03-27 22:32:35 +02:00
Johannes
e882934d1b Update controller.py 2022-03-27 22:30:40 +02:00
Johannes
7477af1d2b Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-27 22:24:00 +02:00
Johannes
f2c67e47b3 fix thermo None values 2022-03-27 22:23:55 +02:00
joBr99
d35c990cc0 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-27 20:10:34 +00:00
Johannes
03c0940baa Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-27 22:10:15 +02:00
Johannes
48a0f331a8 increased entity char limit 2022-03-27 22:10:09 +02:00
joBr99
3081804f5a increase cooldown (add nextion2text) 2022-03-27 19:31:49 +00:00
Johannes
daf9fc5181 increase cooldown 2022-03-27 21:31:28 +02:00
joBr99
b6b12a2855 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-27 19:26:40 +00:00
Johannes
94eaebb542 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-27 21:26:15 +02:00
Johannes
dbe7725e48 changed cooldowns 2022-03-27 21:26:13 +02:00
Johannes
98e5249a43 fix pic 2022-03-27 20:28:44 +02:00
joBr99
43211467b2 added double tap feature for screensaver (add nextion2text) 2022-03-27 18:26:28 +00:00
Johannes
07260c0d0b added double tap feature for screensaver 2022-03-27 20:26:06 +02:00
Johannes
071b56f488 Update config.py 2022-03-27 20:04:58 +02:00
Johannes
d30fcf4157 Update controller.py 2022-03-27 19:48:49 +02:00
Johannes
3d04f77961 Do not display speaker selection item, in case there is only one speaker 2022-03-27 19:30:54 +02:00
joBr99
0b206e7fe3 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-27 14:29:36 +00:00
Johannes
f6e5e1ffdb Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-27 16:29:11 +02:00
Johannes
d2695b0437 more locations for sensor data on screensaver 2022-03-27 16:29:06 +02:00
Johannes
04bc737fd1 changed forecast on screensaver 2022-03-27 16:03:54 +02:00
joBr99
5586b57c9b implemented speaker control on media page (add nextion2text) 2022-03-27 13:49:18 +00:00
Johannes
11fc578984 implemented speaker control on media page 2022-03-27 15:48:57 +02:00
Johannes
a74043e4aa added speaker controls to hmi 2022-03-27 14:52:14 +02:00
Johannes
816d6787b7 Update pages.py 2022-03-27 12:05:44 +02:00
Johannes
01e4e233bf Update pages.py 2022-03-27 11:52:21 +02:00
Johannes
f78e03e5ec fixes #82 2022-03-27 11:34:54 +02:00
Johannes
33afd31d8f Check that page is existent #55 2022-03-26 21:06:59 +01:00
joBr99
4dccdfb014 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-26 15:41:05 +00:00
Johannes
2d6b8634bf Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-26 16:40:43 +01:00
Johannes
f11177c5c1 fix updater msg and bump to v1.8.3 2022-03-26 16:40:36 +01:00
joBr99
645aef4cfa fix bump for 1.8.2 (add nextion2text) 2022-03-26 15:26:46 +00:00
Johannes
d5fe05f806 fix bump for 1.8.2 2022-03-26 16:26:25 +01:00
Johannes
64cb8563aa bump to 18 for v1.8.1 2022-03-26 16:21:31 +01:00
Johannes
b91629421e Add name and icon to navigation buttons 2022-03-26 14:15:26 +01:00
Johannes
814cd4a295 implements #78 2022-03-26 13:44:48 +01:00
Johannes
9c2d91e3d9 fix brightness scale 2022-03-26 11:23:19 +01:00
Johannes
028ddb7896 Update pages.py 2022-03-26 11:16:39 +01:00
Johannes
afdc05a239 Add unit to forecast 2022-03-26 11:12:07 +01:00
Johannes
f63f7f7861 fix weather override 2022-03-26 11:08:32 +01:00
Johannes
c9d8f622cb fix weather override 2022-03-26 11:05:25 +01:00
Johannes
e6bb202823 Merge pull request #77 from gerard33/patch-2
Fix weather override
2022-03-26 11:00:01 +01:00
joBr99
7080facb10 added volume buttons to media page (add nextion2text) 2022-03-26 09:56:34 +00:00
Johannes
dcce889b3e added volume buttons to media page 2022-03-26 10:56:14 +01:00
Johannes
2e15482ed1 limit lower bound of color brightness scale 2022-03-26 10:45:22 +01:00
joBr99
adb99623e9 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-26 09:31:24 +00:00
Johannes
27f48819a4 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-26 10:31:02 +01:00
Johannes
1b52c885f6 added cooldown to sliders on light detail page 2022-03-26 10:30:54 +01:00
Gerard
1f937f75f2 Fix weather override 2022-03-26 10:10:58 +01:00
Johannes
269b983c2a fix current_page on nested page nav 2022-03-26 09:57:37 +01:00
Johannes
29dfa5671d Update README.md 2022-03-26 09:55:15 +01:00
Johannes
74a3860aa0 Merge pull request #76 from gerard33/patch-2
Fix weather forecast
2022-03-26 09:47:39 +01:00
Gerard
1bc69128a9 Fix weather forecast
Show the correct day and icon for day 2
2022-03-26 09:46:26 +01:00
Johannes
4529d5e34e Update README.md 2022-03-26 09:14:49 +01:00
Johannes
0db8983b4a Update README.md 2022-03-26 09:12:21 +01:00
Johannes
dc5e732e04 Update README.md 2022-03-26 09:11:47 +01:00
Johannes
7e7d14a999 add overwrite for forecast's on screensaver 2022-03-26 08:51:21 +01:00
joBr99
7ebc29b4a4 allow empty type as alternative for delete (add nextion2text) 2022-03-26 00:28:30 +00:00
Johannes
8b24f70ae0 allow empty type as alternative for delete 2022-03-26 01:28:10 +01:00
Johannes
edfe79e3c4 implemented navigation within tree 2022-03-26 01:23:41 +01:00
Johannes
93d223141b fixes #72 at least for now 2022-03-25 22:58:34 +01:00
Johannes
853de19a40 fixes #69 2022-03-25 22:34:31 +01:00
Johannes
da2b4565a4 fixes #74 2022-03-25 22:30:00 +01:00
Johannes
18d360d339 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-25 22:23:36 +01:00
Johannes
af494ada10 fixes #73 2022-03-25 22:23:27 +01:00
Johannes
05d6ee1f5f fixed localization for buttons 2022-03-25 20:58:04 +01:00
Johannes
a4344ade18 send brightness and timeout on startup 2022-03-25 20:50:45 +01:00
Johannes
1470ee5c82 Update localization.py 2022-03-25 20:44:19 +01:00
Johannes
9ae898c30f Update localization.py 2022-03-25 20:43:07 +01:00
Johannes
ec65eebb74 Add localization to thermo page status 2022-03-25 20:39:26 +01:00
Johannes
f7a768de7c Update localization.py 2022-03-25 20:37:40 +01:00
Johannes
e7aa27128c Merge pull request #70 from gerard33/patch-2
Some textual updates
2022-03-25 20:26:51 +01:00
Johannes
11bbad78d1 Update localization.py 2022-03-25 20:25:28 +01:00
Gerard
95e3dfa0ea Some textual updates 2022-03-25 20:23:28 +01:00
Johannes
70557ab748 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-25 16:57:17 +01:00
Johannes
2ecc7caedd update config 2022-03-25 16:57:11 +01:00
joBr99
6fd8553450 added am/pm on screensaver (add nextion2text) 2022-03-25 15:31:46 +00:00
Johannes
83396c283f added am/pm on screensaver 2022-03-25 16:31:28 +01:00
Johannes
a388efb5b5 Merge pull request #65 from gerard33/patch-3
Rename `getEntityColor` to `get_entity_color`
2022-03-25 15:46:22 +01:00
Johannes
77b05b8079 add min brightness 2022-03-25 15:46:03 +01:00
Johannes
0aae22118b fix ext update 2022-03-25 15:44:12 +01:00
Johannes
4a0a2d3620 merged main into pr 2022-03-25 15:29:40 +01:00
Johannes Braun
cfd0d2cbe8 fixed erron in gen items 2022-03-25 15:11:33 +01:00
Johannes
39575935b6 Merge pull request #68 from joBr99/newConfigFormat
new config parseing
2022-03-25 15:05:09 +01:00
Johannes Braun
9f8900bf78 fixed altert 2022-03-25 14:43:33 +01:00
joBr99
a054f7a7b3 fixed alerts (add nextion2text) 2022-03-25 13:34:26 +00:00
Johannes Braun
464e625eaa fixed alerts 2022-03-25 14:34:06 +01:00
Johannes
505db42064 Merge branch 'main' into newConfigFormat 2022-03-25 14:13:07 +01:00
Johannes Braun
36459145e4 added localization fixed updater 2022-03-25 14:06:40 +01:00
Johannes Braun
32b84bba9f upd docs 2022-03-25 12:11:53 +01:00
Johannes Braun
952398a827 added updater 2022-03-25 12:09:53 +01:00
Johannes Braun
ff106be9cb added state change callback 2022-03-25 00:26:43 +01:00
Johannes Braun
0ab7900ec0 basic navigation and event handling 2022-03-24 22:51:51 +01:00
Johannes
f328107f75 Merge pull request #66 from gerard33/patch-2
Show alert icon instead of shutter icon
2022-03-24 22:37:07 +01:00
Gerard
8deb0fd35e Show alert icon instead of shutter icon
When no mediaplayer is found
2022-03-24 20:20:14 +01:00
Gerard
ed207b6e1a Rename getEntityColor to get_entity_color
I have also set a minimum brightness for the icon otherwise it's almost not visible anymore when the brightness value is very low. What do you think?
2022-03-24 20:14:15 +01:00
Johannes
83e3316458 Merge pull request #63 from gerard33/patch-2
Add language settings
2022-03-24 20:10:45 +01:00
Johannes
53c4ed370b Merge pull request #64 from gerard33/patch-3
Add icon_color for binary sensor
2022-03-24 20:10:10 +01:00
Gerard
050a8e6fd2 Add icon_color for binary sensor
Blue when `off` and yellow when `on`
Not sure about the colors though, but at least it's nice to show different icon colors based on the state
2022-03-24 20:07:36 +01:00
Gerard
907f814ac7 Add config options for buttons and scenes 2022-03-24 19:45:18 +01:00
Gerard
e91c514fe1 Add language settings
Make `PRESS` and `ACTIVATE` text configurable
2022-03-24 19:42:48 +01:00
Johannes
5566f20e47 fixes #61 2022-03-24 17:24:47 +01:00
Johannes
4810679ac5 Update README.md 2022-03-24 16:18:35 +01:00
Johannes
48ed2daa33 Merge pull request #59 closes #58
Add name as config item
2022-03-24 16:14:46 +01:00
Johannes Braun
482cee0552 redesign of config format 2022-03-24 16:12:42 +01:00
Gerard
8813331299 Update README.md 2022-03-24 16:11:06 +01:00
Gerard
abf4868281 Update README.md 2022-03-24 16:10:06 +01:00
Gerard
420905db04 Add name as config item
See FR #58
2022-03-24 16:08:21 +01:00
Johannes
4151aba6ea Update README.md 2022-03-24 14:56:48 +01:00
britzelpuf
8a48ff35d4 Fix Startup routine 2022-03-24 12:23:01 +01:00
Johannes
35b15c92e0 Merge pull request #54 from joBr99/patch-buttonPress2
Migrate to new buttonPress cmd format
2022-03-23 22:11:48 +01:00
Johannes
c40906fdfe Merge pull request #56 from britzelpuf/patch-buttonPress2
Update NsPanelTs.ts
2022-03-23 22:11:23 +01:00
britzelpuf
66a65c03e8 Update NsPanelTs.ts
Update HandleMessage function to switch
Fix tempupd
2022-03-23 22:08:25 +01:00
Johannes
20e6f21307 Migrate to new buttonPress cmd format 2022-03-23 11:25:21 +01:00
joBr99
342a97df0f don't show palette icon if color temp isn't supported (add nextion2text) 2022-03-23 10:13:32 +00:00
Johannes Braun
0d343d4919 don't show palette icon if color temp isn't supported 2022-03-23 11:13:06 +01:00
Johannes Braun
0111a9bb21 updated screens picture 2022-03-23 09:37:25 +01:00
Johannes Braun
9ac5c8d748 fix input_boolean icon 2022-03-23 09:37:00 +01:00
Johannes
a725305cd4 Update nspanel-lovelace-ui.py 2022-03-22 23:56:24 +01:00
joBr99
0746221fe7 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-22 22:44:56 +00:00
Johannes
dbfd5e7da4 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-22 23:44:37 +01:00
Johannes
6d80a53e9c bump version for next release 2022-03-22 23:44:28 +01:00
joBr99
fb93f96a94 update doc (add nextion2text) 2022-03-22 22:35:23 +00:00
Johannes
5dd7dd2c77 update doc 2022-03-22 23:35:01 +01:00
Johannes
f11c870f47 removed old buttonPress format 2022-03-22 23:32:46 +01:00
joBr99
e4727822a9 moved entities page to new button format (add nextion2text) 2022-03-22 22:27:44 +00:00
Johannes
a75e7abc32 moved entities page to new button format 2022-03-22 23:27:25 +01:00
joBr99
d3e308ccaf added input boolean to button command (add nextion2text) 2022-03-22 22:13:43 +00:00
Johannes
f5d785298f added input boolean to button command 2022-03-22 23:13:23 +01:00
Johannes
89cd951e70 migrated some more pages to button v2 cmd format 2022-03-22 23:12:57 +01:00
Johannes
9278258684 cleanup 2022-03-22 22:36:36 +01:00
Johannes
327be4bca2 change override config format 2022-03-22 22:11:08 +01:00
Johannes
27f492ba6a Fix indent 2022-03-22 19:46:53 +01:00
Johannes Braun
c66e595e65 add docs about upcoming icon feature 2022-03-22 19:45:34 +01:00
Johannes Braun
29613e11cc remove import 2022-03-22 19:35:59 +01:00
Johannes Braun
2bf396f7af Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui 2022-03-22 19:30:23 +01:00
Johannes Braun
9dd34abac4 fix cover and input boolean 2022-03-22 19:30:13 +01:00
Johannes Braun
aae3aa9e62 fix import 2022-03-22 19:29:12 +01:00
joBr99
ff3208d5fa fix (add nextion2text) 2022-03-22 18:21:02 +00:00
Johannes Braun
da3ae4b78d fix 2022-03-22 19:20:39 +01:00
Johannes Braun
256b3e5fe6 Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui 2022-03-22 19:20:28 +01:00
Johannes Braun
0629f70d30 inital support for alternating icons 2022-03-22 19:00:22 +01:00
Johannes Braun
3ed71d725d upadte readme 2022-03-22 18:27:43 +01:00
joBr99
35e4252a6c added some icons (add nextion2text) 2022-03-22 17:24:49 +00:00
Johannes Braun
9ba4395e6c added some icons 2022-03-22 18:24:26 +01:00
Johannes Braun
909101d726 Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui 2022-03-22 17:11:15 +01:00
Johannes Braun
f99fa640fe inital support for binary_sensors closes #52 2022-03-22 17:11:00 +01:00
joBr99
d2434ca626 changed timeout page exit on popup pages (add nextion2text) 2022-03-22 15:34:05 +00:00
Johannes Braun
65f4dd3970 changed timeout page exit on popup pages 2022-03-22 16:33:40 +01:00
Johannes Braun
fac86624ae changed behaviour of light detail page 2022-03-22 16:32:02 +01:00
joBr99
277b2ccfd6 . (add nextion2text) 2022-03-22 15:09:16 +00:00
Johannes
cbfd803a65 . 2022-03-22 16:08:53 +01:00
Johannes Braun
ae691d298f fix testing for none 2022-03-22 11:42:22 +01:00
joBr99
ee187ae9cd migrated thero page to new button cmd format (add nextion2text) 2022-03-22 10:37:28 +00:00
Johannes Braun
35e1b4cd66 migrated thero page to new button cmd format 2022-03-22 11:37:04 +01:00
Johannes
f6912ad3ca Update nspanel-lovelace-ui.py 2022-03-22 10:22:32 +01:00
joBr99
71a5830db4 migrate media page to new buttonPress cmd format (add nextion2text) 2022-03-22 09:08:02 +00:00
Johannes
8ada5ad9b9 migrate media page to new buttonPress cmd format 2022-03-22 10:07:39 +01:00
Johannes
9a59b453d2 some more cleanup 2022-03-22 00:17:04 +01:00
Johannes
e52091b274 some more cleanup 2022-03-22 00:09:04 +01:00
Johannes
95de956e77 fix dimmode 2022-03-22 00:02:48 +01:00
Johannes
358a5f8b72 Update nspanel-lovelace-ui.py 2022-03-21 23:50:58 +01:00
Johannes
4292a34c11 fix 2022-03-21 23:48:49 +01:00
Johannes
60c40d56e5 some cleanup 2022-03-21 23:44:17 +01:00
Johannes
97fed8c52c Fixed input boolean, broken ealier :) 2022-03-21 22:12:07 +01:00
Johannes
bf06931a2e Fixed Callbacks for customized items 2022-03-21 21:51:37 +01:00
Johannes
cec43eeb16 Fix input_boolean and switch 2022-03-21 21:38:51 +01:00
Johannes
20c02007fa cleanup get all items 2022-03-21 21:31:42 +01:00
Johannes
2be33d723a Added support for custom icons on cover, light, switch, button and scene 2022-03-21 21:02:26 +01:00
Johannes
ea121ff9a9 Merge pull request #50 from britzelpuf/main
Colors and color interpolation
2022-03-21 20:30:20 +01:00
britzelpuf
601de7b47f added a feature information 2022-03-21 20:05:05 +01:00
britzelpuf
0c33184e5c Update README.md 2022-03-21 20:04:16 +01:00
britzelpuf
979d37281c Cleanup, Restructure
Added colors for missing items and cards
Added color interpolation
2022-03-21 19:57:07 +01:00
Johannes
7a5d76e2f4 Update nspanel-lovelace-ui.py 2022-03-21 16:53:41 +01:00
joBr99
745445af19 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-21 15:53:30 +00:00
Johannes
1f7a3d513d Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-21 16:53:08 +01:00
Johannes
24365f7824 bump to 15 2022-03-21 16:53:05 +01:00
Johannes
7996393afb fix version tag 2022-03-21 16:48:13 +01:00
Johannes
5903239456 Update nspanel-lovelace-ui.py 2022-03-21 15:46:04 +01:00
joBr99
32aa35d9c3 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-21 14:44:50 +00:00
Johannes
bb0108dc7a Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-21 15:44:27 +01:00
Johannes
cf6359dea5 bump version for next release 2022-03-21 15:44:16 +01:00
joBr99
8d4c1904f1 add icon (add nextion2text) 2022-03-21 14:43:35 +00:00
Johannes
3111ce15a2 add icon 2022-03-21 15:43:12 +01:00
joBr99
85d290c3f4 added command to exit notification page (add nextion2text) 2022-03-21 13:56:20 +00:00
Johannes
f8a72a55a9 added command to exit notification page 2022-03-21 14:55:55 +01:00
Johannes Braun
b9123ed2e9 update screens pic 2022-03-21 12:24:48 +01:00
Johannes
b9d2c08cab icon color also for switches 2022-03-21 11:02:12 +01:00
Johannes
0d460af0c6 fixed method call 2022-03-21 10:58:43 +01:00
Johannes
6eefab4ed7 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-21 10:53:02 +01:00
Johannes
41c90f68ce changed color on state 2022-03-21 10:52:55 +01:00
joBr99
18516917b9 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-21 09:25:20 +00:00
Johannes
bd64ba702a Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-21 10:24:59 +01:00
Johannes
429f023d3d flip icon 1 and 11 2022-03-21 10:24:45 +01:00
joBr99
6264f22d12 added v2 button msg format (add nextion2text) 2022-03-21 09:13:51 +00:00
Johannes
fc4fb72818 added v2 button msg format 2022-03-21 10:13:25 +01:00
Johannes
23814a7bf2 added internal names to buttons 2022-03-21 10:11:44 +01:00
Johannes
ef6877b2ae Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-21 10:01:47 +01:00
Johannes
9b5ca37673 implemented commands for alarm page 2022-03-21 09:59:46 +01:00
Johannes
acc2e859bb Fixed weather forecast to make babel optional again 2022-03-21 09:13:33 +01:00
Johannes
481f5fc074 fix ident 2022-03-21 07:58:18 +01:00
Johannes
ff96c8fce6 Merge pull request #48 from britzelpuf/main
Gridpages
2022-03-21 00:42:40 +01:00
joBr99
5e74db2d85 bumped version for next release (add nextion2text) 2022-03-20 23:25:26 +00:00
Johannes
74a2cfd369 bumped version for next release 2022-03-21 00:24:53 +01:00
Johannes
e780bf302d fixed pageThermo type from pageNotify 2022-03-21 00:24:17 +01:00
britzelpuf
54c8b7d2ab Merge branch 'joBr99:main' into main 2022-03-21 00:01:31 +01:00
britzelpuf
88a2ad46ec Merge branch 'main' of https://github.com/britzelpuf/nspanel-lovelace-ui 2022-03-21 00:01:14 +01:00
britzelpuf
18855840d8 Added support for GridPages
Added color support
Color interpolation
2022-03-21 00:00:54 +01:00
Johannes
2cbcb098e6 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-20 23:52:07 +01:00
Johannes
e2c20b8c2d bumped version for next release 2022-03-20 23:51:52 +01:00
joBr99
a895a85477 fixed screensaver timeout on popup pages (add nextion2text) 2022-03-20 22:49:55 +00:00
Johannes
d1165efbd8 fixed screensaver timeout on popup pages 2022-03-20 23:49:36 +01:00
Johannes
a2a2e221d4 Fix delete doc 2022-03-20 23:22:08 +01:00
Johannes
23d0514339 added advanced examples nodered 2022-03-20 22:42:01 +01:00
joBr99
d66cfc6cd8 fixed event on sleeptimout on notify page (add nextion2text) 2022-03-20 21:33:34 +00:00
Johannes
07fd51543f fixed event on sleeptimout on notify page 2022-03-20 22:33:13 +01:00
joBr99
8d0feefb01 fix timeout on pageNotify (add nextion2text) 2022-03-20 21:26:22 +00:00
Johannes
b5afc7d427 fix timeout on pageNotify 2022-03-20 22:26:01 +01:00
britzelpuf
c0dd81f967 Merge branch 'joBr99:main' into main 2022-03-20 21:52:18 +01:00
britzelpuf
91273bb6f2 Fix Typo 2022-03-20 21:44:44 +01:00
Johannes Braun
4ce16095b5 change requirements for auto update 2022-03-20 20:35:25 +01:00
Johannes Braun
9bd6925f75 Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui 2022-03-20 20:27:33 +01:00
Johannes Braun
0b58f16a0e added auto update to config examples 2022-03-20 20:27:02 +01:00
Johannes Braun
6983ff1532 implemented auto update 2022-03-20 20:20:44 +01:00
joBr99
f7f63d00a4 fixed dimmode on popup pages (add nextion2text) 2022-03-20 19:16:13 +00:00
Johannes Braun
b0027d4c3c fixed dimmode on popup pages 2022-03-20 20:15:53 +01:00
joBr99
622f9bf0c7 fix pagetype notify on startup page (add nextion2text) 2022-03-20 19:09:32 +00:00
Johannes Braun
b6b0249bfe fix pagetype notify on startup page 2022-03-20 20:09:11 +01:00
joBr99
27251104ee preserve sleep also on page type command (add nextion2text) 2022-03-20 18:58:43 +00:00
Johannes Braun
7822782fc6 preserve sleep also on page type command 2022-03-20 19:58:19 +01:00
Johannes Braun
763dbb6ef8 preserve sleep timeout on notify page 2022-03-20 19:57:05 +01:00
joBr99
45b59d4d01 remove dummy text (add nextion2text) 2022-03-20 18:37:40 +00:00
Johannes Braun
ae515df4c9 remove dummy text 2022-03-20 19:37:17 +01:00
joBr99
498f8bf234 Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-20 18:28:46 +00:00
Johannes Braun
3f531da6f0 Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui 2022-03-20 19:28:24 +01:00
Johannes Braun
264e9cd61c increase cmd buffer 2022-03-20 19:28:08 +01:00
joBr99
fc0f24a794 extend msg length (add nextion2text) 2022-03-20 18:21:05 +00:00
Johannes Braun
f9549a7dc6 extend msg length 2022-03-20 19:20:44 +01:00
joBr99
b698d67f79 set dimval on pageType startup (add nextion2text) 2022-03-20 18:16:28 +00:00
Johannes Braun
d0d456c49d set dimval on pageType startup 2022-03-20 19:16:02 +01:00
Johannes Braun
e3909e457c Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui 2022-03-20 19:01:18 +01:00
Johannes Braun
b1768f2b80 startet implementation on auto update 2022-03-20 19:01:05 +01:00
joBr99
6643d6c284 swap default tasmota driver (add nextion2text) 2022-03-20 16:18:47 +00:00
Johannes Braun
c683a9bc7c swap default tasmota driver 2022-03-20 17:18:15 +01:00
Johannes Braun
721a41ce3e fix detail pages exit 2022-03-20 16:41:12 +01:00
Johannes Braun
94891bf2cb Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui 2022-03-20 16:17:15 +01:00
Johannes Braun
0de9d83b50 remove event form notify page 2022-03-20 16:17:01 +01:00
joBr99
25f3913010 Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-20 14:54:41 +00:00
Johannes Braun
a023d2e04a Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui 2022-03-20 15:54:21 +01:00
Johannes Braun
741ff125f3 changed delimiter on notify page 2022-03-20 15:54:12 +01:00
joBr99
0d883983fa Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-20 14:48:55 +00:00
Johannes Braun
646ec6cf92 Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui 2022-03-20 15:48:32 +01:00
Johannes Braun
411ef851a7 added sleepTimeout to notify command 2022-03-20 15:48:22 +01:00
joBr99
65886ca9fc Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-20 14:43:53 +00:00
Johannes Braun
a789c39fa1 Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui 2022-03-20 15:43:30 +01:00
Johannes Braun
3930408ebf fixed pagetype notify 2022-03-20 15:43:11 +01:00
joBr99
17554fd57d modified notify page commands (add nextion2text) 2022-03-20 14:31:33 +00:00
Johannes Braun
5d6f59df71 modified notify page commands 2022-03-20 15:31:12 +01:00
Johannes Braun
818405fa73 fixed forecast icons 2022-03-20 15:08:53 +01:00
joBr99
2451c353f8 fixed dim value on wake (add nextion2text) 2022-03-20 14:05:54 +00:00
Johannes Braun
d3475a948e fixed dim value on wake 2022-03-20 15:05:28 +01:00
joBr99
0b7fec2f99 Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-20 13:56:05 +00:00
Johannes Braun
81487e580b Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui 2022-03-20 14:54:57 +01:00
Johannes Braun
6347297d1f simplified pageOpen 2022-03-20 14:54:45 +01:00
joBr99
6e3dbc4057 modified notify commands (add nextion2text) 2022-03-20 13:36:33 +00:00
Johannes Braun
8849e18e48 modified notify commands 2022-03-20 14:36:11 +01:00
Johannes Braun
5e6348dc70 migration to icon mapper 2022-03-20 14:20:57 +01:00
Johannes Braun
b1399aad81 fix ident 2022-03-20 13:55:46 +01:00
Johannes Braun
fe3e0c882e migrate weather to icon mapper 2022-03-20 13:54:03 +01:00
Johannes Braun
59691cc591 fixed file ending in links 2022-03-20 13:43:54 +01:00
Johannes Braun
0d85dac1e1 added code gen for stuff related to icons ids 2022-03-20 13:37:45 +01:00
Johannes Braun
f08010d74b Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui 2022-03-20 12:32:22 +01:00
Johannes Braun
470a891f65 update docs 2022-03-20 12:32:06 +01:00
joBr99
860f4a3dd0 fix shutter on grid page (add nextion2text) 2022-03-20 11:09:44 +00:00
Johannes Braun
64cb6c58e3 fix shutter on grid page 2022-03-20 12:09:26 +01:00
Johannes
21d1ad9a1e fix icon for switches 2022-03-20 12:05:10 +01:00
Johannes
7a55c1c876 added light toggle to buttonpress 2022-03-20 10:57:44 +01:00
Johannes
ae9254eda2 Merge pull request #45 from gerard33/patch-2
Change check for supported_color_modes
2022-03-20 01:42:03 +01:00
joBr99
2b0e16d633 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-20 00:30:03 +00:00
Johannes
330744ca9c Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-20 01:29:45 +01:00
Johannes
7584516ac9 fixed shutter 2022-03-20 01:29:35 +01:00
joBr99
7937368f73 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-20 00:26:46 +00:00
Johannes
1aca308970 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-20 01:26:23 +01:00
Johannes
5a9ffc1889 changed sel color 2022-03-20 01:26:15 +01:00
Johannes
6a9b4d4f0e Update nspanel-lovelace-ui.py 2022-03-20 01:16:48 +01:00
Johannes
0809443b5d Update nspanel-lovelace-ui.py 2022-03-20 01:15:40 +01:00
joBr99
9ca085e296 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-20 00:14:24 +00:00
Johannes
5120a87472 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-20 01:14:00 +01:00
Johannes
8c3df900fe added long press for cardgrid 2022-03-20 01:13:50 +01:00
Gerard
3af3fd5172 Change check for supported_color_modes 2022-03-20 01:04:01 +01:00
joBr99
13d1e95e74 added usercode to buttons (add nextion2text) 2022-03-19 23:49:48 +00:00
Johannes
36ab2eb09c added usercode to buttons 2022-03-20 00:49:30 +01:00
Johannes
66f3e2955b Merge pull request #44 from gerard33/patch-2
Change indent for popup shutter
2022-03-20 00:42:34 +01:00
Gerard
e01d4a8bc8 Change indent for popup shutter 2022-03-20 00:35:53 +01:00
Johannes
63e7ecd60a Merge pull request #43 from gerard33/patch-1
Fix light with brightness
2022-03-20 00:33:17 +01:00
joBr99
2ad0ad4c35 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-19 23:31:11 +00:00
Johannes
a1665075b5 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-20 00:30:51 +01:00
Johannes
d095f7ef28 fixed delete on grid page 2022-03-20 00:30:48 +01:00
Gerard
9a4fef98d3 Create nspanel-lovelace-ui.py 2022-03-20 00:28:29 +01:00
Gerard
1e9a8df3f8 Fix light with brightness 2022-03-20 00:17:50 +01:00
joBr99
2f21594289 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-19 23:13:44 +00:00
Johannes
63778275dc Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-20 00:13:18 +01:00
Johannes
ff43743ae3 fixed grind command 2022-03-20 00:13:09 +01:00
Johannes
a7d710bb6f Merge pull request #42 from britzelpuf/main
Fixed Typo in HMI/README.md
2022-03-19 23:51:28 +01:00
joBr99
ee66eb13f6 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-19 22:50:58 +00:00
Johannes
441bedf5a2 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-19 23:50:35 +01:00
Johannes
85b0ed4154 fixed grid cmd 2022-03-19 23:50:26 +01:00
joBr99
890236f683 added grid page (add nextion2text) 2022-03-19 22:26:58 +00:00
britzelpuf
18c96ee0f8 Fixed Typo in HMI/README.md
Updated to NsPanelTs.ts to support new FW
Updated README.md
2022-03-19 23:26:57 +01:00
Johannes
00442c82b0 added grid page 2022-03-19 23:26:39 +01:00
Johannes
dc3062eba0 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-19 22:00:39 +01:00
Johannes
cfdfb9404c added light color to detail page 2022-03-19 22:00:31 +01:00
joBr99
246c03ee4b added icon to popup light command (add nextion2text) 2022-03-19 20:49:20 +00:00
Johannes
940ee10fc4 added icon to popup light command 2022-03-19 21:48:56 +01:00
Johannes
ba887cf60c added light with brightness only 2022-03-19 21:30:00 +01:00
Johannes
e5706d848f added brightness 2022-03-19 21:24:03 +01:00
Johannes
eac1095bbd set current rgb_color 2022-03-19 20:56:15 +01:00
Johannes
1f6cd2d1aa Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-19 20:39:18 +01:00
Johannes
1201142cb5 move color stuff to seperate file 2022-03-19 20:39:11 +01:00
joBr99
dddff76d11 added color to commands for entity page (add nextion2text) 2022-03-19 19:14:22 +00:00
Johannes
e74de74ede added color to commands for entity page 2022-03-19 20:14:02 +01:00
Johannes
e859c338b3 added color to update command on entity card 2022-03-19 20:08:58 +01:00
Johannes
0921dd81b8 Update nspanel-lovelace-ui.py 2022-03-19 19:16:43 +01:00
Johannes
413401b1f9 Update nspanel-lovelace-ui.py 2022-03-19 18:26:12 +01:00
Johannes
fcc8d44bfd Merge pull request #41 from gerard33/patch-1
Change to f-string
2022-03-19 18:10:18 +01:00
joBr99
d4ff842dee Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-19 17:09:24 +00:00
Johannes
4cd0ecbe56 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-19 18:09:03 +01:00
Johannes
cfba107246 increase max mem for cmd 2022-03-19 18:08:54 +01:00
Gerard
e5b4fb4743 Change to f-string 2022-03-19 17:58:11 +01:00
joBr99
a35467830f bind startup animation to ui element (add nextion2text) 2022-03-19 16:06:25 +00:00
Johannes
625bddc894 bind startup animation to ui element 2022-03-19 17:06:01 +01:00
Johannes
6124a24887 fixed function call 2022-03-19 16:47:41 +01:00
Johannes
39e44bc820 fixed state callback 2022-03-19 16:23:23 +01:00
joBr99
f3351af4e5 fixed page command (add nextion2text) 2022-03-19 14:45:12 +00:00
Johannes Braun
0cc735566f fixed page command 2022-03-19 15:44:52 +01:00
Johannes Braun
90e2b1622b fixed callback 2022-03-19 14:46:03 +01:00
Johannes Braun
9f8be27835 changed to new entities msg format 2022-03-19 14:30:24 +01:00
Johannes Braun
b852703aa1 Merge branch 'main' of github.com:joBr99/nspanel-widget-ui 2022-03-19 14:07:35 +01:00
Johannes Braun
cce36c281e extended cmd length 2022-03-19 14:07:24 +01:00
joBr99
9267e7be4e changed entities page message format (add nextion2text) 2022-03-19 12:36:24 +00:00
Johannes Braun
91434bfdd3 changed entities page message format 2022-03-19 13:36:00 +01:00
Johannes Braun
9153b602d7 changed entities page message format 2022-03-19 13:35:34 +01:00
joBr99
7c7241bc98 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-19 07:32:22 +00:00
Johannes
9a111720e5 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-19 08:31:54 +01:00
Johannes
a93681f262 removed font 3, to save some space 2022-03-19 08:31:35 +01:00
joBr99
dfe82dcd45 added page command to screensaver (add nextion2text) 2022-03-19 07:22:33 +00:00
Johannes
6f792443ad added page command to screensaver 2022-03-19 08:22:04 +01:00
joBr99
4b21961707 Merge branch 'main' of github.com:joBr99/nspanel-widget-ui (add nextion2text) 2022-03-19 07:08:42 +00:00
Johannes Braun
699ba7855b Merge branch 'main' of github.com:joBr99/nspanel-widget-ui 2022-03-19 08:08:14 +01:00
Johannes Braun
0b740fb14d added early version of alarm screen 2022-03-19 08:07:53 +01:00
Johannes
19764eb220 Merge pull request #40 from gerard33/patch-1
Add localization for weather forecast
2022-03-17 21:54:02 +01:00
Gerard
8fee0af87f Update info.md 2022-03-17 21:29:23 +01:00
Gerard
ccd914c1a7 Update apps.yaml 2022-03-17 21:28:57 +01:00
Gerard
49f6631d5a Update README.md 2022-03-17 21:28:05 +01:00
Gerard
6fd1ddb432 Add localization for weather forecast
Show the day in local format for the weather forecast
2022-03-17 21:21:59 +01:00
Johannes
3fae02ebe2 Merge pull request #39 from britzelpuf/main
some cleanup and some fixes
2022-03-17 20:39:14 +01:00
Johannes
6e073f7181 Update codeql-analysis.yml 2022-03-17 20:34:52 +01:00
britzelpuf
9ea6c218fa - general cleanup
- updated Accuweather mapping
- added Button code
2022-03-17 20:05:15 +01:00
Johannes
f48510e03e Update README.md 2022-03-16 23:53:39 +01:00
Johannes
b5e3133d77 added localization support for date 2022-03-16 23:39:36 +01:00
Johannes
fc1614e243 Update README.md 2022-03-16 18:55:11 +01:00
Johannes
2d39e15b9d Update README.md 2022-03-16 18:46:44 +01:00
Johannes
025a3bd700 Update README.md 2022-03-16 18:30:45 +01:00
joBr99
93393ac877 Merge branch 'main' of github.com:joBr99/nspanel-widget-ui (add nextion2text) 2022-03-16 17:27:22 +00:00
Johannes Braun
b28c4e46eb Merge branch 'main' of github.com:joBr99/nspanel-widget-ui 2022-03-16 18:27:00 +01:00
Johannes Braun
48e17ed986 added another icon 2022-03-16 18:26:48 +01:00
joBr99
f0857aeec7 added two icons (add nextion2text) 2022-03-16 17:24:34 +00:00
Johannes Braun
36dddb0dc2 added two icons 2022-03-16 18:24:07 +01:00
Johannes
e1ac4d4cec Update README.md 2022-03-16 18:11:40 +01:00
Johannes
d82c4127b7 Update README.md 2022-03-16 18:11:03 +01:00
Johannes
991c882373 Update README.md 2022-03-16 18:10:08 +01:00
Johannes
e35b9d4a82 Update Icon Reference with Table in HMI Doc
Since I won't update this picture I think it's better to link the table where I'm documenting the icons, even if the HMI documentation isn't great :)
2022-03-16 18:09:58 +01:00
Johannes
0cdbfc5708 Update README.md 2022-03-16 18:06:38 +01:00
Johannes
21e8300191 Merge pull request #38 from britzelpuf/main
Added README.md
2022-03-16 17:49:06 +01:00
britzelpuf
d534ba30ac Added note where to change the screensaver value 2022-03-16 17:44:34 +01:00
britzelpuf
491ad5ea25 Update README.md 2022-03-16 17:42:18 +01:00
britzelpuf
fb5145561f Create README.md 2022-03-16 17:39:01 +01:00
joBr99
a65b8cb2df display light detail in correct mode (add nextion2text) 2022-03-16 16:37:58 +00:00
Johannes Braun
4d27f2f485 display light detail in correct mode 2022-03-16 17:37:21 +01:00
Johannes
864f5b80d0 Update codeql-analysis.yml 2022-03-16 17:07:21 +01:00
Johannes
6b1e0f0499 Update codeql-analysis.yml 2022-03-16 17:06:31 +01:00
Johannes
13919eba01 Adding typescript to codeql 2022-03-16 17:00:48 +01:00
Johannes
5965a089f1 Merge pull request #37 from britzelpuf/main
ioBroker integration
2022-03-16 16:44:24 +01:00
britzelpuf
5ea3557ffb Update NsPanelTs.ts
Fix commenting
2022-03-16 14:58:45 +01:00
britzelpuf
c8e3960003 Cleanup
DetailEntityWatcher for sending changes to display
2022-03-16 14:55:00 +01:00
Mad-C
9aec695f89 Basic Typescript for ioBroker. 2022-03-16 13:18:53 +01:00
joBr99
14bc505c79 redesign of light detail page, addded screen for icons on therm page (add nextion2text) 2022-03-15 17:38:02 +00:00
Johannes Braun
7504120e83 redesign of light detail page, addded screen for icons on therm page 2022-03-15 18:37:38 +01:00
joBr99
c1d15385c3 fixed icon (add nextion2text) 2022-03-14 22:09:36 +00:00
Johannes
a49b12c204 fixed icon 2022-03-14 23:09:14 +01:00
Johannes
96b136c194 change missing colors 2022-03-14 19:52:46 +01:00
Johannes
292c372060 Added Icons on Therm Page 2022-03-14 19:14:10 +01:00
joBr99
9c79197a59 changed therm button command (add nextion2text) 2022-03-14 18:00:31 +00:00
Johannes Braun
ac167a36ea changed therm button command 2022-03-14 19:00:11 +01:00
joBr99
989f085649 Merge branch 'main' of github.com:joBr99/nspanel-widget-ui (add nextion2text) 2022-03-14 17:50:18 +00:00
Johannes Braun
f231ea690b Merge branch 'main' of github.com:joBr99/nspanel-widget-ui 2022-03-14 18:49:56 +01:00
Johannes Braun
d18fbe269d fixed cmd len therm page 2022-03-14 18:49:24 +01:00
joBr99
27ff4f0581 changed msg format implemented buttons (add nextion2text) 2022-03-14 17:32:06 +00:00
Johannes Braun
b9e70f7b89 changed msg format implemented buttons 2022-03-14 18:31:39 +01:00
joBr99
bea91b01a9 fixed active color setting (add nextion2text) 2022-03-14 16:59:29 +00:00
Johannes Braun
0bcacd6ba6 fixed active color setting 2022-03-14 17:59:05 +01:00
joBr99
e3f5aad46b Merge branch 'main' of github.com:joBr99/nspanel-widget-ui (add nextion2text) 2022-03-14 16:18:44 +00:00
Johannes Braun
f367758445 Merge branch 'main' of github.com:joBr99/nspanel-widget-ui 2022-03-14 17:18:18 +01:00
Johannes Braun
9f0f670db5 fixed state attributes 2022-03-14 17:18:03 +01:00
joBr99
36d0685f3d added some icons (add nextion2text) 2022-03-14 15:32:25 +00:00
Johannes Braun
f0ee420d52 added some icons 2022-03-14 16:31:48 +01:00
Johannes Braun
daa1b1ee0f added button attr thermo page 2022-03-14 16:21:00 +01:00
Johannes
35d97fa0bd Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-14 01:00:32 +01:00
Johannes
0e76fc37de fix http headers 2022-03-14 01:00:24 +01:00
joBr99
0cb06c752f Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-03-13 23:30:06 +00:00
Johannes
cf9f14f12a Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-14 00:29:44 +01:00
Johannes
a3a6487e13 fix cardMedia from startupPage 2022-03-14 00:29:29 +01:00
joBr99
bd9709fda6 enable recmod before each startup event (add nextion2text) 2022-03-13 22:55:30 +00:00
Johannes
ac237ff2ed enable recmod before each startup event 2022-03-13 23:55:09 +01:00
Johannes
6353d67335 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-03-13 23:28:12 +01:00
Johannes
c9b73303cf added beta driver based on ns-flash 2022-03-13 23:27:48 +01:00
Johannes
580681eb73 Implemented safe values for thermo page 2022-03-13 23:23:58 +01:00
Johannes
dc2aea3ffc Update nspanel-lovelace-ui.py 2022-03-13 19:12:41 +01:00
Johannes
4af3449491 Update nspanel-lovelace-ui.py 2022-03-13 19:09:25 +01:00
Johannes
85d1de3c19 Update nspanel-lovelace-ui.py 2022-03-13 19:07:07 +01:00
Johannes
cdda0d9601 fix for device_class in sensor item 2022-03-13 18:24:07 +01:00
joBr99
7961a27ab2 fixed length text item2 (add nextion2text) 2022-03-13 14:26:23 +00:00
Johannes
1533f52130 fixed length text item2 2022-03-13 15:26:06 +01:00
Johannes
af618b0f12 added error messages for apps.yaml missconfiguration 2022-03-13 15:24:48 +01:00
joBr99
36836f39c8 fixed pageType command for popupLight page (add nextion2text) 2022-03-13 09:16:22 +00:00
Johannes
d934f92a7e fixed pageType command for popupLight page 2022-03-13 10:16:01 +01:00
joBr99
be5b95fac2 fixed dim bug on startupscreen (add nextion2text) 2022-03-13 00:27:44 +00:00
Johannes
842ad460e9 fixed dim bug on startupscreen 2022-03-13 01:27:24 +01:00
Johannes
7f360e3fa6 fixed detail page shutter 2022-03-13 01:02:43 +01:00
Johannes
19dbda638e unified names 2022-03-13 00:48:52 +01:00
Johannes
05c6bf8770 Update nspanel-lovelance-ui.py 2022-03-13 00:35:18 +01:00
Johannes
8a66d49f93 Merge pull request #32 from gerard33/patch-1
Enhance readability
2022-03-12 23:45:08 +01:00
Gerard
1876470f15 Enhance readability 2022-03-12 23:42:32 +01:00
Johannes
c61c064fb4 Added "hs" to color modes for color wheel 2022-03-12 23:35:13 +01:00
Johannes
7c093d688b added rgbw to color modes for color wheel 2022-03-12 23:32:00 +01:00
Johannes
8fc4a2999d Added Notes about updating 2022-03-12 23:09:22 +01:00
joBr99
5083c1e2c4 modifed nextion2text action, to include visuals (add nextion2text) 2022-03-12 20:58:36 +00:00
Johannes Braun
42d3bb1d8a modifed nextion2text action, to include visuals 2022-03-12 21:58:16 +01:00
Johannes Braun
b087bcf390 fixed heading xcen on media card 2022-03-12 21:50:18 +01:00
joBr99
c588542b5b Merge branch 'main' of github.com:joBr99/nspanel-widget-ui (add nextion2text) 2022-03-12 20:43:59 +00:00
Johannes Braun
72515b6889 Merge branch 'main' of github.com:joBr99/nspanel-widget-ui 2022-03-12 21:43:36 +01:00
Johannes Braun
f624f4f119 moved nav buttons 2022-03-12 21:43:21 +01:00
Johannes
888f8ffeb5 Update nextion2text.yml 2022-03-12 21:08:30 +01:00
joBr99
5272d06513 Add nextion2text 2022-03-12 20:02:17 +00:00
Johannes Braun
376ca2dc40 fix deletion of buffer in pageType command 2022-03-12 21:01:57 +01:00
joBr99
e667d8fff4 Add nextion2text 2022-03-12 19:54:11 +00:00
Johannes Braun
4f180cded6 Merge branch 'main' of github.com:joBr99/nspanel-widget-ui 2022-03-12 20:53:25 +01:00
Johannes Braun
168e8c83c0 added pageType for notify 2022-03-12 20:53:08 +01:00
Johannes
5a5807cbf4 Update codeql-analysis.yml 2022-03-12 20:45:29 +01:00
Johannes
999ade0539 Update nextion2text.yml 2022-03-12 20:41:58 +01:00
joBr99
f0d3b775e6 Add nextion2text 2022-03-12 19:27:58 +00:00
Johannes
0617cae706 Update nextion2text.yml 2022-03-12 20:18:10 +01:00
Johannes
15570fc096 Update nextion2text.yml 2022-03-12 20:06:49 +01:00
Johannes
318ae91399 Create nextion2text.yml 2022-03-12 20:05:58 +01:00
Johannes Braun
72f9af1175 fix bug on light page #2 2022-03-12 19:49:58 +01:00
144 changed files with 93498 additions and 3716 deletions

2
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,2 @@
custom: ['https://paypal.me/joBr99']
ko_fi: jobr99

View File

@@ -14,9 +14,14 @@ name: "CodeQL"
on:
push:
branches: [ main ]
# paths:
# - '**.py'
# - '**.ts'
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
# paths:
# - '**.py'
schedule:
- cron: '36 14 * * 3'
@@ -32,7 +37,7 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'python' ]
language: [ 'python', 'typescript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

76
.github/workflows/nextion2text.yml vendored Normal file
View File

@@ -0,0 +1,76 @@
name: nextion2text
on:
pull_request:
paths:
- HMI/nspanel.HMI
- HMI/US/portrait/nspanel_US_P.HMI
- HMI/US/portrait/diff-ignore/cardEntities.txt
- HMI/US/landscape/nspanel_US_L.HMI
- .github/workflows/nextion2text.yml
push:
branches:
- main
paths:
- HMI/nspanel.HMI
- HMI/US/portrait/nspanel_US_P.HMI
- HMI/US/portrait/diff-ignore/cardEntities.txt
- HMI/US/landscape/nspanel_US_L.HMI
- .github/workflows/nextion2text.yml
jobs:
gen-nextion-to-text:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Get last commit message
id: last-commit-message
run: |
echo "::set-output name=msg::$(git log -1 --pretty=%s)"
- name: Download n2t
continue-on-error: true
run: |
wget https://raw.githubusercontent.com/joBr99/Nextion2Text/linux/Nextion2Text.py
- name: Run n2t EU
continue-on-error: true
run: |
python Nextion2Text.py -s -d -p -p visual -i HMI/nspanel.HMI -o HMI/n2t-out-visual
- name: Run n2t US
continue-on-error: true
run: |
python Nextion2Text.py -s -d -p -p visual -i HMI/US/portrait/nspanel_US_P.HMI -o HMI/US/portrait/n2t-out-visual
python Nextion2Text.py -s -d -p -p visual -i HMI/US/landscape/nspanel_US_L.HMI -o HMI/US/landscape/n2t-out-visual
- name: Run n2t US P DIFF
continue-on-error: true
run: |
echo "YXR0cmlidXRlcyA9IHsKICAgICJpZCI6IHsKICAgICAgICAiaWdub3JlIjogVHJ1ZSwKICAgICAgICAibmFtZSI6ICJJRCIsCiAgICAgICAgInN0cnVjdCI6ICJpIiwKICAgIH0KfQ==" | base64 -d > ignore-id.py
python Nextion2Text.py -c ignore-id.py -d -i HMI/nspanel.HMI -o HMI/n2t-out
echo portrait
python Nextion2Text.py -c ignore-id.py -d -i HMI/US/portrait/nspanel_US_P.HMI -o HMI/US/portrait/n2t-out
diff -bur HMI/n2t-out HMI/US/portrait/n2t-out > HMI/US/portrait/diff-eu-version.txt
- name: Run n2t US L DIFF
continue-on-error: true
run: |
echo landscape
python Nextion2Text.py -c ignore-id.py -d -i HMI/US/landscape/nspanel_US_L.HMI -o HMI/US/landscape/n2t-out
diff -bur HMI/n2t-out HMI/US/landscape/n2t-out > HMI/US/landscape/diff-eu-version.txt
- name: Display txt files
continue-on-error: true
run: |
find -name "**.txt"
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: ${{ steps.last-commit-message.outputs.msg }} (add nextion2text)
file_pattern: "**.txt"

1
.gitignore vendored
View File

@@ -1,2 +1,3 @@
__pycache__/
# don't add nextion2text
HMI/Nextion2Text.py

View File

@@ -1,7 +1,7 @@
# NSPanel Lovelance UI
The general idea is that the Nextion Display cycles though a page counter and the esp32 tells the display what to do.
If you are changeing the page the nextion display will send and event to the esp32 and it has to answer with the messages, that will update the current page with it's desired components. This enables easy changes, without touching the HMI Project.
If you are changeing the page the nextion display will send and event to the esp32 and it has to answer with the messages~ that will update the current page with it's desired components. This enables easy changes~ without touching the HMI Project.
# Message Flow
@@ -25,7 +25,7 @@ This protocol does not try to implement broken JSON Commands with a specified ty
Instead the commands are plain text commands with parameters.
## Example for valid Message
This message has to be generated for the Message "1337" (1337 is not a valid command, this is just an example)
This message has to be generated for the Message "1337" (1337 is not a valid command~ this is just an example)
```
55 BB 04 00 31 33 33 37 5F 5B
```
@@ -35,189 +35,185 @@ The following message should be implemented on all pages
wake screen:
wake
`wake`
set brightness of screensaver:
dimmode,0 - (screen off)
dimmode,100 - (screen on with full brightness)
`dimmode~0 - (screen off)`
`dimmode~100 - (screen on with full brightness)`
set current time:
time,22 : 26
`time~22 : 26`
set current date:
date,?Di 24. Februar
`date~Di 24. Februar`
set screensaver timeout (set time in ms limited from 50 to 65535:
set screensaver timeout (set time in sec~ max 65):
timeout,15 - timeout after 15 seconds
timeout,0 - disable screensaver
`timeout~15 - timeout after 15 seconds`
`timeout~0 - disable screensaver`
change the page type:
pageType,pageStartup
`pageType~pageStartup`
pageType,cardEntities
`pageType~cardEntities`
pageType,cardThermo
`pageType~cardThermo`
pageType,cardMedia
`pageType~cardMedia`
pageType,popupLight,Schreibtischlampe
`pageType~popupLight~Schreibtischlampe~light.schreibtischlampe`
`pageType~popupNotify`
`pageType~screensaver`
### screensaver page
weatherUpdate,? tMainIcon? tMainText? tMRIcon? tMR? tForecast1? tF1Icon? tForecast1Val? tForecast2? tF2Icon? tForecast2Val
weatherUpdate,?0?2,3 C?0?0 mm?Mi?0?9,3 C?Do?0?11,5 C
`weatherUpdate~tMainIcon~tMainText~tForecast1~tF1Icon~tForecast1Val~tForecast2~tF2Icon~tForecast2Val~tForecast3~tF3Icon~tForecast3Val~tForecast4~tF4Icon~tForecast4Val~optionalLayoutIcon~optionalLayoutText`
### cardEntities Page
The following message can be used to update the content on the cardEntities Page
entityUpdHeading,heading1337
`entityUpd~heading~navigation~[~*type*~*internalNameEntity*~*iconId*~*iconColor*~*displayNameEntity*~*optionalValue*]x4`
entityUpd,*id*,*type*,*internalNameEntity*,*iconId*,*displayNameEntity*,*optionalValue*
`~light~light.entityName~1~17299~Light1~0`
entityUpd,1,light,light.entityName,1,Light1,0
`~shutter~cover.entityName~0~17299~Shutter2~`
entityUpd,2,shutter,cover.entityName,0,Shutter2
`~delete~~~~~`
entityUpd,3,delete
`~text~sensor.entityName~3~17299~Temperature~content`
entityUpd,4,text,sensor.entityName,3,Temperature,content
`~button~button.entityName~3~17299~bt-name~bt-text`
entityUpd,4,button,button.entityName,3,bt-name,bt-text
entityUpd,1,switch,switch.entityName,4,Switch1,0
`~switch~switch.entityName~4~17299~Switch1~0`
### popupLight Page
entityUpdateDetail,*buttonState*,*sliderBrightnessPos*,*sliderColorTempPos*,*colorMode*
`entityUpdateDetail~*iconId*~*iconColor*~*buttonState*~*sliderBrightnessPos*~*sliderColorTempPos*~*colorMode*`
entityUpdateDetail,1,100,78,enable
`entityUpdateDetail~1~17299~1~100~78~enable`
entityUpdateDetail,1,100,disable
`entityUpdateDetail~1~17299~1~100~disable`
### popupShutter Page
entityUpdateDetail,*ignored*,*sliderPos*
`entityUpdateDetail~*ignored*~*sliderPos*`
entityUpdateDetail,1,77
`entityUpdateDetail~1~77`
### popupNotify Page
entityUpdateDetail,*tHeading*,*b1*,*b2*,*tText*
`entityUpdateDetail~*internalName*~*tHeading*~*tHeadingColor*~*b1*~*tB1Color*~*b2*~*tB2Color*~*tText*~*tTextColor*~*sleepTimeout*`
`exitPopup`
### cardThermo Page
entityUpd,*internalNameEntiy*,*heading*,*currentTemp*,*destTemp*,*status*,*minTemp*,*maxTemp*,*stepTemp*
`entityUpd~*heading*~*navigation*~*internalNameEntiy*~*currentTemp*~*destTemp*~*status*~*minTemp*~*maxTemp*~*stepTemp*[[~*iconId*~*activeColor*~*state*~*hvac_action*]]`
`[[]]` are not part of the command~ this part repeats 9 times for the buttons
### cardMedia Page
entityUpd,|*internalNameEntiy*|*heading*|*icon*|*title*|*author*|*volume*|*playpauseicon*
`entityUpd~*heading*~*navigation*~*internalNameEntiy*~*icon*~*title*~*author*~*volume*~*playpauseicon*~currentSpeaker~speakerList-seperated-by-?`
### cardAlarm Page
`entityUpd~*internalNameEntity*~*navigation*~*arm1*~*arm1ActionName*~*arm2*~*arm2ActionName*~*arm3*~*arm3ActionName*~*arm4*~*arm4ActionName*~*icon*~*iconcolor*~*numpadStatus*~*flashing*`
## Messages from Nextion Display
`event,buttonPress2,pageName,bNext`
`event,buttonPress2,pageName,bPrev`
`event,buttonPress2,pageName,bExit,number_of_taps`
`event,buttonPress2,pageName,sleepReached`
### startup page
event,startup,version
`event,startup,version,model`
### screensaver page
event,screensaverOpen
`event,buttonPress2,screensaver,exit` - Touch Event on Screensaver
`event,screensaverOpen` - Screensaver has opened
### cardEntities Page
event,*eventName*,*PageNumber*,*PageHeading*,*entityName*,*buttonId*,*actionName*,*optionalValue*
`event,*eventName*,*entityName*,*actionName*,*optionalValue*`
event,pageOpen,0
`event,buttonPress2,internalNameEntity,up`
event,buttonPress,1,tHeading,internalNameEntity,1,up
`event,buttonPress2,internalNameEntity,down`
event,buttonPress,1,tHeading,internalNameEntity,1,down
`event,buttonPress2,internalNameEntity,stop`
event,buttonPress,1,tHeading,internalNameEntity,1,stop
`event,buttonPress2,internalNameEntity,OnOff,1`
event,buttonPress,1,tHeading,internalNameEntity,1,OnOff,1
event,buttonPress,1,tHeading,internalNameEntity,1,button
`event,buttonPress2,internalNameEntity,button`
### popupLight Page
event,pageOpenDetail,popupLight,internalNameEntity
`event,pageOpenDetail,popupLight,internalNameEntity`
event,buttonPress,D,nameEntity,internalNameEntity,1,OnOff,1
`event,buttonPress2,internalNameEntity,OnOff,1`
event,buttonPress,D,nameEntity,internalNameEntity,1,brightnessSlider,50
`event,buttonPress2,internalNameEntity,brightnessSlider,50`
event,buttonPress,D,nameEntity,internalNameEntity,1,colorTempSlider,50
`event,buttonPress2,internalNameEntity,colorTempSlider,50`
event,buttonPress,D,nameEntity,internalNameEntity,1,colorWheel,x|y
`event,buttonPress2,internalNameEntity,colorWheel,x|y`
### popupShutter Page
event,pageOpenDetail,popupShutter,internalNameEntity
`event,pageOpenDetail,popupShutter,internalNameEntity`
event,buttonPress,D,nameEntity,internalNameEntity,1,positionSlider,50
`event,buttonPress2,internalNameEntity,positionSlider,50`
### popupNotify Page
event,buttonPress,D,D,D,1,notifyAction,yes
`event,buttonPress2,*internalName*,notifyAction,yes`
event,buttonPress,D,D,D,1,notifyAction,no
`event,buttonPress2,*internalName*,notifyAction,no`
### cardThermo Page
event,pageOpen,0
`event,buttonPress2,*entityName*,tempUpd,*temperature*`
event,tempUpd,*pageNumber*,*entityName*,*temperature*
`event,buttonPress2,*entityName*,hvac_action,*hvac_action*`
### cardMedia Page
event,buttonPress,1,tHeading,internalNameEntity,1,media-back
`event,buttonPress2,internalNameEntity,media-back`
event,buttonPress,1,tHeading,internalNameEntity,1,media-pause
`event,buttonPress2,internalNameEntity,media-pause`
event,buttonPress,1,tHeading,internalNameEntity,1,media-next
`event,buttonPress2,internalNameEntity,media-next`
event,buttonPress,1,tHeading,internalNameEntity,1,volumeSlider,75
`event,buttonPress2,internalNameEntity,volumeSlider,75`
### cardAlarm Page
`event,buttonPress2,internalNameEntity,actionName,code`
# Icons IDs
ID | Icon
-- | ----
0 | ![window-open](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/window-open.svg)
1 | ![lightbulb](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/lightbulb.svg)
2 | ![thermometer](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/thermometer.svg)
3 | ![gesture-tap-button](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/gesture-tap-button.svg)
4 | ![flash](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/flash.svg)
5 | ![music](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/music.svg)
6 | ![check-circle-outline](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/check-circle-outline.svg)
7 | ![close-circle-outline](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/close-circle-outline.svg)
8 | ![pause](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/pause.svg)
9 | ![play](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/play.svg)
10 | ![palette](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/palette.svg)
11 | ![alert-circle-outline](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/alert-circle-outline.svg)
12 | ![weather-cloudy](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/weather-cloudy.svg)
13 | ![weather-fog](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/weather-fog.svg)
14 | ![weather-hail](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/weather-hail.svg)
15 | ![weather-lightning](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/weather-lightning.svg)
16 | ![weather-lightning-rainy](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/weather-lightning-rainy.svg)
17 | ![weather-night](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/weather-night.svg)
18 | ![weather-partly-cloudy](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/weather-partly-cloudy.svg)
19 | ![weather-pouring](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/weather-pouring.svg)
20 | ![weather-rainy](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/weather-rainy.svg)
21 | ![weather-snowy](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/weather-snowy.svg)
22 | ![weather-snowy-rainy](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/weather-snowy-rainy.svg)
23 | ![weather-sunny](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/weather-sunny.svg)
24 | ![weather-windy](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/weather-windy.svg)
25 | ![weather-windy-variant](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/weather-windy-variant.svg)
26 | ![water-percent](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/water-percent.svg)
Please see Icon's int the [icons.md file](icons.md)
# Design Guidelines for Nextion HMI Project

View File

@@ -0,0 +1,24 @@
diff -bur HMI/n2t-out/Program.s.txt HMI/US/landscape/n2t-out/Program.s.txt
--- HMI/n2t-out/Program.s.txt 2022-04-03 07:35:47.898571291 +0000
+++ HMI/US/landscape/n2t-out/Program.s.txt 2022-04-03 07:35:48.646571620 +0000
@@ -11,6 +11,6 @@
// dim value
int dimValue=40
int dimValueNormal=100
- // fix touch offset
- lcd_dev fffb 0002 0000 0020
+ // fix touch offset (Removed for US version)
+ //lcd_dev fffb 0002 0000 0020
page pageStartup
diff -bur HMI/n2t-out/pageStartup.txt HMI/US/landscape/n2t-out/pageStartup.txt
--- HMI/n2t-out/pageStartup.txt 2022-04-03 07:35:47.902571293 +0000
+++ HMI/US/landscape/n2t-out/pageStartup.txt 2022-04-03 07:35:48.646571620 +0000
@@ -177,7 +177,7 @@
recmod=1
bauds=115200
// startup event
- tSend.txt="event,startup,"+tVersion.txt+",eu"
+ tSend.txt="event,startup,"+tVersion.txt+",us-l"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC

View File

@@ -0,0 +1,16 @@
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 //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 bufferPos=0
int recvCrc=0
int payloadLength=0
int par0=0,par1=0
// sleep timeout in s
int sleepTimeout=20
int sleepValue=0
// dim value
int dimValue=40
int dimValueNormal=100
// fix touch offset (Removed for US version)
//lcd_dev fffb 0002 0000 0020
page pageStartup

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,62 @@
Program.s
0 Component(s)
10 Line(s) of event code
10 Unique line(s) of event code
pageTest
13 Component(s)
13 Line(s) of event code
13 Unique line(s) of event code
pageSerialTest
13 Component(s)
48 Line(s) of event code
43 Unique line(s) of event code
pageIcons
7 Component(s)
0 Line(s) of event code
0 Unique line(s) of event code
popupNotify
17 Component(s)
178 Line(s) of event code
117 Unique line(s) of event code
pageStartup
19 Component(s)
150 Line(s) of event code
113 Unique line(s) of event code
popupShutter
19 Component(s)
178 Line(s) of event code
101 Unique line(s) of event code
cardGrid
39 Component(s)
430 Line(s) of event code
249 Unique line(s) of event code
popupLight
27 Component(s)
322 Line(s) of event code
173 Unique line(s) of event code
screensaver
33 Component(s)
207 Line(s) of event code
158 Unique line(s) of event code
cardMedia
30 Component(s)
333 Line(s) of event code
170 Unique line(s) of event code
cardAlarm
35 Component(s)
345 Line(s) of event code
214 Unique line(s) of event code
cardThermo
41 Component(s)
460 Line(s) of event code
284 Unique line(s) of event code
cardEntities
62 Component(s)
972 Line(s) of event code
413 Unique line(s) of event code
Total
13 Page(s)
355 Component(s)
3646 Line(s) of event code
1039 Unique line(s) of event code

View File

@@ -0,0 +1,141 @@
Page pageIcons
Attributes
ID : 0
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
Width : 480
Effect : load
Effect Priority : 0
Effect Time : 300
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Fill : solid color
Back. Color : 65535
Variable (string) vaTime
Attributes
ID : 5
Scope : global
Text :
Max. Text Size: 15
Variable (string) vaDate
Attributes
ID : 6
Scope : global
Text :
Max. Text Size: 35
Text tIcons
Attributes
ID : 2
Scope : global
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 1
y coordinate : 8
Width : 298
Height : 299
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 1
Back. Color : 65535
Font Color : 0
Horizontal Alignment : left
Vertical Alignment : top
Input Type : character
Text : 
Max. Text Size : 170
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tTmp1
Attributes
ID : 3
Scope : global
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 302
y coordinate : 8
Width : 146
Height : 69
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 1
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 50
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tTmp2
Attributes
ID : 4
Scope : global
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 302
y coordinate : 82
Width : 146
Height : 69
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 1
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 50
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Picture p0
Attributes
ID : 1
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 0
Width : 479
Height : 319
Effect : load
Effect Priority : 0
Effect Time : 300
Picture ID : 0

View File

@@ -0,0 +1,434 @@
Page pageSerialTest
Attributes
ID : 0
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
Width : 480
Effect : load
Effect Priority : 0
Effect Time : 300
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Fill : solid color
Back. Color : 65535
Events
Preinitialize Event
//vis p0,0
//recmod=1
//bauds=115200
Number nCrcRecv
Attributes
ID : 5
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 160
y coordinate : 0
Width : 88
Height : 29
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 4
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Value : 0
Significant digits shown : all
Format : decimal with digit grouping
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Number nCrcCalc
Attributes
ID : 6
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 159
y coordinate : 31
Width : 90
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 4
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Value : 0
Significant digits shown : all
Format : decimal with digit grouping
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Number nIt
Attributes
ID : 11
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 378
y coordinate : 234
Width : 52
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 4
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Value : 0
Significant digits shown : all
Format : decimal
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Number nLength
Attributes
ID : 12
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 15
y coordinate : 215
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Value : 0
Significant digits shown : all
Format : decimal
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tStatus
Attributes
ID : 3
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 160
y coordinate : 60
Width : 271
Height : 90
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 4
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : newtxt
Max. Text Size : 100
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tCmd
Attributes
ID : 4
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 160
y coordinate : 151
Width : 272
Height : 80
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 4
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : newtxt
Max. Text Size : 500
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tBuffer
Attributes
ID : 7
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 7
y coordinate : 270
Width : 435
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 4
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : newtxt
Max. Text Size : 100
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tDesc
Attributes
ID : 8
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 0
Width : 159
Height : 204
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 4
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : CRC Recv:\r\nCRC Calc:\r\n\r\nStatus\r\n\r\nCommand
Max. Text Size : 60
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Picture p0
Attributes
ID : 1
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 0
Width : 479
Height : 319
Effect : load
Effect Priority : 0
Effect Time : 300
Picture ID : 0
Button b0
Attributes
ID : 9
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 334
y coordinate : 9
Width : 46
Height : 46
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 4
Back. Color : 50712
Back. Picture ID (Pressed) : 0
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : bck
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
recmod=0
page pageTest
Button b1
Attributes
ID : 10
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 392
y coordinate : 10
Width : 48
Height : 48
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 4
Back. Color : 50712
Back. Picture ID (Pressed) : 0
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : ON
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
recmod=1
bauds=115200
Timer tmSerial
Attributes
ID : 2
Scope : local
Period (ms): 400
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
tStatus.txt="init command detected"
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
//payloadLength=u[2]
ucopy payloadLength,2,2,0
nLength.val=payloadLength
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
tStatus.txt="reached"
// calculate crc
crcrest 1,0xFFFF
// payload length -1 to exclude crc
crcputu 0,payloadLength-1 //u[2]+3
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
nCrcRecv.val=recvCrc
// compare crc with recived value
if(crcval==recvCrc)
{
tStatus.txt="crc ok"
nIt.val=nIt.val+1
ucopy tCmd.txt,4,payloadLength-5,0
udelete payloadLength-1
bufferPos=0
// here is the location where acual code should be
}
// copy calculated crc and recived crc to nCrcRecv and nCrcCalc, for debugging
nCrcRecv.val=recvCrc
nCrcCalc.val=crcval
//ucopy nCrcCalc.val,u[2]+3,3,0
}
}
}
// next character
bufferPos++
}
if(bufferPos==usize)
{
// copy whole buffer to tCmd.txt, for debugging
//ucopy tBuffer.txt,0,usize,0
// ucopy nIt.val,0,usize,0
// clear whole buffer
//code_c
//bufferPos=0
}
}

View File

@@ -0,0 +1,668 @@
Page pageStartup
Attributes
ID : 0
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
Width : 480
Effect : load
Effect Priority : 0
Effect Time : 300
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Fill : solid color
Back. Color : 6371
Events
Preinitialize Event
vis p0,0
recmod=1
bauds=115200
vis tSend,0
vis tInstruction,0
vis tTmp,0
vis tId,0
vis bSendStartup,0
vis frame_ptr,0
vis spinner_w,0
vis frapic_w,0
vis usual_cnt,0
vis tMsg2,0
vis tMsg3,0
vis tVersion,0
dim=100
Postinitialize Event
//send messages by clicking button
click bSendStartup,1
Variable (string) strCommand
Attributes
ID : 5
Scope : local
Text :
Max. Text Size: 50
Number frame_ptr
Attributes
ID : 10
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 11
y coordinate : 34
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Value : 0
Significant digits shown : all
Format : decimal
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Number spinner_w
Attributes
ID : 11
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 11
y coordinate : 67
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Value : 140
Significant digits shown : all
Format : decimal
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Number frapic_w
Attributes
ID : 12
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 11
y coordinate : 100
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Value : 1960
Significant digits shown : all
Format : decimal
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Number usual_cnt
Attributes
ID : 15
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 12
y coordinate : 134
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Value : 0
Significant digits shown : all
Format : decimal
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tSend
Attributes
ID : 2
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 0
Width : 230
Height : 23
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : newtxt
Max. Text Size : 100
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tTmp
Attributes
ID : 3
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 408
y coordinate : 0
Width : 34
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tInstruction
Attributes
ID : 6
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 163
y coordinate : 0
Width : 119
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 20
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tId
Attributes
ID : 7
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 282
y coordinate : 0
Width : 125
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 20
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tMsg1
Attributes
ID : 8
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 59
y coordinate : 223
Width : 375
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 1
Back. Color : 6371
Font Color : 65535
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : Waiting for content ...
Max. Text Size : 40
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tMsg2
Attributes
ID : 13
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 42
y coordinate : 256
Width : 408
Height : 25
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 6371
Font Color : 65535
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : This is taking longer than usual,
Max. Text Size : 100
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tMsg3
Attributes
ID : 14
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 42
y coordinate : 278
Width : 408
Height : 25
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 6371
Font Color : 65535
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : please check your backend configuration
Max. Text Size : 100
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tVersion
Attributes
ID : 18
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 402
y coordinate : 101
Width : 78
Height : 72
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : 28
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Picture p0
Attributes
ID : 1
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 0
Width : 479
Height : 319
Effect : load
Effect Priority : 0
Effect Time : 300
Picture ID : 0
Button bSendStartup
Attributes
ID : 17
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 380
y coordinate : 39
Width : 63
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 0
Back. Color : 50712
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : startup
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
recmod=1
bauds=115200
// startup event
tSend.txt="event,startup,"+tVersion.txt+",us-l"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Hotspot mSpinner
Attributes
ID : 16
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 171
y coordinate : 49
Width : 140
Height : 140
Effect : load
Effect Priority : 0
Effect Time : 300
Events
Touch Press Event
sys2=sys2+1
sys2%=10
//n0.val=sys2
if(sys2==9)
{
page pageTest
}
Timer tmSerial
Attributes
ID : 4
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
ucopy payloadLength,2,2,0
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
// calculate crc
crcrest 1,0xFFFF
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
//crcputu 3,u[2]
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
crcputu 0,payloadLength-1
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
// compare crc with recived value
if(crcval==recvCrc)
{
// crc is okay
// here is the location where acual code should be
// write command to variable strCommand
ucopy strCommand.txt,4,payloadLength-5,0
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
spstr strCommand.txt,tInstruction.txt,"~",0
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="pageType")
{
dim=100
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="cardThermo")
{
page cardThermo
}
if(tId.txt=="screensaver")
{
page screensaver
}
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
}
Timer tmSpinner
Attributes
ID : 9
Scope : local
Period (ms): 80
Enabled : yes
Events
Timer Event
xpic mSpinner.x,mSpinner.y,spinner_w.val,140,frame_ptr.val,0,11 // draw the current frame
frame_ptr.val+=spinner_w.val%frapic_w.val // advance the pointer to the next frame in the pic resource and roll over at the end
doevents // finish drawing before next timer event triggers
if(frame_ptr.val==1820)
{
usual_cnt.val+=1
sys0=usual_cnt.val%5
if(sys0==0)
{
// retry sending startup messages by clicking button
click bSendStartup,1
}
}
if(usual_cnt.val==10)
{
vis tMsg2,1
vis tMsg3,1
}

View File

@@ -0,0 +1,438 @@
Page pageTest
Attributes
ID : 0
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
Width : 480
Effect : load
Effect Priority : 0
Effect Time : 300
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Fill : solid color
Back. Color : 4226
Events
Preinitialize Event
vis p0,0
Picture p0
Attributes
ID : 1
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 0
Width : 479
Height : 319
Effect : load
Effect Priority : 0
Effect Time : 300
Picture ID : 0
Button b0
Attributes
ID : 2
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 5
y coordinate : 12
Width : 100
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 4
Back. Color : 50712
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : entities
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
page cardEntities
Button b1
Attributes
ID : 3
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 347
y coordinate : 262
Width : 100
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 4
Back. Color : 50712
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : serial
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
page pageSerialTest
Button b3
Attributes
ID : 4
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 345
y coordinate : 195
Width : 102
Height : 63
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 4
Back. Color : 50712
Back. Picture ID (Pressed) : 0
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : disable recmod
Max. Text Size : 20
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
recmod=0
Button b6
Attributes
ID : 5
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 5
y coordinate : 64
Width : 100
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 4
Back. Color : 50712
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : shutter
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
page popupShutter
Button b4
Attributes
ID : 6
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 7
y coordinate : 120
Width : 100
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 4
Back. Color : 50712
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : light
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
page popupLight
Button b5
Attributes
ID : 7
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 111
y coordinate : 12
Width : 100
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 4
Back. Color : 50712
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : thermo
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
page cardThermo
Button b7
Attributes
ID : 8
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 113
y coordinate : 72
Width : 100
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 4
Back. Color : 50712
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : media
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
page cardMedia
Button b8
Attributes
ID : 9
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 341
y coordinate : 9
Width : 106
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 4
Back. Color : 50712
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : screens
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
dimValue=50
page screensaver
Button b9
Attributes
ID : 10
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 6
y coordinate : 175
Width : 100
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 4
Back. Color : 50712
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : notify
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
page popupNotify
Button b10
Attributes
ID : 11
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 115
y coordinate : 128
Width : 100
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 4
Back. Color : 50712
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : alarm
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
page cardAlarm
Button b11
Attributes
ID : 12
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 117
y coordinate : 184
Width : 100
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 4
Back. Color : 50712
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : grid
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
page cardGrid

View File

@@ -0,0 +1,978 @@
Page popupLight
Attributes
ID : 0
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
Width : 480
Effect : load
Effect Priority : 0
Effect Time : 300
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Fill : solid color
Back. Color : 6371
Events
Preinitialize Event
//get entitiy name
tEntity.txt=pageIcons.tTmp1.txt
//get entity id
entn.txt=pageIcons.tTmp2.txt
vis p0,0
vis tSend,0
vis tTmp,0
vis tInstruction,0
vis tId,0
//page open event
// event,pageOpenDetail,typeOfPage,tEntityName
// craft command
tSend.txt="event,pageOpenDetail,popupLight,"+entn.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
//disable brightness by default
vis t1,0
vis t2,0
vis hBrightness,0
//disable color temp by default
vis t4,0
vis t3,0
vis hTempSlider,0
//disable color wheel components by default
vis bColor,0
vis t0,0
vis pColorWheel,0
//vis t0,0
Variable (string) strCommand
Attributes
ID : 17
Scope : local
Text :
Max. Text Size: 100
Variable (string) entn
Attributes
ID : 21
Scope : local
Text : newtxt
Max. Text Size: 50
Variable (int32) mode
Attributes
ID : 23
Scope: local
Value: 1
Variable (int32) mode_temp
Attributes
ID : 24
Scope: local
Value: 0
Text tEntity
Attributes
ID : 3
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 107
y coordinate : 21
Width : 263
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 6371
Font Color : 65535
Horizontal Alignment : left
Vertical Alignment : center
Input Type : character
Text : tEntity1
Max. Text Size : 25
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tIcon1
Attributes
ID : 4
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 26
y coordinate : 21
Width : 45
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 1
Back. Color : 6371
Font Color : 17299
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : 
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text t1
Attributes
ID : 6
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 25
y coordinate : 226
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 6371
Font Color : 65535
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : Brightness
Max. Text Size : 15
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text t2
Attributes
ID : 9
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 25
y coordinate : 267
Width : 45
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 1
Back. Color : 6371
Font Color : 40147
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : 
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text t3
Attributes
ID : 10
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 25
y coordinate : 181
Width : 45
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 1
Back. Color : 6371
Font Color : 40147
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : 
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text t4
Attributes
ID : 11
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 24
y coordinate : 143
Width : 116
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 6371
Font Color : 65535
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : Temperature
Max. Text Size : 15
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tSend
Attributes
ID : 12
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 15
y coordinate : 0
Width : 348
Height : 7
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : newtxt
Max. Text Size : 100
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tTmp
Attributes
ID : 13
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 421
y coordinate : 277
Width : 34
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tInstruction
Attributes
ID : 18
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 15
y coordinate : 290
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 20
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tId
Attributes
ID : 19
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 115
y coordinate : 290
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 20
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text t0
Attributes
ID : 25
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 24
y coordinate : 80
Width : 64
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 6371
Font Color : 65535
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : Color
Max. Text Size : 15
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Picture p0
Attributes
ID : 1
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 0
Width : 480
Height : 320
Effect : load
Effect Priority : 0
Effect Time : 300
Picture ID : 0
Picture pColorWheel
Attributes
ID : 2
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 182
y coordinate : 69
Width : 160
Height : 160
Effect : load
Effect Priority : 0
Effect Time : 300
Picture ID : 3
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",colorWheel,"
sys0=tch0
sys0=sys0-pColorWheel.x
covx sys0,tTmp.txt,0,0
tSend.txt+=tTmp.txt
tSend.txt+="|"
sys0=tch1
sys0=sys0-pColorWheel.y
covx sys0,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Slider hBrightness
Attributes
ID : 7
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 76
y coordinate : 261
Width : 335
Height : 43
Effect : load
Effect Priority : 0
Effect Time : 300
Direction : horizontal
Fill : image
Cursor width : auto
Cursor height : 255
Back. Picture ID : 5
Slided Back. Picture ID : 4
Position : 50
Upper range limit : 100
Lower range limit : 0
Events
Touch Release Event
tmCooldown.en=1
tmCooldown.tim=2500
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",brightnessSlider,"
covx hBrightness.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Slider hTempSlider
Attributes
ID : 20
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 76
y coordinate : 178
Width : 335
Height : 44
Effect : load
Effect Priority : 0
Effect Time : 300
Direction : horizontal
Fill : image
Cursor width : auto
Cursor height : 255
Back. Picture ID : 8
Slided Back. Picture ID : 10
Position : 50
Upper range limit : 100
Lower range limit : 0
Events
Touch Release Event
tmCooldown.en=1
tmCooldown.tim=2500
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",colorTempSlider,"
covx hTempSlider.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button b0
Attributes
ID : 5
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 412
y coordinate : 8
Width : 50
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Font ID : 1
Back. Color : 6371
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 14823
Font Color (Unpressed) : 65535
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : 
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
tSend.txt="event,buttonPress2,popupLight,bExit"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bColor
Attributes
ID : 22
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 104
y coordinate : 68
Width : 50
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Font ID : 1
Back. Color : 6371
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 14823
Font Color (Unpressed) : 65535
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : 
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
if(mode.val==1)
{
mode.val=0
//enable color wheel
vis pColorWheel,1
//disable color temp
vis t4,0
vis t3,0
vis hTempSlider,0
}else
{
mode.val=1
//disable color wheel
vis pColorWheel,0
if(mode_temp.val==1)
{
//enable color temp
vis t4,1
vis t3,1
vis hTempSlider,1
}
}
Dual-state Button btOnOff1
Attributes
ID : 8
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 385
y coordinate : 79
Width : 50
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : image
Font ID : 0
Background Picture ID (Unpressed) : 1
Back. Picture ID (Pressed) : 2
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text :
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+","+"OnOff,"
covx btOnOff1.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Timer tmSleep
Attributes
ID : 15
Scope : local
Period (ms): 1000
Enabled : yes
Events
Timer Event
if(sleepTimeout!=0)
{
sleepValue+=1
if(sleepTimeout<=sleepValue)
{
sleepValue=0
click b0,1
click b0,0
}
}
Timer tmSerial
Attributes
ID : 16
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
ucopy payloadLength,2,2,0
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
// calculate crc
crcrest 1,0xFFFF
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
//crcputu 3,u[2]
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
crcputu 0,payloadLength-1
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
// compare crc with recived value
if(crcval==recvCrc)
{
// crc is okay
// here is the location where acual code should be
// write command to variable strCommand
ucopy strCommand.txt,4,payloadLength-5,0
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
spstr strCommand.txt,tInstruction.txt,"~",0
if(tInstruction.txt=="entityUpdateDetail")
{
// change icon
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tIcon1.txt,sys0,1
vis tIcon1,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",2
covx tTmp.txt,sys0,0,0
tIcon1.pco=sys0
// get Button State
spstr strCommand.txt,tTmp.txt,"~",3
covx tTmp.txt,sys0,0,0
btOnOff1.val=sys0
// get Brightness value
spstr strCommand.txt,tTmp.txt,"~",4
if(tTmp.txt=="disable")
{
vis t1,0
vis t2,0
vis hBrightness,0
}else
{
vis t1,1
vis t2,1
vis hBrightness,1
covx tTmp.txt,sys0,0,0
if(tmCooldown.en==0)
{
hBrightness.val=sys0
}
}
// get ColorTemp value
spstr strCommand.txt,tTmp.txt,"~",5
if(tTmp.txt=="disable")
{
vis hTempSlider,0
vis t3,0
vis t4,0
mode_temp.val=0
// mode == 1 is temp controls currently shown
if(mode.val==1)
{
// switch mode
click bColor,1
click bColor,0
}
}else if(tTmp.txt=="unknown") // temp supported, but not in color mode
{
mode_temp.val=1
// mode == 1 is temp controls currently shown
if(mode.val==1)
{
// switch mode
click bColor,1
click bColor,0
}
}else
{
mode_temp.val=1
vis hTempSlider,1
vis t3,1
vis t4,1
if(tmCooldown.en==0)
{
covx tTmp.txt,sys0,0,0
hTempSlider.val=sys0
}
// mode == 0 is rgb controls currently shown
if(mode.val==0)
{
// switch mode
click bColor,1
click bColor,0
}
}
// get Color value
spstr strCommand.txt,tTmp.txt,"~",6
// disable -> isn't supported
if(tTmp.txt=="disable")
{
vis t0,0
vis bColor,0
vis pColorWheel,0
}else
{
vis t0,1
//only enable bColor button if color temp is also supported
if(mode_temp.val==1)
{
vis bColor,1
}
if(mode.val==0)
{
vis pColorWheel,1
}
}
}
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="pageType")
{
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
}
Timer tmCooldown
Attributes
ID : 26
Scope : local
Period (ms): 100
Enabled : no
Events
Timer Event
tmCooldown.en=0
TouchCap tc0
Attributes
ID : 14
Scope: local
Value: 0
Events
Touch Press Event
sleepValue=0

View File

@@ -0,0 +1,606 @@
Page popupNotify
Attributes
ID : 0
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
Width : 480
Effect : load
Effect Priority : 0
Effect Time : 300
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Fill : solid color
Back. Color : 6371
Events
Preinitialize Event
vis p0,0
vis tSend,0
vis tTmp,0
vis tInstruction,0
vis tId,0
Variable (string) strCommand
Attributes
ID : 8
Scope : local
Text :
Max. Text Size: 1000
Variable (string) entn
Attributes
ID : 15
Scope : local
Text :
Max. Text Size: 30
Variable (int32) vaOldSleepT
Attributes
ID : 16
Scope: local
Value: 0
Text tSend
Attributes
ID : 3
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 15
y coordinate : 0
Width : 348
Height : 22
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : newtxt
Max. Text Size : 100
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tTmp
Attributes
ID : 4
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 421
y coordinate : 277
Width : 34
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tInstruction
Attributes
ID : 9
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 15
y coordinate : 290
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 20
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tId
Attributes
ID : 10
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 115
y coordinate : 290
Width : 100
Height : 29
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 20
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tHeading
Attributes
ID : 11
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 38
y coordinate : 26
Width : 345
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 1
Back. Color : 6371
Font Color : 65535
Horizontal Alignment : left
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 40
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tText
Attributes
ID : 12
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 38
y coordinate : 74
Width : 397
Height : 171
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 6371
Font Color : 65535
Horizontal Alignment : left
Vertical Alignment : top
Input Type : character
Text :
Max. Text Size : 500
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Picture p0
Attributes
ID : 1
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 0
Width : 480
Height : 320
Effect : load
Effect Priority : 0
Effect Time : 300
Picture ID : 0
Button b0
Attributes
ID : 2
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 412
y coordinate : 8
Width : 50
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Font ID : 1
Back. Color : 6371
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 14823
Font Color (Unpressed) : 65535
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : 
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
sleepTimeout=vaOldSleepT.val
tSend.txt="event,buttonPress2,popupNotify,bExit"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button b2
Attributes
ID : 13
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 254
y coordinate : 261
Width : 182
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Font ID : 1
Back. Color : 6371
Back. Picture ID (Pressed) : 9
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 65535
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text :
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
sleepTimeout=vaOldSleepT.val
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",notifyAction,yes"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button b1
Attributes
ID : 14
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 39
y coordinate : 261
Width : 182
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Font ID : 1
Back. Color : 6371
Back. Picture ID (Pressed) : 9
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 65535
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text :
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
sleepTimeout=vaOldSleepT.val
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",notifyAction,no"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Timer tmSleep
Attributes
ID : 6
Scope : local
Period (ms): 1000
Enabled : yes
Events
Timer Event
if(sleepTimeout!=0)
{
sleepValue+=1
if(sleepTimeout<=sleepValue)
{
sleepValue=0
click b0,1
click b0,0
}
}
Timer tmSerial
Attributes
ID : 7
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
ucopy payloadLength,2,2,0
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
// calculate crc
crcrest 1,0xFFFF
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
//crcputu 3,u[2]
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
crcputu 0,payloadLength-1
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
// compare crc with recived value
if(crcval==recvCrc)
{
// crc is okay
// here is the location where acual code should be
// write command to variable strCommand
ucopy strCommand.txt,4,payloadLength-5,0
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
spstr strCommand.txt,tInstruction.txt,"~",0
if(tInstruction.txt=="entityUpdateDetail")
{
// get entn
spstr strCommand.txt,entn.txt,"~",1
// get Heading
spstr strCommand.txt,tHeading.txt,"~",2
// heading color
spstr strCommand.txt,tTmp.txt,"~",3
covx tTmp.txt,sys0,0,0
tHeading.pco=sys0
// get b1
spstr strCommand.txt,b1.txt,"~",4
if(b1.txt!="")
{
vis b1,1
}
// b1 color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
b1.pco=sys0
// get b2
spstr strCommand.txt,b2.txt,"~",6
if(b2.txt!="")
{
vis b2,1
}
// b2 color
spstr strCommand.txt,tTmp.txt,"~",7
covx tTmp.txt,sys0,0,0
b2.pco=sys0
// get tText
spstr strCommand.txt,tText.txt,"~",8
// tText color
spstr strCommand.txt,tTmp.txt,"~",9
covx tTmp.txt,sys0,0,0
tText.pco=sys0
//preserve old sleepTimeout
vaOldSleepT.val=sleepTimeout
// sleep timeout
spstr strCommand.txt,tTmp.txt,"~",10
covx tTmp.txt,sys0,0,0
sleepTimeout=sys0
}
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="exitPopup")
{
click b0,1
}
if(tInstruction.txt=="pageType")
{
sleepTimeout=vaOldSleepT.val
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="cardThermo")
{
page cardThermo
}
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
if(bufferPos==usize)
{
// copy whole buffer to t1.txt, for debugging
//ucopy t2.txt,0,usize,0
// ucopy n2.val,0,usize,0
// clear whole buffer
//code_c
//bufferPos=0
}
}
TouchCap tc0
Attributes
ID : 5
Scope: local
Value: 0
Events
Touch Press Event
sleepValue=0

View File

@@ -0,0 +1,694 @@
Page popupShutter
Attributes
ID : 0
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
Width : 480
Effect : load
Effect Priority : 0
Effect Time : 300
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Fill : solid color
Back. Color : 6371
Events
Preinitialize Event
//get entitiy name
tEntity.txt=pageIcons.tTmp1.txt
//get entity id
entn.txt=pageIcons.tTmp2.txt
vis p0,0
vis tSend,0
vis tTmp,0
vis tInstruction,0
vis tId,0
//page open event
// event,pageOpenDetail,typeOfPage,tEntityName
// craft command
tSend.txt="event,pageOpenDetail,popupShutter,"+entn.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Variable (string) strCommand
Attributes
ID : 10
Scope : local
Text :
Max. Text Size: 50
Variable (string) entn
Attributes
ID : 18
Scope : local
Text : newtxt
Max. Text Size: 50
Text tEntity
Attributes
ID : 2
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 80
y coordinate : 108
Width : 195
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 6371
Font Color : 65535
Horizontal Alignment : left
Vertical Alignment : center
Input Type : character
Text : tEntity1
Max. Text Size : 25
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tIcon1
Attributes
ID : 3
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 27
y coordinate : 109
Width : 45
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 1
Back. Color : 6371
Font Color : 17299
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : 
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tSend
Attributes
ID : 5
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 15
y coordinate : 0
Width : 348
Height : 22
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : newtxt
Max. Text Size : 100
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tTmp
Attributes
ID : 6
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 421
y coordinate : 277
Width : 34
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tInstruction
Attributes
ID : 11
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 15
y coordinate : 290
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 20
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tId
Attributes
ID : 12
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 115
y coordinate : 290
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 20
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text t1
Attributes
ID : 17
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 79
y coordinate : 164
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 6371
Font Color : 65535
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : Position
Max. Text Size : 15
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Picture p0
Attributes
ID : 1
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 0
Width : 480
Height : 320
Effect : load
Effect Priority : 0
Effect Time : 300
Picture ID : 0
Slider hPosition
Attributes
ID : 16
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 80
y coordinate : 194
Width : 335
Height : 43
Effect : load
Effect Priority : 0
Effect Time : 300
Direction : horizontal
Fill : image
Cursor width : auto
Cursor height : 255
Back. Picture ID : 5
Slided Back. Picture ID : 4
Position : 50
Upper range limit : 100
Lower range limit : 0
Events
Touch Release Event
// event,buttonPress2,internalNameEntity,positionSlider,50
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",positionSlider,"
covx hPosition.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button b0
Attributes
ID : 4
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 412
y coordinate : 8
Width : 50
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Font ID : 1
Back. Color : 6371
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 14823
Font Color (Unpressed) : 65535
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : 
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
tSend.txt="event,buttonPress2,popupShutter,bExit"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bDown1
Attributes
ID : 13
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 408
y coordinate : 96
Width : 50
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Font ID : 1
Back. Color : 6371
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 14823
Font Color (Unpressed) : 65535
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : 
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
tSend.txt="event,buttonPress2,"+entn.txt+",down"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bStop1
Attributes
ID : 14
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 356
y coordinate : 96
Width : 50
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Font ID : 1
Back. Color : 6371
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 14823
Font Color (Unpressed) : 65535
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : 
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
tSend.txt="event,buttonPress2,"+entn.txt+",stop"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bUp1
Attributes
ID : 15
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 304
y coordinate : 96
Width : 50
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Font ID : 1
Back. Color : 6371
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 14823
Font Color (Unpressed) : 65535
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : 
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
tSend.txt="event,buttonPress2,"+entn.txt+",up"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Timer tmSleep
Attributes
ID : 8
Scope : local
Period (ms): 1000
Enabled : yes
Events
Timer Event
if(sleepTimeout!=0)
{
sleepValue+=1
if(sleepTimeout<=sleepValue)
{
sleepValue=0
click b0,1
click b0,0
}
}
Timer tmSerial
Attributes
ID : 9
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
ucopy payloadLength,2,2,0
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
// calculate crc
crcrest 1,0xFFFF
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
//crcputu 3,u[2]
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
crcputu 0,payloadLength-1
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
// compare crc with recived value
if(crcval==recvCrc)
{
// crc is okay
// here is the location where acual code should be
// write command to variable strCommand
ucopy strCommand.txt,4,payloadLength-5,0
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
spstr strCommand.txt,tInstruction.txt,"~",0
if(tInstruction.txt=="entityUpdateDetail")
{
// get Position value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sys0,0,0
hPosition.val=sys0
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
}
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="pageType")
{
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
if(bufferPos==usize)
{
// copy whole buffer to t1.txt, for debugging
//ucopy t2.txt,0,usize,0
// ucopy n2.val,0,usize,0
// clear whole buffer
//code_c
//bufferPos=0
}
}
TouchCap tc0
Attributes
ID : 7
Scope: local
Value: 0
Events
Touch Press Event
sleepValue=0

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,16 @@
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 //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 bufferPos=0
int recvCrc=0
int payloadLength=0
int par0=0,par1=0
// sleep timeout in s
int sleepTimeout=20
int sleepValue=0
// dim value
int dimValue=40
int dimValueNormal=100
// fix touch offset (Removed for US version)
//lcd_dev fffb 0002 0000 0020
page pageStartup

View File

@@ -0,0 +1,776 @@
Page cardAlarm
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Events
Preinitialize Event
vis p0,0
vis tSend,0
vis tInstruction,0
vis tTmp,0
vis tId,0
vis arm1,0
vis arm2,0
vis arm3,0
vis arm4,0
vis b0,0
vis b1,0
vis b2,0
vis b3,0
vis b4,0
vis b5,0
vis b6,0
vis b7,0
vis b8,0
vis b9,0
vis b10,0
vis tCode,0
Variable (string) strCommand
Attributes
Scope : local
Text :
Max. Text Size: 200
Variable (string) entn
Attributes
Scope : local
Text :
Max. Text Size: 50
Variable (string) tSend
Attributes
Scope : local
Text :
Max. Text Size: 100
Variable (string) va1
Attributes
Scope : local
Text :
Max. Text Size: 20
Variable (string) va2
Attributes
Scope : local
Text :
Max. Text Size: 20
Variable (string) va3
Attributes
Scope : local
Text :
Max. Text Size: 20
Variable (string) va4
Attributes
Scope : local
Text :
Max. Text Size: 20
Text tTmp
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tInstruction
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 20
Text tId
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 20
Text tCode
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tIcon
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Picture p0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Button bNext
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,bNext"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bPrev
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button b0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 1
Max. Text Size : 10
Events
Touch Press Event
tCode.txt=tCode.txt+"1"
Button b1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 2
Max. Text Size : 10
Events
Touch Press Event
tCode.txt=tCode.txt+"2"
Button b2
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 3
Max. Text Size : 10
Events
Touch Press Event
tCode.txt=tCode.txt+"3"
Button b3
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 4
Max. Text Size : 10
Events
Touch Press Event
tCode.txt=tCode.txt+"4"
Button b4
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 5
Max. Text Size : 10
Events
Touch Press Event
tCode.txt=tCode.txt+"5"
Button b5
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 6
Max. Text Size : 10
Events
Touch Press Event
tCode.txt=tCode.txt+"6"
Button b6
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 7
Max. Text Size : 10
Events
Touch Press Event
tCode.txt=tCode.txt+"7"
Button b7
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 8
Max. Text Size : 10
Events
Touch Press Event
tCode.txt=tCode.txt+"8"
Button b8
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 9
Max. Text Size : 10
Events
Touch Press Event
tCode.txt=tCode.txt+"9"
Button b9
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 0
Max. Text Size : 10
Events
Touch Press Event
tCode.txt=tCode.txt+"0"
Button b10
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : CLR
Max. Text Size : 10
Events
Touch Press Event
tCode.txt=""
Button arm1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
// event,buttonPress2,entn,arm1,tCode
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+=va1.txt+","
tSend.txt+=tCode.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
tCode.txt=""
Button arm3
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
// event,buttonPress2,entn,arm1,tCode
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+=va3.txt+","
tSend.txt+=tCode.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
tCode.txt=""
Button arm2
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
// event,buttonPress2,entn,arm1,tCode
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+=va2.txt+","
tSend.txt+=tCode.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
tCode.txt=""
Button arm4
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
// event,buttonPress2,entn,arm1,tCode
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+=va4.txt+","
tSend.txt+=tCode.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
tCode.txt=""
Timer tmSerial
Attributes
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
ucopy payloadLength,2,2,0
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
// calculate crc
crcrest 1,0xFFFF
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
//crcputu 3,u[2]
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
crcputu 0,payloadLength-1
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
// compare crc with recived value
if(crcval==recvCrc)
{
// crc is okay
// here is the location where acual code should be
// write command to variable strCommand
ucopy strCommand.txt,4,payloadLength-5,0
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
spstr strCommand.txt,tInstruction.txt,"~",0
if(tInstruction.txt=="entityUpd")
{
//entn
spstr strCommand.txt,entn.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
{
vis bPrev,0
}
if(tTmp.txt=="1")
{
vis bPrev,1
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
{
vis bNext,0
}
if(tTmp.txt=="1")
{
vis bPrev,1
bNext.txt=""
}
//text arm1
spstr strCommand.txt,arm1.txt,"~",3
if(arm1.txt!="")
{
vis arm1,1
}
//id arm1
spstr strCommand.txt,va1.txt,"~",4
//text arm2
spstr strCommand.txt,arm2.txt,"~",5
if(arm2.txt!="")
{
vis arm2,1
}
//id arm2
spstr strCommand.txt,va2.txt,"~",6
//text arm3
spstr strCommand.txt,arm3.txt,"~",7
if(arm3.txt!="")
{
vis arm3,1
}
//id arm3
spstr strCommand.txt,va3.txt,"~",8
//text arm4
spstr strCommand.txt,arm4.txt,"~",9
if(arm4.txt!="")
{
vis arm4,1
}
//id arm4
spstr strCommand.txt,va4.txt,"~",10
//icon
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tIcon.txt,sys0,1
//icon color
spstr strCommand.txt,tTmp.txt,"~",12
covx tTmp.txt,sys0,0,0
tIcon.pco=sys0
//numpad status
spstr strCommand.txt,tTmp.txt,"~",13
if(tTmp.txt!="disable")
{
vis b0,1
vis b1,1
vis b2,1
vis b3,1
vis b4,1
vis b5,1
vis b6,1
vis b7,1
vis b8,1
vis b9,1
vis b10,1
vis tCode,1
}else
{
vis b0,0
vis b1,0
vis b2,0
vis b3,0
vis b4,0
vis b5,0
vis b6,0
vis b7,0
vis b8,0
vis b9,0
vis b10,0
vis tCode,0
}
//flashing status
spstr strCommand.txt,tTmp.txt,"~",14
if(tTmp.txt=="enable")
{
tmFlash.en=1
}else
{
tmFlash.en=0
}
}
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
dim=dimValue
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="pageType")
{
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="screensaver")
{
page screensaver
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="popupShutter")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupShutter
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardThermo")
{
page cardThermo
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
}
Timer tmSleep
Attributes
Scope : local
Period (ms): 1000
Enabled : yes
Events
Timer Event
if(sleepTimeout!=0&&dimValue!=dim)
{
sleepValue+=1
if(sleepTimeout<=sleepValue)
{
sleepValue=0
dim=dimValue
tSend.txt="event,sleepReached,cardAlarm"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
}
}
Timer tmFlash
Attributes
Scope : local
Period (ms): 600
Enabled : no
Events
Timer Event
if(tIcon.isbr==1)
{
tIcon.isbr=0
vis tIcon,0
}else
{
tIcon.isbr=1
vis tIcon,1
}
TouchCap tc0
Attributes
Scope: local
Value: 0
Events
Touch Press Event
sleepValue=0

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,884 @@
Page cardGrid
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Events
Preinitialize Event
//wup=cardEntities
//remove background & activate reparse mode
vis p0,0
recmod=1
bauds=115200
//debug stuff
vis tTmp,0
vis tSend,0
vis tInstruction,0
vis tId,0
vis bEntity1,0
vis bEntity2,0
vis bEntity3,0
vis bEntity4,0
vis bEntity5,0
vis bEntity6,0
vis tEntity1,0
vis tEntity2,0
vis tEntity3,0
vis tEntity4,0
vis tEntity5,0
vis tEntity6,0
Variable (string) strCommand
Attributes
Scope : local
Text :
Max. Text Size: 500
Variable (string) type1
Attributes
Scope : local
Text :
Max. Text Size: 10
Variable (string) type2
Attributes
Scope : local
Text :
Max. Text Size: 10
Variable (string) type3
Attributes
Scope : local
Text :
Max. Text Size: 10
Variable (string) type4
Attributes
Scope : local
Text :
Max. Text Size: 10
Variable (string) entn1
Attributes
Scope : local
Text :
Max. Text Size: 70
Variable (string) entn2
Attributes
Scope : local
Text :
Max. Text Size: 70
Variable (string) entn3
Attributes
Scope : local
Text :
Max. Text Size: 70
Variable (string) entn4
Attributes
Scope : local
Text :
Max. Text Size: 70
Variable (string) type5
Attributes
Scope : local
Text :
Max. Text Size: 10
Variable (string) type6
Attributes
Scope : local
Text :
Max. Text Size: 10
Variable (string) entn5
Attributes
Scope : local
Text :
Max. Text Size: 50
Variable (string) entn6
Attributes
Scope : local
Text :
Max. Text Size: 50
Text tHeading
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 40
Text tEntity1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : tEntity1
Max. Text Size : 30
Text tSend
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : newtxt
Max. Text Size : 100
Text tTmp
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tInstruction
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 20
Text tId
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 50
Text tEntity2
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : tEntity2
Max. Text Size : 30
Text tEntity3
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : tEntity3
Max. Text Size : 30
Text tEntity4
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : tEntity4
Max. Text Size : 30
Text tEntity5
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : tEntity5
Max. Text Size : 30
Text tEntity6
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : tEntity6
Max. Text Size : 30
Picture p0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Button bPrev
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardGrid,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bNext
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardGrid,bNext"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bEntity1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tmLP.en=1
tTmp.txt=type1.txt
pageIcons.tTmp1.txt=tEntity1.txt
pageIcons.tTmp2.txt=entn1.txt
if(type1.txt=="shutter")
{
page popupShutter
}
Touch Release Event
tmLP.en=0
tSend.txt="event,buttonPress2,"+entn1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bEntity2
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tmLP.en=1
tTmp.txt=type2.txt
pageIcons.tTmp1.txt=tEntity2.txt
pageIcons.tTmp2.txt=entn2.txt
if(type2.txt=="shutter")
{
page popupShutter
}
Touch Release Event
tmLP.en=0
tSend.txt="event,buttonPress2,"+entn2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bEntity3
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tmLP.en=1
tTmp.txt=type3.txt
pageIcons.tTmp1.txt=tEntity3.txt
pageIcons.tTmp2.txt=entn3.txt
if(type3.txt=="shutter")
{
page popupShutter
}
Touch Release Event
tmLP.en=0
tSend.txt="event,buttonPress2,"+entn3.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bEntity4
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tmLP.en=1
tTmp.txt=type4.txt
pageIcons.tTmp1.txt=tEntity4.txt
pageIcons.tTmp2.txt=entn4.txt
if(type4.txt=="shutter")
{
page popupShutter
}
Touch Release Event
tmLP.en=0
tSend.txt="event,buttonPress2,"+entn4.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bEntity5
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tmLP.en=1
tTmp.txt=type5.txt
pageIcons.tTmp1.txt=tEntity5.txt
pageIcons.tTmp2.txt=entn5.txt
if(type5.txt=="shutter")
{
page popupShutter
}
Touch Release Event
tmLP.en=0
tSend.txt="event,buttonPress2,"+entn5.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bEntity6
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tmLP.en=1
tTmp.txt=type6.txt
pageIcons.tTmp1.txt=tEntity6.txt
pageIcons.tTmp2.txt=entn6.txt
if(type6.txt=="shutter")
{
page popupShutter
}
Touch Release Event
tmLP.en=0
tSend.txt="event,buttonPress2,"+entn6.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Hotspot mSpecial
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Events
Touch Press Event
sys2=sys2+1
sys2%=10
//n0.val=sys2
if(sys2==9)
{
page pageTest
}
Timer tmSerial
Attributes
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
ucopy payloadLength,2,2,0
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
// calculate crc
crcrest 1,0xFFFF
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
//crcputu 3,u[2]
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
crcputu 0,payloadLength-1
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
// compare crc with recived value
if(crcval==recvCrc)
{
// crc is okay
// here is the location where acual code should be
// write command to variable strCommand
ucopy strCommand.txt,4,payloadLength-5,0
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
spstr strCommand.txt,tInstruction.txt,"~",0
if(tInstruction.txt=="entityUpd")
{
// command format: entityUpd,heading,navigation,[,type,internalName,iconId,iconColor,displayName,optionalValue]x6
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
{
vis bPrev,0
}
if(tTmp.txt=="1")
{
vis bPrev,1
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
{
vis bNext,0
}
if(tTmp.txt=="1")
{
vis bPrev,1
bNext.txt=""
}
// get Type
spstr strCommand.txt,type1.txt,"~",3
// get internal name
spstr strCommand.txt,entn1.txt,"~",4
if(type1.txt=="delete"||type1.txt=="")
{
vis tEntity1,0
vis bEntity1,0
}else
{
// change icon
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,bEntity1.txt,sys0,1
vis bEntity1,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",6
covx tTmp.txt,sys0,0,0
bEntity1.pco=sys0
// set name
spstr strCommand.txt,tEntity1.txt,"~",7
vis tEntity1,1
}
// get Type
spstr strCommand.txt,type2.txt,"~",9
// get internal name
spstr strCommand.txt,entn2.txt,"~",10
if(type2.txt=="delete"||type2.txt=="")
{
vis tEntity2,0
vis bEntity2,0
}else
{
// change icon
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,bEntity2.txt,sys0,1
vis bEntity2,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",12
covx tTmp.txt,sys0,0,0
bEntity2.pco=sys0
// set name
spstr strCommand.txt,tEntity2.txt,"~",13
vis tEntity2,1
}
// get Type
spstr strCommand.txt,type3.txt,"~",15
// get internal name
spstr strCommand.txt,entn3.txt,"~",16
if(type3.txt=="delete"||type3.txt=="")
{
vis tEntity3,0
vis bEntity3,0
}else
{
// change icon
spstr strCommand.txt,tTmp.txt,"~",17
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,bEntity3.txt,sys0,1
vis bEntity3,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",18
covx tTmp.txt,sys0,0,0
bEntity3.pco=sys0
// set name
spstr strCommand.txt,tEntity3.txt,"~",19
vis tEntity3,1
}
// get Type
spstr strCommand.txt,type4.txt,"~",21
// get internal name
spstr strCommand.txt,entn4.txt,"~",22
if(type4.txt=="delete"||type4.txt=="")
{
vis tEntity4,0
vis bEntity4,0
}else
{
// change icon
spstr strCommand.txt,tTmp.txt,"~",23
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,bEntity4.txt,sys0,1
vis bEntity4,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",24
covx tTmp.txt,sys0,0,0
bEntity4.pco=sys0
// set name
spstr strCommand.txt,tEntity4.txt,"~",25
vis tEntity4,1
}
// get Type
spstr strCommand.txt,type5.txt,"~",27
// get internal name
spstr strCommand.txt,entn5.txt,"~",28
if(type5.txt=="delete"||type5.txt=="")
{
vis tEntity5,0
vis bEntity5,0
}else
{
// change icon
spstr strCommand.txt,tTmp.txt,"~",29
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,bEntity5.txt,sys0,1
vis bEntity5,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",30
covx tTmp.txt,sys0,0,0
bEntity5.pco=sys0
// set name
spstr strCommand.txt,tEntity5.txt,"~",31
vis tEntity5,1
}
// get Type
spstr strCommand.txt,type6.txt,"~",33
// get internal name
spstr strCommand.txt,entn6.txt,"~",34
if(type6.txt=="delete"||type6.txt=="")
{
vis tEntity6,0
vis bEntity6,0
}else
{
// change icon
spstr strCommand.txt,tTmp.txt,"~",35
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,bEntity6.txt,sys0,1
vis bEntity6,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",36
covx tTmp.txt,sys0,0,0
bEntity6.pco=sys0
// set name
spstr strCommand.txt,tEntity6.txt,"~",37
vis tEntity6,1
}
}
if(tInstruction.txt=="pageType")
{
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="screensaver")
{
page screensaver
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="popupShutter")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupShutter
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardThermo")
{
page cardThermo
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
}
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
}
Timer tmSleep
Attributes
Scope : local
Period (ms): 1000
Enabled : yes
Events
Timer Event
if(sleepTimeout!=0&&dimValue!=dim)
{
sleepValue+=1
if(sleepTimeout<=sleepValue)
{
sleepValue=0
dim=dimValue
tSend.txt="event,sleepReached,cardGrid"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
}
}
Timer tmLP
Attributes
Scope : local
Period (ms): 500
Enabled : no
Events
Timer Event
if(tTmp.txt=="light")
{
page popupLight
}
TouchCap tc0
Attributes
Scope: local
Value: 0
Events
Touch Press Event
sleepValue=0

View File

@@ -0,0 +1,732 @@
Page cardMedia
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Events
Preinitialize Event
vis p0,0
vis tSend,0
vis tInstruction,0
vis tTmp,0
vis tId,0
vis t5,0
//vis nPageDisp,0
Variable (string) strCommand
Attributes
Scope : local
Text :
Max. Text Size: 500
Variable (string) entn
Attributes
Scope : local
Text :
Max. Text Size: 50
Variable (string) vaSpeakerList
Attributes
Scope : local
Text :
Max. Text Size: 200
Variable (int32) vaSpeakerPos
Attributes
Scope: local
Value: 0
Text tSend
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 200
Text tTmp
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tInstruction
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 20
Text tId
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 20
Text tHeading
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 40
Text tTitle
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 50
Text tAuthor
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 50
Text t2
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 
Max. Text Size : 10
Events
Touch Press Event
// event,buttonPress2,entn,media-next
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="media-next"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Text tPlayPause
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 
Max. Text Size : 10
Events
Touch Press Event
// event,buttonPress2,entn,media-pause
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="media-pause"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Text t0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 
Max. Text Size : 10
Events
Touch Press Event
// event,buttonPress2,entn,media-back
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="media-back"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Text tIcon
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text t1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 
Max. Text Size : 10
Events
Touch Press Event
hVolume.val=hVolume.val-5
// event,buttonPress2,internalNameEntity,volumeSlider,50
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",volumeSlider,"
covx hVolume.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Text t3
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 
Max. Text Size : 10
Events
Touch Press Event
hVolume.val=hVolume.val+5
// event,buttonPress2,internalNameEntity,volumeSlider,50
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",volumeSlider,"
covx hVolume.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Text t4
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 
Max. Text Size : 10
Text tSpeaker
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 50
Events
Touch Press Event
// event,buttonPress2,entn,media-next
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="speaker-sel,"+tSpeaker.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Text t6
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 
Max. Text Size : 10
Events
Touch Press Event
//speaker
tSpeaker.pco=65535
spstr vaSpeakerList.txt,tSpeaker.txt,"?",vaSpeakerPos.val
vaSpeakerPos.val+=1
if(tSpeaker.txt=="")
{
vaSpeakerPos.val=0
spstr vaSpeakerList.txt,tSpeaker.txt,"?",vaSpeakerPos.val
}
Text t5
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 
Max. Text Size : 10
Events
Touch Press Event
// event,buttonPress2,entn,media-next
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="media-OnOff"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Picture p0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Slider hVolume
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Position : 50
Upper range limit : 100
Lower range limit : 0
Events
Touch Release Event
tmCooldown.en=1
tmCooldown.tim=800
// event,buttonPress2,internalNameEntity,volumeSlider,50
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",volumeSlider,"
covx hVolume.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bNext
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardMedia,bNext"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bPrev
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardMedia,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Timer tmSerial
Attributes
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
ucopy payloadLength,2,2,0
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
// calculate crc
crcrest 1,0xFFFF
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
//crcputu 3,u[2]
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
crcputu 0,payloadLength-1
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
// compare crc with recived value
if(crcval==recvCrc)
{
// crc is okay
// here is the location where acual code should be
// write command to variable strCommand
ucopy strCommand.txt,4,payloadLength-5,0
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
spstr strCommand.txt,tInstruction.txt,"~",0
if(tInstruction.txt=="entityUpd")
{
//heading
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
{
vis bPrev,0
}
if(tTmp.txt=="1")
{
vis bPrev,1
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
{
vis bNext,0
}
if(tTmp.txt=="1")
{
vis bPrev,1
bNext.txt=""
}
//entity name
spstr strCommand.txt,entn.txt,"~",3
//icon
spstr strCommand.txt,tTmp.txt,"~",4
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tIcon.txt,sys0,1
//title
spstr strCommand.txt,tTitle.txt,"~",5
//author
spstr strCommand.txt,tAuthor.txt,"~",6
//volume
spstr strCommand.txt,tTmp.txt,"~",7
covx tTmp.txt,sys0,0,0
hVolume.val=sys0
//icon
spstr strCommand.txt,tTmp.txt,"~",8
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tPlayPause.txt,sys0,1
//speaker current
spstr strCommand.txt,tSpeaker.txt,"~",9
if(tSpeaker.txt!="")
{
tSpeaker.pco=1374
}else
{
tSpeaker.pco=65535
}
//speaker list
spstr strCommand.txt,vaSpeakerList.txt,"~",10
if(vaSpeakerList.txt=="")
{
vis t6,0
}
vaSpeakerPos.val=0
// on off button
spstr strCommand.txt,tTmp.txt,"~",11
if(tTmp.txt=="disable")
{
vis t5,0
}else
{
vis t5,1
covx tTmp.txt,t5.pco,0,0
}
}
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
dim=dimValue
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="pageType")
{
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="screensaver")
{
page screensaver
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="popupShutter")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupShutter
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardThermo")
{
page cardThermo
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
if(bufferPos==usize)
{
// copy whole buffer to t1.txt, for debugging
//ucopy t2.txt,0,usize,0
// ucopy n2.val,0,usize,0
// clear whole buffer
//code_c
//bufferPos=0
}
}
Timer tmSleep
Attributes
Scope : local
Period (ms): 1000
Enabled : yes
Events
Timer Event
if(sleepTimeout!=0&&dimValue!=dim)
{
sleepValue+=1
if(sleepTimeout<=sleepValue)
{
sleepValue=0
dim=dimValue
tSend.txt="event,sleepReached,cardMedia"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
}
}
Timer tmCooldown
Attributes
Scope : local
Period (ms): 100
Enabled : no
Events
Timer Event
tmCooldown.en=0
TouchCap tc0
Attributes
Scope: local
Value: 0
Events
Touch Press Event
sleepValue=0

View File

@@ -0,0 +1,988 @@
Page cardThermo
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Events
Preinitialize Event
vis p0,0
vis tSend,0
vis tInstruction,0
vis tTmp,0
vis tId,0
vis xTempMin,0
vis xTempMax,0
vis xTempStep,0
//tEntity.txt=tHeading.txt
// disable all buttons
vis bt0,0
vis bt1,0
vis bt2,0
vis bt3,0
vis bt4,0
vis bt5,0
vis bt6,0
vis bt7,0
vis bt8,0
Variable (string) strCommand
Attributes
Scope : local
Text :
Max. Text Size: 250
Variable (string) entn
Attributes
Scope : local
Text :
Max. Text Size: 50
Variable (string) va0
Attributes
Scope : local
Text :
Max. Text Size: 10
Variable (string) va1
Attributes
Scope : local
Text :
Max. Text Size: 10
Variable (string) va2
Attributes
Scope : local
Text :
Max. Text Size: 10
Variable (string) va3
Attributes
Scope : local
Text :
Max. Text Size: 10
Variable (string) va4
Attributes
Scope : local
Text :
Max. Text Size: 10
Variable (string) va5
Attributes
Scope : local
Text :
Max. Text Size: 10
Variable (string) va6
Attributes
Scope : local
Text :
Max. Text Size: 10
Variable (string) va7
Attributes
Scope : local
Text :
Max. Text Size: 10
Variable (string) va8
Attributes
Scope : local
Text :
Max. Text Size: 10
XFloat xTempCurr
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Value : 0
XFloat xTempDest
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Value : 0
XFloat xTempMin
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Value : 0
XFloat xTempMax
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Value : 0
XFloat xTempStep
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Value : 0
Text tSend
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : newtxt
Max. Text Size : 100
Text tTmp
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tInstruction
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 20
Text tId
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 20
Text tHeading
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 40
Text tStatus
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text t2
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 
Max. Text Size : 10
Picture p0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Button bNext
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardThermo,bNext"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bDown
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 10
Events
Touch Press Event
if(xTempDest.val>xTempMin.val)
{
xTempDest.val=xTempDest.val-xTempStep.val
}
// event,buttonPress2,entn,tempUpd,X
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="tempUpd,"
//convert temperature
covx xTempDest.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bUp
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 10
Events
Touch Press Event
if(xTempDest.val<xTempMax.val)
{
xTempDest.val=xTempDest.val+xTempStep.val
}
// event,buttonPress2,entn,tempUpd,X
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="tempUpd,"
//convert temperature
covx xTempDest.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bPrev
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardThermo,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Dual-state Button bt0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"+entn.txt
tSend.txt+=",hvac_action,"+va0.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Dual-state Button bt1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"+entn.txt
tSend.txt+=",hvac_action,"+va1.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Dual-state Button bt2
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"+entn.txt
tSend.txt+=",hvac_action,"+va2.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Dual-state Button bt3
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"+entn.txt
tSend.txt+=",hvac_action,"+va3.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Dual-state Button bt4
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"+entn.txt
tSend.txt+=",hvac_action,"+va4.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Dual-state Button bt5
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : pressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"+entn.txt
tSend.txt+=",hvac_action,"+va5.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Dual-state Button bt6
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : pressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"+entn.txt
tSend.txt+=",hvac_action,"+va6.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Dual-state Button bt7
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : pressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"+entn.txt
tSend.txt+=",hvac_action,"+va7.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Dual-state Button bt8
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : pressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"+entn.txt
tSend.txt+=",hvac_action,"+va8.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Timer tmSerial
Attributes
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
ucopy payloadLength,2,2,0
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
// calculate crc
crcrest 1,0xFFFF
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
//crcputu 3,u[2]
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
crcputu 0,payloadLength-1
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
// compare crc with recived value
if(crcval==recvCrc)
{
// crc is okay
// here is the location where acual code should be
// write command to variable strCommand
ucopy strCommand.txt,4,payloadLength-5,0
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
spstr strCommand.txt,tInstruction.txt,"~",0
if(tInstruction.txt=="entityUpd")
{
//heading
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
{
vis bPrev,0
}
if(tTmp.txt=="1")
{
vis bPrev,1
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
{
vis bNext,0
}
if(tTmp.txt=="1")
{
vis bPrev,1
bNext.txt=""
}
//entity name
spstr strCommand.txt,entn.txt,"~",3
//currentTemp
spstr strCommand.txt,tTmp.txt,"~",4
covx tTmp.txt,xTempCurr.val,0,0
//dstTemp
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,xTempDest.val,0,0
//status
spstr strCommand.txt,tStatus.txt,"~",6
//minTemp
spstr strCommand.txt,tTmp.txt,"~",7
covx tTmp.txt,xTempMin.val,0,0
//maxTemp
spstr strCommand.txt,tTmp.txt,"~",8
covx tTmp.txt,xTempMax.val,0,0
//tempStep
spstr strCommand.txt,tTmp.txt,"~",9
covx tTmp.txt,xTempStep.val,0,0
// disable all buttons
vis bt0,0
vis bt1,0
vis bt2,0
vis bt3,0
vis bt4,0
vis bt5,0
vis bt6,0
vis bt7,0
vis bt8,0
//bt0
spstr strCommand.txt,tTmp.txt,"~",10
if(tTmp.txt!="")
{
// set icon
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,bt0.txt,sys0,1
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,bt0.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",12
covx tTmp.txt,bt0.val,0,0
// save action
spstr strCommand.txt,va0.txt,"~",13
//enable
vis bt0,1
} //bt1
spstr strCommand.txt,tTmp.txt,"~",14
if(tTmp.txt!="")
{
// set icon
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,bt1.txt,sys0,1
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",15
covx tTmp.txt,bt1.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",16
covx tTmp.txt,bt1.val,0,0
// save action
spstr strCommand.txt,va1.txt,"~",17
//enable
vis bt1,1
} //bt2
spstr strCommand.txt,tTmp.txt,"~",18
if(tTmp.txt!="")
{
// set icon
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,bt2.txt,sys0,1
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",19
covx tTmp.txt,bt2.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",20
covx tTmp.txt,bt2.val,0,0
// save action
spstr strCommand.txt,va2.txt,"~",21
//enable
vis bt2,1
} //bt3
spstr strCommand.txt,tTmp.txt,"~",22
if(tTmp.txt!="")
{
// set icon
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,bt3.txt,sys0,1
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",23
covx tTmp.txt,bt3.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",24
covx tTmp.txt,bt3.val,0,0
// save action
spstr strCommand.txt,va3.txt,"~",25
//enable
vis bt3,1
} //bt4
spstr strCommand.txt,tTmp.txt,"~",26
if(tTmp.txt!="")
{
// set icon
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,bt4.txt,sys0,1
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",27
covx tTmp.txt,bt4.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",28
covx tTmp.txt,bt4.val,0,0
// save action
spstr strCommand.txt,va4.txt,"~",29
//enable
vis bt4,1
} //bt5
spstr strCommand.txt,tTmp.txt,"~",30
if(tTmp.txt!="")
{
// set icon
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,bt5.txt,sys0,1
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",31
covx tTmp.txt,bt5.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",32
covx tTmp.txt,bt5.val,0,0
// save action
spstr strCommand.txt,va5.txt,"~",33
//enable
vis bt5,1
} //bt6
spstr strCommand.txt,tTmp.txt,"~",34
if(tTmp.txt!="")
{
// set icon
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,bt6.txt,sys0,1
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",35
covx tTmp.txt,bt6.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",36
covx tTmp.txt,bt6.val,0,0
// save action
spstr strCommand.txt,va6.txt,"~",37
//enable
vis bt6,1
} //bt7
spstr strCommand.txt,tTmp.txt,"~",38
if(tTmp.txt!="")
{
// set icon
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,bt7.txt,sys0,1
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",39
covx tTmp.txt,bt7.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",40
covx tTmp.txt,bt7.val,0,0
// save action
spstr strCommand.txt,va7.txt,"~",41
//enable
vis bt7,1
} //bt8
spstr strCommand.txt,tTmp.txt,"~",42
if(tTmp.txt!="")
{
// set icon
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,bt8.txt,sys0,1
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",43
covx tTmp.txt,bt8.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",44
covx tTmp.txt,bt8.val,0,0
// save action
spstr strCommand.txt,va8.txt,"~",45
//enable
vis bt8,1
}
}
if(tInstruction.txt=="pageType")
{
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="screensaver")
{
page screensaver
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="popupShutter")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupShutter
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardThermo")
{
page cardThermo
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
}
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
}
Timer tmSleep
Attributes
Scope : local
Period (ms): 1000
Enabled : yes
Events
Timer Event
if(sleepTimeout!=0&&dimValue!=dim)
{
sleepValue+=1
if(sleepTimeout<=sleepValue)
{
sleepValue=0
dim=dimValue
tSend.txt="event,sleepReached,cardThermo"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
}
}
TouchCap tc0
Attributes
Scope: local
Value: 0
Events
Touch Press Event
sleepValue=0

View File

@@ -0,0 +1,61 @@
Page pageIcons
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Variable (string) vaTime
Attributes
Scope : global
Text :
Max. Text Size: 15
Variable (string) vaDate
Attributes
Scope : global
Text :
Max. Text Size: 35
Text tIcons
Attributes
Scope : global
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 
Max. Text Size : 170
Text tTmp1
Attributes
Scope : global
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 50
Text tTmp2
Attributes
Scope : global
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 50
Picture p0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled

View File

@@ -0,0 +1,207 @@
Page pageSerialTest
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Events
Preinitialize Event
//vis p0,0
//recmod=1
//bauds=115200
Number nCrcRecv
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Value : 0
Number nCrcCalc
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Value : 0
Number nIt
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Value : 0
Number nLength
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Value : 0
Text tStatus
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : newtxt
Max. Text Size : 100
Text tCmd
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : newtxt
Max. Text Size : 500
Text tBuffer
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : newtxt
Max. Text Size : 100
Text tDesc
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : CRC Recv:\r\nCRC Calc:\r\n\r\nStatus\r\n\r\nCommand
Max. Text Size : 60
Picture p0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Button b0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : bck
Max. Text Size : 10
Events
Touch Press Event
recmod=0
page pageTest
Button b1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : ON
Max. Text Size : 10
Events
Touch Press Event
recmod=1
bauds=115200
Timer tmSerial
Attributes
Scope : local
Period (ms): 400
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
tStatus.txt="init command detected"
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
//payloadLength=u[2]
ucopy payloadLength,2,2,0
nLength.val=payloadLength
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
tStatus.txt="reached"
// calculate crc
crcrest 1,0xFFFF
// payload length -1 to exclude crc
crcputu 0,payloadLength-1 //u[2]+3
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
nCrcRecv.val=recvCrc
// compare crc with recived value
if(crcval==recvCrc)
{
tStatus.txt="crc ok"
nIt.val=nIt.val+1
ucopy tCmd.txt,4,payloadLength-5,0
udelete payloadLength-1
bufferPos=0
// here is the location where acual code should be
}
// copy calculated crc and recived crc to nCrcRecv and nCrcCalc, for debugging
nCrcRecv.val=recvCrc
nCrcCalc.val=crcval
//ucopy nCrcCalc.val,u[2]+3,3,0
}
}
}
// next character
bufferPos++
}
if(bufferPos==usize)
{
// copy whole buffer to tCmd.txt, for debugging
//ucopy tBuffer.txt,0,usize,0
// ucopy nIt.val,0,usize,0
// clear whole buffer
//code_c
//bufferPos=0
}
}

View File

@@ -0,0 +1,372 @@
Page pageStartup
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Events
Preinitialize Event
vis p0,0
recmod=1
bauds=115200
vis tSend,0
vis tInstruction,0
vis tTmp,0
vis tId,0
vis bSendStartup,0
vis frame_ptr,0
vis spinner_w,0
vis frapic_w,0
vis usual_cnt,0
vis tMsg2,0
vis tMsg3,0
vis tVersion,0
dim=100
Postinitialize Event
//send messages by clicking button
click bSendStartup,1
Variable (string) strCommand
Attributes
Scope : local
Text :
Max. Text Size: 50
Number frame_ptr
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Value : 0
Number spinner_w
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Value : 140
Number frapic_w
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Value : 1960
Number usual_cnt
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Value : 0
Text tSend
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : newtxt
Max. Text Size : 100
Text tTmp
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tInstruction
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 20
Text tId
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 20
Text tMsg1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : Waiting for content ...
Max. Text Size : 40
Text tMsg2
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : This is taking longer than usual,
Max. Text Size : 100
Text tMsg3
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : please check your backend configuration
Max. Text Size : 100
Text tVersion
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 28
Max. Text Size : 10
Picture p0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Button bSendStartup
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : startup
Max. Text Size : 10
Events
Touch Press Event
recmod=1
bauds=115200
// startup event
tSend.txt="event,startup,"+tVersion.txt+",us-l"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Hotspot mSpinner
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Events
Touch Press Event
sys2=sys2+1
sys2%=10
//n0.val=sys2
if(sys2==9)
{
page pageTest
}
Timer tmSerial
Attributes
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
ucopy payloadLength,2,2,0
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
// calculate crc
crcrest 1,0xFFFF
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
//crcputu 3,u[2]
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
crcputu 0,payloadLength-1
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
// compare crc with recived value
if(crcval==recvCrc)
{
// crc is okay
// here is the location where acual code should be
// write command to variable strCommand
ucopy strCommand.txt,4,payloadLength-5,0
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
spstr strCommand.txt,tInstruction.txt,"~",0
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="pageType")
{
dim=100
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="cardThermo")
{
page cardThermo
}
if(tId.txt=="screensaver")
{
page screensaver
}
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
}
Timer tmSpinner
Attributes
Scope : local
Period (ms): 80
Enabled : yes
Events
Timer Event
xpic mSpinner.x,mSpinner.y,spinner_w.val,140,frame_ptr.val,0,11 // draw the current frame
frame_ptr.val+=spinner_w.val%frapic_w.val // advance the pointer to the next frame in the pic resource and roll over at the end
doevents // finish drawing before next timer event triggers
if(frame_ptr.val==1820)
{
usual_cnt.val+=1
sys0=usual_cnt.val%5
if(sys0==0)
{
// retry sending startup messages by clicking button
click bSendStartup,1
}
}
if(usual_cnt.val==10)
{
vis tMsg2,1
vis tMsg3,1
}

View File

@@ -0,0 +1,178 @@
Page pageTest
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Events
Preinitialize Event
vis p0,0
Picture p0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Button b0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : entities
Max. Text Size : 10
Events
Touch Press Event
page cardEntities
Button b1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : serial
Max. Text Size : 10
Events
Touch Press Event
page pageSerialTest
Button b3
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : disable recmod
Max. Text Size : 20
Events
Touch Press Event
recmod=0
Button b6
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : shutter
Max. Text Size : 10
Events
Touch Press Event
page popupShutter
Button b4
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : light
Max. Text Size : 10
Events
Touch Press Event
page popupLight
Button b5
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : thermo
Max. Text Size : 10
Events
Touch Press Event
page cardThermo
Button b7
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : media
Max. Text Size : 10
Events
Touch Press Event
page cardMedia
Button b8
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : screens
Max. Text Size : 10
Events
Touch Press Event
dimValue=50
page screensaver
Button b9
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : notify
Max. Text Size : 10
Events
Touch Press Event
page popupNotify
Button b10
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : alarm
Max. Text Size : 10
Events
Touch Press Event
page cardAlarm
Button b11
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : grid
Max. Text Size : 10
Events
Touch Press Event
page cardGrid

View File

@@ -0,0 +1,630 @@
Page popupLight
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Events
Preinitialize Event
//get entitiy name
tEntity.txt=pageIcons.tTmp1.txt
//get entity id
entn.txt=pageIcons.tTmp2.txt
vis p0,0
vis tSend,0
vis tTmp,0
vis tInstruction,0
vis tId,0
//page open event
// event,pageOpenDetail,typeOfPage,tEntityName
// craft command
tSend.txt="event,pageOpenDetail,popupLight,"+entn.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
//disable brightness by default
vis t1,0
vis t2,0
vis hBrightness,0
//disable color temp by default
vis t4,0
vis t3,0
vis hTempSlider,0
//disable color wheel components by default
vis bColor,0
vis t0,0
vis pColorWheel,0
//vis t0,0
Variable (string) strCommand
Attributes
Scope : local
Text :
Max. Text Size: 100
Variable (string) entn
Attributes
Scope : local
Text : newtxt
Max. Text Size: 50
Variable (int32) mode
Attributes
Scope: local
Value: 1
Variable (int32) mode_temp
Attributes
Scope: local
Value: 0
Text tEntity
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : tEntity1
Max. Text Size : 25
Text tIcon1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 
Max. Text Size : 10
Text t1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : Brightness
Max. Text Size : 15
Text t2
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 
Max. Text Size : 10
Text t3
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 
Max. Text Size : 10
Text t4
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : Temperature
Max. Text Size : 15
Text tSend
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : newtxt
Max. Text Size : 100
Text tTmp
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tInstruction
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 20
Text tId
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 20
Text t0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : Color
Max. Text Size : 15
Picture p0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Picture pColorWheel
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",colorWheel,"
sys0=tch0
sys0=sys0-pColorWheel.x
covx sys0,tTmp.txt,0,0
tSend.txt+=tTmp.txt
tSend.txt+="|"
sys0=tch1
sys0=sys0-pColorWheel.y
covx sys0,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Slider hBrightness
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Position : 50
Upper range limit : 100
Lower range limit : 0
Events
Touch Release Event
tmCooldown.en=1
tmCooldown.tim=2500
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",brightnessSlider,"
covx hBrightness.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Slider hTempSlider
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Position : 50
Upper range limit : 100
Lower range limit : 0
Events
Touch Release Event
tmCooldown.en=1
tmCooldown.tim=2500
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",colorTempSlider,"
covx hTempSlider.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button b0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tSend.txt="event,buttonPress2,popupLight,bExit"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bColor
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
if(mode.val==1)
{
mode.val=0
//enable color wheel
vis pColorWheel,1
//disable color temp
vis t4,0
vis t3,0
vis hTempSlider,0
}else
{
mode.val=1
//disable color wheel
vis pColorWheel,0
if(mode_temp.val==1)
{
//enable color temp
vis t4,1
vis t3,1
vis hTempSlider,1
}
}
Dual-state Button btOnOff1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 10
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+","+"OnOff,"
covx btOnOff1.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Timer tmSleep
Attributes
Scope : local
Period (ms): 1000
Enabled : yes
Events
Timer Event
if(sleepTimeout!=0)
{
sleepValue+=1
if(sleepTimeout<=sleepValue)
{
sleepValue=0
click b0,1
click b0,0
}
}
Timer tmSerial
Attributes
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
ucopy payloadLength,2,2,0
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
// calculate crc
crcrest 1,0xFFFF
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
//crcputu 3,u[2]
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
crcputu 0,payloadLength-1
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
// compare crc with recived value
if(crcval==recvCrc)
{
// crc is okay
// here is the location where acual code should be
// write command to variable strCommand
ucopy strCommand.txt,4,payloadLength-5,0
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
spstr strCommand.txt,tInstruction.txt,"~",0
if(tInstruction.txt=="entityUpdateDetail")
{
// change icon
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tIcon1.txt,sys0,1
vis tIcon1,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",2
covx tTmp.txt,sys0,0,0
tIcon1.pco=sys0
// get Button State
spstr strCommand.txt,tTmp.txt,"~",3
covx tTmp.txt,sys0,0,0
btOnOff1.val=sys0
// get Brightness value
spstr strCommand.txt,tTmp.txt,"~",4
if(tTmp.txt=="disable")
{
vis t1,0
vis t2,0
vis hBrightness,0
}else
{
vis t1,1
vis t2,1
vis hBrightness,1
covx tTmp.txt,sys0,0,0
if(tmCooldown.en==0)
{
hBrightness.val=sys0
}
}
// get ColorTemp value
spstr strCommand.txt,tTmp.txt,"~",5
if(tTmp.txt=="disable")
{
vis hTempSlider,0
vis t3,0
vis t4,0
mode_temp.val=0
// mode == 1 is temp controls currently shown
if(mode.val==1)
{
// switch mode
click bColor,1
click bColor,0
}
}else if(tTmp.txt=="unknown") // temp supported, but not in color mode
{
mode_temp.val=1
// mode == 1 is temp controls currently shown
if(mode.val==1)
{
// switch mode
click bColor,1
click bColor,0
}
}else
{
mode_temp.val=1
vis hTempSlider,1
vis t3,1
vis t4,1
if(tmCooldown.en==0)
{
covx tTmp.txt,sys0,0,0
hTempSlider.val=sys0
}
// mode == 0 is rgb controls currently shown
if(mode.val==0)
{
// switch mode
click bColor,1
click bColor,0
}
}
// get Color value
spstr strCommand.txt,tTmp.txt,"~",6
// disable -> isn't supported
if(tTmp.txt=="disable")
{
vis t0,0
vis bColor,0
vis pColorWheel,0
}else
{
vis t0,1
//only enable bColor button if color temp is also supported
if(mode_temp.val==1)
{
vis bColor,1
}
if(mode.val==0)
{
vis pColorWheel,1
}
}
}
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="pageType")
{
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
}
Timer tmCooldown
Attributes
Scope : local
Period (ms): 100
Enabled : no
Events
Timer Event
tmCooldown.en=0
TouchCap tc0
Attributes
Scope: local
Value: 0
Events
Touch Press Event
sleepValue=0

View File

@@ -0,0 +1,396 @@
Page popupNotify
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Events
Preinitialize Event
vis p0,0
vis tSend,0
vis tTmp,0
vis tInstruction,0
vis tId,0
Variable (string) strCommand
Attributes
Scope : local
Text :
Max. Text Size: 1000
Variable (string) entn
Attributes
Scope : local
Text :
Max. Text Size: 30
Variable (int32) vaOldSleepT
Attributes
Scope: local
Value: 0
Text tSend
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : newtxt
Max. Text Size : 100
Text tTmp
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tInstruction
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 20
Text tId
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 20
Text tHeading
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 40
Text tText
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 500
Picture p0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Button b0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
sleepTimeout=vaOldSleepT.val
tSend.txt="event,buttonPress2,popupNotify,bExit"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button b2
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 10
Events
Touch Press Event
sleepTimeout=vaOldSleepT.val
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",notifyAction,yes"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button b1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 10
Events
Touch Press Event
sleepTimeout=vaOldSleepT.val
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",notifyAction,no"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Timer tmSleep
Attributes
Scope : local
Period (ms): 1000
Enabled : yes
Events
Timer Event
if(sleepTimeout!=0)
{
sleepValue+=1
if(sleepTimeout<=sleepValue)
{
sleepValue=0
click b0,1
click b0,0
}
}
Timer tmSerial
Attributes
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
ucopy payloadLength,2,2,0
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
// calculate crc
crcrest 1,0xFFFF
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
//crcputu 3,u[2]
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
crcputu 0,payloadLength-1
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
// compare crc with recived value
if(crcval==recvCrc)
{
// crc is okay
// here is the location where acual code should be
// write command to variable strCommand
ucopy strCommand.txt,4,payloadLength-5,0
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
spstr strCommand.txt,tInstruction.txt,"~",0
if(tInstruction.txt=="entityUpdateDetail")
{
// get entn
spstr strCommand.txt,entn.txt,"~",1
// get Heading
spstr strCommand.txt,tHeading.txt,"~",2
// heading color
spstr strCommand.txt,tTmp.txt,"~",3
covx tTmp.txt,sys0,0,0
tHeading.pco=sys0
// get b1
spstr strCommand.txt,b1.txt,"~",4
if(b1.txt!="")
{
vis b1,1
}
// b1 color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
b1.pco=sys0
// get b2
spstr strCommand.txt,b2.txt,"~",6
if(b2.txt!="")
{
vis b2,1
}
// b2 color
spstr strCommand.txt,tTmp.txt,"~",7
covx tTmp.txt,sys0,0,0
b2.pco=sys0
// get tText
spstr strCommand.txt,tText.txt,"~",8
// tText color
spstr strCommand.txt,tTmp.txt,"~",9
covx tTmp.txt,sys0,0,0
tText.pco=sys0
//preserve old sleepTimeout
vaOldSleepT.val=sleepTimeout
// sleep timeout
spstr strCommand.txt,tTmp.txt,"~",10
covx tTmp.txt,sys0,0,0
sleepTimeout=sys0
}
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="exitPopup")
{
click b0,1
}
if(tInstruction.txt=="pageType")
{
sleepTimeout=vaOldSleepT.val
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="cardThermo")
{
page cardThermo
}
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
if(bufferPos==usize)
{
// copy whole buffer to t1.txt, for debugging
//ucopy t2.txt,0,usize,0
// ucopy n2.val,0,usize,0
// clear whole buffer
//code_c
//bufferPos=0
}
}
TouchCap tc0
Attributes
Scope: local
Value: 0
Events
Touch Press Event
sleepValue=0

View File

@@ -0,0 +1,428 @@
Page popupShutter
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Events
Preinitialize Event
//get entitiy name
tEntity.txt=pageIcons.tTmp1.txt
//get entity id
entn.txt=pageIcons.tTmp2.txt
vis p0,0
vis tSend,0
vis tTmp,0
vis tInstruction,0
vis tId,0
//page open event
// event,pageOpenDetail,typeOfPage,tEntityName
// craft command
tSend.txt="event,pageOpenDetail,popupShutter,"+entn.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Variable (string) strCommand
Attributes
Scope : local
Text :
Max. Text Size: 50
Variable (string) entn
Attributes
Scope : local
Text : newtxt
Max. Text Size: 50
Text tEntity
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : tEntity1
Max. Text Size : 25
Text tIcon1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 
Max. Text Size : 10
Text tSend
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : newtxt
Max. Text Size : 100
Text tTmp
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tInstruction
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 20
Text tId
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 20
Text t1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : Position
Max. Text Size : 15
Picture p0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Slider hPosition
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Position : 50
Upper range limit : 100
Lower range limit : 0
Events
Touch Release Event
// event,buttonPress2,internalNameEntity,positionSlider,50
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",positionSlider,"
covx hPosition.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button b0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tSend.txt="event,buttonPress2,popupShutter,bExit"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bDown1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tSend.txt="event,buttonPress2,"+entn.txt+",down"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bStop1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tSend.txt="event,buttonPress2,"+entn.txt+",stop"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bUp1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tSend.txt="event,buttonPress2,"+entn.txt+",up"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Timer tmSleep
Attributes
Scope : local
Period (ms): 1000
Enabled : yes
Events
Timer Event
if(sleepTimeout!=0)
{
sleepValue+=1
if(sleepTimeout<=sleepValue)
{
sleepValue=0
click b0,1
click b0,0
}
}
Timer tmSerial
Attributes
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
ucopy payloadLength,2,2,0
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
// calculate crc
crcrest 1,0xFFFF
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
//crcputu 3,u[2]
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
crcputu 0,payloadLength-1
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
// compare crc with recived value
if(crcval==recvCrc)
{
// crc is okay
// here is the location where acual code should be
// write command to variable strCommand
ucopy strCommand.txt,4,payloadLength-5,0
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
spstr strCommand.txt,tInstruction.txt,"~",0
if(tInstruction.txt=="entityUpdateDetail")
{
// get Position value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sys0,0,0
hPosition.val=sys0
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
}
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="pageType")
{
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
if(bufferPos==usize)
{
// copy whole buffer to t1.txt, for debugging
//ucopy t2.txt,0,usize,0
// ucopy n2.val,0,usize,0
// clear whole buffer
//code_c
//bufferPos=0
}
}
TouchCap tc0
Attributes
Scope: local
Value: 0
Events
Touch Press Event
sleepValue=0

View File

@@ -0,0 +1,577 @@
Page screensaver
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Events
Preinitialize Event
recmod=1
bauds=115200
vis tInstruction,0
vis tTmp,0
vis p0,0
//load gloabl time string from pageIcons
//tTime.txt=vaTime.txt
spstr pageIcons.vaTime.txt,tTime.txt,"?",0
spstr pageIcons.vaTime.txt,tAMPM.txt,"?",1
if(tAMPM.txt=="")
{
vis tAMPM,0
}
tDate.txt=pageIcons.vaDate.txt
dim=dimValue
vis tSend,0
//page open event
// clear weather elements, to keep example content in HMI
Variable (string) strCommand
Attributes
Scope : local
Text :
Max. Text Size: 200
Variable (string) tId
Attributes
Scope : local
Text :
Max. Text Size: 25
Variable (int32) vaTap
Attributes
Scope: local
Value: 0
Text tInstruction
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 50
Text tTmp
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 50
Text tTime
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 21:32
Max. Text Size : 15
Text tDate
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : Tuesday, 08. March 2022
Max. Text Size : 35
Text tSend
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 50
Text tMainIcon
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tMainText
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tForecast1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tForecast1Val
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tF1Icon
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tForecast2
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tF2Icon
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tForecast2Val
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text t10
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : |
Max. Text Size : 10
Text tAMPM
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : PM
Max. Text Size : 10
Text tForecast3Val
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tF3Icon
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tForecast3
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tForecast4
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tF4Icon
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 5
Text tForecast4Val
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tMainTextAlt
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tMainIconAlt
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tMRIcon
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tMR
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Picture p0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Timer tmSerial
Attributes
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
ucopy payloadLength,2,2,0
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
// calculate crc
crcrest 1,0xFFFF
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
//crcputu 3,u[2]
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
crcputu 0,payloadLength-1
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
// compare crc with recived value
if(crcval==recvCrc)
{
// crc is okay
// here is the location where acual code should be
// write command to variable strCommand
ucopy strCommand.txt,4,payloadLength-5,0
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
spstr strCommand.txt,tInstruction.txt,"~",0
if(tInstruction.txt=="wake")
{
//dim=100
click tc0,1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
dim=dimValue
}
if(tInstruction.txt=="time")
{
//get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
spstr pageIcons.vaTime.txt,tTime.txt,"?",0
spstr pageIcons.vaTime.txt,tAMPM.txt,"?",1
if(tAMPM.txt=="")
{
vis tAMPM,0
}
}
if(tInstruction.txt=="date")
{
//get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
tDate.txt=pageIcons.vaDate.txt
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="weatherUpdate")
{
vis tMainIcon,1
vis tMainIconAlt,0
vis tMainText,1
vis tMainTextAlt,0
vis tMRIcon,0
vis tMR,0
//tMainIcon
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tMainIcon.txt,sys0,1
tMainIconAlt.txt=tMainIcon.txt
//tMainText
spstr strCommand.txt,tMainText.txt,"~",2
tMainTextAlt.txt=tMainText.txt
//tForecast1
spstr strCommand.txt,tForecast1.txt,"~",3
//tF1Icon
spstr strCommand.txt,tTmp.txt,"~",4
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tF1Icon.txt,sys0,1
//tForecast1Val
spstr strCommand.txt,tForecast1Val.txt,"~",5
//tForecast2
spstr strCommand.txt,tForecast2.txt,"~",6
//tF2Icon
spstr strCommand.txt,tTmp.txt,"~",7
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tF2Icon.txt,sys0,1
//tForecast2Val
spstr strCommand.txt,tForecast2Val.txt,"~",8
//tForecast3
spstr strCommand.txt,tForecast3.txt,"~",9
//tF3Icon
spstr strCommand.txt,tTmp.txt,"~",10
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tF3Icon.txt,sys0,1
//tForecast3Val
spstr strCommand.txt,tForecast3Val.txt,"~",11
//tForecast4
spstr strCommand.txt,tForecast4.txt,"~",12
//tF4Icon
spstr strCommand.txt,tTmp.txt,"~",13
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tF4Icon.txt,sys0,1
//tForecast4Val
spstr strCommand.txt,tForecast4Val.txt,"~",14
//alternative layout
//tMRIcon
spstr strCommand.txt,tTmp.txt,"~",15
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tMRIcon.txt,sys0,1
if(tTmp.txt!="")
{
//value for tMRIcon, activate alternative layout
vis tMainIcon,0
vis tMainText,0
vis tMainTextAlt,1
vis tMainIconAlt,1
vis tMRIcon,1
vis tMR,1
vis tForecast1,0
vis tF1Icon,0
vis tForecast1Val,0
//move forecast values to the right
tForecast4.txt=tForecast3.txt
tForecast3.txt=tForecast2.txt
tForecast2.txt=tForecast1.txt
tForecast4Val.txt=tForecast3Val.txt
tForecast3Val.txt=tForecast2Val.txt
tForecast2Val.txt=tForecast1Val.txt
tF4Icon.txt=tF3Icon.txt
tF3Icon.txt=tF2Icon.txt
tF2Icon.txt=tF1Icon.txt
}
//tMR
spstr strCommand.txt,tMR.txt,"~",16
}
if(tInstruction.txt=="pageType")
{
dim=100
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete u[2]+3
bufferPos=0
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="cardThermo")
{
page cardThermo
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
}
Timer tmSleep
Attributes
Scope : local
Period (ms): 1000
Enabled : yes
Events
Timer Event
if(sleepTimeout!=0&&dimValue!=dim)
{
sleepValue+=1
if(sleepTimeout<=sleepValue)
{
sleepValue=0
dim=dimValue
vaTap.val=0
}
}
TouchCap tc0
Attributes
Scope: local
Value: 0
Events
Touch Press Event
dim=dimValueNormal
vaTap.val+=1
covx vaTap.val,tTmp.txt,0,0
tSend.txt="event,buttonPress2,screensaver,bExit,"+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,803 @@
diff -bur HMI/n2t-out/Program.s.txt HMI/US/portrait/n2t-out/Program.s.txt
--- HMI/n2t-out/Program.s.txt 2022-04-01 04:54:12.884151859 +0000
+++ HMI/US/portrait/n2t-out/Program.s.txt 2022-04-01 04:54:13.372185922 +0000
@@ -11,6 +11,6 @@
// dim value
int dimValue=40
int dimValueNormal=100
- // fix touch offset
- lcd_dev fffb 0002 0000 0020
+ // fix touch offset (Removed for US version)
+ //lcd_dev fffb 0002 0000 0020
page pageStartup
diff -bur HMI/n2t-out/cardEntities.txt HMI/US/portrait/n2t-out/cardEntities.txt
--- HMI/n2t-out/cardEntities.txt 2022-04-01 04:54:12.888152138 +0000
+++ HMI/US/portrait/n2t-out/cardEntities.txt 2022-04-01 04:54:13.372185922 +0000
@@ -62,6 +62,26 @@
vis bText4,0
vis hSlider4,0
vis nNum4,0
+ //ui e5
+ vis btOnOff5,0
+ vis bUp5,0
+ vis bStop5,0
+ vis bDown5,0
+ vis tIcon5,0
+ vis tEntity5,0
+ vis bText5,0
+ vis hSlider5,0
+ vis nNum5,0
+ //ui e6
+ vis btOnOff6,0
+ vis bUp6,0
+ vis bStop6,0
+ vis bDown6,0
+ vis tIcon6,0
+ vis tEntity6,0
+ vis bText6,0
+ vis hSlider6,0
+ vis nNum6,0
Variable (string) strCommand
Attributes
@@ -117,6 +137,30 @@
Text :
Max. Text Size: 70
+Variable (string) entn5
+ Attributes
+ Scope : local
+ Text :
+ Max. Text Size: 70
+
+Variable (string) entn6
+ Attributes
+ Scope : local
+ Text :
+ Max. Text Size: 70
+
+Variable (string) type5
+ Attributes
+ Scope : local
+ Text :
+ Max. Text Size: 10
+
+Variable (string) type6
+ Attributes
+ Scope : local
+ Text :
+ Max. Text Size: 10
+
Number nNum1
Attributes
Scope : local
@@ -153,6 +197,24 @@
Associated Keyboard : none
Value : 0
+Number nNum5
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ Associated Keyboard : none
+ Value : 0
+
+Number nNum6
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ Associated Keyboard : none
+ Value : 0
+
Text tHeading
Attributes
Scope : local
@@ -283,6 +345,46 @@
Text :
Max. Text Size : 50
+Text tEntity5
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ Associated Keyboard : none
+ Text : tEntity5
+ Max. Text Size : 30
+
+Text tIcon5
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ Associated Keyboard : none
+ Text : 
+ Max. Text Size : 5
+
+Text tEntity6
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ Associated Keyboard : none
+ Text : tEntity6
+ Max. Text Size : 30
+
+Text tIcon6
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ Associated Keyboard : none
+ Text : 
+ Max. Text Size : 5
+
Picture p0
Attributes
Scope : local
@@ -402,6 +504,62 @@
prints tSend.txt,0
prints crcval,2
+Slider hSlider5
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ Position : 50
+ Upper range limit : 100
+ Lower range limit : 0
+
+ Events
+ Touch Release Event
+ nNum5.val=hSlider5.val
+ tSend.txt="event,buttonPress2,"+entn5.txt+",number-set,"
+ covx nNum5.val,tTmp.txt,0,0
+ tSend.txt+=tTmp.txt
+ //send calc crc
+ btlen tSend.txt,sys0
+ crcrest 1,0xffff // reset CRC
+ crcputh 55 bb
+ crcputs sys0,1
+ crcputs tSend.txt,0
+ //send cmd
+ printh 55 bb
+ prints sys0,2
+ prints tSend.txt,0
+ prints crcval,2
+
+Slider hSlider6
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ Position : 50
+ Upper range limit : 100
+ Lower range limit : 0
+
+ Events
+ Touch Release Event
+ nNum6.val=hSlider6.val
+ tSend.txt="event,buttonPress2,"+entn6.txt+",number-set,"
+ covx nNum6.val,tTmp.txt,0,0
+ tSend.txt+=tTmp.txt
+ //send calc crc
+ btlen tSend.txt,sys0
+ crcrest 1,0xffff // reset CRC
+ crcputh 55 bb
+ crcputs sys0,1
+ crcputs tSend.txt,0
+ //send cmd
+ printh 55 bb
+ prints sys0,2
+ prints tSend.txt,0
+ prints crcval,2
+
Button bDown1
Attributes
Scope : local
@@ -857,6 +1015,206 @@
prints tSend.txt,0
prints crcval,2
+Button bStop5
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ State : unpressed
+ Text : 
+ Max. Text Size : 10
+
+ Events
+ Touch Press Event
+ tSend.txt="event,buttonPress2,"+entn5.txt+",stop"
+ //send calc crc
+ btlen tSend.txt,sys0
+ crcrest 1,0xffff // reset CRC
+ crcputh 55 bb
+ crcputs sys0,1
+ crcputs tSend.txt,0
+ //send cmd
+ printh 55 bb
+ prints sys0,2
+ prints tSend.txt,0
+ prints crcval,2
+
+Button bDown5
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ State : unpressed
+ Text : 
+ Max. Text Size : 10
+
+ Events
+ Touch Press Event
+ tSend.txt="event,buttonPress2,"+entn5.txt+",down"
+ //send calc crc
+ btlen tSend.txt,sys0
+ crcrest 1,0xffff // reset CRC
+ crcputh 55 bb
+ crcputs sys0,1
+ crcputs tSend.txt,0
+ //send cmd
+ printh 55 bb
+ prints sys0,2
+ prints tSend.txt,0
+ prints crcval,2
+
+Button bUp5
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ State : unpressed
+ Text : 
+ Max. Text Size : 10
+
+ Events
+ Touch Press Event
+ tSend.txt="event,buttonPress2,"+entn5.txt+",up"
+ //send calc crc
+ btlen tSend.txt,sys0
+ crcrest 1,0xffff // reset CRC
+ crcputh 55 bb
+ crcputs sys0,1
+ crcputs tSend.txt,0
+ //send cmd
+ printh 55 bb
+ prints sys0,2
+ prints tSend.txt,0
+ prints crcval,2
+
+Button bText5
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ State : unpressed
+ Text : newtxt
+ Max. Text Size : 10
+
+ Events
+ Touch Press Event
+ tSend.txt="event,buttonPress2,"+entn5.txt+",button"
+ //send calc crc
+ btlen tSend.txt,sys0
+ crcrest 1,0xffff // reset CRC
+ crcputh 55 bb
+ crcputs sys0,1
+ crcputs tSend.txt,0
+ //send cmd
+ printh 55 bb
+ prints sys0,2
+ prints tSend.txt,0
+ prints crcval,2
+
+Button bStop6
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ State : unpressed
+ Text : 
+ Max. Text Size : 10
+
+ Events
+ Touch Press Event
+ tSend.txt="event,buttonPress2,"+entn6.txt+",stop"
+ //send calc crc
+ btlen tSend.txt,sys0
+ crcrest 1,0xffff // reset CRC
+ crcputh 55 bb
+ crcputs sys0,1
+ crcputs tSend.txt,0
+ //send cmd
+ printh 55 bb
+ prints sys0,2
+ prints tSend.txt,0
+ prints crcval,2
+
+Button bDown6
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ State : unpressed
+ Text : 
+ Max. Text Size : 10
+
+ Events
+ Touch Press Event
+ tSend.txt="event,buttonPress2,"+entn6.txt+",down"
+ //send calc crc
+ btlen tSend.txt,sys0
+ crcrest 1,0xffff // reset CRC
+ crcputh 55 bb
+ crcputs sys0,1
+ crcputs tSend.txt,0
+ //send cmd
+ printh 55 bb
+ prints sys0,2
+ prints tSend.txt,0
+ prints crcval,2
+
+Button bUp6
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ State : unpressed
+ Text : 
+ Max. Text Size : 10
+
+ Events
+ Touch Press Event
+ tSend.txt="event,buttonPress2,"+entn6.txt+",up"
+ //send calc crc
+ btlen tSend.txt,sys0
+ crcrest 1,0xffff // reset CRC
+ crcputh 55 bb
+ crcputs sys0,1
+ crcputs tSend.txt,0
+ //send cmd
+ printh 55 bb
+ prints sys0,2
+ prints tSend.txt,0
+ prints crcval,2
+
+Button bText6
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ State : unpressed
+ Text : newtxt
+ Max. Text Size : 10
+
+ Events
+ Touch Press Event
+ tSend.txt="event,buttonPress2,"+entn6.txt+",button"
+ //send calc crc
+ btlen tSend.txt,sys0
+ crcrest 1,0xffff // reset CRC
+ crcputh 55 bb
+ crcputs sys0,1
+ crcputs tSend.txt,0
+ //send cmd
+ printh 55 bb
+ prints sys0,2
+ prints tSend.txt,0
+ prints crcval,2
+
Dual-state Button btOnOff1
Attributes
Scope : local
@@ -965,6 +1323,60 @@
prints tSend.txt,0
prints crcval,2
+Dual-state Button btOnOff5
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ State : unpressed
+ Text :
+ Max. Text Size : 10
+
+ Events
+ Touch Press Event
+ tSend.txt="event,buttonPress2,"+entn5.txt+",OnOff,"
+ covx btOnOff5.val,tTmp.txt,0,0
+ tSend.txt+=tTmp.txt
+ //send calc crc
+ btlen tSend.txt,sys0
+ crcrest 1,0xffff // reset CRC
+ crcputh 55 bb
+ crcputs sys0,1
+ crcputs tSend.txt,0
+ //send cmd
+ printh 55 bb
+ prints sys0,2
+ prints tSend.txt,0
+ prints crcval,2
+
+Dual-state Button btOnOff6
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ State : unpressed
+ Text :
+ Max. Text Size : 10
+
+ Events
+ Touch Press Event
+ tSend.txt="event,buttonPress2,"+entn6.txt+",OnOff,"
+ covx btOnOff6.val,tTmp.txt,0,0
+ tSend.txt+=tTmp.txt
+ //send calc crc
+ btlen tSend.txt,sys0
+ crcrest 1,0xffff // reset CRC
+ crcputh 55 bb
+ crcputs sys0,1
+ crcputs tSend.txt,0
+ //send cmd
+ printh 55 bb
+ prints sys0,2
+ prints tSend.txt,0
+ prints crcval,2
+
Hotspot mSpecial
Attributes
Scope : local
@@ -1070,6 +1482,50 @@
page popupLight
}
+Hotspot m4
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+
+ Events
+ Touch Press Event
+ pageIcons.tTmp1.txt=tEntity5.txt
+ pageIcons.tTmp2.txt=entn5.txt
+ if(type5.txt=="shutter")
+ {
+ //popupShutter.tHeading.txt=tEntity5.txt
+ page popupShutter
+ }
+ if(type5.txt=="light")
+ {
+ //popupLight.tEntity.txt=tEntity5.txt
+ page popupLight
+ }
+
+Hotspot m5
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+
+ Events
+ Touch Press Event
+ pageIcons.tTmp1.txt=tEntity6.txt
+ pageIcons.tTmp2.txt=entn6.txt
+ if(type6.txt=="shutter")
+ {
+ //popupShutter.tHeading.txt=tEntity6.txt
+ page popupShutter
+ }
+ if(type6.txt=="light")
+ {
+ //popupLight.tEntity.txt=tEntity6.txt
+ page popupLight
+ }
+
Timer tmSerial
Attributes
Scope : local
@@ -1648,6 +2104,254 @@
covx tTmp.txt,sys0,0,0
hSlider4.maxval=sys0
}
+ // get Type
+ spstr strCommand.txt,type5.txt,",",27
+ // get internal name
+ spstr strCommand.txt,entn5.txt,",",28
+ if(type5.txt=="delete"||type5.txt=="")
+ {
+ vis bUp5,0
+ vis bStop5,0
+ vis bDown5,0
+ vis btOnOff5,0
+ vis tEntity5,0
+ vis tIcon5,0
+ vis bText5,0
+ vis hSlider5,0
+ vis nNum5,0
+ }else
+ {
+ // change icon
+ spstr strCommand.txt,tTmp.txt,",",29
+ covx tTmp.txt,sys0,0,0
+ substr pageIcons.tIcons.txt,tIcon5.txt,sys0,1
+ vis tIcon5,1
+ // change icon color
+ spstr strCommand.txt,tTmp.txt,",",30
+ covx tTmp.txt,sys0,0,0
+ tIcon5.pco=sys0
+ // set name
+ spstr strCommand.txt,tEntity5.txt,",",31
+ vis tEntity5,1
+ }
+ if(type5.txt=="shutter")
+ {
+ vis bUp5,1
+ vis bStop5,1
+ vis bDown5,1
+ vis btOnOff5,0
+ vis bText5,0
+ vis hSlider5,0
+ vis nNum5,0
+ }
+ if(type5.txt=="light")
+ {
+ vis bUp5,0
+ vis bStop5,0
+ vis bDown5,0
+ vis btOnOff5,1
+ vis bText5,0
+ vis hSlider5,0
+ vis nNum5,0
+ // get Button State (optional Value)
+ spstr strCommand.txt,tTmp.txt,",",32
+ covx tTmp.txt,sys0,0,0
+ btOnOff5.val=sys0
+ }
+ if(type5.txt=="switch")
+ {
+ vis bUp5,0
+ vis bStop5,0
+ vis bDown5,0
+ vis btOnOff5,1
+ vis bText5,0
+ vis hSlider5,0
+ vis nNum5,0
+ // get Button State (optional Value)
+ spstr strCommand.txt,tTmp.txt,",",32
+ covx tTmp.txt,sys0,0,0
+ btOnOff5.val=sys0
+ }
+ if(type5.txt=="text")
+ {
+ vis bUp5,0
+ vis bStop5,0
+ vis bDown5,0
+ vis btOnOff5,0
+ vis bText5,1
+ tsw bText5,0
+ vis hSlider5,0
+ vis nNum5,0
+ bText5.pco=65535
+ bText5.pco2=65535
+ // get Text (optional Value)
+ spstr strCommand.txt,bText5.txt,",",32
+ }
+ if(type5.txt=="button")
+ {
+ vis bUp5,0
+ vis bStop5,0
+ vis bDown5,0
+ vis btOnOff5,0
+ vis bText5,1
+ tsw bText5,1
+ vis hSlider5,0
+ vis nNum5,0
+ bText5.pco=1374
+ bText5.pco2=1374
+ // get Text (optional Value)
+ spstr strCommand.txt,bText5.txt,",",32
+ }
+ if(type5.txt=="number")
+ {
+ vis bUp5,0
+ vis bStop5,0
+ vis bDown5,0
+ vis btOnOff5,0
+ vis bText5,0
+ tsw bText5,0
+ vis hSlider5,1
+ vis nNum5,1
+ // get config (optional Value) (use bText as variable)
+ spstr strCommand.txt,bText5.txt,",",32
+ //first value is current value
+ spstr bText5.txt,tTmp.txt,"|",0
+ covx tTmp.txt,sys0,0,0
+ hSlider5.val=sys0
+ nNum5.val=sys0
+ //second value is min value
+ spstr bText5.txt,tTmp.txt,"|",1
+ covx tTmp.txt,sys0,0,0
+ hSlider5.minval=sys0
+ //third value is max value
+ spstr bText5.txt,tTmp.txt,"|",2
+ covx tTmp.txt,sys0,0,0
+ hSlider5.maxval=sys0
+ }
+ // get Type
+ spstr strCommand.txt,type6.txt,",",33
+ // get internal name
+ spstr strCommand.txt,entn6.txt,",",34
+ if(type6.txt=="delete"||type6.txt=="")
+ {
+ vis bUp6,0
+ vis bStop6,0
+ vis bDown6,0
+ vis btOnOff6,0
+ vis tEntity6,0
+ vis tIcon6,0
+ vis bText6,0
+ vis hSlider6,0
+ vis nNum6,0
+ }else
+ {
+ // change icon
+ spstr strCommand.txt,tTmp.txt,",",35
+ covx tTmp.txt,sys0,0,0
+ substr pageIcons.tIcons.txt,tIcon6.txt,sys0,1
+ vis tIcon6,1
+ // change icon color
+ spstr strCommand.txt,tTmp.txt,",",36
+ covx tTmp.txt,sys0,0,0
+ tIcon6.pco=sys0
+ // set name
+ spstr strCommand.txt,tEntity6.txt,",",37
+ vis tEntity6,1
+ }
+ if(type6.txt=="shutter")
+ {
+ vis bUp6,1
+ vis bStop6,1
+ vis bDown6,1
+ vis btOnOff6,0
+ vis bText6,0
+ vis hSlider6,0
+ vis nNum6,0
+ }
+ if(type6.txt=="light")
+ {
+ vis bUp6,0
+ vis bStop6,0
+ vis bDown6,0
+ vis btOnOff6,1
+ vis bText6,0
+ vis hSlider6,0
+ vis nNum6,0
+ // get Button State (optional Value)
+ spstr strCommand.txt,tTmp.txt,",",38
+ covx tTmp.txt,sys0,0,0
+ btOnOff6.val=sys0
+ }
+ if(type6.txt=="switch")
+ {
+ vis bUp6,0
+ vis bStop6,0
+ vis bDown6,0
+ vis btOnOff6,1
+ vis bText6,0
+ vis hSlider6,0
+ vis nNum6,0
+ // get Button State (optional Value)
+ spstr strCommand.txt,tTmp.txt,",",38
+ covx tTmp.txt,sys0,0,0
+ btOnOff6.val=sys0
+ }
+ if(type6.txt=="text")
+ {
+ vis bUp6,0
+ vis bStop6,0
+ vis bDown6,0
+ vis btOnOff6,0
+ vis bText6,1
+ tsw bText6,0
+ vis hSlider6,0
+ vis nNum6,0
+ bText6.pco=65535
+ bText6.pco2=65535
+ // get Text (optional Value)
+ spstr strCommand.txt,bText6.txt,",",38
+ }
+ if(type6.txt=="button")
+ {
+ vis bUp6,0
+ vis bStop6,0
+ vis bDown6,0
+ vis btOnOff6,0
+ vis bText6,1
+ tsw bText6,1
+ vis hSlider6,0
+ vis nNum6,0
+ bText6.pco=1374
+ bText6.pco2=1374
+ // get Text (optional Value)
+ spstr strCommand.txt,bText6.txt,",",38
+ }
+ if(type6.txt=="number")
+ {
+ vis bUp6,0
+ vis bStop6,0
+ vis bDown6,0
+ vis btOnOff6,0
+ vis bText6,0
+ tsw bText6,0
+ vis hSlider6,1
+ vis nNum6,1
+ // get config (optional Value) (use bText as variable)
+ spstr strCommand.txt,bText6.txt,",",38
+ //first value is current value
+ spstr bText6.txt,tTmp.txt,"|",0
+ covx tTmp.txt,sys0,0,0
+ hSlider6.val=sys0
+ nNum6.val=sys0
+ //second value is min value
+ spstr bText6.txt,tTmp.txt,"|",1
+ covx tTmp.txt,sys0,0,0
+ hSlider6.minval=sys0
+ //third value is max value
+ spstr bText6.txt,tTmp.txt,"|",2
+ covx tTmp.txt,sys0,0,0
+ hSlider6.maxval=sys0
+ }
}
if(tInstruction.txt=="pageType")
{
diff -bur HMI/n2t-out/pageStartup.txt HMI/US/portrait/n2t-out/pageStartup.txt
--- HMI/n2t-out/pageStartup.txt 2022-04-01 04:54:12.884151859 +0000
+++ HMI/US/portrait/n2t-out/pageStartup.txt 2022-04-01 04:54:13.372185922 +0000
@@ -142,7 +142,7 @@
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
- Text : please check your backend configuration
+ Text : pls check your backend configuration
Max. Text Size : 100
Text tVersion
@@ -177,7 +177,7 @@
recmod=1
bauds=115200
// startup event
- tSend.txt="event,startup,"+tVersion.txt+",eu"
+ tSend.txt="event,startup,"+tVersion.txt+",us-p"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC

View File

@@ -0,0 +1,803 @@
diff -bur HMI/n2t-out/Program.s.txt HMI/US/portrait/n2t-out/Program.s.txt
--- HMI/n2t-out/Program.s.txt 2022-04-03 07:35:47.898571291 +0000
+++ HMI/US/portrait/n2t-out/Program.s.txt 2022-04-03 07:35:48.266571453 +0000
@@ -11,6 +11,6 @@
// dim value
int dimValue=40
int dimValueNormal=100
- // fix touch offset
- lcd_dev fffb 0002 0000 0020
+ // fix touch offset (Removed for US version)
+ //lcd_dev fffb 0002 0000 0020
page pageStartup
diff -bur HMI/n2t-out/cardEntities.txt HMI/US/portrait/n2t-out/cardEntities.txt
--- HMI/n2t-out/cardEntities.txt 2022-04-03 07:35:47.902571293 +0000
+++ HMI/US/portrait/n2t-out/cardEntities.txt 2022-04-03 07:35:48.266571453 +0000
@@ -62,6 +62,26 @@
vis bText4,0
vis hSlider4,0
vis nNum4,0
+ //ui e5
+ vis btOnOff5,0
+ vis bUp5,0
+ vis bStop5,0
+ vis bDown5,0
+ vis tIcon5,0
+ vis tEntity5,0
+ vis bText5,0
+ vis hSlider5,0
+ vis nNum5,0
+ //ui e6
+ vis btOnOff6,0
+ vis bUp6,0
+ vis bStop6,0
+ vis bDown6,0
+ vis tIcon6,0
+ vis tEntity6,0
+ vis bText6,0
+ vis hSlider6,0
+ vis nNum6,0
Variable (string) strCommand
Attributes
@@ -117,6 +137,30 @@
Text :
Max. Text Size: 70
+Variable (string) entn5
+ Attributes
+ Scope : local
+ Text :
+ Max. Text Size: 70
+
+Variable (string) entn6
+ Attributes
+ Scope : local
+ Text :
+ Max. Text Size: 70
+
+Variable (string) type5
+ Attributes
+ Scope : local
+ Text :
+ Max. Text Size: 10
+
+Variable (string) type6
+ Attributes
+ Scope : local
+ Text :
+ Max. Text Size: 10
+
Number nNum1
Attributes
Scope : local
@@ -153,6 +197,24 @@
Associated Keyboard : none
Value : 0
+Number nNum5
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ Associated Keyboard : none
+ Value : 0
+
+Number nNum6
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ Associated Keyboard : none
+ Value : 0
+
Text tHeading
Attributes
Scope : local
@@ -283,6 +345,46 @@
Text :
Max. Text Size : 50
+Text tEntity5
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ Associated Keyboard : none
+ Text : tEntity5
+ Max. Text Size : 30
+
+Text tIcon5
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ Associated Keyboard : none
+ Text : 
+ Max. Text Size : 5
+
+Text tEntity6
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ Associated Keyboard : none
+ Text : tEntity6
+ Max. Text Size : 30
+
+Text tIcon6
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ Associated Keyboard : none
+ Text : 
+ Max. Text Size : 5
+
Picture p0
Attributes
Scope : local
@@ -402,6 +504,62 @@
prints tSend.txt,0
prints crcval,2
+Slider hSlider5
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ Position : 50
+ Upper range limit : 100
+ Lower range limit : 0
+
+ Events
+ Touch Release Event
+ nNum5.val=hSlider5.val
+ tSend.txt="event,buttonPress2,"+entn5.txt+",number-set,"
+ covx nNum5.val,tTmp.txt,0,0
+ tSend.txt+=tTmp.txt
+ //send calc crc
+ btlen tSend.txt,sys0
+ crcrest 1,0xffff // reset CRC
+ crcputh 55 bb
+ crcputs sys0,1
+ crcputs tSend.txt,0
+ //send cmd
+ printh 55 bb
+ prints sys0,2
+ prints tSend.txt,0
+ prints crcval,2
+
+Slider hSlider6
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ Position : 50
+ Upper range limit : 100
+ Lower range limit : 0
+
+ Events
+ Touch Release Event
+ nNum6.val=hSlider6.val
+ tSend.txt="event,buttonPress2,"+entn6.txt+",number-set,"
+ covx nNum6.val,tTmp.txt,0,0
+ tSend.txt+=tTmp.txt
+ //send calc crc
+ btlen tSend.txt,sys0
+ crcrest 1,0xffff // reset CRC
+ crcputh 55 bb
+ crcputs sys0,1
+ crcputs tSend.txt,0
+ //send cmd
+ printh 55 bb
+ prints sys0,2
+ prints tSend.txt,0
+ prints crcval,2
+
Button bDown1
Attributes
Scope : local
@@ -859,6 +1017,206 @@
prints tSend.txt,0
prints crcval,2
+Button bStop5
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ State : unpressed
+ Text : 
+ Max. Text Size : 10
+
+ Events
+ Touch Press Event
+ tSend.txt="event,buttonPress2,"+entn5.txt+",stop"
+ //send calc crc
+ btlen tSend.txt,sys0
+ crcrest 1,0xffff // reset CRC
+ crcputh 55 bb
+ crcputs sys0,1
+ crcputs tSend.txt,0
+ //send cmd
+ printh 55 bb
+ prints sys0,2
+ prints tSend.txt,0
+ prints crcval,2
+
+Button bDown5
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ State : unpressed
+ Text : 
+ Max. Text Size : 10
+
+ Events
+ Touch Press Event
+ tSend.txt="event,buttonPress2,"+entn5.txt+",down"
+ //send calc crc
+ btlen tSend.txt,sys0
+ crcrest 1,0xffff // reset CRC
+ crcputh 55 bb
+ crcputs sys0,1
+ crcputs tSend.txt,0
+ //send cmd
+ printh 55 bb
+ prints sys0,2
+ prints tSend.txt,0
+ prints crcval,2
+
+Button bUp5
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ State : unpressed
+ Text : 
+ Max. Text Size : 10
+
+ Events
+ Touch Press Event
+ tSend.txt="event,buttonPress2,"+entn5.txt+",up"
+ //send calc crc
+ btlen tSend.txt,sys0
+ crcrest 1,0xffff // reset CRC
+ crcputh 55 bb
+ crcputs sys0,1
+ crcputs tSend.txt,0
+ //send cmd
+ printh 55 bb
+ prints sys0,2
+ prints tSend.txt,0
+ prints crcval,2
+
+Button bText5
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ State : unpressed
+ Text : newtxt
+ Max. Text Size : 10
+
+ Events
+ Touch Press Event
+ tSend.txt="event,buttonPress2,"+entn5.txt+",button"
+ //send calc crc
+ btlen tSend.txt,sys0
+ crcrest 1,0xffff // reset CRC
+ crcputh 55 bb
+ crcputs sys0,1
+ crcputs tSend.txt,0
+ //send cmd
+ printh 55 bb
+ prints sys0,2
+ prints tSend.txt,0
+ prints crcval,2
+
+Button bStop6
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ State : unpressed
+ Text : 
+ Max. Text Size : 10
+
+ Events
+ Touch Press Event
+ tSend.txt="event,buttonPress2,"+entn6.txt+",stop"
+ //send calc crc
+ btlen tSend.txt,sys0
+ crcrest 1,0xffff // reset CRC
+ crcputh 55 bb
+ crcputs sys0,1
+ crcputs tSend.txt,0
+ //send cmd
+ printh 55 bb
+ prints sys0,2
+ prints tSend.txt,0
+ prints crcval,2
+
+Button bDown6
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ State : unpressed
+ Text : 
+ Max. Text Size : 10
+
+ Events
+ Touch Press Event
+ tSend.txt="event,buttonPress2,"+entn6.txt+",down"
+ //send calc crc
+ btlen tSend.txt,sys0
+ crcrest 1,0xffff // reset CRC
+ crcputh 55 bb
+ crcputs sys0,1
+ crcputs tSend.txt,0
+ //send cmd
+ printh 55 bb
+ prints sys0,2
+ prints tSend.txt,0
+ prints crcval,2
+
+Button bUp6
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ State : unpressed
+ Text : 
+ Max. Text Size : 10
+
+ Events
+ Touch Press Event
+ tSend.txt="event,buttonPress2,"+entn6.txt+",up"
+ //send calc crc
+ btlen tSend.txt,sys0
+ crcrest 1,0xffff // reset CRC
+ crcputh 55 bb
+ crcputs sys0,1
+ crcputs tSend.txt,0
+ //send cmd
+ printh 55 bb
+ prints sys0,2
+ prints tSend.txt,0
+ prints crcval,2
+
+Button bText6
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ State : unpressed
+ Text : newtxt
+ Max. Text Size : 10
+
+ Events
+ Touch Press Event
+ tSend.txt="event,buttonPress2,"+entn6.txt+",button"
+ //send calc crc
+ btlen tSend.txt,sys0
+ crcrest 1,0xffff // reset CRC
+ crcputh 55 bb
+ crcputs sys0,1
+ crcputs tSend.txt,0
+ //send cmd
+ printh 55 bb
+ prints sys0,2
+ prints tSend.txt,0
+ prints crcval,2
+
Dual-state Button btOnOff1
Attributes
Scope : local
@@ -967,6 +1325,60 @@
prints tSend.txt,0
prints crcval,2
+Dual-state Button btOnOff5
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ State : unpressed
+ Text :
+ Max. Text Size : 10
+
+ Events
+ Touch Press Event
+ tSend.txt="event,buttonPress2,"+entn5.txt+",OnOff,"
+ covx btOnOff5.val,tTmp.txt,0,0
+ tSend.txt+=tTmp.txt
+ //send calc crc
+ btlen tSend.txt,sys0
+ crcrest 1,0xffff // reset CRC
+ crcputh 55 bb
+ crcputs sys0,1
+ crcputs tSend.txt,0
+ //send cmd
+ printh 55 bb
+ prints sys0,2
+ prints tSend.txt,0
+ prints crcval,2
+
+Dual-state Button btOnOff6
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ State : unpressed
+ Text :
+ Max. Text Size : 10
+
+ Events
+ Touch Press Event
+ tSend.txt="event,buttonPress2,"+entn6.txt+",OnOff,"
+ covx btOnOff6.val,tTmp.txt,0,0
+ tSend.txt+=tTmp.txt
+ //send calc crc
+ btlen tSend.txt,sys0
+ crcrest 1,0xffff // reset CRC
+ crcputh 55 bb
+ crcputs sys0,1
+ crcputs tSend.txt,0
+ //send cmd
+ printh 55 bb
+ prints sys0,2
+ prints tSend.txt,0
+ prints crcval,2
+
Hotspot mSpecial
Attributes
Scope : local
@@ -1072,6 +1484,50 @@
page popupLight
}
+Hotspot m4
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+
+ Events
+ Touch Press Event
+ pageIcons.tTmp1.txt=tEntity5.txt
+ pageIcons.tTmp2.txt=entn5.txt
+ if(type5.txt=="shutter")
+ {
+ //popupShutter.tHeading.txt=tEntity5.txt
+ page popupShutter
+ }
+ if(type5.txt=="light")
+ {
+ //popupLight.tEntity.txt=tEntity5.txt
+ page popupLight
+ }
+
+Hotspot m5
+ Attributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+
+ Events
+ Touch Press Event
+ pageIcons.tTmp1.txt=tEntity6.txt
+ pageIcons.tTmp2.txt=entn6.txt
+ if(type6.txt=="shutter")
+ {
+ //popupShutter.tHeading.txt=tEntity6.txt
+ page popupShutter
+ }
+ if(type6.txt=="light")
+ {
+ //popupLight.tEntity.txt=tEntity6.txt
+ page popupLight
+ }
+
Timer tmSerial
Attributes
Scope : local
@@ -1650,6 +2106,254 @@
covx tTmp.txt,sys0,0,0
hSlider4.maxval=sys0
}
+ // get Type
+ spstr strCommand.txt,type5.txt,"~",27
+ // get internal name
+ spstr strCommand.txt,entn5.txt,"~",28
+ if(type5.txt=="delete"||type5.txt=="")
+ {
+ vis bUp5,0
+ vis bStop5,0
+ vis bDown5,0
+ vis btOnOff5,0
+ vis tEntity5,0
+ vis tIcon5,0
+ vis bText5,0
+ vis hSlider5,0
+ vis nNum5,0
+ }else
+ {
+ // change icon
+ spstr strCommand.txt,tTmp.txt,"~",29
+ covx tTmp.txt,sys0,0,0
+ substr pageIcons.tIcons.txt,tIcon5.txt,sys0,1
+ vis tIcon5,1
+ // change icon color
+ spstr strCommand.txt,tTmp.txt,"~",30
+ covx tTmp.txt,sys0,0,0
+ tIcon5.pco=sys0
+ // set name
+ spstr strCommand.txt,tEntity5.txt,"~",31
+ vis tEntity5,1
+ }
+ if(type5.txt=="shutter")
+ {
+ vis bUp5,1
+ vis bStop5,1
+ vis bDown5,1
+ vis btOnOff5,0
+ vis bText5,0
+ vis hSlider5,0
+ vis nNum5,0
+ }
+ if(type5.txt=="light")
+ {
+ vis bUp5,0
+ vis bStop5,0
+ vis bDown5,0
+ vis btOnOff5,1
+ vis bText5,0
+ vis hSlider5,0
+ vis nNum5,0
+ // get Button State (optional Value)
+ spstr strCommand.txt,tTmp.txt,"~",32
+ covx tTmp.txt,sys0,0,0
+ btOnOff5.val=sys0
+ }
+ if(type5.txt=="switch")
+ {
+ vis bUp5,0
+ vis bStop5,0
+ vis bDown5,0
+ vis btOnOff5,1
+ vis bText5,0
+ vis hSlider5,0
+ vis nNum5,0
+ // get Button State (optional Value)
+ spstr strCommand.txt,tTmp.txt,"~",32
+ covx tTmp.txt,sys0,0,0
+ btOnOff5.val=sys0
+ }
+ if(type5.txt=="text")
+ {
+ vis bUp5,0
+ vis bStop5,0
+ vis bDown5,0
+ vis btOnOff5,0
+ vis bText5,1
+ tsw bText5,0
+ vis hSlider5,0
+ vis nNum5,0
+ bText5.pco=65535
+ bText5.pco2=65535
+ // get Text (optional Value)
+ spstr strCommand.txt,bText5.txt,"~",32
+ }
+ if(type5.txt=="button")
+ {
+ vis bUp5,0
+ vis bStop5,0
+ vis bDown5,0
+ vis btOnOff5,0
+ vis bText5,1
+ tsw bText5,1
+ vis hSlider5,0
+ vis nNum5,0
+ bText5.pco=1374
+ bText5.pco2=1374
+ // get Text (optional Value)
+ spstr strCommand.txt,bText5.txt,"~",32
+ }
+ if(type5.txt=="number")
+ {
+ vis bUp5,0
+ vis bStop5,0
+ vis bDown5,0
+ vis btOnOff5,0
+ vis bText5,0
+ tsw bText5,0
+ vis hSlider5,1
+ vis nNum5,1
+ // get config (optional Value) (use bText as variable)
+ spstr strCommand.txt,bText5.txt,"~",32
+ //first value is current value
+ spstr bText5.txt,tTmp.txt,"|",0
+ covx tTmp.txt,sys0,0,0
+ hSlider5.val=sys0
+ nNum5.val=sys0
+ //second value is min value
+ spstr bText5.txt,tTmp.txt,"|",1
+ covx tTmp.txt,sys0,0,0
+ hSlider5.minval=sys0
+ //third value is max value
+ spstr bText5.txt,tTmp.txt,"|",2
+ covx tTmp.txt,sys0,0,0
+ hSlider5.maxval=sys0
+ }
+ // get Type
+ spstr strCommand.txt,type6.txt,"~",33
+ // get internal name
+ spstr strCommand.txt,entn6.txt,"~",34
+ if(type6.txt=="delete"||type6.txt=="")
+ {
+ vis bUp6,0
+ vis bStop6,0
+ vis bDown6,0
+ vis btOnOff6,0
+ vis tEntity6,0
+ vis tIcon6,0
+ vis bText6,0
+ vis hSlider6,0
+ vis nNum6,0
+ }else
+ {
+ // change icon
+ spstr strCommand.txt,tTmp.txt,"~",35
+ covx tTmp.txt,sys0,0,0
+ substr pageIcons.tIcons.txt,tIcon6.txt,sys0,1
+ vis tIcon6,1
+ // change icon color
+ spstr strCommand.txt,tTmp.txt,"~",36
+ covx tTmp.txt,sys0,0,0
+ tIcon6.pco=sys0
+ // set name
+ spstr strCommand.txt,tEntity6.txt,"~",37
+ vis tEntity6,1
+ }
+ if(type6.txt=="shutter")
+ {
+ vis bUp6,1
+ vis bStop6,1
+ vis bDown6,1
+ vis btOnOff6,0
+ vis bText6,0
+ vis hSlider6,0
+ vis nNum6,0
+ }
+ if(type6.txt=="light")
+ {
+ vis bUp6,0
+ vis bStop6,0
+ vis bDown6,0
+ vis btOnOff6,1
+ vis bText6,0
+ vis hSlider6,0
+ vis nNum6,0
+ // get Button State (optional Value)
+ spstr strCommand.txt,tTmp.txt,"~",38
+ covx tTmp.txt,sys0,0,0
+ btOnOff6.val=sys0
+ }
+ if(type6.txt=="switch")
+ {
+ vis bUp6,0
+ vis bStop6,0
+ vis bDown6,0
+ vis btOnOff6,1
+ vis bText6,0
+ vis hSlider6,0
+ vis nNum6,0
+ // get Button State (optional Value)
+ spstr strCommand.txt,tTmp.txt,"~",38
+ covx tTmp.txt,sys0,0,0
+ btOnOff6.val=sys0
+ }
+ if(type6.txt=="text")
+ {
+ vis bUp6,0
+ vis bStop6,0
+ vis bDown6,0
+ vis btOnOff6,0
+ vis bText6,1
+ tsw bText6,0
+ vis hSlider6,0
+ vis nNum6,0
+ bText6.pco=65535
+ bText6.pco2=65535
+ // get Text (optional Value)
+ spstr strCommand.txt,bText6.txt,"~",38
+ }
+ if(type6.txt=="button")
+ {
+ vis bUp6,0
+ vis bStop6,0
+ vis bDown6,0
+ vis btOnOff6,0
+ vis bText6,1
+ tsw bText6,1
+ vis hSlider6,0
+ vis nNum6,0
+ bText6.pco=1374
+ bText6.pco2=1374
+ // get Text (optional Value)
+ spstr strCommand.txt,bText6.txt,"~",38
+ }
+ if(type6.txt=="number")
+ {
+ vis bUp6,0
+ vis bStop6,0
+ vis bDown6,0
+ vis btOnOff6,0
+ vis bText6,0
+ tsw bText6,0
+ vis hSlider6,1
+ vis nNum6,1
+ // get config (optional Value) (use bText as variable)
+ spstr strCommand.txt,bText6.txt,"~",38
+ //first value is current value
+ spstr bText6.txt,tTmp.txt,"|",0
+ covx tTmp.txt,sys0,0,0
+ hSlider6.val=sys0
+ nNum6.val=sys0
+ //second value is min value
+ spstr bText6.txt,tTmp.txt,"|",1
+ covx tTmp.txt,sys0,0,0
+ hSlider6.minval=sys0
+ //third value is max value
+ spstr bText6.txt,tTmp.txt,"|",2
+ covx tTmp.txt,sys0,0,0
+ hSlider6.maxval=sys0
+ }
}
if(tInstruction.txt=="pageType")
{
diff -bur HMI/n2t-out/pageStartup.txt HMI/US/portrait/n2t-out/pageStartup.txt
--- HMI/n2t-out/pageStartup.txt 2022-04-03 07:35:47.902571293 +0000
+++ HMI/US/portrait/n2t-out/pageStartup.txt 2022-04-03 07:35:48.266571453 +0000
@@ -142,7 +142,7 @@
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
- Text : please check your backend configuration
+ Text : pls check your backend configuration
Max. Text Size : 100
Text tVersion
@@ -177,7 +177,7 @@
recmod=1
bauds=115200
// startup event
- tSend.txt="event,startup,"+tVersion.txt+",eu"
+ tSend.txt="event,startup,"+tVersion.txt+",us-p"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC

View File

@@ -0,0 +1,16 @@
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 //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 bufferPos=0
int recvCrc=0
int payloadLength=0
int par0=0,par1=0
// sleep timeout in s
int sleepTimeout=20
int sleepValue=0
// dim value
int dimValue=40
int dimValueNormal=100
// fix touch offset (Removed for US version)
//lcd_dev fffb 0002 0000 0020
page pageStartup

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,62 @@
Program.s
0 Component(s)
10 Line(s) of event code
10 Unique line(s) of event code
pageSerialTest
13 Component(s)
48 Line(s) of event code
43 Unique line(s) of event code
pageIcons
7 Component(s)
0 Line(s) of event code
0 Unique line(s) of event code
pageStartup
19 Component(s)
150 Line(s) of event code
113 Unique line(s) of event code
popupNotify
17 Component(s)
178 Line(s) of event code
117 Unique line(s) of event code
pageTest
13 Component(s)
13 Line(s) of event code
13 Unique line(s) of event code
popupLight
27 Component(s)
322 Line(s) of event code
173 Unique line(s) of event code
screensaver
33 Component(s)
207 Line(s) of event code
158 Unique line(s) of event code
cardMedia
30 Component(s)
333 Line(s) of event code
170 Unique line(s) of event code
popupShutter
19 Component(s)
178 Line(s) of event code
101 Unique line(s) of event code
cardAlarm
35 Component(s)
345 Line(s) of event code
214 Unique line(s) of event code
cardGrid
39 Component(s)
430 Line(s) of event code
249 Unique line(s) of event code
cardThermo
41 Component(s)
460 Line(s) of event code
284 Unique line(s) of event code
cardEntities
86 Component(s)
1362 Line(s) of event code
553 Unique line(s) of event code
Total
13 Page(s)
379 Component(s)
4036 Line(s) of event code
1153 Unique line(s) of event code

View File

@@ -0,0 +1,141 @@
Page pageIcons
Attributes
ID : 0
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
Width : 320
Effect : load
Effect Priority : 0
Effect Time : 300
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Fill : solid color
Back. Color : 65535
Variable (string) vaTime
Attributes
ID : 5
Scope : global
Text :
Max. Text Size: 15
Variable (string) vaDate
Attributes
ID : 6
Scope : global
Text :
Max. Text Size: 35
Text tIcons
Attributes
ID : 2
Scope : global
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 15
y coordinate : 161
Width : 295
Height : 285
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 1
Back. Color : 65535
Font Color : 0
Horizontal Alignment : left
Vertical Alignment : top
Input Type : character
Text : 
Max. Text Size : 170
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tTmp1
Attributes
ID : 3
Scope : global
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 86
y coordinate : 3
Width : 146
Height : 69
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 1
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 50
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tTmp2
Attributes
ID : 4
Scope : global
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 86
y coordinate : 73
Width : 146
Height : 69
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 1
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 50
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Picture p0
Attributes
ID : 1
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 0
Width : 319
Height : 479
Effect : load
Effect Priority : 0
Effect Time : 300
Picture ID : 0

View File

@@ -0,0 +1,434 @@
Page pageSerialTest
Attributes
ID : 0
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
Width : 320
Effect : load
Effect Priority : 0
Effect Time : 300
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Fill : solid color
Back. Color : 65535
Events
Preinitialize Event
//vis p0,0
//recmod=1
//bauds=115200
Number nCrcRecv
Attributes
ID : 5
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 5
y coordinate : 205
Width : 88
Height : 29
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 4
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Value : 0
Significant digits shown : all
Format : decimal with digit grouping
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Number nCrcCalc
Attributes
ID : 6
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 4
y coordinate : 236
Width : 90
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 4
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Value : 0
Significant digits shown : all
Format : decimal with digit grouping
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Number nIt
Attributes
ID : 11
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 181
y coordinate : 168
Width : 52
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 4
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Value : 0
Significant digits shown : all
Format : decimal
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Number nLength
Attributes
ID : 12
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 181
y coordinate : 78
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Value : 0
Significant digits shown : all
Format : decimal
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tStatus
Attributes
ID : 3
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 5
y coordinate : 267
Width : 271
Height : 90
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 4
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : newtxt
Max. Text Size : 100
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tCmd
Attributes
ID : 4
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 5
y coordinate : 358
Width : 272
Height : 80
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 4
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : newtxt
Max. Text Size : 500
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tBuffer
Attributes
ID : 7
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 5
y coordinate : 443
Width : 310
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 4
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : newtxt
Max. Text Size : 100
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tDesc
Attributes
ID : 8
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 0
Width : 159
Height : 204
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 4
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : CRC Recv:\r\nCRC Calc:\r\n\r\nStatus\r\n\r\nCommand
Max. Text Size : 60
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Picture p0
Attributes
ID : 1
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 0
Width : 319
Height : 479
Effect : load
Effect Priority : 0
Effect Time : 300
Picture ID : 0
Button b0
Attributes
ID : 9
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 181
y coordinate : 9
Width : 46
Height : 46
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 4
Back. Color : 50712
Back. Picture ID (Pressed) : 0
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : bck
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
recmod=0
page pageTest
Button b1
Attributes
ID : 10
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 249
y coordinate : 9
Width : 48
Height : 48
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 4
Back. Color : 50712
Back. Picture ID (Pressed) : 0
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : ON
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
recmod=1
bauds=115200
Timer tmSerial
Attributes
ID : 2
Scope : local
Period (ms): 400
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
tStatus.txt="init command detected"
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
//payloadLength=u[2]
ucopy payloadLength,2,2,0
nLength.val=payloadLength
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
tStatus.txt="reached"
// calculate crc
crcrest 1,0xFFFF
// payload length -1 to exclude crc
crcputu 0,payloadLength-1 //u[2]+3
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
nCrcRecv.val=recvCrc
// compare crc with recived value
if(crcval==recvCrc)
{
tStatus.txt="crc ok"
nIt.val=nIt.val+1
ucopy tCmd.txt,4,payloadLength-5,0
udelete payloadLength-1
bufferPos=0
// here is the location where acual code should be
}
// copy calculated crc and recived crc to nCrcRecv and nCrcCalc, for debugging
nCrcRecv.val=recvCrc
nCrcCalc.val=crcval
//ucopy nCrcCalc.val,u[2]+3,3,0
}
}
}
// next character
bufferPos++
}
if(bufferPos==usize)
{
// copy whole buffer to tCmd.txt, for debugging
//ucopy tBuffer.txt,0,usize,0
// ucopy nIt.val,0,usize,0
// clear whole buffer
//code_c
//bufferPos=0
}
}

View File

@@ -0,0 +1,668 @@
Page pageStartup
Attributes
ID : 0
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
Width : 320
Effect : load
Effect Priority : 0
Effect Time : 300
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Fill : solid color
Back. Color : 6371
Events
Preinitialize Event
vis p0,0
recmod=1
bauds=115200
vis tSend,0
vis tInstruction,0
vis tTmp,0
vis tId,0
vis bSendStartup,0
vis frame_ptr,0
vis spinner_w,0
vis frapic_w,0
vis usual_cnt,0
vis tMsg2,0
vis tMsg3,0
vis tVersion,0
dim=100
Postinitialize Event
//send messages by clicking button
click bSendStartup,1
Variable (string) strCommand
Attributes
ID : 5
Scope : local
Text :
Max. Text Size: 50
Number frame_ptr
Attributes
ID : 10
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 6
y coordinate : 78
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Value : 0
Significant digits shown : all
Format : decimal
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Number spinner_w
Attributes
ID : 11
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 6
y coordinate : 111
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Value : 140
Significant digits shown : all
Format : decimal
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Number frapic_w
Attributes
ID : 12
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 6
y coordinate : 144
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Value : 1960
Significant digits shown : all
Format : decimal
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Number usual_cnt
Attributes
ID : 15
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 7
y coordinate : 178
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Value : 0
Significant digits shown : all
Format : decimal
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tSend
Attributes
ID : 2
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 0
Width : 230
Height : 23
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : newtxt
Max. Text Size : 100
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tTmp
Attributes
ID : 3
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 127
y coordinate : 24
Width : 34
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tInstruction
Attributes
ID : 6
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 163
y coordinate : 0
Width : 119
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 20
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tId
Attributes
ID : 7
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 25
Width : 125
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 20
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tMsg1
Attributes
ID : 8
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 399
Width : 320
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 1
Back. Color : 6371
Font Color : 65535
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : Waiting for content ...
Max. Text Size : 40
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tMsg2
Attributes
ID : 13
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 432
Width : 320
Height : 25
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 6371
Font Color : 65535
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : This is taking longer than usual,
Max. Text Size : 100
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tMsg3
Attributes
ID : 14
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 454
Width : 320
Height : 25
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 6371
Font Color : 65535
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : pls check your backend configuration
Max. Text Size : 100
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tVersion
Attributes
ID : 18
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 240
y coordinate : 138
Width : 78
Height : 72
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : 28
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Picture p0
Attributes
ID : 1
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 0
Width : 319
Height : 479
Effect : load
Effect Priority : 0
Effect Time : 300
Picture ID : 0
Button bSendStartup
Attributes
ID : 17
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 254
y coordinate : 87
Width : 63
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 0
Back. Color : 50712
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : startup
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
recmod=1
bauds=115200
// startup event
tSend.txt="event,startup,"+tVersion.txt+",us-p"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Hotspot mSpinner
Attributes
ID : 16
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 89
y coordinate : 226
Width : 140
Height : 140
Effect : load
Effect Priority : 0
Effect Time : 300
Events
Touch Press Event
sys2=sys2+1
sys2%=10
//n0.val=sys2
if(sys2==9)
{
page pageTest
}
Timer tmSerial
Attributes
ID : 4
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
ucopy payloadLength,2,2,0
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
// calculate crc
crcrest 1,0xFFFF
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
//crcputu 3,u[2]
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
crcputu 0,payloadLength-1
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
// compare crc with recived value
if(crcval==recvCrc)
{
// crc is okay
// here is the location where acual code should be
// write command to variable strCommand
ucopy strCommand.txt,4,payloadLength-5,0
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
spstr strCommand.txt,tInstruction.txt,"~",0
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="pageType")
{
dim=100
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="cardThermo")
{
page cardThermo
}
if(tId.txt=="screensaver")
{
page screensaver
}
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
}
Timer tmSpinner
Attributes
ID : 9
Scope : local
Period (ms): 80
Enabled : yes
Events
Timer Event
xpic mSpinner.x,mSpinner.y,spinner_w.val,140,frame_ptr.val,0,11 // draw the current frame
frame_ptr.val+=spinner_w.val%frapic_w.val // advance the pointer to the next frame in the pic resource and roll over at the end
doevents // finish drawing before next timer event triggers
if(frame_ptr.val==1820)
{
usual_cnt.val+=1
sys0=usual_cnt.val%5
if(sys0==0)
{
// retry sending startup messages by clicking button
click bSendStartup,1
}
}
if(usual_cnt.val==10)
{
vis tMsg2,1
vis tMsg3,1
}

View File

@@ -0,0 +1,438 @@
Page pageTest
Attributes
ID : 0
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
Width : 320
Effect : load
Effect Priority : 0
Effect Time : 300
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Fill : solid color
Back. Color : 4226
Events
Preinitialize Event
vis p0,0
Picture p0
Attributes
ID : 1
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 0
Width : 319
Height : 479
Effect : load
Effect Priority : 0
Effect Time : 300
Picture ID : 0
Button b0
Attributes
ID : 2
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 35
y coordinate : 20
Width : 100
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 4
Back. Color : 50712
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : entities
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
page cardEntities
Button b1
Attributes
ID : 3
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 190
y coordinate : 380
Width : 100
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 4
Back. Color : 50712
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : serial
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
page pageSerialTest
Button b3
Attributes
ID : 4
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 35
y coordinate : 380
Width : 100
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 4
Back. Color : 50712
Back. Picture ID (Pressed) : 0
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : disable recmod
Max. Text Size : 20
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
recmod=0
Button b6
Attributes
ID : 5
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 34
y coordinate : 92
Width : 100
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 4
Back. Color : 50712
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : shutter
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
page popupShutter
Button b4
Attributes
ID : 6
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 35
y coordinate : 164
Width : 100
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 4
Back. Color : 50712
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : light
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
page popupLight
Button b5
Attributes
ID : 7
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 184
y coordinate : 20
Width : 100
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 4
Back. Color : 50712
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : thermo
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
page cardThermo
Button b7
Attributes
ID : 8
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 186
y coordinate : 92
Width : 100
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 4
Back. Color : 50712
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : media
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
page cardMedia
Button b8
Attributes
ID : 9
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 188
y coordinate : 308
Width : 100
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 4
Back. Color : 50712
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : screens
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
dimValue=50
page screensaver
Button b9
Attributes
ID : 10
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 34
y coordinate : 236
Width : 100
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 4
Back. Color : 50712
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : notify
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
page popupNotify
Button b10
Attributes
ID : 11
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 188
y coordinate : 164
Width : 100
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 4
Back. Color : 50712
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : alarm
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
page cardAlarm
Button b11
Attributes
ID : 12
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 190
y coordinate : 236
Width : 100
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 4
Back. Color : 50712
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : grid
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
page cardGrid

View File

@@ -0,0 +1,978 @@
Page popupLight
Attributes
ID : 0
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
Width : 320
Effect : load
Effect Priority : 0
Effect Time : 300
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Fill : solid color
Back. Color : 6371
Events
Preinitialize Event
//get entitiy name
tEntity.txt=pageIcons.tTmp1.txt
//get entity id
entn.txt=pageIcons.tTmp2.txt
vis p0,0
vis tSend,0
vis tTmp,0
vis tInstruction,0
vis tId,0
//page open event
// event,pageOpenDetail,typeOfPage,tEntityName
// craft command
tSend.txt="event,pageOpenDetail,popupLight,"+entn.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
//disable brightness by default
vis t1,0
vis t2,0
vis hBrightness,0
//disable color temp by default
vis t4,0
vis t3,0
vis hTempSlider,0
//disable color wheel components by default
vis bColor,0
vis t0,0
vis pColorWheel,0
//vis t0,0
Variable (string) strCommand
Attributes
ID : 17
Scope : local
Text :
Max. Text Size: 100
Variable (string) entn
Attributes
ID : 21
Scope : local
Text : newtxt
Max. Text Size: 50
Variable (int32) mode
Attributes
ID : 23
Scope: local
Value: 1
Variable (int32) mode_temp
Attributes
ID : 24
Scope: local
Value: 0
Text tEntity
Attributes
ID : 3
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 60
y coordinate : 21
Width : 200
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 6371
Font Color : 65535
Horizontal Alignment : left
Vertical Alignment : center
Input Type : character
Text : tEntity1
Max. Text Size : 25
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tIcon1
Attributes
ID : 4
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 11
y coordinate : 21
Width : 45
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 1
Back. Color : 6371
Font Color : 17299
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : 
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text t1
Attributes
ID : 6
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 10
y coordinate : 319
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 6371
Font Color : 65535
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : Brightness
Max. Text Size : 15
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text t2
Attributes
ID : 9
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 10
y coordinate : 360
Width : 45
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 1
Back. Color : 6371
Font Color : 40147
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : 
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text t3
Attributes
ID : 10
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 10
y coordinate : 274
Width : 45
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 1
Back. Color : 6371
Font Color : 40147
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : 
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text t4
Attributes
ID : 11
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 9
y coordinate : 234
Width : 116
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 6371
Font Color : 65535
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : Temperature
Max. Text Size : 15
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tSend
Attributes
ID : 12
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 5
y coordinate : 5
Width : 300
Height : 7
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : newtxt
Max. Text Size : 100
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tTmp
Attributes
ID : 13
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 282
y coordinate : 412
Width : 34
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tInstruction
Attributes
ID : 18
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 416
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 20
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tId
Attributes
ID : 19
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 100
y coordinate : 416
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 20
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text t0
Attributes
ID : 25
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 12
y coordinate : 57
Width : 64
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 6371
Font Color : 65535
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : Color
Max. Text Size : 15
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Picture p0
Attributes
ID : 1
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 0
Width : 319
Height : 479
Effect : load
Effect Priority : 0
Effect Time : 300
Picture ID : 0
Picture pColorWheel
Attributes
ID : 2
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 160
y coordinate : 69
Width : 160
Height : 160
Effect : load
Effect Priority : 0
Effect Time : 300
Picture ID : 3
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",colorWheel,"
sys0=tch0
sys0=sys0-pColorWheel.x
covx sys0,tTmp.txt,0,0
tSend.txt+=tTmp.txt
tSend.txt+="|"
sys0=tch1
sys0=sys0-pColorWheel.y
covx sys0,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Slider hBrightness
Attributes
ID : 7
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 61
y coordinate : 354
Width : 250
Height : 43
Effect : load
Effect Priority : 0
Effect Time : 300
Direction : horizontal
Fill : image
Cursor width : auto
Cursor height : 255
Back. Picture ID : 5
Slided Back. Picture ID : 4
Position : 50
Upper range limit : 100
Lower range limit : 0
Events
Touch Release Event
tmCooldown.en=1
tmCooldown.tim=2500
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",brightnessSlider,"
covx hBrightness.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Slider hTempSlider
Attributes
ID : 20
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 61
y coordinate : 271
Width : 250
Height : 44
Effect : load
Effect Priority : 0
Effect Time : 300
Direction : horizontal
Fill : image
Cursor width : auto
Cursor height : 255
Back. Picture ID : 8
Slided Back. Picture ID : 10
Position : 50
Upper range limit : 100
Lower range limit : 0
Events
Touch Release Event
tmCooldown.en=1
tmCooldown.tim=2500
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",colorTempSlider,"
covx hTempSlider.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button b0
Attributes
ID : 5
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 266
y coordinate : 14
Width : 50
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Font ID : 1
Back. Color : 6371
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 14823
Font Color (Unpressed) : 65535
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : 
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
tSend.txt="event,buttonPress2,popupLight,bExit"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bColor
Attributes
ID : 22
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 83
y coordinate : 57
Width : 50
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Font ID : 1
Back. Color : 6371
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 14823
Font Color (Unpressed) : 65535
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : 
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
if(mode.val==1)
{
mode.val=0
//enable color wheel
vis pColorWheel,1
//disable color temp
vis t4,0
vis t3,0
vis hTempSlider,0
}else
{
mode.val=1
//disable color wheel
vis pColorWheel,0
if(mode_temp.val==1)
{
//enable color temp
vis t4,1
vis t3,1
vis hTempSlider,1
}
}
Dual-state Button btOnOff1
Attributes
ID : 8
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 12
y coordinate : 142
Width : 50
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : image
Font ID : 0
Background Picture ID (Unpressed) : 1
Back. Picture ID (Pressed) : 2
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text :
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+","+"OnOff,"
covx btOnOff1.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Timer tmSleep
Attributes
ID : 15
Scope : local
Period (ms): 1000
Enabled : yes
Events
Timer Event
if(sleepTimeout!=0)
{
sleepValue+=1
if(sleepTimeout<=sleepValue)
{
sleepValue=0
click b0,1
click b0,0
}
}
Timer tmSerial
Attributes
ID : 16
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
ucopy payloadLength,2,2,0
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
// calculate crc
crcrest 1,0xFFFF
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
//crcputu 3,u[2]
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
crcputu 0,payloadLength-1
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
// compare crc with recived value
if(crcval==recvCrc)
{
// crc is okay
// here is the location where acual code should be
// write command to variable strCommand
ucopy strCommand.txt,4,payloadLength-5,0
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
spstr strCommand.txt,tInstruction.txt,"~",0
if(tInstruction.txt=="entityUpdateDetail")
{
// change icon
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tIcon1.txt,sys0,1
vis tIcon1,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",2
covx tTmp.txt,sys0,0,0
tIcon1.pco=sys0
// get Button State
spstr strCommand.txt,tTmp.txt,"~",3
covx tTmp.txt,sys0,0,0
btOnOff1.val=sys0
// get Brightness value
spstr strCommand.txt,tTmp.txt,"~",4
if(tTmp.txt=="disable")
{
vis t1,0
vis t2,0
vis hBrightness,0
}else
{
vis t1,1
vis t2,1
vis hBrightness,1
covx tTmp.txt,sys0,0,0
if(tmCooldown.en==0)
{
hBrightness.val=sys0
}
}
// get ColorTemp value
spstr strCommand.txt,tTmp.txt,"~",5
if(tTmp.txt=="disable")
{
vis hTempSlider,0
vis t3,0
vis t4,0
mode_temp.val=0
// mode == 1 is temp controls currently shown
if(mode.val==1)
{
// switch mode
click bColor,1
click bColor,0
}
}else if(tTmp.txt=="unknown") // temp supported, but not in color mode
{
mode_temp.val=1
// mode == 1 is temp controls currently shown
if(mode.val==1)
{
// switch mode
click bColor,1
click bColor,0
}
}else
{
mode_temp.val=1
vis hTempSlider,1
vis t3,1
vis t4,1
if(tmCooldown.en==0)
{
covx tTmp.txt,sys0,0,0
hTempSlider.val=sys0
}
// mode == 0 is rgb controls currently shown
if(mode.val==0)
{
// switch mode
click bColor,1
click bColor,0
}
}
// get Color value
spstr strCommand.txt,tTmp.txt,"~",6
// disable -> isn't supported
if(tTmp.txt=="disable")
{
vis t0,0
vis bColor,0
vis pColorWheel,0
}else
{
vis t0,1
//only enable bColor button if color temp is also supported
if(mode_temp.val==1)
{
vis bColor,1
}
if(mode.val==0)
{
vis pColorWheel,1
}
}
}
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="pageType")
{
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
}
Timer tmCooldown
Attributes
ID : 26
Scope : local
Period (ms): 100
Enabled : no
Events
Timer Event
tmCooldown.en=0
TouchCap tc0
Attributes
ID : 14
Scope: local
Value: 0
Events
Touch Press Event
sleepValue=0

View File

@@ -0,0 +1,606 @@
Page popupNotify
Attributes
ID : 0
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
Width : 320
Effect : load
Effect Priority : 0
Effect Time : 300
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Fill : solid color
Back. Color : 6371
Events
Preinitialize Event
vis p0,0
vis tSend,0
vis tTmp,0
vis tInstruction,0
vis tId,0
Variable (string) strCommand
Attributes
ID : 8
Scope : local
Text :
Max. Text Size: 1000
Variable (string) entn
Attributes
ID : 15
Scope : local
Text :
Max. Text Size: 30
Variable (int32) vaOldSleepT
Attributes
ID : 16
Scope: local
Value: 0
Text tSend
Attributes
ID : 3
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 0
Width : 300
Height : 22
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : newtxt
Max. Text Size : 100
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tTmp
Attributes
ID : 4
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 281
y coordinate : 409
Width : 34
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tInstruction
Attributes
ID : 9
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 13
y coordinate : 409
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 20
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tId
Attributes
ID : 10
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 113
y coordinate : 410
Width : 100
Height : 29
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 20
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tHeading
Attributes
ID : 11
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 5
y coordinate : 21
Width : 260
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 1
Back. Color : 6371
Font Color : 65535
Horizontal Alignment : left
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 40
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tText
Attributes
ID : 12
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 5
y coordinate : 74
Width : 307
Height : 260
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 6371
Font Color : 65535
Horizontal Alignment : left
Vertical Alignment : top
Input Type : character
Text :
Max. Text Size : 500
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Picture p0
Attributes
ID : 1
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 0
Width : 319
Height : 479
Effect : load
Effect Priority : 0
Effect Time : 300
Picture ID : 0
Button b0
Attributes
ID : 2
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 268
y coordinate : 14
Width : 50
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Font ID : 1
Back. Color : 6371
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 14823
Font Color (Unpressed) : 65535
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : 
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
sleepTimeout=vaOldSleepT.val
tSend.txt="event,buttonPress2,popupNotify,bExit"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button b2
Attributes
ID : 13
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 162
y coordinate : 348
Width : 150
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Font ID : 1
Back. Color : 6371
Back. Picture ID (Pressed) : 9
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 65535
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text :
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
sleepTimeout=vaOldSleepT.val
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",notifyAction,yes"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button b1
Attributes
ID : 14
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 5
y coordinate : 348
Width : 150
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Font ID : 1
Back. Color : 6371
Back. Picture ID (Pressed) : 9
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 65535
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text :
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
sleepTimeout=vaOldSleepT.val
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",notifyAction,no"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Timer tmSleep
Attributes
ID : 6
Scope : local
Period (ms): 1000
Enabled : yes
Events
Timer Event
if(sleepTimeout!=0)
{
sleepValue+=1
if(sleepTimeout<=sleepValue)
{
sleepValue=0
click b0,1
click b0,0
}
}
Timer tmSerial
Attributes
ID : 7
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
ucopy payloadLength,2,2,0
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
// calculate crc
crcrest 1,0xFFFF
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
//crcputu 3,u[2]
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
crcputu 0,payloadLength-1
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
// compare crc with recived value
if(crcval==recvCrc)
{
// crc is okay
// here is the location where acual code should be
// write command to variable strCommand
ucopy strCommand.txt,4,payloadLength-5,0
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
spstr strCommand.txt,tInstruction.txt,"~",0
if(tInstruction.txt=="entityUpdateDetail")
{
// get entn
spstr strCommand.txt,entn.txt,"~",1
// get Heading
spstr strCommand.txt,tHeading.txt,"~",2
// heading color
spstr strCommand.txt,tTmp.txt,"~",3
covx tTmp.txt,sys0,0,0
tHeading.pco=sys0
// get b1
spstr strCommand.txt,b1.txt,"~",4
if(b1.txt!="")
{
vis b1,1
}
// b1 color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
b1.pco=sys0
// get b2
spstr strCommand.txt,b2.txt,"~",6
if(b2.txt!="")
{
vis b2,1
}
// b2 color
spstr strCommand.txt,tTmp.txt,"~",7
covx tTmp.txt,sys0,0,0
b2.pco=sys0
// get tText
spstr strCommand.txt,tText.txt,"~",8
// tText color
spstr strCommand.txt,tTmp.txt,"~",9
covx tTmp.txt,sys0,0,0
tText.pco=sys0
//preserve old sleepTimeout
vaOldSleepT.val=sleepTimeout
// sleep timeout
spstr strCommand.txt,tTmp.txt,"~",10
covx tTmp.txt,sys0,0,0
sleepTimeout=sys0
}
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="exitPopup")
{
click b0,1
}
if(tInstruction.txt=="pageType")
{
sleepTimeout=vaOldSleepT.val
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="cardThermo")
{
page cardThermo
}
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
if(bufferPos==usize)
{
// copy whole buffer to t1.txt, for debugging
//ucopy t2.txt,0,usize,0
// ucopy n2.val,0,usize,0
// clear whole buffer
//code_c
//bufferPos=0
}
}
TouchCap tc0
Attributes
ID : 5
Scope: local
Value: 0
Events
Touch Press Event
sleepValue=0

View File

@@ -0,0 +1,694 @@
Page popupShutter
Attributes
ID : 0
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
Width : 320
Effect : load
Effect Priority : 0
Effect Time : 300
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Fill : solid color
Back. Color : 6371
Events
Preinitialize Event
//get entitiy name
tEntity.txt=pageIcons.tTmp1.txt
//get entity id
entn.txt=pageIcons.tTmp2.txt
vis p0,0
vis tSend,0
vis tTmp,0
vis tInstruction,0
vis tId,0
//page open event
// event,pageOpenDetail,typeOfPage,tEntityName
// craft command
tSend.txt="event,pageOpenDetail,popupShutter,"+entn.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Variable (string) strCommand
Attributes
ID : 10
Scope : local
Text :
Max. Text Size: 50
Variable (string) entn
Attributes
ID : 18
Scope : local
Text : newtxt
Max. Text Size: 50
Text tEntity
Attributes
ID : 2
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 60
y coordinate : 21
Width : 195
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 6371
Font Color : 65535
Horizontal Alignment : left
Vertical Alignment : center
Input Type : character
Text : tEntity1
Max. Text Size : 25
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tIcon1
Attributes
ID : 3
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 11
y coordinate : 21
Width : 45
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 1
Back. Color : 6371
Font Color : 17299
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : 
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tSend
Attributes
ID : 5
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 0
Width : 300
Height : 22
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : newtxt
Max. Text Size : 100
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tTmp
Attributes
ID : 6
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 283
y coordinate : 411
Width : 34
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tInstruction
Attributes
ID : 11
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 5
y coordinate : 411
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 20
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tId
Attributes
ID : 12
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 105
y coordinate : 411
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 20
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text t1
Attributes
ID : 17
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 8
y coordinate : 168
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 6371
Font Color : 65535
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : Position
Max. Text Size : 15
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Picture p0
Attributes
ID : 1
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 0
Width : 319
Height : 479
Effect : load
Effect Priority : 0
Effect Time : 300
Picture ID : 0
Slider hPosition
Attributes
ID : 16
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 9
y coordinate : 198
Width : 250
Height : 43
Effect : load
Effect Priority : 0
Effect Time : 300
Direction : horizontal
Fill : image
Cursor width : auto
Cursor height : 255
Back. Picture ID : 5
Slided Back. Picture ID : 4
Position : 50
Upper range limit : 100
Lower range limit : 0
Events
Touch Release Event
// event,buttonPress2,internalNameEntity,positionSlider,50
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",positionSlider,"
covx hPosition.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button b0
Attributes
ID : 4
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 266
y coordinate : 14
Width : 50
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Font ID : 1
Back. Color : 6371
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 14823
Font Color (Unpressed) : 65535
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : 
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
tSend.txt="event,buttonPress2,popupShutter,bExit"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bDown1
Attributes
ID : 13
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 112
y coordinate : 88
Width : 50
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Font ID : 1
Back. Color : 6371
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 14823
Font Color (Unpressed) : 65535
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : 
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
tSend.txt="event,buttonPress2,"+entn.txt+",down"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bStop1
Attributes
ID : 14
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 60
y coordinate : 88
Width : 50
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Font ID : 1
Back. Color : 6371
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 14823
Font Color (Unpressed) : 65535
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : 
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
tSend.txt="event,buttonPress2,"+entn.txt+",stop"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bUp1
Attributes
ID : 15
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 8
y coordinate : 88
Width : 50
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Font ID : 1
Back. Color : 6371
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 14823
Font Color (Unpressed) : 65535
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : 
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
tSend.txt="event,buttonPress2,"+entn.txt+",up"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Timer tmSleep
Attributes
ID : 8
Scope : local
Period (ms): 1000
Enabled : yes
Events
Timer Event
if(sleepTimeout!=0)
{
sleepValue+=1
if(sleepTimeout<=sleepValue)
{
sleepValue=0
click b0,1
click b0,0
}
}
Timer tmSerial
Attributes
ID : 9
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
ucopy payloadLength,2,2,0
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
// calculate crc
crcrest 1,0xFFFF
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
//crcputu 3,u[2]
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
crcputu 0,payloadLength-1
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
// compare crc with recived value
if(crcval==recvCrc)
{
// crc is okay
// here is the location where acual code should be
// write command to variable strCommand
ucopy strCommand.txt,4,payloadLength-5,0
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
spstr strCommand.txt,tInstruction.txt,"~",0
if(tInstruction.txt=="entityUpdateDetail")
{
// get Position value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sys0,0,0
hPosition.val=sys0
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
}
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="pageType")
{
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
if(bufferPos==usize)
{
// copy whole buffer to t1.txt, for debugging
//ucopy t2.txt,0,usize,0
// ucopy n2.val,0,usize,0
// clear whole buffer
//code_c
//bufferPos=0
}
}
TouchCap tc0
Attributes
ID : 7
Scope: local
Value: 0
Events
Touch Press Event
sleepValue=0

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,16 @@
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 //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 bufferPos=0
int recvCrc=0
int payloadLength=0
int par0=0,par1=0
// sleep timeout in s
int sleepTimeout=20
int sleepValue=0
// dim value
int dimValue=40
int dimValueNormal=100
// fix touch offset (Removed for US version)
//lcd_dev fffb 0002 0000 0020
page pageStartup

View File

@@ -0,0 +1,776 @@
Page cardAlarm
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Events
Preinitialize Event
vis p0,0
vis tSend,0
vis tInstruction,0
vis tTmp,0
vis tId,0
vis arm1,0
vis arm2,0
vis arm3,0
vis arm4,0
vis b0,0
vis b1,0
vis b2,0
vis b3,0
vis b4,0
vis b5,0
vis b6,0
vis b7,0
vis b8,0
vis b9,0
vis b10,0
vis tCode,0
Variable (string) strCommand
Attributes
Scope : local
Text :
Max. Text Size: 200
Variable (string) entn
Attributes
Scope : local
Text :
Max. Text Size: 50
Variable (string) tSend
Attributes
Scope : local
Text :
Max. Text Size: 100
Variable (string) va1
Attributes
Scope : local
Text :
Max. Text Size: 20
Variable (string) va2
Attributes
Scope : local
Text :
Max. Text Size: 20
Variable (string) va3
Attributes
Scope : local
Text :
Max. Text Size: 20
Variable (string) va4
Attributes
Scope : local
Text :
Max. Text Size: 20
Text tTmp
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tInstruction
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 20
Text tId
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 20
Text tCode
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tIcon
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Picture p0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Button bNext
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,bNext"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bPrev
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button b0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 1
Max. Text Size : 10
Events
Touch Press Event
tCode.txt=tCode.txt+"1"
Button b1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 2
Max. Text Size : 10
Events
Touch Press Event
tCode.txt=tCode.txt+"2"
Button b2
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 3
Max. Text Size : 10
Events
Touch Press Event
tCode.txt=tCode.txt+"3"
Button b3
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 4
Max. Text Size : 10
Events
Touch Press Event
tCode.txt=tCode.txt+"4"
Button b4
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 5
Max. Text Size : 10
Events
Touch Press Event
tCode.txt=tCode.txt+"5"
Button b5
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 6
Max. Text Size : 10
Events
Touch Press Event
tCode.txt=tCode.txt+"6"
Button b6
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 7
Max. Text Size : 10
Events
Touch Press Event
tCode.txt=tCode.txt+"7"
Button b7
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 8
Max. Text Size : 10
Events
Touch Press Event
tCode.txt=tCode.txt+"8"
Button b8
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 9
Max. Text Size : 10
Events
Touch Press Event
tCode.txt=tCode.txt+"9"
Button b9
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 0
Max. Text Size : 10
Events
Touch Press Event
tCode.txt=tCode.txt+"0"
Button b10
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : CLR
Max. Text Size : 10
Events
Touch Press Event
tCode.txt=""
Button arm1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
// event,buttonPress2,entn,arm1,tCode
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+=va1.txt+","
tSend.txt+=tCode.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
tCode.txt=""
Button arm3
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
// event,buttonPress2,entn,arm1,tCode
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+=va3.txt+","
tSend.txt+=tCode.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
tCode.txt=""
Button arm2
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
// event,buttonPress2,entn,arm1,tCode
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+=va2.txt+","
tSend.txt+=tCode.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
tCode.txt=""
Button arm4
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
// event,buttonPress2,entn,arm1,tCode
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+=va4.txt+","
tSend.txt+=tCode.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
tCode.txt=""
Timer tmSerial
Attributes
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
ucopy payloadLength,2,2,0
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
// calculate crc
crcrest 1,0xFFFF
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
//crcputu 3,u[2]
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
crcputu 0,payloadLength-1
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
// compare crc with recived value
if(crcval==recvCrc)
{
// crc is okay
// here is the location where acual code should be
// write command to variable strCommand
ucopy strCommand.txt,4,payloadLength-5,0
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
spstr strCommand.txt,tInstruction.txt,"~",0
if(tInstruction.txt=="entityUpd")
{
//entn
spstr strCommand.txt,entn.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
{
vis bPrev,0
}
if(tTmp.txt=="1")
{
vis bPrev,1
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
{
vis bNext,0
}
if(tTmp.txt=="1")
{
vis bPrev,1
bNext.txt=""
}
//text arm1
spstr strCommand.txt,arm1.txt,"~",3
if(arm1.txt!="")
{
vis arm1,1
}
//id arm1
spstr strCommand.txt,va1.txt,"~",4
//text arm2
spstr strCommand.txt,arm2.txt,"~",5
if(arm2.txt!="")
{
vis arm2,1
}
//id arm2
spstr strCommand.txt,va2.txt,"~",6
//text arm3
spstr strCommand.txt,arm3.txt,"~",7
if(arm3.txt!="")
{
vis arm3,1
}
//id arm3
spstr strCommand.txt,va3.txt,"~",8
//text arm4
spstr strCommand.txt,arm4.txt,"~",9
if(arm4.txt!="")
{
vis arm4,1
}
//id arm4
spstr strCommand.txt,va4.txt,"~",10
//icon
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tIcon.txt,sys0,1
//icon color
spstr strCommand.txt,tTmp.txt,"~",12
covx tTmp.txt,sys0,0,0
tIcon.pco=sys0
//numpad status
spstr strCommand.txt,tTmp.txt,"~",13
if(tTmp.txt!="disable")
{
vis b0,1
vis b1,1
vis b2,1
vis b3,1
vis b4,1
vis b5,1
vis b6,1
vis b7,1
vis b8,1
vis b9,1
vis b10,1
vis tCode,1
}else
{
vis b0,0
vis b1,0
vis b2,0
vis b3,0
vis b4,0
vis b5,0
vis b6,0
vis b7,0
vis b8,0
vis b9,0
vis b10,0
vis tCode,0
}
//flashing status
spstr strCommand.txt,tTmp.txt,"~",14
if(tTmp.txt=="enable")
{
tmFlash.en=1
}else
{
tmFlash.en=0
}
}
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
dim=dimValue
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="pageType")
{
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="screensaver")
{
page screensaver
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="popupShutter")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupShutter
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardThermo")
{
page cardThermo
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
}
Timer tmSleep
Attributes
Scope : local
Period (ms): 1000
Enabled : yes
Events
Timer Event
if(sleepTimeout!=0&&dimValue!=dim)
{
sleepValue+=1
if(sleepTimeout<=sleepValue)
{
sleepValue=0
dim=dimValue
tSend.txt="event,sleepReached,cardAlarm"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
}
}
Timer tmFlash
Attributes
Scope : local
Period (ms): 600
Enabled : no
Events
Timer Event
if(tIcon.isbr==1)
{
tIcon.isbr=0
vis tIcon,0
}else
{
tIcon.isbr=1
vis tIcon,1
}
TouchCap tc0
Attributes
Scope: local
Value: 0
Events
Touch Press Event
sleepValue=0

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,884 @@
Page cardGrid
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Events
Preinitialize Event
//wup=cardEntities
//remove background & activate reparse mode
vis p0,0
recmod=1
bauds=115200
//debug stuff
vis tTmp,0
vis tSend,0
vis tInstruction,0
vis tId,0
vis bEntity1,0
vis bEntity2,0
vis bEntity3,0
vis bEntity4,0
vis bEntity5,0
vis bEntity6,0
vis tEntity1,0
vis tEntity2,0
vis tEntity3,0
vis tEntity4,0
vis tEntity5,0
vis tEntity6,0
Variable (string) strCommand
Attributes
Scope : local
Text :
Max. Text Size: 500
Variable (string) type1
Attributes
Scope : local
Text :
Max. Text Size: 10
Variable (string) type2
Attributes
Scope : local
Text :
Max. Text Size: 10
Variable (string) type3
Attributes
Scope : local
Text :
Max. Text Size: 10
Variable (string) type4
Attributes
Scope : local
Text :
Max. Text Size: 10
Variable (string) entn1
Attributes
Scope : local
Text :
Max. Text Size: 70
Variable (string) entn2
Attributes
Scope : local
Text :
Max. Text Size: 70
Variable (string) entn3
Attributes
Scope : local
Text :
Max. Text Size: 70
Variable (string) entn4
Attributes
Scope : local
Text :
Max. Text Size: 70
Variable (string) type5
Attributes
Scope : local
Text :
Max. Text Size: 10
Variable (string) type6
Attributes
Scope : local
Text :
Max. Text Size: 10
Variable (string) entn5
Attributes
Scope : local
Text :
Max. Text Size: 50
Variable (string) entn6
Attributes
Scope : local
Text :
Max. Text Size: 50
Text tHeading
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 40
Text tEntity1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : tEntity1
Max. Text Size : 30
Text tSend
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : newtxt
Max. Text Size : 100
Text tTmp
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tInstruction
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 20
Text tId
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 50
Text tEntity2
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : tEntity2
Max. Text Size : 30
Text tEntity3
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : tEntity3
Max. Text Size : 30
Text tEntity4
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : tEntity4
Max. Text Size : 30
Text tEntity5
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : tEntity5
Max. Text Size : 30
Text tEntity6
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : tEntity6
Max. Text Size : 30
Picture p0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Button bPrev
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardGrid,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bNext
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardGrid,bNext"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bEntity1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tmLP.en=1
tTmp.txt=type1.txt
pageIcons.tTmp1.txt=tEntity1.txt
pageIcons.tTmp2.txt=entn1.txt
if(type1.txt=="shutter")
{
page popupShutter
}
Touch Release Event
tmLP.en=0
tSend.txt="event,buttonPress2,"+entn1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bEntity2
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tmLP.en=1
tTmp.txt=type2.txt
pageIcons.tTmp1.txt=tEntity2.txt
pageIcons.tTmp2.txt=entn2.txt
if(type2.txt=="shutter")
{
page popupShutter
}
Touch Release Event
tmLP.en=0
tSend.txt="event,buttonPress2,"+entn2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bEntity3
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tmLP.en=1
tTmp.txt=type3.txt
pageIcons.tTmp1.txt=tEntity3.txt
pageIcons.tTmp2.txt=entn3.txt
if(type3.txt=="shutter")
{
page popupShutter
}
Touch Release Event
tmLP.en=0
tSend.txt="event,buttonPress2,"+entn3.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bEntity4
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tmLP.en=1
tTmp.txt=type4.txt
pageIcons.tTmp1.txt=tEntity4.txt
pageIcons.tTmp2.txt=entn4.txt
if(type4.txt=="shutter")
{
page popupShutter
}
Touch Release Event
tmLP.en=0
tSend.txt="event,buttonPress2,"+entn4.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bEntity5
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tmLP.en=1
tTmp.txt=type5.txt
pageIcons.tTmp1.txt=tEntity5.txt
pageIcons.tTmp2.txt=entn5.txt
if(type5.txt=="shutter")
{
page popupShutter
}
Touch Release Event
tmLP.en=0
tSend.txt="event,buttonPress2,"+entn5.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bEntity6
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tmLP.en=1
tTmp.txt=type6.txt
pageIcons.tTmp1.txt=tEntity6.txt
pageIcons.tTmp2.txt=entn6.txt
if(type6.txt=="shutter")
{
page popupShutter
}
Touch Release Event
tmLP.en=0
tSend.txt="event,buttonPress2,"+entn6.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Hotspot mSpecial
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Events
Touch Press Event
sys2=sys2+1
sys2%=10
//n0.val=sys2
if(sys2==9)
{
page pageTest
}
Timer tmSerial
Attributes
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
ucopy payloadLength,2,2,0
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
// calculate crc
crcrest 1,0xFFFF
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
//crcputu 3,u[2]
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
crcputu 0,payloadLength-1
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
// compare crc with recived value
if(crcval==recvCrc)
{
// crc is okay
// here is the location where acual code should be
// write command to variable strCommand
ucopy strCommand.txt,4,payloadLength-5,0
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
spstr strCommand.txt,tInstruction.txt,"~",0
if(tInstruction.txt=="entityUpd")
{
// command format: entityUpd,heading,navigation,[,type,internalName,iconId,iconColor,displayName,optionalValue]x6
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
{
vis bPrev,0
}
if(tTmp.txt=="1")
{
vis bPrev,1
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
{
vis bNext,0
}
if(tTmp.txt=="1")
{
vis bPrev,1
bNext.txt=""
}
// get Type
spstr strCommand.txt,type1.txt,"~",3
// get internal name
spstr strCommand.txt,entn1.txt,"~",4
if(type1.txt=="delete"||type1.txt=="")
{
vis tEntity1,0
vis bEntity1,0
}else
{
// change icon
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,bEntity1.txt,sys0,1
vis bEntity1,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",6
covx tTmp.txt,sys0,0,0
bEntity1.pco=sys0
// set name
spstr strCommand.txt,tEntity1.txt,"~",7
vis tEntity1,1
}
// get Type
spstr strCommand.txt,type2.txt,"~",9
// get internal name
spstr strCommand.txt,entn2.txt,"~",10
if(type2.txt=="delete"||type2.txt=="")
{
vis tEntity2,0
vis bEntity2,0
}else
{
// change icon
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,bEntity2.txt,sys0,1
vis bEntity2,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",12
covx tTmp.txt,sys0,0,0
bEntity2.pco=sys0
// set name
spstr strCommand.txt,tEntity2.txt,"~",13
vis tEntity2,1
}
// get Type
spstr strCommand.txt,type3.txt,"~",15
// get internal name
spstr strCommand.txt,entn3.txt,"~",16
if(type3.txt=="delete"||type3.txt=="")
{
vis tEntity3,0
vis bEntity3,0
}else
{
// change icon
spstr strCommand.txt,tTmp.txt,"~",17
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,bEntity3.txt,sys0,1
vis bEntity3,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",18
covx tTmp.txt,sys0,0,0
bEntity3.pco=sys0
// set name
spstr strCommand.txt,tEntity3.txt,"~",19
vis tEntity3,1
}
// get Type
spstr strCommand.txt,type4.txt,"~",21
// get internal name
spstr strCommand.txt,entn4.txt,"~",22
if(type4.txt=="delete"||type4.txt=="")
{
vis tEntity4,0
vis bEntity4,0
}else
{
// change icon
spstr strCommand.txt,tTmp.txt,"~",23
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,bEntity4.txt,sys0,1
vis bEntity4,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",24
covx tTmp.txt,sys0,0,0
bEntity4.pco=sys0
// set name
spstr strCommand.txt,tEntity4.txt,"~",25
vis tEntity4,1
}
// get Type
spstr strCommand.txt,type5.txt,"~",27
// get internal name
spstr strCommand.txt,entn5.txt,"~",28
if(type5.txt=="delete"||type5.txt=="")
{
vis tEntity5,0
vis bEntity5,0
}else
{
// change icon
spstr strCommand.txt,tTmp.txt,"~",29
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,bEntity5.txt,sys0,1
vis bEntity5,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",30
covx tTmp.txt,sys0,0,0
bEntity5.pco=sys0
// set name
spstr strCommand.txt,tEntity5.txt,"~",31
vis tEntity5,1
}
// get Type
spstr strCommand.txt,type6.txt,"~",33
// get internal name
spstr strCommand.txt,entn6.txt,"~",34
if(type6.txt=="delete"||type6.txt=="")
{
vis tEntity6,0
vis bEntity6,0
}else
{
// change icon
spstr strCommand.txt,tTmp.txt,"~",35
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,bEntity6.txt,sys0,1
vis bEntity6,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",36
covx tTmp.txt,sys0,0,0
bEntity6.pco=sys0
// set name
spstr strCommand.txt,tEntity6.txt,"~",37
vis tEntity6,1
}
}
if(tInstruction.txt=="pageType")
{
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="screensaver")
{
page screensaver
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="popupShutter")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupShutter
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardThermo")
{
page cardThermo
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
}
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
}
Timer tmSleep
Attributes
Scope : local
Period (ms): 1000
Enabled : yes
Events
Timer Event
if(sleepTimeout!=0&&dimValue!=dim)
{
sleepValue+=1
if(sleepTimeout<=sleepValue)
{
sleepValue=0
dim=dimValue
tSend.txt="event,sleepReached,cardGrid"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
}
}
Timer tmLP
Attributes
Scope : local
Period (ms): 500
Enabled : no
Events
Timer Event
if(tTmp.txt=="light")
{
page popupLight
}
TouchCap tc0
Attributes
Scope: local
Value: 0
Events
Touch Press Event
sleepValue=0

View File

@@ -0,0 +1,732 @@
Page cardMedia
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Events
Preinitialize Event
vis p0,0
vis tSend,0
vis tInstruction,0
vis tTmp,0
vis tId,0
vis t5,0
//vis nPageDisp,0
Variable (string) strCommand
Attributes
Scope : local
Text :
Max. Text Size: 500
Variable (string) entn
Attributes
Scope : local
Text :
Max. Text Size: 50
Variable (string) vaSpeakerList
Attributes
Scope : local
Text :
Max. Text Size: 200
Variable (int32) vaSpeakerPos
Attributes
Scope: local
Value: 0
Text tSend
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 200
Text tTmp
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tInstruction
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 20
Text tId
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 20
Text tHeading
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 40
Text tTitle
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 50
Text tAuthor
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 50
Text t2
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 
Max. Text Size : 10
Events
Touch Press Event
// event,buttonPress2,entn,media-next
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="media-next"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Text tPlayPause
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 
Max. Text Size : 10
Events
Touch Press Event
// event,buttonPress2,entn,media-pause
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="media-pause"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Text t0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 
Max. Text Size : 10
Events
Touch Press Event
// event,buttonPress2,entn,media-back
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="media-back"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Text tIcon
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text t1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 
Max. Text Size : 10
Events
Touch Press Event
hVolume.val=hVolume.val-5
// event,buttonPress2,internalNameEntity,volumeSlider,50
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",volumeSlider,"
covx hVolume.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Text t3
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 
Max. Text Size : 10
Events
Touch Press Event
hVolume.val=hVolume.val+5
// event,buttonPress2,internalNameEntity,volumeSlider,50
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",volumeSlider,"
covx hVolume.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Text t4
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 
Max. Text Size : 10
Text tSpeaker
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 50
Events
Touch Press Event
// event,buttonPress2,entn,media-next
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="speaker-sel,"+tSpeaker.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Text t6
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 
Max. Text Size : 10
Events
Touch Press Event
//speaker
tSpeaker.pco=65535
spstr vaSpeakerList.txt,tSpeaker.txt,"?",vaSpeakerPos.val
vaSpeakerPos.val+=1
if(tSpeaker.txt=="")
{
vaSpeakerPos.val=0
spstr vaSpeakerList.txt,tSpeaker.txt,"?",vaSpeakerPos.val
}
Text t5
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 
Max. Text Size : 10
Events
Touch Press Event
// event,buttonPress2,entn,media-next
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="media-OnOff"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Picture p0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Slider hVolume
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Position : 50
Upper range limit : 100
Lower range limit : 0
Events
Touch Release Event
tmCooldown.en=1
tmCooldown.tim=800
// event,buttonPress2,internalNameEntity,volumeSlider,50
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",volumeSlider,"
covx hVolume.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bNext
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardMedia,bNext"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bPrev
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardMedia,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Timer tmSerial
Attributes
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
ucopy payloadLength,2,2,0
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
// calculate crc
crcrest 1,0xFFFF
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
//crcputu 3,u[2]
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
crcputu 0,payloadLength-1
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
// compare crc with recived value
if(crcval==recvCrc)
{
// crc is okay
// here is the location where acual code should be
// write command to variable strCommand
ucopy strCommand.txt,4,payloadLength-5,0
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
spstr strCommand.txt,tInstruction.txt,"~",0
if(tInstruction.txt=="entityUpd")
{
//heading
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
{
vis bPrev,0
}
if(tTmp.txt=="1")
{
vis bPrev,1
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
{
vis bNext,0
}
if(tTmp.txt=="1")
{
vis bPrev,1
bNext.txt=""
}
//entity name
spstr strCommand.txt,entn.txt,"~",3
//icon
spstr strCommand.txt,tTmp.txt,"~",4
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tIcon.txt,sys0,1
//title
spstr strCommand.txt,tTitle.txt,"~",5
//author
spstr strCommand.txt,tAuthor.txt,"~",6
//volume
spstr strCommand.txt,tTmp.txt,"~",7
covx tTmp.txt,sys0,0,0
hVolume.val=sys0
//icon
spstr strCommand.txt,tTmp.txt,"~",8
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tPlayPause.txt,sys0,1
//speaker current
spstr strCommand.txt,tSpeaker.txt,"~",9
if(tSpeaker.txt!="")
{
tSpeaker.pco=1374
}else
{
tSpeaker.pco=65535
}
//speaker list
spstr strCommand.txt,vaSpeakerList.txt,"~",10
if(vaSpeakerList.txt=="")
{
vis t6,0
}
vaSpeakerPos.val=0
// on off button
spstr strCommand.txt,tTmp.txt,"~",11
if(tTmp.txt=="disable")
{
vis t5,0
}else
{
vis t5,1
covx tTmp.txt,t5.pco,0,0
}
}
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
dim=dimValue
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="pageType")
{
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="screensaver")
{
page screensaver
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="popupShutter")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupShutter
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardThermo")
{
page cardThermo
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
if(bufferPos==usize)
{
// copy whole buffer to t1.txt, for debugging
//ucopy t2.txt,0,usize,0
// ucopy n2.val,0,usize,0
// clear whole buffer
//code_c
//bufferPos=0
}
}
Timer tmSleep
Attributes
Scope : local
Period (ms): 1000
Enabled : yes
Events
Timer Event
if(sleepTimeout!=0&&dimValue!=dim)
{
sleepValue+=1
if(sleepTimeout<=sleepValue)
{
sleepValue=0
dim=dimValue
tSend.txt="event,sleepReached,cardMedia"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
}
}
Timer tmCooldown
Attributes
Scope : local
Period (ms): 100
Enabled : no
Events
Timer Event
tmCooldown.en=0
TouchCap tc0
Attributes
Scope: local
Value: 0
Events
Touch Press Event
sleepValue=0

View File

@@ -0,0 +1,988 @@
Page cardThermo
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Events
Preinitialize Event
vis p0,0
vis tSend,0
vis tInstruction,0
vis tTmp,0
vis tId,0
vis xTempMin,0
vis xTempMax,0
vis xTempStep,0
//tEntity.txt=tHeading.txt
// disable all buttons
vis bt0,0
vis bt1,0
vis bt2,0
vis bt3,0
vis bt4,0
vis bt5,0
vis bt6,0
vis bt7,0
vis bt8,0
Variable (string) strCommand
Attributes
Scope : local
Text :
Max. Text Size: 250
Variable (string) entn
Attributes
Scope : local
Text :
Max. Text Size: 50
Variable (string) va0
Attributes
Scope : local
Text :
Max. Text Size: 10
Variable (string) va1
Attributes
Scope : local
Text :
Max. Text Size: 10
Variable (string) va2
Attributes
Scope : local
Text :
Max. Text Size: 10
Variable (string) va3
Attributes
Scope : local
Text :
Max. Text Size: 10
Variable (string) va4
Attributes
Scope : local
Text :
Max. Text Size: 10
Variable (string) va5
Attributes
Scope : local
Text :
Max. Text Size: 10
Variable (string) va6
Attributes
Scope : local
Text :
Max. Text Size: 10
Variable (string) va7
Attributes
Scope : local
Text :
Max. Text Size: 10
Variable (string) va8
Attributes
Scope : local
Text :
Max. Text Size: 10
XFloat xTempCurr
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Value : 0
XFloat xTempDest
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Value : 0
XFloat xTempMin
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Value : 0
XFloat xTempMax
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Value : 0
XFloat xTempStep
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Value : 0
Text tSend
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : newtxt
Max. Text Size : 100
Text tTmp
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tInstruction
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 20
Text tId
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 20
Text tHeading
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 40
Text tStatus
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text t2
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 
Max. Text Size : 10
Picture p0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Button bNext
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardThermo,bNext"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bDown
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 10
Events
Touch Press Event
if(xTempDest.val>xTempMin.val)
{
xTempDest.val=xTempDest.val-xTempStep.val
}
// event,buttonPress2,entn,tempUpd,X
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="tempUpd,"
//convert temperature
covx xTempDest.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bUp
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 10
Events
Touch Press Event
if(xTempDest.val<xTempMax.val)
{
xTempDest.val=xTempDest.val+xTempStep.val
}
// event,buttonPress2,entn,tempUpd,X
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="tempUpd,"
//convert temperature
covx xTempDest.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bPrev
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardThermo,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Dual-state Button bt0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"+entn.txt
tSend.txt+=",hvac_action,"+va0.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Dual-state Button bt1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"+entn.txt
tSend.txt+=",hvac_action,"+va1.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Dual-state Button bt2
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"+entn.txt
tSend.txt+=",hvac_action,"+va2.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Dual-state Button bt3
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"+entn.txt
tSend.txt+=",hvac_action,"+va3.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Dual-state Button bt4
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"+entn.txt
tSend.txt+=",hvac_action,"+va4.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Dual-state Button bt5
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : pressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"+entn.txt
tSend.txt+=",hvac_action,"+va5.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Dual-state Button bt6
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : pressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"+entn.txt
tSend.txt+=",hvac_action,"+va6.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Dual-state Button bt7
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : pressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"+entn.txt
tSend.txt+=",hvac_action,"+va7.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Dual-state Button bt8
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : pressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"+entn.txt
tSend.txt+=",hvac_action,"+va8.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Timer tmSerial
Attributes
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
ucopy payloadLength,2,2,0
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
// calculate crc
crcrest 1,0xFFFF
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
//crcputu 3,u[2]
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
crcputu 0,payloadLength-1
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
// compare crc with recived value
if(crcval==recvCrc)
{
// crc is okay
// here is the location where acual code should be
// write command to variable strCommand
ucopy strCommand.txt,4,payloadLength-5,0
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
spstr strCommand.txt,tInstruction.txt,"~",0
if(tInstruction.txt=="entityUpd")
{
//heading
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
{
vis bPrev,0
}
if(tTmp.txt=="1")
{
vis bPrev,1
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
{
vis bNext,0
}
if(tTmp.txt=="1")
{
vis bPrev,1
bNext.txt=""
}
//entity name
spstr strCommand.txt,entn.txt,"~",3
//currentTemp
spstr strCommand.txt,tTmp.txt,"~",4
covx tTmp.txt,xTempCurr.val,0,0
//dstTemp
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,xTempDest.val,0,0
//status
spstr strCommand.txt,tStatus.txt,"~",6
//minTemp
spstr strCommand.txt,tTmp.txt,"~",7
covx tTmp.txt,xTempMin.val,0,0
//maxTemp
spstr strCommand.txt,tTmp.txt,"~",8
covx tTmp.txt,xTempMax.val,0,0
//tempStep
spstr strCommand.txt,tTmp.txt,"~",9
covx tTmp.txt,xTempStep.val,0,0
// disable all buttons
vis bt0,0
vis bt1,0
vis bt2,0
vis bt3,0
vis bt4,0
vis bt5,0
vis bt6,0
vis bt7,0
vis bt8,0
//bt0
spstr strCommand.txt,tTmp.txt,"~",10
if(tTmp.txt!="")
{
// set icon
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,bt0.txt,sys0,1
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,bt0.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",12
covx tTmp.txt,bt0.val,0,0
// save action
spstr strCommand.txt,va0.txt,"~",13
//enable
vis bt0,1
} //bt1
spstr strCommand.txt,tTmp.txt,"~",14
if(tTmp.txt!="")
{
// set icon
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,bt1.txt,sys0,1
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",15
covx tTmp.txt,bt1.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",16
covx tTmp.txt,bt1.val,0,0
// save action
spstr strCommand.txt,va1.txt,"~",17
//enable
vis bt1,1
} //bt2
spstr strCommand.txt,tTmp.txt,"~",18
if(tTmp.txt!="")
{
// set icon
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,bt2.txt,sys0,1
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",19
covx tTmp.txt,bt2.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",20
covx tTmp.txt,bt2.val,0,0
// save action
spstr strCommand.txt,va2.txt,"~",21
//enable
vis bt2,1
} //bt3
spstr strCommand.txt,tTmp.txt,"~",22
if(tTmp.txt!="")
{
// set icon
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,bt3.txt,sys0,1
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",23
covx tTmp.txt,bt3.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",24
covx tTmp.txt,bt3.val,0,0
// save action
spstr strCommand.txt,va3.txt,"~",25
//enable
vis bt3,1
} //bt4
spstr strCommand.txt,tTmp.txt,"~",26
if(tTmp.txt!="")
{
// set icon
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,bt4.txt,sys0,1
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",27
covx tTmp.txt,bt4.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",28
covx tTmp.txt,bt4.val,0,0
// save action
spstr strCommand.txt,va4.txt,"~",29
//enable
vis bt4,1
} //bt5
spstr strCommand.txt,tTmp.txt,"~",30
if(tTmp.txt!="")
{
// set icon
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,bt5.txt,sys0,1
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",31
covx tTmp.txt,bt5.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",32
covx tTmp.txt,bt5.val,0,0
// save action
spstr strCommand.txt,va5.txt,"~",33
//enable
vis bt5,1
} //bt6
spstr strCommand.txt,tTmp.txt,"~",34
if(tTmp.txt!="")
{
// set icon
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,bt6.txt,sys0,1
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",35
covx tTmp.txt,bt6.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",36
covx tTmp.txt,bt6.val,0,0
// save action
spstr strCommand.txt,va6.txt,"~",37
//enable
vis bt6,1
} //bt7
spstr strCommand.txt,tTmp.txt,"~",38
if(tTmp.txt!="")
{
// set icon
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,bt7.txt,sys0,1
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",39
covx tTmp.txt,bt7.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",40
covx tTmp.txt,bt7.val,0,0
// save action
spstr strCommand.txt,va7.txt,"~",41
//enable
vis bt7,1
} //bt8
spstr strCommand.txt,tTmp.txt,"~",42
if(tTmp.txt!="")
{
// set icon
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,bt8.txt,sys0,1
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",43
covx tTmp.txt,bt8.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",44
covx tTmp.txt,bt8.val,0,0
// save action
spstr strCommand.txt,va8.txt,"~",45
//enable
vis bt8,1
}
}
if(tInstruction.txt=="pageType")
{
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="screensaver")
{
page screensaver
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="popupShutter")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupShutter
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardThermo")
{
page cardThermo
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
}
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
}
Timer tmSleep
Attributes
Scope : local
Period (ms): 1000
Enabled : yes
Events
Timer Event
if(sleepTimeout!=0&&dimValue!=dim)
{
sleepValue+=1
if(sleepTimeout<=sleepValue)
{
sleepValue=0
dim=dimValue
tSend.txt="event,sleepReached,cardThermo"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
}
}
TouchCap tc0
Attributes
Scope: local
Value: 0
Events
Touch Press Event
sleepValue=0

View File

@@ -0,0 +1,61 @@
Page pageIcons
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Variable (string) vaTime
Attributes
Scope : global
Text :
Max. Text Size: 15
Variable (string) vaDate
Attributes
Scope : global
Text :
Max. Text Size: 35
Text tIcons
Attributes
Scope : global
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 
Max. Text Size : 170
Text tTmp1
Attributes
Scope : global
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 50
Text tTmp2
Attributes
Scope : global
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 50
Picture p0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled

View File

@@ -0,0 +1,207 @@
Page pageSerialTest
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Events
Preinitialize Event
//vis p0,0
//recmod=1
//bauds=115200
Number nCrcRecv
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Value : 0
Number nCrcCalc
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Value : 0
Number nIt
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Value : 0
Number nLength
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Value : 0
Text tStatus
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : newtxt
Max. Text Size : 100
Text tCmd
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : newtxt
Max. Text Size : 500
Text tBuffer
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : newtxt
Max. Text Size : 100
Text tDesc
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : CRC Recv:\r\nCRC Calc:\r\n\r\nStatus\r\n\r\nCommand
Max. Text Size : 60
Picture p0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Button b0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : bck
Max. Text Size : 10
Events
Touch Press Event
recmod=0
page pageTest
Button b1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : ON
Max. Text Size : 10
Events
Touch Press Event
recmod=1
bauds=115200
Timer tmSerial
Attributes
Scope : local
Period (ms): 400
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
tStatus.txt="init command detected"
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
//payloadLength=u[2]
ucopy payloadLength,2,2,0
nLength.val=payloadLength
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
tStatus.txt="reached"
// calculate crc
crcrest 1,0xFFFF
// payload length -1 to exclude crc
crcputu 0,payloadLength-1 //u[2]+3
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
nCrcRecv.val=recvCrc
// compare crc with recived value
if(crcval==recvCrc)
{
tStatus.txt="crc ok"
nIt.val=nIt.val+1
ucopy tCmd.txt,4,payloadLength-5,0
udelete payloadLength-1
bufferPos=0
// here is the location where acual code should be
}
// copy calculated crc and recived crc to nCrcRecv and nCrcCalc, for debugging
nCrcRecv.val=recvCrc
nCrcCalc.val=crcval
//ucopy nCrcCalc.val,u[2]+3,3,0
}
}
}
// next character
bufferPos++
}
if(bufferPos==usize)
{
// copy whole buffer to tCmd.txt, for debugging
//ucopy tBuffer.txt,0,usize,0
// ucopy nIt.val,0,usize,0
// clear whole buffer
//code_c
//bufferPos=0
}
}

View File

@@ -0,0 +1,372 @@
Page pageStartup
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Events
Preinitialize Event
vis p0,0
recmod=1
bauds=115200
vis tSend,0
vis tInstruction,0
vis tTmp,0
vis tId,0
vis bSendStartup,0
vis frame_ptr,0
vis spinner_w,0
vis frapic_w,0
vis usual_cnt,0
vis tMsg2,0
vis tMsg3,0
vis tVersion,0
dim=100
Postinitialize Event
//send messages by clicking button
click bSendStartup,1
Variable (string) strCommand
Attributes
Scope : local
Text :
Max. Text Size: 50
Number frame_ptr
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Value : 0
Number spinner_w
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Value : 140
Number frapic_w
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Value : 1960
Number usual_cnt
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Value : 0
Text tSend
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : newtxt
Max. Text Size : 100
Text tTmp
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tInstruction
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 20
Text tId
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 20
Text tMsg1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : Waiting for content ...
Max. Text Size : 40
Text tMsg2
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : This is taking longer than usual,
Max. Text Size : 100
Text tMsg3
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : pls check your backend configuration
Max. Text Size : 100
Text tVersion
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 28
Max. Text Size : 10
Picture p0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Button bSendStartup
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : startup
Max. Text Size : 10
Events
Touch Press Event
recmod=1
bauds=115200
// startup event
tSend.txt="event,startup,"+tVersion.txt+",us-p"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Hotspot mSpinner
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Events
Touch Press Event
sys2=sys2+1
sys2%=10
//n0.val=sys2
if(sys2==9)
{
page pageTest
}
Timer tmSerial
Attributes
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
ucopy payloadLength,2,2,0
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
// calculate crc
crcrest 1,0xFFFF
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
//crcputu 3,u[2]
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
crcputu 0,payloadLength-1
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
// compare crc with recived value
if(crcval==recvCrc)
{
// crc is okay
// here is the location where acual code should be
// write command to variable strCommand
ucopy strCommand.txt,4,payloadLength-5,0
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
spstr strCommand.txt,tInstruction.txt,"~",0
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="pageType")
{
dim=100
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="cardThermo")
{
page cardThermo
}
if(tId.txt=="screensaver")
{
page screensaver
}
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
}
Timer tmSpinner
Attributes
Scope : local
Period (ms): 80
Enabled : yes
Events
Timer Event
xpic mSpinner.x,mSpinner.y,spinner_w.val,140,frame_ptr.val,0,11 // draw the current frame
frame_ptr.val+=spinner_w.val%frapic_w.val // advance the pointer to the next frame in the pic resource and roll over at the end
doevents // finish drawing before next timer event triggers
if(frame_ptr.val==1820)
{
usual_cnt.val+=1
sys0=usual_cnt.val%5
if(sys0==0)
{
// retry sending startup messages by clicking button
click bSendStartup,1
}
}
if(usual_cnt.val==10)
{
vis tMsg2,1
vis tMsg3,1
}

View File

@@ -0,0 +1,178 @@
Page pageTest
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Events
Preinitialize Event
vis p0,0
Picture p0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Button b0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : entities
Max. Text Size : 10
Events
Touch Press Event
page cardEntities
Button b1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : serial
Max. Text Size : 10
Events
Touch Press Event
page pageSerialTest
Button b3
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : disable recmod
Max. Text Size : 20
Events
Touch Press Event
recmod=0
Button b6
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : shutter
Max. Text Size : 10
Events
Touch Press Event
page popupShutter
Button b4
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : light
Max. Text Size : 10
Events
Touch Press Event
page popupLight
Button b5
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : thermo
Max. Text Size : 10
Events
Touch Press Event
page cardThermo
Button b7
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : media
Max. Text Size : 10
Events
Touch Press Event
page cardMedia
Button b8
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : screens
Max. Text Size : 10
Events
Touch Press Event
dimValue=50
page screensaver
Button b9
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : notify
Max. Text Size : 10
Events
Touch Press Event
page popupNotify
Button b10
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : alarm
Max. Text Size : 10
Events
Touch Press Event
page cardAlarm
Button b11
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : grid
Max. Text Size : 10
Events
Touch Press Event
page cardGrid

View File

@@ -0,0 +1,630 @@
Page popupLight
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Events
Preinitialize Event
//get entitiy name
tEntity.txt=pageIcons.tTmp1.txt
//get entity id
entn.txt=pageIcons.tTmp2.txt
vis p0,0
vis tSend,0
vis tTmp,0
vis tInstruction,0
vis tId,0
//page open event
// event,pageOpenDetail,typeOfPage,tEntityName
// craft command
tSend.txt="event,pageOpenDetail,popupLight,"+entn.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
//disable brightness by default
vis t1,0
vis t2,0
vis hBrightness,0
//disable color temp by default
vis t4,0
vis t3,0
vis hTempSlider,0
//disable color wheel components by default
vis bColor,0
vis t0,0
vis pColorWheel,0
//vis t0,0
Variable (string) strCommand
Attributes
Scope : local
Text :
Max. Text Size: 100
Variable (string) entn
Attributes
Scope : local
Text : newtxt
Max. Text Size: 50
Variable (int32) mode
Attributes
Scope: local
Value: 1
Variable (int32) mode_temp
Attributes
Scope: local
Value: 0
Text tEntity
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : tEntity1
Max. Text Size : 25
Text tIcon1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 
Max. Text Size : 10
Text t1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : Brightness
Max. Text Size : 15
Text t2
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 
Max. Text Size : 10
Text t3
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 
Max. Text Size : 10
Text t4
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : Temperature
Max. Text Size : 15
Text tSend
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : newtxt
Max. Text Size : 100
Text tTmp
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tInstruction
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 20
Text tId
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 20
Text t0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : Color
Max. Text Size : 15
Picture p0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Picture pColorWheel
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",colorWheel,"
sys0=tch0
sys0=sys0-pColorWheel.x
covx sys0,tTmp.txt,0,0
tSend.txt+=tTmp.txt
tSend.txt+="|"
sys0=tch1
sys0=sys0-pColorWheel.y
covx sys0,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Slider hBrightness
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Position : 50
Upper range limit : 100
Lower range limit : 0
Events
Touch Release Event
tmCooldown.en=1
tmCooldown.tim=2500
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",brightnessSlider,"
covx hBrightness.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Slider hTempSlider
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Position : 50
Upper range limit : 100
Lower range limit : 0
Events
Touch Release Event
tmCooldown.en=1
tmCooldown.tim=2500
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",colorTempSlider,"
covx hTempSlider.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button b0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tSend.txt="event,buttonPress2,popupLight,bExit"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bColor
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
if(mode.val==1)
{
mode.val=0
//enable color wheel
vis pColorWheel,1
//disable color temp
vis t4,0
vis t3,0
vis hTempSlider,0
}else
{
mode.val=1
//disable color wheel
vis pColorWheel,0
if(mode_temp.val==1)
{
//enable color temp
vis t4,1
vis t3,1
vis hTempSlider,1
}
}
Dual-state Button btOnOff1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 10
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+","+"OnOff,"
covx btOnOff1.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Timer tmSleep
Attributes
Scope : local
Period (ms): 1000
Enabled : yes
Events
Timer Event
if(sleepTimeout!=0)
{
sleepValue+=1
if(sleepTimeout<=sleepValue)
{
sleepValue=0
click b0,1
click b0,0
}
}
Timer tmSerial
Attributes
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
ucopy payloadLength,2,2,0
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
// calculate crc
crcrest 1,0xFFFF
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
//crcputu 3,u[2]
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
crcputu 0,payloadLength-1
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
// compare crc with recived value
if(crcval==recvCrc)
{
// crc is okay
// here is the location where acual code should be
// write command to variable strCommand
ucopy strCommand.txt,4,payloadLength-5,0
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
spstr strCommand.txt,tInstruction.txt,"~",0
if(tInstruction.txt=="entityUpdateDetail")
{
// change icon
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tIcon1.txt,sys0,1
vis tIcon1,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",2
covx tTmp.txt,sys0,0,0
tIcon1.pco=sys0
// get Button State
spstr strCommand.txt,tTmp.txt,"~",3
covx tTmp.txt,sys0,0,0
btOnOff1.val=sys0
// get Brightness value
spstr strCommand.txt,tTmp.txt,"~",4
if(tTmp.txt=="disable")
{
vis t1,0
vis t2,0
vis hBrightness,0
}else
{
vis t1,1
vis t2,1
vis hBrightness,1
covx tTmp.txt,sys0,0,0
if(tmCooldown.en==0)
{
hBrightness.val=sys0
}
}
// get ColorTemp value
spstr strCommand.txt,tTmp.txt,"~",5
if(tTmp.txt=="disable")
{
vis hTempSlider,0
vis t3,0
vis t4,0
mode_temp.val=0
// mode == 1 is temp controls currently shown
if(mode.val==1)
{
// switch mode
click bColor,1
click bColor,0
}
}else if(tTmp.txt=="unknown") // temp supported, but not in color mode
{
mode_temp.val=1
// mode == 1 is temp controls currently shown
if(mode.val==1)
{
// switch mode
click bColor,1
click bColor,0
}
}else
{
mode_temp.val=1
vis hTempSlider,1
vis t3,1
vis t4,1
if(tmCooldown.en==0)
{
covx tTmp.txt,sys0,0,0
hTempSlider.val=sys0
}
// mode == 0 is rgb controls currently shown
if(mode.val==0)
{
// switch mode
click bColor,1
click bColor,0
}
}
// get Color value
spstr strCommand.txt,tTmp.txt,"~",6
// disable -> isn't supported
if(tTmp.txt=="disable")
{
vis t0,0
vis bColor,0
vis pColorWheel,0
}else
{
vis t0,1
//only enable bColor button if color temp is also supported
if(mode_temp.val==1)
{
vis bColor,1
}
if(mode.val==0)
{
vis pColorWheel,1
}
}
}
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="pageType")
{
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
}
Timer tmCooldown
Attributes
Scope : local
Period (ms): 100
Enabled : no
Events
Timer Event
tmCooldown.en=0
TouchCap tc0
Attributes
Scope: local
Value: 0
Events
Touch Press Event
sleepValue=0

View File

@@ -0,0 +1,396 @@
Page popupNotify
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Events
Preinitialize Event
vis p0,0
vis tSend,0
vis tTmp,0
vis tInstruction,0
vis tId,0
Variable (string) strCommand
Attributes
Scope : local
Text :
Max. Text Size: 1000
Variable (string) entn
Attributes
Scope : local
Text :
Max. Text Size: 30
Variable (int32) vaOldSleepT
Attributes
Scope: local
Value: 0
Text tSend
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : newtxt
Max. Text Size : 100
Text tTmp
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tInstruction
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 20
Text tId
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 20
Text tHeading
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 40
Text tText
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 500
Picture p0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Button b0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
sleepTimeout=vaOldSleepT.val
tSend.txt="event,buttonPress2,popupNotify,bExit"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button b2
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 10
Events
Touch Press Event
sleepTimeout=vaOldSleepT.val
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",notifyAction,yes"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button b1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 10
Events
Touch Press Event
sleepTimeout=vaOldSleepT.val
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",notifyAction,no"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Timer tmSleep
Attributes
Scope : local
Period (ms): 1000
Enabled : yes
Events
Timer Event
if(sleepTimeout!=0)
{
sleepValue+=1
if(sleepTimeout<=sleepValue)
{
sleepValue=0
click b0,1
click b0,0
}
}
Timer tmSerial
Attributes
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
ucopy payloadLength,2,2,0
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
// calculate crc
crcrest 1,0xFFFF
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
//crcputu 3,u[2]
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
crcputu 0,payloadLength-1
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
// compare crc with recived value
if(crcval==recvCrc)
{
// crc is okay
// here is the location where acual code should be
// write command to variable strCommand
ucopy strCommand.txt,4,payloadLength-5,0
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
spstr strCommand.txt,tInstruction.txt,"~",0
if(tInstruction.txt=="entityUpdateDetail")
{
// get entn
spstr strCommand.txt,entn.txt,"~",1
// get Heading
spstr strCommand.txt,tHeading.txt,"~",2
// heading color
spstr strCommand.txt,tTmp.txt,"~",3
covx tTmp.txt,sys0,0,0
tHeading.pco=sys0
// get b1
spstr strCommand.txt,b1.txt,"~",4
if(b1.txt!="")
{
vis b1,1
}
// b1 color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
b1.pco=sys0
// get b2
spstr strCommand.txt,b2.txt,"~",6
if(b2.txt!="")
{
vis b2,1
}
// b2 color
spstr strCommand.txt,tTmp.txt,"~",7
covx tTmp.txt,sys0,0,0
b2.pco=sys0
// get tText
spstr strCommand.txt,tText.txt,"~",8
// tText color
spstr strCommand.txt,tTmp.txt,"~",9
covx tTmp.txt,sys0,0,0
tText.pco=sys0
//preserve old sleepTimeout
vaOldSleepT.val=sleepTimeout
// sleep timeout
spstr strCommand.txt,tTmp.txt,"~",10
covx tTmp.txt,sys0,0,0
sleepTimeout=sys0
}
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="exitPopup")
{
click b0,1
}
if(tInstruction.txt=="pageType")
{
sleepTimeout=vaOldSleepT.val
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="cardThermo")
{
page cardThermo
}
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
if(bufferPos==usize)
{
// copy whole buffer to t1.txt, for debugging
//ucopy t2.txt,0,usize,0
// ucopy n2.val,0,usize,0
// clear whole buffer
//code_c
//bufferPos=0
}
}
TouchCap tc0
Attributes
Scope: local
Value: 0
Events
Touch Press Event
sleepValue=0

View File

@@ -0,0 +1,428 @@
Page popupShutter
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Events
Preinitialize Event
//get entitiy name
tEntity.txt=pageIcons.tTmp1.txt
//get entity id
entn.txt=pageIcons.tTmp2.txt
vis p0,0
vis tSend,0
vis tTmp,0
vis tInstruction,0
vis tId,0
//page open event
// event,pageOpenDetail,typeOfPage,tEntityName
// craft command
tSend.txt="event,pageOpenDetail,popupShutter,"+entn.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Variable (string) strCommand
Attributes
Scope : local
Text :
Max. Text Size: 50
Variable (string) entn
Attributes
Scope : local
Text : newtxt
Max. Text Size: 50
Text tEntity
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : tEntity1
Max. Text Size : 25
Text tIcon1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 
Max. Text Size : 10
Text tSend
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : newtxt
Max. Text Size : 100
Text tTmp
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tInstruction
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 20
Text tId
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 20
Text t1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : Position
Max. Text Size : 15
Picture p0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Slider hPosition
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Position : 50
Upper range limit : 100
Lower range limit : 0
Events
Touch Release Event
// event,buttonPress2,internalNameEntity,positionSlider,50
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",positionSlider,"
covx hPosition.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button b0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tSend.txt="event,buttonPress2,popupShutter,bExit"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bDown1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tSend.txt="event,buttonPress2,"+entn.txt+",down"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bStop1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tSend.txt="event,buttonPress2,"+entn.txt+",stop"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bUp1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tSend.txt="event,buttonPress2,"+entn.txt+",up"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Timer tmSleep
Attributes
Scope : local
Period (ms): 1000
Enabled : yes
Events
Timer Event
if(sleepTimeout!=0)
{
sleepValue+=1
if(sleepTimeout<=sleepValue)
{
sleepValue=0
click b0,1
click b0,0
}
}
Timer tmSerial
Attributes
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
ucopy payloadLength,2,2,0
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
// calculate crc
crcrest 1,0xFFFF
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
//crcputu 3,u[2]
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
crcputu 0,payloadLength-1
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
// compare crc with recived value
if(crcval==recvCrc)
{
// crc is okay
// here is the location where acual code should be
// write command to variable strCommand
ucopy strCommand.txt,4,payloadLength-5,0
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
spstr strCommand.txt,tInstruction.txt,"~",0
if(tInstruction.txt=="entityUpdateDetail")
{
// get Position value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sys0,0,0
hPosition.val=sys0
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
}
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="pageType")
{
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
if(bufferPos==usize)
{
// copy whole buffer to t1.txt, for debugging
//ucopy t2.txt,0,usize,0
// ucopy n2.val,0,usize,0
// clear whole buffer
//code_c
//bufferPos=0
}
}
TouchCap tc0
Attributes
Scope: local
Value: 0
Events
Touch Press Event
sleepValue=0

View File

@@ -0,0 +1,577 @@
Page screensaver
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Events
Preinitialize Event
recmod=1
bauds=115200
vis tInstruction,0
vis tTmp,0
vis p0,0
//load gloabl time string from pageIcons
//tTime.txt=vaTime.txt
spstr pageIcons.vaTime.txt,tTime.txt,"?",0
spstr pageIcons.vaTime.txt,tAMPM.txt,"?",1
if(tAMPM.txt=="")
{
vis tAMPM,0
}
tDate.txt=pageIcons.vaDate.txt
dim=dimValue
vis tSend,0
//page open event
// clear weather elements, to keep example content in HMI
Variable (string) strCommand
Attributes
Scope : local
Text :
Max. Text Size: 200
Variable (string) tId
Attributes
Scope : local
Text :
Max. Text Size: 25
Variable (int32) vaTap
Attributes
Scope: local
Value: 0
Text tInstruction
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 50
Text tTmp
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 50
Text tTime
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 21:32
Max. Text Size : 15
Text tDate
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : Tuesday, 08. March 2022
Max. Text Size : 35
Text tSend
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 50
Text tMainIcon
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tMainText
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tForecast1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tForecast1Val
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tF1Icon
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tForecast2
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tF2Icon
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tForecast2Val
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text t10
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : |
Max. Text Size : 10
Text tAMPM
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : PM
Max. Text Size : 10
Text tForecast3Val
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tF3Icon
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tForecast3
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tForecast4
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tF4Icon
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 5
Text tForecast4Val
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tMainTextAlt
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tMainIconAlt
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tMRIcon
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tMR
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Picture p0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Timer tmSerial
Attributes
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
ucopy payloadLength,2,2,0
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
// calculate crc
crcrest 1,0xFFFF
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
//crcputu 3,u[2]
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
crcputu 0,payloadLength-1
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
// compare crc with recived value
if(crcval==recvCrc)
{
// crc is okay
// here is the location where acual code should be
// write command to variable strCommand
ucopy strCommand.txt,4,payloadLength-5,0
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
spstr strCommand.txt,tInstruction.txt,"~",0
if(tInstruction.txt=="wake")
{
//dim=100
click tc0,1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
dim=dimValue
}
if(tInstruction.txt=="time")
{
//get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
spstr pageIcons.vaTime.txt,tTime.txt,"?",0
spstr pageIcons.vaTime.txt,tAMPM.txt,"?",1
if(tAMPM.txt=="")
{
vis tAMPM,0
}
}
if(tInstruction.txt=="date")
{
//get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
tDate.txt=pageIcons.vaDate.txt
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="weatherUpdate")
{
vis tMainIcon,1
vis tMainIconAlt,0
vis tMainText,1
vis tMainTextAlt,0
vis tMRIcon,0
vis tMR,0
//tMainIcon
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tMainIcon.txt,sys0,1
tMainIconAlt.txt=tMainIcon.txt
//tMainText
spstr strCommand.txt,tMainText.txt,"~",2
tMainTextAlt.txt=tMainText.txt
//tForecast1
spstr strCommand.txt,tForecast1.txt,"~",3
//tF1Icon
spstr strCommand.txt,tTmp.txt,"~",4
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tF1Icon.txt,sys0,1
//tForecast1Val
spstr strCommand.txt,tForecast1Val.txt,"~",5
//tForecast2
spstr strCommand.txt,tForecast2.txt,"~",6
//tF2Icon
spstr strCommand.txt,tTmp.txt,"~",7
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tF2Icon.txt,sys0,1
//tForecast2Val
spstr strCommand.txt,tForecast2Val.txt,"~",8
//tForecast3
spstr strCommand.txt,tForecast3.txt,"~",9
//tF3Icon
spstr strCommand.txt,tTmp.txt,"~",10
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tF3Icon.txt,sys0,1
//tForecast3Val
spstr strCommand.txt,tForecast3Val.txt,"~",11
//tForecast4
spstr strCommand.txt,tForecast4.txt,"~",12
//tF4Icon
spstr strCommand.txt,tTmp.txt,"~",13
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tF4Icon.txt,sys0,1
//tForecast4Val
spstr strCommand.txt,tForecast4Val.txt,"~",14
//alternative layout
//tMRIcon
spstr strCommand.txt,tTmp.txt,"~",15
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tMRIcon.txt,sys0,1
if(tTmp.txt!="")
{
//value for tMRIcon, activate alternative layout
vis tMainIcon,0
vis tMainText,0
vis tMainTextAlt,1
vis tMainIconAlt,1
vis tMRIcon,1
vis tMR,1
vis tForecast1,0
vis tF1Icon,0
vis tForecast1Val,0
//move forecast values to the right
tForecast4.txt=tForecast3.txt
tForecast3.txt=tForecast2.txt
tForecast2.txt=tForecast1.txt
tForecast4Val.txt=tForecast3Val.txt
tForecast3Val.txt=tForecast2Val.txt
tForecast2Val.txt=tForecast1Val.txt
tF4Icon.txt=tF3Icon.txt
tF3Icon.txt=tF2Icon.txt
tF2Icon.txt=tF1Icon.txt
}
//tMR
spstr strCommand.txt,tMR.txt,"~",16
}
if(tInstruction.txt=="pageType")
{
dim=100
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete u[2]+3
bufferPos=0
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="cardThermo")
{
page cardThermo
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
}
Timer tmSleep
Attributes
Scope : local
Period (ms): 1000
Enabled : yes
Events
Timer Event
if(sleepTimeout!=0&&dimValue!=dim)
{
sleepValue+=1
if(sleepTimeout<=sleepValue)
{
sleepValue=0
dim=dimValue
vaTap.val=0
}
}
TouchCap tc0
Attributes
Scope: local
Value: 0
Events
Touch Press Event
dim=dimValueNormal
vaTap.val+=1
covx vaTap.val,tTmp.txt,0,0
tSend.txt="event,buttonPress2,screensaver,bExit,"+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2

Binary file not shown.

Binary file not shown.

25592
HMI/code_gen/icons/icons.json Normal file

File diff suppressed because it is too large Load Diff

112
HMI/code_gen/icons/icons.py Normal file
View File

@@ -0,0 +1,112 @@
import json
import os
icons = [
"alert-circle-outline",
"lightbulb",
"thermometer",
"gesture-tap-button",
"flash",
"music",
"check-circle-outline",
"close-circle-outline",
"pause",
"play",
"palette",
"window-open",
"weather-cloudy",
"weather-fog",
"weather-hail",
"weather-lightning",
"weather-lightning-rainy",
"weather-night",
"weather-partly-cloudy",
"weather-pouring",
"weather-rainy",
"weather-snowy",
"weather-snowy-rainy",
"weather-sunny",
"weather-windy",
"weather-windy-variant",
"water-percent",
"power",
"fire",
"calendar-sync",
"fan",
"snowflake",
"solar-power",
"battery-charging-medium",
"battery-medium",
"shield-home",
"door-open",
"door-closed",
"window-closed",
"shield-off",
"shield",
"shield-lock",
"shield-airplane",
"bell-ring",
"ray-vertex",
"script-text",
"home-import-outline",
"home-export-outline",
"arrow-up-bold",
"arrow-down-bold",
"cast-audio",
"cast",
"radio",
"fireplace"
]
__location__ = os.path.realpath(
os.path.join(os.getcwd(), os.path.dirname(__file__)))
with open(os.path.join(__location__, "icons.json"),'r') as f:
icon_metadata = json.load(f)
icon_nextion_string = ""
icon_name_list = []
for icon_name in icons:
#print(icon_name)
icon = next((item for item in icon_metadata if item["name"] == icon_name), None)
if icon is None:
print(f"WARNING ICON NOT FOUND: {icon_name}")
else:
hex = icon['hex']
s = int(hex, 16)
#print(chr(s), end = '')
icon_nextion_string += chr(s)
icon_name_list.append(icon_name)
# write mapping lib for python
with open(os.path.join(__location__, "../../../apps/nspanel-lovelace-ui/luibackend", "icon_mapping.py"), 'w') as f:
f.write("icons = {\n")
for idx, val in enumerate(icon_name_list):
f.write(f" '{val}': {idx},\n")
f.write("}\n")
f.write("""
def get_icon_id(ma_name):
if ma_name in icons:
return icons[ma_name]
else:
return icons["alert-circle-outline"]
""")
# write documentation file
with open(os.path.join(__location__, "../..","icons.md"), 'w') as f:
f.write("""
# Icons IDs
This file contains the Icons IDs included in the display firmware, addressable via serial.
ID | MD Icon Name | Icon
-- | ------------ | ----
""")
for idx, val in enumerate(icon_name_list):
f.write(f"{idx} | {val} | ![{val}](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/{val}.svg)\n")
print("=== STRING for HMI Project ===")
print("=== Put the following string into the txt field in nextion ===")
print(icon_nextion_string)

View File

@@ -0,0 +1,147 @@
from shared import *
head = sharedhead + """
if(tInstruction.txt=="entityUpd")
{
// command format: entityUpd,heading,navigation,[,type,internalName,iconId,displayName,optionalValue]x4
spstr strCommand.txt,tHeading.txt,"~",1
""" + navigation
print(head)
start = 3
for i in range(1,7):
idxstart = start + (i-1)*6
item = f"""
// get Type
spstr strCommand.txt,type{i}.txt,"~",{idxstart}
// get internal name
spstr strCommand.txt,entn{i}.txt,"~",{idxstart+1}
if(type{i}.txt=="delete"||type{i}.txt=="")
{{
vis bUp{i},0
vis bStop{i},0
vis bDown{i},0
vis btOnOff{i},0
vis tEntity{i},0
vis tIcon{i},0
vis bText{i},0
vis hSlider{i},0
vis nNum{i},0
}}else
{{
// change icon
spstr strCommand.txt,tTmp.txt,"~",{idxstart+2}
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tIcon{i}.txt,sys0,1
vis tIcon{i},1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",{idxstart+3}
covx tTmp.txt,sys0,0,0
tIcon{i}.pco=sys0
// set name
spstr strCommand.txt,tEntity{i}.txt,"~",{idxstart+4}
vis tEntity{i},1
}}
if(type{i}.txt=="shutter")
{{
vis bUp{i},1
vis bStop{i},1
vis bDown{i},1
vis btOnOff{i},0
vis bText{i},0
vis hSlider{i},0
vis nNum{i},0
}}
if(type{i}.txt=="light")
{{
vis bUp{i},0
vis bStop{i},0
vis bDown{i},0
vis btOnOff{i},1
vis bText{i},0
vis hSlider{i},0
vis nNum{i},0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",{idxstart+5}
covx tTmp.txt,sys0,0,0
btOnOff{i}.val=sys0
}}
if(type{i}.txt=="switch")
{{
vis bUp{i},0
vis bStop{i},0
vis bDown{i},0
vis btOnOff{i},1
vis bText{i},0
vis hSlider{i},0
vis nNum{i},0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",{idxstart+5}
covx tTmp.txt,sys0,0,0
btOnOff{i}.val=sys0
}}
if(type{i}.txt=="text")
{{
vis bUp{i},0
vis bStop{i},0
vis bDown{i},0
vis btOnOff{i},0
vis bText{i},1
tsw bText{i},0
vis hSlider{i},0
vis nNum{i},0
bText{i}.pco=65535
bText{i}.pco2=65535
// get Text (optional Value)
spstr strCommand.txt,bText{i}.txt,"~",{idxstart+5}
}}
if(type{i}.txt=="button")
{{
vis bUp{i},0
vis bStop{i},0
vis bDown{i},0
vis btOnOff{i},0
vis bText{i},1
tsw bText{i},1
vis hSlider{i},0
vis nNum{i},0
bText{i}.pco=1374
bText{i}.pco2=1374
// get Text (optional Value)
spstr strCommand.txt,bText{i}.txt,"~",{idxstart+5}
}}
if(type{i}.txt=="number")
{{
vis bUp{i},0
vis bStop{i},0
vis bDown{i},0
vis btOnOff{i},0
vis bText{i},0
tsw bText{i},0
vis hSlider{i},1
vis nNum{i},1
// get config (optional Value) (use bText as variable)
spstr strCommand.txt,bText{i}.txt,"~",{idxstart+5}
//first value is current value
spstr bText{i}.txt,tTmp.txt,"|",0
covx tTmp.txt,sys0,0,0
hSlider{i}.val=sys0
nNum{i}.val=sys0
//second value is min value
spstr bText{i}.txt,tTmp.txt,"|",1
covx tTmp.txt,sys0,0,0
hSlider{i}.minval=sys0
//third value is max value
spstr bText{i}.txt,tTmp.txt,"|",2
covx tTmp.txt,sys0,0,0
hSlider{i}.maxval=sys0
}}
"""
print(item)
foot = """
}
""" + sharedfoot
print(foot)

View File

@@ -0,0 +1,43 @@
from shared import *
head = sharedhead + """
if(tInstruction.txt=="entityUpd")
{
// command format: entityUpd,heading,navigation,[,type,internalName,iconId,iconColor,displayName,optionalValue]x6
spstr strCommand.txt,tHeading.txt,",",1
""" + navigation
print(head)
start = 3
for i in range(1,7):
idxstart = start + (i-1)*6
item = f"""
// get Type
spstr strCommand.txt,type{i}.txt,",",{idxstart}
// get internal name
spstr strCommand.txt,entn{i}.txt,",",{idxstart+1}
if(type{i}.txt=="delete"||type{i}.txt=="")
{{
vis tEntity{i},0
vis bEntity{i},0
}}else
{{
// change icon
spstr strCommand.txt,tTmp.txt,",",{idxstart+2}
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,bEntity{i}.txt,sys0,1
vis bEntity{i},1
// change icon color
spstr strCommand.txt,tTmp.txt,",",{idxstart+3}
covx tTmp.txt,sys0,0,0
bEntity{i}.pco=sys0
// set name
spstr strCommand.txt,tEntity{i}.txt,",",{idxstart+4}
vis tEntity{i},1
}}
"""
print(item)
foot = """
}
""" + sharedfoot
print(foot)

View File

@@ -0,0 +1,67 @@
from shared import *
text = sharedhead + """
if(tInstruction.txt=="entityUpd")
{
//heading
spstr strCommand.txt,tHeading.txt,",",1
""" + navigation
text += """
//entity name
spstr strCommand.txt,entn.txt,",",3
//currentTemp
spstr strCommand.txt,tTmp.txt,",",4
covx tTmp.txt,xTempCurr.val,0,0
//dstTemp
spstr strCommand.txt,tTmp.txt,",",4
covx tTmp.txt,xTempDest.val,0,0
//status
spstr strCommand.txt,tStatus.txt,",",6
//minTemp
spstr strCommand.txt,tTmp.txt,",",7
covx tTmp.txt,xTempMin.val,0,0
//maxTemp
spstr strCommand.txt,tTmp.txt,",",8
covx tTmp.txt,xTempMax.val,0,0
//tempStep
spstr strCommand.txt,tTmp.txt,",",9
covx tTmp.txt,xTempStep.val,0,0
// disable all buttons
vis bt0,0
vis bt1,0
vis bt2,0
vis bt3,0
vis bt4,0
vis bt5,0
vis bt6,0
vis bt7,0
vis bt8,0
"""
start = 10
for i in range(0,9):
idxstart = start + i*4
text += f""" //bt{i}
spstr strCommand.txt,tTmp.txt,",",{idxstart}
if(tTmp.txt!="")
{{
// set icon
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,bt{i}.txt,sys0,1
// set text color on active state
spstr strCommand.txt,tTmp.txt,",",{idxstart+1}
covx tTmp.txt,bt{i}.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,",",{idxstart+2}
covx tTmp.txt,bt{i}.val,0,0
// save action
spstr strCommand.txt,va{i}.txt,",",{idxstart+3}
//enable
vis bt{i},1
}}"""
text += """
}
""" + sharedfoot
print(text)

View File

@@ -0,0 +1,166 @@
sharedhead = """
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
ucopy payloadLength,2,2,0
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
// calculate crc
crcrest 1,0xFFFF
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
//crcputu 3,u[2]
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
crcputu 0,payloadLength-1
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
// compare crc with recived value
if(crcval==recvCrc)
{
// crc is okay
// here is the location where acual code should be
// write command to variable strCommand
ucopy strCommand.txt,4,payloadLength-5,0
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
spstr strCommand.txt,tInstruction.txt,"~",0
"""
sharedfoot = """
if(tInstruction.txt=="pageType")
{
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="screensaver")
{
page screensaver
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="popupShutter")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupShutter
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardThermo")
{
page cardThermo
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
}
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
}
"""
navigation = """
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
{
vis bPrev,0
}
if(tTmp.txt=="1")
{
vis bPrev,1
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
{
vis bNext,0
}
if(tTmp.txt=="1")
{
vis bPrev,1
bNext.txt=""
}
"""

60
HMI/icons.md Normal file
View File

@@ -0,0 +1,60 @@
# Icons IDs
This file contains the Icons IDs included in the display firmware, addressable via serial.
ID | MD Icon Name | Icon
-- | ------------ | ----
0 | alert-circle-outline | ![alert-circle-outline](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/alert-circle-outline.svg)
1 | lightbulb | ![lightbulb](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/lightbulb.svg)
2 | thermometer | ![thermometer](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/thermometer.svg)
3 | gesture-tap-button | ![gesture-tap-button](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/gesture-tap-button.svg)
4 | flash | ![flash](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/flash.svg)
5 | music | ![music](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/music.svg)
6 | check-circle-outline | ![check-circle-outline](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/check-circle-outline.svg)
7 | close-circle-outline | ![close-circle-outline](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/close-circle-outline.svg)
8 | pause | ![pause](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/pause.svg)
9 | play | ![play](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/play.svg)
10 | palette | ![palette](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/palette.svg)
11 | window-open | ![window-open](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/window-open.svg)
12 | weather-cloudy | ![weather-cloudy](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/weather-cloudy.svg)
13 | weather-fog | ![weather-fog](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/weather-fog.svg)
14 | weather-hail | ![weather-hail](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/weather-hail.svg)
15 | weather-lightning | ![weather-lightning](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/weather-lightning.svg)
16 | weather-lightning-rainy | ![weather-lightning-rainy](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/weather-lightning-rainy.svg)
17 | weather-night | ![weather-night](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/weather-night.svg)
18 | weather-partly-cloudy | ![weather-partly-cloudy](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/weather-partly-cloudy.svg)
19 | weather-pouring | ![weather-pouring](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/weather-pouring.svg)
20 | weather-rainy | ![weather-rainy](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/weather-rainy.svg)
21 | weather-snowy | ![weather-snowy](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/weather-snowy.svg)
22 | weather-snowy-rainy | ![weather-snowy-rainy](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/weather-snowy-rainy.svg)
23 | weather-sunny | ![weather-sunny](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/weather-sunny.svg)
24 | weather-windy | ![weather-windy](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/weather-windy.svg)
25 | weather-windy-variant | ![weather-windy-variant](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/weather-windy-variant.svg)
26 | water-percent | ![water-percent](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/water-percent.svg)
27 | power | ![power](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/power.svg)
28 | fire | ![fire](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/fire.svg)
29 | calendar-sync | ![calendar-sync](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/calendar-sync.svg)
30 | fan | ![fan](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/fan.svg)
31 | snowflake | ![snowflake](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/snowflake.svg)
32 | solar-power | ![solar-power](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/solar-power.svg)
33 | battery-charging-medium | ![battery-charging-medium](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/battery-charging-medium.svg)
34 | battery-medium | ![battery-medium](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/battery-medium.svg)
35 | shield-home | ![shield-home](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/shield-home.svg)
36 | door-open | ![door-open](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/door-open.svg)
37 | door-closed | ![door-closed](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/door-closed.svg)
38 | window-closed | ![window-closed](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/window-closed.svg)
39 | shield-off | ![shield-off](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/shield-off.svg)
40 | shield | ![shield](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/shield.svg)
41 | shield-lock | ![shield-lock](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/shield-lock.svg)
42 | shield-airplane | ![shield-airplane](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/shield-airplane.svg)
43 | bell-ring | ![bell-ring](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/bell-ring.svg)
44 | ray-vertex | ![ray-vertex](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/ray-vertex.svg)
45 | script-text | ![script-text](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/script-text.svg)
46 | home-import-outline | ![home-import-outline](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/home-import-outline.svg)
47 | home-export-outline | ![home-export-outline](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/home-export-outline.svg)
48 | arrow-up-bold | ![arrow-up-bold](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/arrow-up-bold.svg)
49 | arrow-down-bold | ![arrow-down-bold](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/arrow-down-bold.svg)
50 | cast-audio | ![cast-audio](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/cast-audio.svg)
51 | cast | ![cast](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/cast.svg)
52 | radio | ![radio](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/radio.svg)
53 | fireplace | ![fireplace](https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/0aeb4d612644d80d9d1fe242f705f362985de5dc/svg/fireplace.svg)

View File

@@ -0,0 +1,16 @@
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 //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 bufferPos=0
int recvCrc=0
int payloadLength=0
int par0=0,par1=0
// sleep timeout in s
int sleepTimeout=20
int sleepValue=0
// dim value
int dimValue=40
int dimValueNormal=100
// fix touch offset
lcd_dev fffb 0002 0000 0020
page pageStartup

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,62 @@
Program.s
0 Component(s)
11 Line(s) of event code
11 Unique line(s) of event code
pageTest
13 Component(s)
13 Line(s) of event code
13 Unique line(s) of event code
pageSerialTest
13 Component(s)
48 Line(s) of event code
43 Unique line(s) of event code
pageIcons
7 Component(s)
0 Line(s) of event code
0 Unique line(s) of event code
popupNotify
17 Component(s)
178 Line(s) of event code
117 Unique line(s) of event code
popupShutter
19 Component(s)
178 Line(s) of event code
101 Unique line(s) of event code
popupLight
27 Component(s)
322 Line(s) of event code
173 Unique line(s) of event code
pageStartup
19 Component(s)
150 Line(s) of event code
113 Unique line(s) of event code
cardThermo
41 Component(s)
460 Line(s) of event code
284 Unique line(s) of event code
cardMedia
30 Component(s)
333 Line(s) of event code
170 Unique line(s) of event code
screensaver
33 Component(s)
207 Line(s) of event code
158 Unique line(s) of event code
cardAlarm
35 Component(s)
345 Line(s) of event code
214 Unique line(s) of event code
cardGrid
39 Component(s)
430 Line(s) of event code
249 Unique line(s) of event code
cardEntities
62 Component(s)
972 Line(s) of event code
413 Unique line(s) of event code
Total
13 Page(s)
355 Component(s)
3647 Line(s) of event code
1040 Unique line(s) of event code

View File

@@ -0,0 +1,141 @@
Page pageIcons
Attributes
ID : 0
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
Width : 480
Effect : load
Effect Priority : 0
Effect Time : 300
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Fill : solid color
Back. Color : 65535
Variable (string) vaTime
Attributes
ID : 5
Scope : global
Text :
Max. Text Size: 15
Variable (string) vaDate
Attributes
ID : 6
Scope : global
Text :
Max. Text Size: 35
Text tIcons
Attributes
ID : 2
Scope : global
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 1
y coordinate : 8
Width : 298
Height : 299
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 1
Back. Color : 65535
Font Color : 0
Horizontal Alignment : left
Vertical Alignment : top
Input Type : character
Text : 
Max. Text Size : 170
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tTmp1
Attributes
ID : 3
Scope : global
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 302
y coordinate : 8
Width : 146
Height : 69
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 1
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 50
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tTmp2
Attributes
ID : 4
Scope : global
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 302
y coordinate : 82
Width : 146
Height : 69
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 1
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 50
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Picture p0
Attributes
ID : 1
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 0
Width : 479
Height : 319
Effect : load
Effect Priority : 0
Effect Time : 300
Picture ID : 0

View File

@@ -0,0 +1,434 @@
Page pageSerialTest
Attributes
ID : 0
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
Width : 480
Effect : load
Effect Priority : 0
Effect Time : 300
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Fill : solid color
Back. Color : 65535
Events
Preinitialize Event
//vis p0,0
//recmod=1
//bauds=115200
Number nCrcRecv
Attributes
ID : 5
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 160
y coordinate : 0
Width : 88
Height : 29
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 4
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Value : 0
Significant digits shown : all
Format : decimal with digit grouping
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Number nCrcCalc
Attributes
ID : 6
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 159
y coordinate : 31
Width : 90
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 4
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Value : 0
Significant digits shown : all
Format : decimal with digit grouping
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Number nIt
Attributes
ID : 11
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 378
y coordinate : 234
Width : 52
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 4
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Value : 0
Significant digits shown : all
Format : decimal
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Number nLength
Attributes
ID : 12
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 15
y coordinate : 215
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Value : 0
Significant digits shown : all
Format : decimal
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tStatus
Attributes
ID : 3
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 160
y coordinate : 60
Width : 271
Height : 90
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 4
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : newtxt
Max. Text Size : 100
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tCmd
Attributes
ID : 4
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 160
y coordinate : 151
Width : 272
Height : 80
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 4
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : newtxt
Max. Text Size : 500
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tBuffer
Attributes
ID : 7
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 7
y coordinate : 270
Width : 435
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 4
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : newtxt
Max. Text Size : 100
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tDesc
Attributes
ID : 8
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 0
Width : 159
Height : 204
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 4
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : CRC Recv:\r\nCRC Calc:\r\n\r\nStatus\r\n\r\nCommand
Max. Text Size : 60
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Picture p0
Attributes
ID : 1
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 0
Width : 479
Height : 319
Effect : load
Effect Priority : 0
Effect Time : 300
Picture ID : 0
Button b0
Attributes
ID : 9
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 334
y coordinate : 9
Width : 46
Height : 46
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 4
Back. Color : 50712
Back. Picture ID (Pressed) : 0
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : bck
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
recmod=0
page pageTest
Button b1
Attributes
ID : 10
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 392
y coordinate : 10
Width : 48
Height : 48
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 4
Back. Color : 50712
Back. Picture ID (Pressed) : 0
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : ON
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
recmod=1
bauds=115200
Timer tmSerial
Attributes
ID : 2
Scope : local
Period (ms): 400
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
tStatus.txt="init command detected"
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
//payloadLength=u[2]
ucopy payloadLength,2,2,0
nLength.val=payloadLength
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
tStatus.txt="reached"
// calculate crc
crcrest 1,0xFFFF
// payload length -1 to exclude crc
crcputu 0,payloadLength-1 //u[2]+3
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
nCrcRecv.val=recvCrc
// compare crc with recived value
if(crcval==recvCrc)
{
tStatus.txt="crc ok"
nIt.val=nIt.val+1
ucopy tCmd.txt,4,payloadLength-5,0
udelete payloadLength-1
bufferPos=0
// here is the location where acual code should be
}
// copy calculated crc and recived crc to nCrcRecv and nCrcCalc, for debugging
nCrcRecv.val=recvCrc
nCrcCalc.val=crcval
//ucopy nCrcCalc.val,u[2]+3,3,0
}
}
}
// next character
bufferPos++
}
if(bufferPos==usize)
{
// copy whole buffer to tCmd.txt, for debugging
//ucopy tBuffer.txt,0,usize,0
// ucopy nIt.val,0,usize,0
// clear whole buffer
//code_c
//bufferPos=0
}
}

View File

@@ -0,0 +1,668 @@
Page pageStartup
Attributes
ID : 0
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
Width : 480
Effect : load
Effect Priority : 0
Effect Time : 300
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Fill : solid color
Back. Color : 6371
Events
Preinitialize Event
vis p0,0
recmod=1
bauds=115200
vis tSend,0
vis tInstruction,0
vis tTmp,0
vis tId,0
vis bSendStartup,0
vis frame_ptr,0
vis spinner_w,0
vis frapic_w,0
vis usual_cnt,0
vis tMsg2,0
vis tMsg3,0
vis tVersion,0
dim=100
Postinitialize Event
//send messages by clicking button
click bSendStartup,1
Variable (string) strCommand
Attributes
ID : 5
Scope : local
Text :
Max. Text Size: 50
Number frame_ptr
Attributes
ID : 10
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 11
y coordinate : 34
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Value : 0
Significant digits shown : all
Format : decimal
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Number spinner_w
Attributes
ID : 11
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 11
y coordinate : 67
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Value : 140
Significant digits shown : all
Format : decimal
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Number frapic_w
Attributes
ID : 12
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 11
y coordinate : 100
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Value : 1960
Significant digits shown : all
Format : decimal
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Number usual_cnt
Attributes
ID : 15
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 12
y coordinate : 134
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Value : 0
Significant digits shown : all
Format : decimal
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tSend
Attributes
ID : 2
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 0
Width : 230
Height : 23
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : newtxt
Max. Text Size : 100
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tTmp
Attributes
ID : 3
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 408
y coordinate : 0
Width : 34
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tInstruction
Attributes
ID : 6
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 163
y coordinate : 0
Width : 119
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 20
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tId
Attributes
ID : 7
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 282
y coordinate : 0
Width : 125
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 20
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tMsg1
Attributes
ID : 8
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 42
y coordinate : 223
Width : 375
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 1
Back. Color : 6371
Font Color : 65535
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : Waiting for content ...
Max. Text Size : 40
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tMsg2
Attributes
ID : 13
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 25
y coordinate : 256
Width : 408
Height : 25
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 6371
Font Color : 65535
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : This is taking longer than usual,
Max. Text Size : 100
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tMsg3
Attributes
ID : 14
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 25
y coordinate : 278
Width : 408
Height : 25
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 6371
Font Color : 65535
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : please check your backend configuration
Max. Text Size : 100
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tVersion
Attributes
ID : 18
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 402
y coordinate : 101
Width : 78
Height : 72
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : 28
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Picture p0
Attributes
ID : 1
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 0
Width : 480
Height : 320
Effect : load
Effect Priority : 0
Effect Time : 300
Picture ID : 0
Button bSendStartup
Attributes
ID : 17
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 380
y coordinate : 39
Width : 63
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 0
Back. Color : 50712
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : startup
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
recmod=1
bauds=115200
// startup event
tSend.txt="event,startup,"+tVersion.txt+",eu"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Hotspot mSpinner
Attributes
ID : 16
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 154
y coordinate : 49
Width : 140
Height : 140
Effect : load
Effect Priority : 0
Effect Time : 300
Events
Touch Press Event
sys2=sys2+1
sys2%=10
//n0.val=sys2
if(sys2==9)
{
page pageTest
}
Timer tmSerial
Attributes
ID : 4
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
ucopy payloadLength,2,2,0
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
// calculate crc
crcrest 1,0xFFFF
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
//crcputu 3,u[2]
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
crcputu 0,payloadLength-1
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
// compare crc with recived value
if(crcval==recvCrc)
{
// crc is okay
// here is the location where acual code should be
// write command to variable strCommand
ucopy strCommand.txt,4,payloadLength-5,0
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
spstr strCommand.txt,tInstruction.txt,"~",0
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="pageType")
{
dim=100
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="cardThermo")
{
page cardThermo
}
if(tId.txt=="screensaver")
{
page screensaver
}
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
}
Timer tmSpinner
Attributes
ID : 9
Scope : local
Period (ms): 80
Enabled : yes
Events
Timer Event
xpic mSpinner.x,mSpinner.y,spinner_w.val,140,frame_ptr.val,0,11 // draw the current frame
frame_ptr.val+=spinner_w.val%frapic_w.val // advance the pointer to the next frame in the pic resource and roll over at the end
doevents // finish drawing before next timer event triggers
if(frame_ptr.val==1820)
{
usual_cnt.val+=1
sys0=usual_cnt.val%5
if(sys0==0)
{
// retry sending startup messages by clicking button
click bSendStartup,1
}
}
if(usual_cnt.val==10)
{
vis tMsg2,1
vis tMsg3,1
}

View File

@@ -0,0 +1,438 @@
Page pageTest
Attributes
ID : 0
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
Width : 480
Effect : load
Effect Priority : 0
Effect Time : 300
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Fill : solid color
Back. Color : 4226
Events
Preinitialize Event
vis p0,0
Picture p0
Attributes
ID : 1
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 0
Width : 479
Height : 319
Effect : load
Effect Priority : 0
Effect Time : 300
Picture ID : 0
Button b0
Attributes
ID : 2
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 5
y coordinate : 12
Width : 100
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 4
Back. Color : 50712
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : entities
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
page cardEntities
Button b1
Attributes
ID : 3
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 347
y coordinate : 262
Width : 100
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 4
Back. Color : 50712
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : serial
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
page pageSerialTest
Button b3
Attributes
ID : 4
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 345
y coordinate : 195
Width : 102
Height : 63
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 4
Back. Color : 50712
Back. Picture ID (Pressed) : 0
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : disable recmod
Max. Text Size : 20
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
recmod=0
Button b6
Attributes
ID : 5
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 5
y coordinate : 64
Width : 100
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 4
Back. Color : 50712
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : shutter
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
page popupShutter
Button b4
Attributes
ID : 6
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 7
y coordinate : 120
Width : 100
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 4
Back. Color : 50712
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : light
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
page popupLight
Button b5
Attributes
ID : 7
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 111
y coordinate : 12
Width : 100
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 4
Back. Color : 50712
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : thermo
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
page cardThermo
Button b7
Attributes
ID : 8
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 113
y coordinate : 72
Width : 100
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 4
Back. Color : 50712
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : media
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
page cardMedia
Button b8
Attributes
ID : 9
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 341
y coordinate : 9
Width : 106
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 4
Back. Color : 50712
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : screens
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
dimValue=50
page screensaver
Button b9
Attributes
ID : 10
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 6
y coordinate : 175
Width : 100
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 4
Back. Color : 50712
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : notify
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
page popupNotify
Button b10
Attributes
ID : 11
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 115
y coordinate : 128
Width : 100
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 4
Back. Color : 50712
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : alarm
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
page cardAlarm
Button b11
Attributes
ID : 12
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 117
y coordinate : 184
Width : 100
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 4
Back. Color : 50712
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 0
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : grid
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
page cardGrid

View File

@@ -0,0 +1,978 @@
Page popupLight
Attributes
ID : 0
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
Width : 480
Effect : load
Effect Priority : 0
Effect Time : 300
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Fill : solid color
Back. Color : 6371
Events
Preinitialize Event
//get entitiy name
tEntity.txt=pageIcons.tTmp1.txt
//get entity id
entn.txt=pageIcons.tTmp2.txt
vis p0,0
vis tSend,0
vis tTmp,0
vis tInstruction,0
vis tId,0
//page open event
// event,pageOpenDetail,typeOfPage,tEntityName
// craft command
tSend.txt="event,pageOpenDetail,popupLight,"+entn.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
//disable brightness by default
vis t1,0
vis t2,0
vis hBrightness,0
//disable color temp by default
vis t4,0
vis t3,0
vis hTempSlider,0
//disable color wheel components by default
vis bColor,0
vis t0,0
vis pColorWheel,0
//vis t0,0
Variable (string) strCommand
Attributes
ID : 17
Scope : local
Text :
Max. Text Size: 100
Variable (string) entn
Attributes
ID : 21
Scope : local
Text : newtxt
Max. Text Size: 50
Variable (int32) mode
Attributes
ID : 23
Scope: local
Value: 1
Variable (int32) mode_temp
Attributes
ID : 24
Scope: local
Value: 0
Text tEntity
Attributes
ID : 3
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 92
y coordinate : 21
Width : 263
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 6371
Font Color : 65535
Horizontal Alignment : left
Vertical Alignment : center
Input Type : character
Text : tEntity1
Max. Text Size : 25
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tIcon1
Attributes
ID : 4
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 11
y coordinate : 21
Width : 45
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 1
Back. Color : 6371
Font Color : 17299
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : 
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text t1
Attributes
ID : 6
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 10
y coordinate : 226
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 6371
Font Color : 65535
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : Brightness
Max. Text Size : 15
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text t2
Attributes
ID : 9
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 10
y coordinate : 267
Width : 45
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 1
Back. Color : 6371
Font Color : 40147
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : 
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text t3
Attributes
ID : 10
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 10
y coordinate : 181
Width : 45
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 1
Back. Color : 6371
Font Color : 40147
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : 
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text t4
Attributes
ID : 11
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 9
y coordinate : 143
Width : 116
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 6371
Font Color : 65535
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : Temperature
Max. Text Size : 15
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tSend
Attributes
ID : 12
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 0
Width : 348
Height : 7
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : newtxt
Max. Text Size : 100
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tTmp
Attributes
ID : 13
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 406
y coordinate : 277
Width : 34
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tInstruction
Attributes
ID : 18
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 290
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 20
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tId
Attributes
ID : 19
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 100
y coordinate : 290
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 20
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text t0
Attributes
ID : 25
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 9
y coordinate : 80
Width : 64
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 6371
Font Color : 65535
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : Color
Max. Text Size : 15
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Picture p0
Attributes
ID : 1
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 0
Width : 480
Height : 320
Effect : load
Effect Priority : 0
Effect Time : 300
Picture ID : 0
Picture pColorWheel
Attributes
ID : 2
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 167
y coordinate : 69
Width : 160
Height : 160
Effect : load
Effect Priority : 0
Effect Time : 300
Picture ID : 3
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",colorWheel,"
sys0=tch0
sys0=sys0-pColorWheel.x
covx sys0,tTmp.txt,0,0
tSend.txt+=tTmp.txt
tSend.txt+="|"
sys0=tch1
sys0=sys0-pColorWheel.y
covx sys0,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Slider hBrightness
Attributes
ID : 7
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 61
y coordinate : 261
Width : 335
Height : 43
Effect : load
Effect Priority : 0
Effect Time : 300
Direction : horizontal
Fill : image
Cursor width : auto
Cursor height : 255
Back. Picture ID : 5
Slided Back. Picture ID : 4
Position : 50
Upper range limit : 100
Lower range limit : 0
Events
Touch Release Event
tmCooldown.en=1
tmCooldown.tim=2500
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",brightnessSlider,"
covx hBrightness.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Slider hTempSlider
Attributes
ID : 20
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 61
y coordinate : 178
Width : 335
Height : 44
Effect : load
Effect Priority : 0
Effect Time : 300
Direction : horizontal
Fill : image
Cursor width : auto
Cursor height : 255
Back. Picture ID : 8
Slided Back. Picture ID : 10
Position : 50
Upper range limit : 100
Lower range limit : 0
Events
Touch Release Event
tmCooldown.en=1
tmCooldown.tim=2500
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",colorTempSlider,"
covx hTempSlider.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button b0
Attributes
ID : 5
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 397
y coordinate : 8
Width : 50
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Font ID : 1
Back. Color : 6371
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 14823
Font Color (Unpressed) : 65535
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : 
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
tSend.txt="event,buttonPress2,popupLight,bExit"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bColor
Attributes
ID : 22
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 89
y coordinate : 68
Width : 50
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Font ID : 1
Back. Color : 6371
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 14823
Font Color (Unpressed) : 65535
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : 
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
if(mode.val==1)
{
mode.val=0
//enable color wheel
vis pColorWheel,1
//disable color temp
vis t4,0
vis t3,0
vis hTempSlider,0
}else
{
mode.val=1
//disable color wheel
vis pColorWheel,0
if(mode_temp.val==1)
{
//enable color temp
vis t4,1
vis t3,1
vis hTempSlider,1
}
}
Dual-state Button btOnOff1
Attributes
ID : 8
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 370
y coordinate : 79
Width : 50
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : image
Font ID : 0
Background Picture ID (Unpressed) : 1
Back. Picture ID (Pressed) : 2
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text :
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+","+"OnOff,"
covx btOnOff1.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Timer tmSleep
Attributes
ID : 15
Scope : local
Period (ms): 1000
Enabled : yes
Events
Timer Event
if(sleepTimeout!=0)
{
sleepValue+=1
if(sleepTimeout<=sleepValue)
{
sleepValue=0
click b0,1
click b0,0
}
}
Timer tmSerial
Attributes
ID : 16
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
ucopy payloadLength,2,2,0
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
// calculate crc
crcrest 1,0xFFFF
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
//crcputu 3,u[2]
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
crcputu 0,payloadLength-1
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
// compare crc with recived value
if(crcval==recvCrc)
{
// crc is okay
// here is the location where acual code should be
// write command to variable strCommand
ucopy strCommand.txt,4,payloadLength-5,0
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
spstr strCommand.txt,tInstruction.txt,"~",0
if(tInstruction.txt=="entityUpdateDetail")
{
// change icon
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tIcon1.txt,sys0,1
vis tIcon1,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",2
covx tTmp.txt,sys0,0,0
tIcon1.pco=sys0
// get Button State
spstr strCommand.txt,tTmp.txt,"~",3
covx tTmp.txt,sys0,0,0
btOnOff1.val=sys0
// get Brightness value
spstr strCommand.txt,tTmp.txt,"~",4
if(tTmp.txt=="disable")
{
vis t1,0
vis t2,0
vis hBrightness,0
}else
{
vis t1,1
vis t2,1
vis hBrightness,1
covx tTmp.txt,sys0,0,0
if(tmCooldown.en==0)
{
hBrightness.val=sys0
}
}
// get ColorTemp value
spstr strCommand.txt,tTmp.txt,"~",5
if(tTmp.txt=="disable")
{
vis hTempSlider,0
vis t3,0
vis t4,0
mode_temp.val=0
// mode == 1 is temp controls currently shown
if(mode.val==1)
{
// switch mode
click bColor,1
click bColor,0
}
}else if(tTmp.txt=="unknown") // temp supported, but not in color mode
{
mode_temp.val=1
// mode == 1 is temp controls currently shown
if(mode.val==1)
{
// switch mode
click bColor,1
click bColor,0
}
}else
{
mode_temp.val=1
vis hTempSlider,1
vis t3,1
vis t4,1
if(tmCooldown.en==0)
{
covx tTmp.txt,sys0,0,0
hTempSlider.val=sys0
}
// mode == 0 is rgb controls currently shown
if(mode.val==0)
{
// switch mode
click bColor,1
click bColor,0
}
}
// get Color value
spstr strCommand.txt,tTmp.txt,"~",6
// disable -> isn't supported
if(tTmp.txt=="disable")
{
vis t0,0
vis bColor,0
vis pColorWheel,0
}else
{
vis t0,1
//only enable bColor button if color temp is also supported
if(mode_temp.val==1)
{
vis bColor,1
}
if(mode.val==0)
{
vis pColorWheel,1
}
}
}
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="pageType")
{
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
}
Timer tmCooldown
Attributes
ID : 26
Scope : local
Period (ms): 100
Enabled : no
Events
Timer Event
tmCooldown.en=0
TouchCap tc0
Attributes
ID : 14
Scope: local
Value: 0
Events
Touch Press Event
sleepValue=0

View File

@@ -0,0 +1,606 @@
Page popupNotify
Attributes
ID : 0
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
Width : 480
Effect : load
Effect Priority : 0
Effect Time : 300
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Fill : solid color
Back. Color : 6371
Events
Preinitialize Event
vis p0,0
vis tSend,0
vis tTmp,0
vis tInstruction,0
vis tId,0
Variable (string) strCommand
Attributes
ID : 8
Scope : local
Text :
Max. Text Size: 1000
Variable (string) entn
Attributes
ID : 15
Scope : local
Text :
Max. Text Size: 30
Variable (int32) vaOldSleepT
Attributes
ID : 16
Scope: local
Value: 0
Text tSend
Attributes
ID : 3
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 0
Width : 348
Height : 22
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : newtxt
Max. Text Size : 100
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tTmp
Attributes
ID : 4
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 406
y coordinate : 277
Width : 34
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tInstruction
Attributes
ID : 9
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 290
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 20
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tId
Attributes
ID : 10
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 100
y coordinate : 290
Width : 100
Height : 29
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 20
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tHeading
Attributes
ID : 11
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 23
y coordinate : 26
Width : 345
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 1
Back. Color : 6371
Font Color : 65535
Horizontal Alignment : left
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 40
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tText
Attributes
ID : 12
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 23
y coordinate : 74
Width : 397
Height : 171
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 6371
Font Color : 65535
Horizontal Alignment : left
Vertical Alignment : top
Input Type : character
Text :
Max. Text Size : 500
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Picture p0
Attributes
ID : 1
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 0
Width : 480
Height : 320
Effect : load
Effect Priority : 0
Effect Time : 300
Picture ID : 0
Button b0
Attributes
ID : 2
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 397
y coordinate : 8
Width : 50
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Font ID : 1
Back. Color : 6371
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 14823
Font Color (Unpressed) : 65535
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : 
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
sleepTimeout=vaOldSleepT.val
tSend.txt="event,buttonPress2,popupNotify,bExit"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button b2
Attributes
ID : 13
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 239
y coordinate : 261
Width : 182
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Font ID : 1
Back. Color : 6371
Back. Picture ID (Pressed) : 9
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 65535
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text :
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
sleepTimeout=vaOldSleepT.val
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",notifyAction,yes"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button b1
Attributes
ID : 14
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 24
y coordinate : 261
Width : 182
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Font ID : 1
Back. Color : 6371
Back. Picture ID (Pressed) : 9
Back. Color (Pressed) : 1024
Font Color (Unpressed) : 65535
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text :
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
sleepTimeout=vaOldSleepT.val
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",notifyAction,no"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Timer tmSleep
Attributes
ID : 6
Scope : local
Period (ms): 1000
Enabled : yes
Events
Timer Event
if(sleepTimeout!=0)
{
sleepValue+=1
if(sleepTimeout<=sleepValue)
{
sleepValue=0
click b0,1
click b0,0
}
}
Timer tmSerial
Attributes
ID : 7
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
ucopy payloadLength,2,2,0
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
// calculate crc
crcrest 1,0xFFFF
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
//crcputu 3,u[2]
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
crcputu 0,payloadLength-1
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
// compare crc with recived value
if(crcval==recvCrc)
{
// crc is okay
// here is the location where acual code should be
// write command to variable strCommand
ucopy strCommand.txt,4,payloadLength-5,0
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
spstr strCommand.txt,tInstruction.txt,"~",0
if(tInstruction.txt=="entityUpdateDetail")
{
// get entn
spstr strCommand.txt,entn.txt,"~",1
// get Heading
spstr strCommand.txt,tHeading.txt,"~",2
// heading color
spstr strCommand.txt,tTmp.txt,"~",3
covx tTmp.txt,sys0,0,0
tHeading.pco=sys0
// get b1
spstr strCommand.txt,b1.txt,"~",4
if(b1.txt!="")
{
vis b1,1
}
// b1 color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
b1.pco=sys0
// get b2
spstr strCommand.txt,b2.txt,"~",6
if(b2.txt!="")
{
vis b2,1
}
// b2 color
spstr strCommand.txt,tTmp.txt,"~",7
covx tTmp.txt,sys0,0,0
b2.pco=sys0
// get tText
spstr strCommand.txt,tText.txt,"~",8
// tText color
spstr strCommand.txt,tTmp.txt,"~",9
covx tTmp.txt,sys0,0,0
tText.pco=sys0
//preserve old sleepTimeout
vaOldSleepT.val=sleepTimeout
// sleep timeout
spstr strCommand.txt,tTmp.txt,"~",10
covx tTmp.txt,sys0,0,0
sleepTimeout=sys0
}
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="exitPopup")
{
click b0,1
}
if(tInstruction.txt=="pageType")
{
sleepTimeout=vaOldSleepT.val
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="cardThermo")
{
page cardThermo
}
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
if(bufferPos==usize)
{
// copy whole buffer to t1.txt, for debugging
//ucopy t2.txt,0,usize,0
// ucopy n2.val,0,usize,0
// clear whole buffer
//code_c
//bufferPos=0
}
}
TouchCap tc0
Attributes
ID : 5
Scope: local
Value: 0
Events
Touch Press Event
sleepValue=0

View File

@@ -0,0 +1,694 @@
Page popupShutter
Attributes
ID : 0
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
Width : 480
Effect : load
Effect Priority : 0
Effect Time : 300
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Fill : solid color
Back. Color : 6371
Events
Preinitialize Event
//get entitiy name
tEntity.txt=pageIcons.tTmp1.txt
//get entity id
entn.txt=pageIcons.tTmp2.txt
vis p0,0
vis tSend,0
vis tTmp,0
vis tInstruction,0
vis tId,0
//page open event
// event,pageOpenDetail,typeOfPage,tEntityName
// craft command
tSend.txt="event,pageOpenDetail,popupShutter,"+entn.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Variable (string) strCommand
Attributes
ID : 10
Scope : local
Text :
Max. Text Size: 50
Variable (string) entn
Attributes
ID : 18
Scope : local
Text : newtxt
Max. Text Size: 50
Text tEntity
Attributes
ID : 2
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 65
y coordinate : 108
Width : 195
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 6371
Font Color : 65535
Horizontal Alignment : left
Vertical Alignment : center
Input Type : character
Text : tEntity1
Max. Text Size : 25
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tIcon1
Attributes
ID : 3
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 12
y coordinate : 109
Width : 45
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 1
Back. Color : 6371
Font Color : 17299
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : 
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tSend
Attributes
ID : 5
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 0
Width : 348
Height : 22
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : newtxt
Max. Text Size : 100
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tTmp
Attributes
ID : 6
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 406
y coordinate : 277
Width : 34
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tInstruction
Attributes
ID : 11
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 290
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 20
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tId
Attributes
ID : 12
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 100
y coordinate : 290
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 65535
Font Color : 0
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 20
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text t1
Attributes
ID : 17
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 64
y coordinate : 164
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 0
Back. Color : 6371
Font Color : 65535
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : Position
Max. Text Size : 15
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Picture p0
Attributes
ID : 1
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 0
Width : 480
Height : 320
Effect : load
Effect Priority : 0
Effect Time : 300
Picture ID : 0
Slider hPosition
Attributes
ID : 16
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 65
y coordinate : 194
Width : 335
Height : 43
Effect : load
Effect Priority : 0
Effect Time : 300
Direction : horizontal
Fill : image
Cursor width : auto
Cursor height : 255
Back. Picture ID : 5
Slided Back. Picture ID : 4
Position : 50
Upper range limit : 100
Lower range limit : 0
Events
Touch Release Event
// event,buttonPress2,internalNameEntity,positionSlider,50
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",positionSlider,"
covx hPosition.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button b0
Attributes
ID : 4
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 397
y coordinate : 8
Width : 50
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Font ID : 1
Back. Color : 6371
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 14823
Font Color (Unpressed) : 65535
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : 
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
tSend.txt="event,buttonPress2,popupShutter,bExit"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bDown1
Attributes
ID : 13
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 393
y coordinate : 96
Width : 50
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Font ID : 1
Back. Color : 6371
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 14823
Font Color (Unpressed) : 65535
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : 
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
tSend.txt="event,buttonPress2,"+entn.txt+",down"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bStop1
Attributes
ID : 14
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 341
y coordinate : 96
Width : 50
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Font ID : 1
Back. Color : 6371
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 14823
Font Color (Unpressed) : 65535
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : 
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
tSend.txt="event,buttonPress2,"+entn.txt+",stop"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bUp1
Attributes
ID : 15
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 289
y coordinate : 96
Width : 50
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Font ID : 1
Back. Color : 6371
Back. Picture ID (Pressed) : 65535
Back. Color (Pressed) : 14823
Font Color (Unpressed) : 65535
Font Color (Pressed) : 65535
Horizontal Alignment : center
Vertical Alignment : center
State : unpressed
Text : 
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
tSend.txt="event,buttonPress2,"+entn.txt+",up"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Timer tmSleep
Attributes
ID : 8
Scope : local
Period (ms): 1000
Enabled : yes
Events
Timer Event
if(sleepTimeout!=0)
{
sleepValue+=1
if(sleepTimeout<=sleepValue)
{
sleepValue=0
click b0,1
click b0,0
}
}
Timer tmSerial
Attributes
ID : 9
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
ucopy payloadLength,2,2,0
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
// calculate crc
crcrest 1,0xFFFF
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
//crcputu 3,u[2]
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
crcputu 0,payloadLength-1
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
// compare crc with recived value
if(crcval==recvCrc)
{
// crc is okay
// here is the location where acual code should be
// write command to variable strCommand
ucopy strCommand.txt,4,payloadLength-5,0
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
spstr strCommand.txt,tInstruction.txt,"~",0
if(tInstruction.txt=="entityUpdateDetail")
{
// get Position value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sys0,0,0
hPosition.val=sys0
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
}
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="pageType")
{
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
if(bufferPos==usize)
{
// copy whole buffer to t1.txt, for debugging
//ucopy t2.txt,0,usize,0
// ucopy n2.val,0,usize,0
// clear whole buffer
//code_c
//bufferPos=0
}
}
TouchCap tc0
Attributes
ID : 7
Scope: local
Value: 0
Events
Touch Press Event
sleepValue=0

File diff suppressed because it is too large Load Diff

View File

@@ -5,24 +5,12 @@ Program.s
int recvCrc=0
int payloadLength=0
int par0=0,par1=0
// landsspace orientation x has 480px and y has 320px xy limits todo: adjust xy values to something that fit's resulution
//Maximum values in directional change for Swipes beeing detected as swipe (diagonal swipes are invalid) (for one axis at a time)
int xLimit=125,yLimit=125
int ixLimit=-125,iyLimit=-125
//Minimum values for swipes, directional changes below theese values are ignored, because they could be unintended swipes
int xLimitMin=80,yLimitMin=80
int ixLimitMin=-80,iyLimitMin=-80
// Swipe Result Vars
int ycR=0,xcR=0
// Start End Swipe Touch Locations
int yc1=0,xc1=0,yc2=0,xc2=0
// sleep timeout in s
int sleepTimeout=20
int sleepValue=0
// dim value
int dimValue=40
// current page
int nPage=0
int dimValueNormal=100
// fix touch offset
lcd_dev fffb 0002 0000 0020
page pageStartup

776
HMI/n2t-out/cardAlarm.txt Normal file
View File

@@ -0,0 +1,776 @@
Page cardAlarm
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Events
Preinitialize Event
vis p0,0
vis tSend,0
vis tInstruction,0
vis tTmp,0
vis tId,0
vis arm1,0
vis arm2,0
vis arm3,0
vis arm4,0
vis b0,0
vis b1,0
vis b2,0
vis b3,0
vis b4,0
vis b5,0
vis b6,0
vis b7,0
vis b8,0
vis b9,0
vis b10,0
vis tCode,0
Variable (string) strCommand
Attributes
Scope : local
Text :
Max. Text Size: 200
Variable (string) entn
Attributes
Scope : local
Text :
Max. Text Size: 50
Variable (string) tSend
Attributes
Scope : local
Text :
Max. Text Size: 100
Variable (string) va1
Attributes
Scope : local
Text :
Max. Text Size: 20
Variable (string) va2
Attributes
Scope : local
Text :
Max. Text Size: 20
Variable (string) va3
Attributes
Scope : local
Text :
Max. Text Size: 20
Variable (string) va4
Attributes
Scope : local
Text :
Max. Text Size: 20
Text tTmp
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tInstruction
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 20
Text tId
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 20
Text tCode
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tIcon
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Picture p0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Button bNext
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,bNext"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bPrev
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button b0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 1
Max. Text Size : 10
Events
Touch Press Event
tCode.txt=tCode.txt+"1"
Button b1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 2
Max. Text Size : 10
Events
Touch Press Event
tCode.txt=tCode.txt+"2"
Button b2
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 3
Max. Text Size : 10
Events
Touch Press Event
tCode.txt=tCode.txt+"3"
Button b3
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 4
Max. Text Size : 10
Events
Touch Press Event
tCode.txt=tCode.txt+"4"
Button b4
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 5
Max. Text Size : 10
Events
Touch Press Event
tCode.txt=tCode.txt+"5"
Button b5
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 6
Max. Text Size : 10
Events
Touch Press Event
tCode.txt=tCode.txt+"6"
Button b6
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 7
Max. Text Size : 10
Events
Touch Press Event
tCode.txt=tCode.txt+"7"
Button b7
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 8
Max. Text Size : 10
Events
Touch Press Event
tCode.txt=tCode.txt+"8"
Button b8
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 9
Max. Text Size : 10
Events
Touch Press Event
tCode.txt=tCode.txt+"9"
Button b9
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 0
Max. Text Size : 10
Events
Touch Press Event
tCode.txt=tCode.txt+"0"
Button b10
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : CLR
Max. Text Size : 10
Events
Touch Press Event
tCode.txt=""
Button arm1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
// event,buttonPress2,entn,arm1,tCode
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+=va1.txt+","
tSend.txt+=tCode.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
tCode.txt=""
Button arm3
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
// event,buttonPress2,entn,arm1,tCode
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+=va3.txt+","
tSend.txt+=tCode.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
tCode.txt=""
Button arm2
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
// event,buttonPress2,entn,arm1,tCode
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+=va2.txt+","
tSend.txt+=tCode.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
tCode.txt=""
Button arm4
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text :
Max. Text Size : 40
Events
Touch Press Event
// event,buttonPress2,entn,arm1,tCode
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+=va4.txt+","
tSend.txt+=tCode.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
tCode.txt=""
Timer tmSerial
Attributes
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
ucopy payloadLength,2,2,0
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
// calculate crc
crcrest 1,0xFFFF
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
//crcputu 3,u[2]
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
crcputu 0,payloadLength-1
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
// compare crc with recived value
if(crcval==recvCrc)
{
// crc is okay
// here is the location where acual code should be
// write command to variable strCommand
ucopy strCommand.txt,4,payloadLength-5,0
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
spstr strCommand.txt,tInstruction.txt,"~",0
if(tInstruction.txt=="entityUpd")
{
//entn
spstr strCommand.txt,entn.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
{
vis bPrev,0
}
if(tTmp.txt=="1")
{
vis bPrev,1
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
{
vis bNext,0
}
if(tTmp.txt=="1")
{
vis bPrev,1
bNext.txt=""
}
//text arm1
spstr strCommand.txt,arm1.txt,"~",3
if(arm1.txt!="")
{
vis arm1,1
}
//id arm1
spstr strCommand.txt,va1.txt,"~",4
//text arm2
spstr strCommand.txt,arm2.txt,"~",5
if(arm2.txt!="")
{
vis arm2,1
}
//id arm2
spstr strCommand.txt,va2.txt,"~",6
//text arm3
spstr strCommand.txt,arm3.txt,"~",7
if(arm3.txt!="")
{
vis arm3,1
}
//id arm3
spstr strCommand.txt,va3.txt,"~",8
//text arm4
spstr strCommand.txt,arm4.txt,"~",9
if(arm4.txt!="")
{
vis arm4,1
}
//id arm4
spstr strCommand.txt,va4.txt,"~",10
//icon
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tIcon.txt,sys0,1
//icon color
spstr strCommand.txt,tTmp.txt,"~",12
covx tTmp.txt,sys0,0,0
tIcon.pco=sys0
//numpad status
spstr strCommand.txt,tTmp.txt,"~",13
if(tTmp.txt!="disable")
{
vis b0,1
vis b1,1
vis b2,1
vis b3,1
vis b4,1
vis b5,1
vis b6,1
vis b7,1
vis b8,1
vis b9,1
vis b10,1
vis tCode,1
}else
{
vis b0,0
vis b1,0
vis b2,0
vis b3,0
vis b4,0
vis b5,0
vis b6,0
vis b7,0
vis b8,0
vis b9,0
vis b10,0
vis tCode,0
}
//flashing status
spstr strCommand.txt,tTmp.txt,"~",14
if(tTmp.txt=="enable")
{
tmFlash.en=1
}else
{
tmFlash.en=0
}
}
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
dim=dimValue
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="pageType")
{
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="screensaver")
{
page screensaver
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="popupShutter")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupShutter
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardThermo")
{
page cardThermo
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
}
Timer tmSleep
Attributes
Scope : local
Period (ms): 1000
Enabled : yes
Events
Timer Event
if(sleepTimeout!=0&&dimValue!=dim)
{
sleepValue+=1
if(sleepTimeout<=sleepValue)
{
sleepValue=0
dim=dimValue
tSend.txt="event,sleepReached,cardAlarm"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
}
}
Timer tmFlash
Attributes
Scope : local
Period (ms): 600
Enabled : no
Events
Timer Event
if(tIcon.isbr==1)
{
tIcon.isbr=0
vis tIcon,0
}else
{
tIcon.isbr=1
vis tIcon,1
}
TouchCap tc0
Attributes
Scope: local
Value: 0
Events
Touch Press Event
sleepValue=0

File diff suppressed because it is too large Load Diff

884
HMI/n2t-out/cardGrid.txt Normal file
View File

@@ -0,0 +1,884 @@
Page cardGrid
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Events
Preinitialize Event
//wup=cardEntities
//remove background & activate reparse mode
vis p0,0
recmod=1
bauds=115200
//debug stuff
vis tTmp,0
vis tSend,0
vis tInstruction,0
vis tId,0
vis bEntity1,0
vis bEntity2,0
vis bEntity3,0
vis bEntity4,0
vis bEntity5,0
vis bEntity6,0
vis tEntity1,0
vis tEntity2,0
vis tEntity3,0
vis tEntity4,0
vis tEntity5,0
vis tEntity6,0
Variable (string) strCommand
Attributes
Scope : local
Text :
Max. Text Size: 500
Variable (string) type1
Attributes
Scope : local
Text :
Max. Text Size: 10
Variable (string) type2
Attributes
Scope : local
Text :
Max. Text Size: 10
Variable (string) type3
Attributes
Scope : local
Text :
Max. Text Size: 10
Variable (string) type4
Attributes
Scope : local
Text :
Max. Text Size: 10
Variable (string) entn1
Attributes
Scope : local
Text :
Max. Text Size: 70
Variable (string) entn2
Attributes
Scope : local
Text :
Max. Text Size: 70
Variable (string) entn3
Attributes
Scope : local
Text :
Max. Text Size: 70
Variable (string) entn4
Attributes
Scope : local
Text :
Max. Text Size: 70
Variable (string) type5
Attributes
Scope : local
Text :
Max. Text Size: 10
Variable (string) type6
Attributes
Scope : local
Text :
Max. Text Size: 10
Variable (string) entn5
Attributes
Scope : local
Text :
Max. Text Size: 50
Variable (string) entn6
Attributes
Scope : local
Text :
Max. Text Size: 50
Text tHeading
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 40
Text tEntity1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : tEntity1
Max. Text Size : 30
Text tSend
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : newtxt
Max. Text Size : 100
Text tTmp
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
Text tInstruction
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 20
Text tId
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 50
Text tEntity2
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : tEntity2
Max. Text Size : 30
Text tEntity3
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : tEntity3
Max. Text Size : 30
Text tEntity4
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : tEntity4
Max. Text Size : 30
Text tEntity5
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : tEntity5
Max. Text Size : 30
Text tEntity6
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : tEntity6
Max. Text Size : 30
Picture p0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Button bPrev
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardGrid,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bNext
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardGrid,bNext"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bEntity1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tmLP.en=1
tTmp.txt=type1.txt
pageIcons.tTmp1.txt=tEntity1.txt
pageIcons.tTmp2.txt=entn1.txt
if(type1.txt=="shutter")
{
page popupShutter
}
Touch Release Event
tmLP.en=0
tSend.txt="event,buttonPress2,"+entn1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bEntity2
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tmLP.en=1
tTmp.txt=type2.txt
pageIcons.tTmp1.txt=tEntity2.txt
pageIcons.tTmp2.txt=entn2.txt
if(type2.txt=="shutter")
{
page popupShutter
}
Touch Release Event
tmLP.en=0
tSend.txt="event,buttonPress2,"+entn2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bEntity3
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tmLP.en=1
tTmp.txt=type3.txt
pageIcons.tTmp1.txt=tEntity3.txt
pageIcons.tTmp2.txt=entn3.txt
if(type3.txt=="shutter")
{
page popupShutter
}
Touch Release Event
tmLP.en=0
tSend.txt="event,buttonPress2,"+entn3.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bEntity4
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tmLP.en=1
tTmp.txt=type4.txt
pageIcons.tTmp1.txt=tEntity4.txt
pageIcons.tTmp2.txt=entn4.txt
if(type4.txt=="shutter")
{
page popupShutter
}
Touch Release Event
tmLP.en=0
tSend.txt="event,buttonPress2,"+entn4.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bEntity5
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tmLP.en=1
tTmp.txt=type5.txt
pageIcons.tTmp1.txt=tEntity5.txt
pageIcons.tTmp2.txt=entn5.txt
if(type5.txt=="shutter")
{
page popupShutter
}
Touch Release Event
tmLP.en=0
tSend.txt="event,buttonPress2,"+entn5.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bEntity6
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tmLP.en=1
tTmp.txt=type6.txt
pageIcons.tTmp1.txt=tEntity6.txt
pageIcons.tTmp2.txt=entn6.txt
if(type6.txt=="shutter")
{
page popupShutter
}
Touch Release Event
tmLP.en=0
tSend.txt="event,buttonPress2,"+entn6.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Hotspot mSpecial
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Events
Touch Press Event
sys2=sys2+1
sys2%=10
//n0.val=sys2
if(sys2==9)
{
page pageTest
}
Timer tmSerial
Attributes
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
ucopy payloadLength,2,2,0
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
// calculate crc
crcrest 1,0xFFFF
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
//crcputu 3,u[2]
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
crcputu 0,payloadLength-1
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
// compare crc with recived value
if(crcval==recvCrc)
{
// crc is okay
// here is the location where acual code should be
// write command to variable strCommand
ucopy strCommand.txt,4,payloadLength-5,0
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
spstr strCommand.txt,tInstruction.txt,"~",0
if(tInstruction.txt=="entityUpd")
{
// command format: entityUpd,heading,navigation,[,type,internalName,iconId,iconColor,displayName,optionalValue]x6
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
{
vis bPrev,0
}
if(tTmp.txt=="1")
{
vis bPrev,1
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
{
vis bNext,0
}
if(tTmp.txt=="1")
{
vis bPrev,1
bNext.txt=""
}
// get Type
spstr strCommand.txt,type1.txt,"~",3
// get internal name
spstr strCommand.txt,entn1.txt,"~",4
if(type1.txt=="delete"||type1.txt=="")
{
vis tEntity1,0
vis bEntity1,0
}else
{
// change icon
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,bEntity1.txt,sys0,1
vis bEntity1,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",6
covx tTmp.txt,sys0,0,0
bEntity1.pco=sys0
// set name
spstr strCommand.txt,tEntity1.txt,"~",7
vis tEntity1,1
}
// get Type
spstr strCommand.txt,type2.txt,"~",9
// get internal name
spstr strCommand.txt,entn2.txt,"~",10
if(type2.txt=="delete"||type2.txt=="")
{
vis tEntity2,0
vis bEntity2,0
}else
{
// change icon
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,bEntity2.txt,sys0,1
vis bEntity2,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",12
covx tTmp.txt,sys0,0,0
bEntity2.pco=sys0
// set name
spstr strCommand.txt,tEntity2.txt,"~",13
vis tEntity2,1
}
// get Type
spstr strCommand.txt,type3.txt,"~",15
// get internal name
spstr strCommand.txt,entn3.txt,"~",16
if(type3.txt=="delete"||type3.txt=="")
{
vis tEntity3,0
vis bEntity3,0
}else
{
// change icon
spstr strCommand.txt,tTmp.txt,"~",17
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,bEntity3.txt,sys0,1
vis bEntity3,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",18
covx tTmp.txt,sys0,0,0
bEntity3.pco=sys0
// set name
spstr strCommand.txt,tEntity3.txt,"~",19
vis tEntity3,1
}
// get Type
spstr strCommand.txt,type4.txt,"~",21
// get internal name
spstr strCommand.txt,entn4.txt,"~",22
if(type4.txt=="delete"||type4.txt=="")
{
vis tEntity4,0
vis bEntity4,0
}else
{
// change icon
spstr strCommand.txt,tTmp.txt,"~",23
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,bEntity4.txt,sys0,1
vis bEntity4,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",24
covx tTmp.txt,sys0,0,0
bEntity4.pco=sys0
// set name
spstr strCommand.txt,tEntity4.txt,"~",25
vis tEntity4,1
}
// get Type
spstr strCommand.txt,type5.txt,"~",27
// get internal name
spstr strCommand.txt,entn5.txt,"~",28
if(type5.txt=="delete"||type5.txt=="")
{
vis tEntity5,0
vis bEntity5,0
}else
{
// change icon
spstr strCommand.txt,tTmp.txt,"~",29
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,bEntity5.txt,sys0,1
vis bEntity5,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",30
covx tTmp.txt,sys0,0,0
bEntity5.pco=sys0
// set name
spstr strCommand.txt,tEntity5.txt,"~",31
vis tEntity5,1
}
// get Type
spstr strCommand.txt,type6.txt,"~",33
// get internal name
spstr strCommand.txt,entn6.txt,"~",34
if(type6.txt=="delete"||type6.txt=="")
{
vis tEntity6,0
vis bEntity6,0
}else
{
// change icon
spstr strCommand.txt,tTmp.txt,"~",35
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,bEntity6.txt,sys0,1
vis bEntity6,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",36
covx tTmp.txt,sys0,0,0
bEntity6.pco=sys0
// set name
spstr strCommand.txt,tEntity6.txt,"~",37
vis tEntity6,1
}
}
if(tInstruction.txt=="pageType")
{
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="screensaver")
{
page screensaver
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="popupShutter")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupShutter
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardThermo")
{
page cardThermo
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
}
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
}
Timer tmSleep
Attributes
Scope : local
Period (ms): 1000
Enabled : yes
Events
Timer Event
if(sleepTimeout!=0&&dimValue!=dim)
{
sleepValue+=1
if(sleepTimeout<=sleepValue)
{
sleepValue=0
dim=dimValue
tSend.txt="event,sleepReached,cardGrid"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
}
}
Timer tmLP
Attributes
Scope : local
Period (ms): 500
Enabled : no
Events
Timer Event
if(tTmp.txt=="light")
{
page popupLight
}
TouchCap tc0
Attributes
Scope: local
Value: 0
Events
Touch Press Event
sleepValue=0

View File

@@ -1,6 +1,5 @@
Page cardMedia
Attributes
ID : 0
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -16,68 +15,46 @@ Page cardMedia
vis p0,0
vis tSend,0
vis tInstruction,0
vis nPageDisp,0
vis tTmp,0
vis tId,0
vis t5,0
//vis nPageDisp,0
//page open event
// event,pageOpen,cardEntities,pageNumber
// craft command
// convert pageNumber and write to tTmp
covx nPage,tTmp.txt,0,0
tSend.txt="event,pageOpen,"+tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
//display current page from global var
nPageDisp.val=nPage
Variable (string) strCommand
Attributes
ID : 8
Scope : local
Text :
Max. Text Size: 200
Max. Text Size: 500
Variable (string) entn
Attributes
ID : 19
Scope : local
Text :
Max. Text Size: 50
Number nPageDisp
Variable (string) vaSpeakerList
Attributes
ID : 6
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Value : 0
Scope : local
Text :
Max. Text Size: 200
Variable (int32) vaSpeakerPos
Attributes
Scope: local
Value: 0
Text tSend
Attributes
ID : 2
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : newtxt
Max. Text Size : 100
Text :
Max. Text Size : 200
Text tTmp
Attributes
ID : 3
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -88,7 +65,6 @@ Text tTmp
Text tInstruction
Attributes
ID : 9
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -99,7 +75,6 @@ Text tInstruction
Text tId
Attributes
ID : 10
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -110,7 +85,6 @@ Text tId
Text tHeading
Attributes
ID : 11
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -121,7 +95,6 @@ Text tHeading
Text tTitle
Attributes
ID : 12
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -132,7 +105,6 @@ Text tTitle
Text tAuthor
Attributes
ID : 13
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -143,25 +115,21 @@ Text tAuthor
Text t2
Attributes
ID : 14
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : î¬
Text : 
Max. Text Size : 10
Events
Touch Press Event
// event,1,tHeading,tEntityName,1,up
// event,buttonPress2,entn,media-next
//craft command
// convert pageNumber and write to tTmp
covx nPage,tTmp.txt,0,0
tSend.txt="event,buttonPress,"+tTmp.txt+","
tSend.txt+=tHeading.txt+","
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="1,media-next"
tSend.txt+="media-next"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -176,7 +144,6 @@ Text t2
Text tPlayPause
Attributes
ID : 15
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -187,14 +154,11 @@ Text tPlayPause
Events
Touch Press Event
// event,1,tHeading,tEntityName,1,up
// event,buttonPress2,entn,media-pause
//craft command
// convert pageNumber and write to tTmp
covx nPage,tTmp.txt,0,0
tSend.txt="event,buttonPress,"+tTmp.txt+","
tSend.txt+=tHeading.txt+","
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="1,media-pause"
tSend.txt+="media-pause"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -209,25 +173,21 @@ Text tPlayPause
Text t0
Attributes
ID : 16
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : î­
Text : 
Max. Text Size : 10
Events
Touch Press Event
// event,1,tHeading,tEntityName,1,up
// event,buttonPress2,entn,media-back
//craft command
// convert pageNumber and write to tTmp
covx nPage,tTmp.txt,0,0
tSend.txt="event,buttonPress,"+tTmp.txt+","
tSend.txt+=tHeading.txt+","
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="1,media-back"
tSend.txt+="media-back"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -242,7 +202,6 @@ Text t0
Text tIcon
Attributes
ID : 18
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -251,9 +210,158 @@ Text tIcon
Text :
Max. Text Size : 10
Text t1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 
Max. Text Size : 10
Events
Touch Press Event
hVolume.val=hVolume.val-5
// event,buttonPress2,internalNameEntity,volumeSlider,50
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",volumeSlider,"
covx hVolume.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Text t3
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 
Max. Text Size : 10
Events
Touch Press Event
hVolume.val=hVolume.val+5
// event,buttonPress2,internalNameEntity,volumeSlider,50
//craft command
tSend.txt="event,buttonPress2,"+entn.txt+",volumeSlider,"
covx hVolume.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Text t4
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 
Max. Text Size : 10
Text tSpeaker
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 50
Events
Touch Press Event
// event,buttonPress2,entn,media-next
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="speaker-sel,"+tSpeaker.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Text t6
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 
Max. Text Size : 10
Events
Touch Press Event
//speaker
tSpeaker.pco=65535
spstr vaSpeakerList.txt,tSpeaker.txt,"?",vaSpeakerPos.val
vaSpeakerPos.val+=1
if(tSpeaker.txt=="")
{
vaSpeakerPos.val=0
spstr vaSpeakerList.txt,tSpeaker.txt,"?",vaSpeakerPos.val
}
Text t5
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 
Max. Text Size : 10
Events
Touch Press Event
// event,buttonPress2,entn,media-next
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="media-OnOff"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Picture p0
Attributes
ID : 1
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -261,7 +369,6 @@ Picture p0
Slider hVolume
Attributes
ID : 17
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -272,14 +379,11 @@ Slider hVolume
Events
Touch Release Event
// event,buttonPress,D,nameEntity,internalNameEntity,1,positionSlider,50
tmCooldown.en=1
tmCooldown.tim=800
// event,buttonPress2,internalNameEntity,volumeSlider,50
//craft command
// convert pageNumber and write to tTmp
covx nPage,tTmp.txt,0,0
tSend.txt="event,buttonPress,"+tTmp.txt+","
tSend.txt+=tHeading.txt+","
tSend.txt+=entn.txt+","
tSend.txt+="1,volumeSlider,"
tSend.txt="event,buttonPress2,"+entn.txt+",volumeSlider,"
covx hVolume.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
//send calc crc
@@ -296,25 +400,17 @@ Slider hVolume
Button bNext
Attributes
ID : 4
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Text : 
Max. Text Size : 10
Events
Touch Press Event
nPage=nPage+1
nPageDisp.val=nPage
//page open event
// event,pageOpen,cardEntities,pageNumber
// craft command
// convert pageNumber and write to tTmp
covx nPage,tTmp.txt,0,0
tSend.txt="event,pageOpen,"+tTmp.txt
tSend.txt="event,buttonPress2,cardMedia,bNext"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -329,25 +425,24 @@ Button bNext
Button bPrev
Attributes
ID : 5
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Text : 
Max. Text Size : 10
Events
Touch Press Event
nPage=nPage-1
nPageDisp.val=nPage
//page open event
// event,pageOpen,cardEntities,pageNumber
// craft command
// convert pageNumber and write to tTmp
covx nPage,tTmp.txt,0,0
tSend.txt="event,pageOpen,"+tTmp.txt
tSend.txt="event,buttonPress2,cardMedia,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -362,7 +457,6 @@ Button bPrev
Timer tmSerial
Attributes
ID : 7
Scope : local
Period (ms): 50
Enabled : yes
@@ -411,78 +505,159 @@ Timer tmSerial
// write command to variable strCommand
ucopy strCommand.txt,4,payloadLength-5,0
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
spstr strCommand.txt,tInstruction.txt,",",0
spstr strCommand.txt,tInstruction.txt,"~",0
if(tInstruction.txt=="entityUpd")
{
//entity name
spstr strCommand.txt,entn.txt,"|",1
//heading
spstr strCommand.txt,tHeading.txt,"|",2
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
{
vis bPrev,0
}
if(tTmp.txt=="1")
{
vis bPrev,1
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
{
vis bNext,0
}
if(tTmp.txt=="1")
{
vis bPrev,1
bNext.txt=""
}
//entity name
spstr strCommand.txt,entn.txt,"~",3
//icon
spstr strCommand.txt,tTmp.txt,"|",3
spstr strCommand.txt,tTmp.txt,"~",4
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tIcon.txt,sys0,1
//title
spstr strCommand.txt,tTitle.txt,"|",4
spstr strCommand.txt,tTitle.txt,"~",5
//author
spstr strCommand.txt,tAuthor.txt,"|",5
spstr strCommand.txt,tAuthor.txt,"~",6
//volume
spstr strCommand.txt,tTmp.txt,"|",6
spstr strCommand.txt,tTmp.txt,"~",7
covx tTmp.txt,sys0,0,0
hVolume.val=sys0
//icon
spstr strCommand.txt,tTmp.txt,"|",7
spstr strCommand.txt,tTmp.txt,"~",8
covx tTmp.txt,sys0,0,0
substr pageIcons.tIcons.txt,tPlayPause.txt,sys0,1
//speaker current
spstr strCommand.txt,tSpeaker.txt,"~",9
if(tSpeaker.txt!="")
{
tSpeaker.pco=1374
}else
{
tSpeaker.pco=65535
}
//speaker list
spstr strCommand.txt,vaSpeakerList.txt,"~",10
if(vaSpeakerList.txt=="")
{
vis t6,0
}
vaSpeakerPos.val=0
// on off button
spstr strCommand.txt,tTmp.txt,"~",11
if(tTmp.txt=="disable")
{
vis t5,0
}else
{
vis t5,1
covx tTmp.txt,t5.pco,0,0
}
}
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,screensaver.vaTime.txt,",",1
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,screensaver.vaDate.txt,"?",1
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,",",1
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
dim=dimValue
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,",",1
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="pageType")
{
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,",",1
if(tId.txt=="cardMedia")
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="pageStartup")
{
//yay, we are already on the correct page
}else
page pageStartup
}
if(tId.txt=="screensaver")
{
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete u[2]+3
bufferPos=0
page screensaver
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="popupShutter")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupShutter
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardThermo")
{
page cardThermo
}
if(tId.txt=="pageStartup")
if(tId.txt=="cardMedia")
{
page pageStartup
page cardMedia
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
}
// end of user code
@@ -508,27 +683,46 @@ Timer tmSerial
Timer tmSleep
Attributes
ID : 20
Scope : local
Period (ms): 1000
Enabled : yes
Events
Timer Event
if(sleepTimeout!=0)
if(sleepTimeout!=0&&dimValue!=dim)
{
sleepValue+=1
if(sleepTimeout<=sleepValue)
{
screensaver.originPage.val=dp
sleepValue=0
page screensaver
dim=dimValue
tSend.txt="event,sleepReached,cardMedia"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,1
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
}
}
Timer tmCooldown
Attributes
Scope : local
Period (ms): 100
Enabled : no
Events
Timer Event
tmCooldown.en=0
TouchCap tc0
Attributes
ID : 21
Scope: local
Value: 0

File diff suppressed because it is too large Load Diff

View File

@@ -1,13 +0,0 @@
Page page0
Attributes
ID : 0
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled

View File

@@ -1,6 +1,5 @@
Page pageIcons
Attributes
ID : 0
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -11,31 +10,30 @@ Page pageIcons
Swide left page ID : disabled
Swide right page ID : disabled
Text t0
Variable (string) vaTime
Attributes
ID : 2
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : tIcons contains all icons that can be used though serial (icon will be pulled from this textbox, first icon 0 and so on)
Max. Text Size : 400
Scope : global
Text :
Max. Text Size: 15
Variable (string) vaDate
Attributes
Scope : global
Text :
Max. Text Size: 35
Text tIcons
Attributes
ID : 3
Scope : global
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : îî—îî–‘
Max. Text Size : 100
Text : 
Max. Text Size : 170
Text tTmp1
Attributes
ID : 4
Scope : global
Dragging : 0
Disable release event after dragging: 0
@@ -46,7 +44,6 @@ Text tTmp1
Text tTmp2
Attributes
ID : 5
Scope : global
Dragging : 0
Disable release event after dragging: 0
@@ -57,7 +54,6 @@ Text tTmp2
Picture p0
Attributes
ID : 1
Scope : local
Dragging : 0
Disable release event after dragging: 0

Some files were not shown because too many files have changed in this diff Show More