Compare commits

...

273 Commits

Author SHA1 Message Date
Johannes
c626a4eb27 Update nspanel-lovelace-ui.py 2023-01-05 21:09:31 +01:00
Johannes
b8acbb531f Update subpages.md 2023-01-05 21:06:08 +01:00
Johannes
2147ae722f Update subpages.md 2023-01-05 21:05:39 +01:00
Johannes
30fb9c7bdc Update subpages.md 2023-01-05 21:04:39 +01:00
joBr99
55365dcfaa added flipped version (add nextion2text) 2023-01-05 18:06:23 +00:00
Johannes
7791c8d4b0 added flipped version 2023-01-05 18:56:20 +01:00
Johannes
791da7257c sync and bump version 2023-01-05 18:55:07 +01:00
Armilar
a9c23c1938 Merge pull request #666 from kuckuckmann/patch-9
Create WLED.js
2023-01-04 23:18:11 +01:00
kuckuckmann
913685ef6e Create WLED.js 2023-01-04 23:16:02 +01:00
Daniel Albert
ed620559aa Make neighbor card generation work in Python < 3.10 (#665)
Co-authored-by: Daniel Albert <esclear@users.noreply.github.com>
Co-authored-by: Johannes <johannes+develop+github@braun-rheingau.de>
2023-01-04 21:18:38 +01:00
Johannes Braun
6870bfe3ff fix template None template call 2023-01-04 20:51:13 +01:00
Johannes Braun
6951da126a use shorter custom ids instand of uuid 2023-01-04 19:44:40 +01:00
Johannes Braun
dca2db7ce3 implements #633 2023-01-04 18:07:59 +01:00
Armilar
5957f2ff12 Merge pull request #664 from kuckuckmann/patch-8
Create Homatic_nonIP_Thermostate.xml
2023-01-03 21:22:52 +01:00
kuckuckmann
426ceb832a Create Homatic_nonIP_Thermostate.xml 2023-01-03 21:21:14 +01:00
kayvenm
cfd74ce87f Fix for empty detail page after change on previous page (#662)
* Update mqtt.py

Allow force sending duplicate messages

* Update pages.py

Allow forcing sending MQTT message when the detail page is initially generated

* Update controller.py

Set is_open_detail to True when generate_xx_detail_page is called from detail_open
2023-01-03 14:14:06 +01:00
joBr99
9f8c83dfad increase cmd buffer cardthermo (add nextion2text) 2023-01-03 11:41:55 +00:00
Johannes
9cc7b7a38a increase cmd buffer cardthermo 2023-01-03 12:38:24 +01:00
Armilar
3e45273467 Merge pull request #659 from kuckuckmann/patch-6
Create Uhrzeit_Logging.xml
2023-01-01 20:19:37 +01:00
kuckuckmann
1384089e92 Create Uhrzeit_Logging.xml 2023-01-01 19:59:06 +01:00
Johannes
30d752cab5 Update mkdocs.yml 2023-01-01 13:36:20 +01:00
Johannes
e57c50e278 Update configure_mqtt.md 2022-12-31 17:54:02 +01:00
joBr99
e2501f79ad sync (add nextion2text) 2022-12-31 14:51:00 +00:00
Johannes
b7a207407f sync 2022-12-31 15:46:59 +01:00
joBr99
965aeeb000 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui (add nextion2text) 2022-12-31 14:38:25 +00:00
Johannes
056776bc42 Merge branch 'main' of https://github.com/joBr99/nspanel-lovelace-ui 2022-12-31 15:35:14 +01:00
Johannes
3c487394c3 sync some changes to us-p 2022-12-31 15:35:09 +01:00
joBr99
bfc7961e84 implements #654 (add nextion2text) 2022-12-31 14:00:56 +00:00
Johannes
8aec75c959 implements #654 2022-12-31 14:56:33 +01:00
Johannes
a7e30166ee added links to some related projects 2022-12-31 13:34:47 +01:00
Johannes Braun
a26e9e390b Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui 2022-12-31 13:22:40 +01:00
Johannes Braun
95af12e6ea add some info that was deleted 2022-12-31 13:22:09 +01:00
joBr99
6a5315dc76 Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui (add nextion2text) 2022-12-31 00:55:04 +00:00
Johannes Braun
e39972deec Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui 2022-12-31 01:52:17 +01:00
Johannes
2da9acce65 Update README.md 2022-12-30 22:45:37 +01:00
Johannes Braun
9314792eaf sync some chanegs 2022-12-30 22:02:48 +01:00
joBr99
93f0f858b8 fixes #653 (add nextion2text) 2022-12-30 20:03:43 +00:00
Johannes Braun
4e57b50e0a fixes #653 2022-12-30 21:00:33 +01:00
Johannes Braun
c410c0863e Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui 2022-12-30 14:00:14 +01:00
Johannes Braun
18c6cfd7b1 implements #652 2022-12-30 13:59:57 +01:00
Armilar
fdf11a2ead Update ioBroker_NSPanel_locales.json 2022-12-30 11:33:04 +01:00
Armilar
a420c28418 v3.7.3.2 - Submenu-Item with ALIAS by @tt-tom17
- Submenu-Item with ALIAS (external Script)
2022-12-29 18:45:56 +01:00
EddyK69
f7b51c359e Allow icons based on state of status entity (#651)
* Respect iconOverride on navigate & service

iconOverrides on navigates & services where not shown when the status entity was of type 'sensor' on cardGrids

* Allow icons based on state of status entity

Allow icons based on state of status entity on navigate
2022-12-29 18:32:20 +01:00
Armilar
274267532d v3.7.3.2 - Submenu-Item with ALIAS by @tt-tom17
- Submenu-Item with ALIAS (external Script)
2022-12-29 17:59:40 +01:00
Armilar
48b06b1b82 v3.7.3.2 - Submenu-Item with ALIAS
- Submenu-Item with ALIAS (external Script)
2022-12-29 17:52:08 +01:00
Johannes
494a8d49fa Fix nav item if there is only one page 2022-12-29 16:44:24 +01:00
Johannes
ccdc3a9a77 Update config.py 2022-12-29 16:35:01 +01:00
EddyK69
254f2a2e25 Respect iconOverride on navigate & service (#650)
iconOverrides on navigates & services where not shown when the status entity was of type 'sensor' on cardGrids
2022-12-29 14:09:23 +01:00
Johannes
688a847c77 fixes #649 2022-12-29 14:00:01 +01:00
Armilar
888dc5c402 v3.7.3.1 - Hotfix - Dateformat us-p
Hotfix - us-p - DateString - Use long/short Weekday and long/short Month
2022-12-29 11:39:10 +01:00
Armilar
a0836ea9c5 v3.7.3.1 - Hotfix - Dateformat us-p
Hotfix - us-p - DateString - Use long/short Weekday and long/short Month
2022-12-29 11:33:40 +01:00
Daniel Albert
0ee8120eed Add status functionality for non-entities (#645)
* Add status functionality for non-entities

I wanted to show services on `cardGrid` pages conditionally, using the
`state` and `state_not` options and based on a `status` entity.
The documentation looked as if this was possible, however it didn't work
due to the order of evaluation.

This change makes it possible to hide any item using `state` /
`state_not`, based on either the `entity` itself or the information
provided by the `status` entity.

This basically implements #483, I think.

* Use if/then/else instead of and/or expression evaluation rules

This improves the readability of the code for people not familiar with
the evaluation of and / or expressions.

Co-authored-by: Daniel Albert <esclear@users.noreply.github.com>
2022-12-29 09:50:52 +01:00
Johannes
61e7438128 Revert docs to old config, until release 2022-12-29 09:22:14 +01:00
Johannes
26eeb7e651 revert to if else syntax, to keep compatibility with python 3.9 2022-12-29 09:20:36 +01:00
Johannes
7057df2364 fix issue if there is only one top level card 2022-12-29 00:24:32 +01:00
Johannes
4e0ecbf9fd Update docs.yml 2022-12-28 23:18:56 +01:00
Armilar
8ab20b16a8 v3.7.3.0 Hotfix - bUp case / Update Berry Version 8
- Hotfix - bUp case
- Update Berry Version 8
2022-12-28 20:32:03 +01:00
Armilar
09a7786df4 v3.7.3.0 Hotfix - bUp case / Update Berry Version 8
- Hotfix - bUp case
- Update Berry Version 8
2022-12-28 20:24:16 +01:00
Johannes
ef6876b660 add compiled version 2022-12-28 20:18:16 +01:00
joBr99
2e275a9b44 start reworking navigation paramters (#644) (add nextion2text) 2022-12-28 19:03:54 +00:00
Johannes
d57fddbbf5 start reworking navigation paramters (#644)
* modify cardGrid/cardEntities nav

* rework backend nav for new style

* fix some bugs

* update other pages with new nav paramters

* readd readme part
2022-12-28 20:00:44 +01:00
Armilar
0c415c0797 Merge pull request #642 from kuckuckmann/patch-5
Create RGB_Dec565_rechner.xml
2022-12-28 15:59:25 +01:00
kuckuckmann
de49a35266 Create RGB_Dec565_rechner.xml 2022-12-28 15:57:36 +01:00
Daniel Albert
5b10a37aa7 Make single, right status icon possible (#640)
According to the [screensaver documentation](https://docs.nspanel.pky.eu/config-screensaver/),
the `statusIcon2` option controls the status icon right of the date.

However, if only `statusIcon2` is configured, it would have landed on the left
side, instead of the right side.
This commit adds padding for unconfigured status icons.

Co-authored-by: Daniel Albert <esclear@users.noreply.github.com>
2022-12-27 22:13:40 +01:00
Armilar
dd2dac4eb6 Merge pull request #638 from kuckuckmann/patch-4
Rename Alarm_Page_Erweitertes_Skript_mit_PopupNotifyPage.xml.xml to A…
2022-12-27 15:38:11 +01:00
kuckuckmann
e72ede6e73 Rename Alarm_Page_Erweitertes_Skript_mit_PopupNotifyPage.xml.xml to Alarm_Page_Erweitertes_Skript_mit_PopupNotifyPage.xml 2022-12-27 15:29:51 +01:00
Armilar
9a53eda4a2 Delete Spotify_Premium_Alias.js 2022-12-27 15:08:01 +01:00
Armilar
e0854996fa Delete Sonos_Alias.js 2022-12-27 15:07:35 +01:00
Armilar
60665f5eac Delete Alexa2_Alias.js 2022-12-27 15:07:17 +01:00
Daniel Albert
4492f4df1f Fix state / state_not logic error for entities (#637)
According to the documentation, an entity is only displayed
* if `state` is set: if the entity state is equal to the `state` value
* if `state_not` is set: if the entity state is _not_ equal to the `state_not` value

So `""` – an **empty** string – shall only be returned – i.e. the **entity be hidden**
* if `state` is set: if the entity state is **not** equal to the `state` value
* if `state_not` is set: if the entity state is equal to the `state_not` value

Co-authored-by: Daniel Albert <esclear@users.noreply.github.com>
2022-12-27 14:14:18 +01:00
Armilar
b34586fce3 Merge pull request #636 from kuckuckmann/patch-3
Patch 3
2022-12-27 14:01:01 +01:00
kuckuckmann
4ce76ea5ef Create PopupNotify_layout2_Emulator.xml 2022-12-27 13:57:41 +01:00
kuckuckmann
fdd7d97178 Create CardChart.xml 2022-12-27 13:56:50 +01:00
kuckuckmann
1877b49b5b Create CardPower_Emulator_Skript.xml 2022-12-27 13:55:48 +01:00
kuckuckmann
2106720fe4 Create SqueezeBoxRPC_Alias.js 2022-12-27 13:50:29 +01:00
kuckuckmann
c32c95e6d4 Create Chrome_Alias.js 2022-12-27 13:49:45 +01:00
kuckuckmann
3cd8f6a0f5 Create Sonos_Alias.js 2022-12-27 13:49:11 +01:00
kuckuckmann
a5de459f81 Create Alexa2_Alias.js 2022-12-27 13:48:40 +01:00
kuckuckmann
c722f18193 Create Spotify_Premium_Alias.js 2022-12-27 13:48:12 +01:00
kuckuckmann
d3e68dcb06 Create PopupTimer.xml 2022-12-27 13:46:20 +01:00
Armilar
d4fe865379 Merge pull request #634 from kuckuckmann/patch-2
Create CardMedia_Equalizer.xml
2022-12-27 13:42:24 +01:00
Armilar
74e0905545 Merge pull request #635 from kuckuckmann/patch-1
Patch 1
2022-12-27 13:41:56 +01:00
kuckuckmann
964d9d1b26 Create CardMedia_Equalizer.xml 2022-12-27 13:37:44 +01:00
kuckuckmann
4fda41ffce Create CardMedia_Equalizer.xml 2022-12-27 13:32:16 +01:00
Armilar
8b136a7c26 Create Abfallkalender.xml 2022-12-27 13:31:38 +01:00
kuckuckmann
7f00c847ac Create DWD_Daten_Broadcast.xml 2022-12-27 13:31:17 +01:00
kuckuckmann
ef3fc0ed93 Create Hardware-Buttons_Multipress.xml 2022-12-27 13:30:07 +01:00
kuckuckmann
e7ff857089 Create Abfallkalender.js 2022-12-27 13:29:12 +01:00
kuckuckmann
c193e6c3c4 Create Abfallkalender.xml 2022-12-27 13:28:39 +01:00
kuckuckmann
48e14540a5 Create Screensaver-Info_auf_Request.xml 2022-12-27 13:27:28 +01:00
kuckuckmann
09eabd2986 Create Alarm_Page_Erweitertes_Skript_mit_PopupNotifyPage.xml.xml 2022-12-27 13:25:54 +01:00
kuckuckmann
1198d8c2bc Create Alarm_Page_Testskript.xml
Exclude Blockly out of Wiki article https://github.com/joBr99/nspanel-lovelace-ui/wiki/ioBroker---FAQ-&-Anleitungen#2-alarm-page
2022-12-27 13:20:03 +01:00
Johannes
9711cdc74b Update nspanel-lovelace-ui.py 2022-12-27 01:06:09 +01:00
Johannes Braun
cc50c4c4b3 rework update logic with migration 2022-12-27 00:57:31 +01:00
Johannes Braun
4f832a9af2 update docs for berry driver installation 2022-12-27 00:03:58 +01:00
Johannes Braun
bd6d558cc5 add tapp file for testing 2022-12-26 23:47:00 +01:00
Johannes Braun
529b0516f4 implementes #539 2022-12-25 15:43:23 +01:00
Johannes
b9504a2ff0 fixes #631 2022-12-25 10:32:45 +01:00
Johannes
b4b988b735 fixes #630 2022-12-24 23:47:02 +01:00
Johannes
d3ab908507 Update issue-close-app.yml 2022-12-24 22:54:14 +01:00
Johannes
2ee79debd0 Update card-climate.md 2022-12-24 00:44:07 +01:00
Johannes
d536957255 bump required berry driver version 2022-12-23 22:22:37 +01:00
Johannes
b4fe08ba43 bump berry driver version to 7 2022-12-23 22:16:20 +01:00
Johannes Braun
e4a4917932 add some delay during flashing 2022-12-23 21:39:54 +01:00
Johannes Braun
d17f8c636c Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui 2022-12-23 21:19:14 +01:00
Johannes Braun
9fc6ccf901 add updated beta locacles json 2022-12-23 21:18:58 +01:00
joBr99
4f760da1aa Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui (add nextion2text) 2022-12-23 15:58:47 +00:00
Johannes Braun
ac2df9e431 Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui 2022-12-23 16:55:26 +01:00
Johannes Braun
cd4d68d590 added bigger icons for us-p 2022-12-23 16:55:05 +01:00
Armilar
2fd5363131 v3.7.0 (Breaking Changes)
* Move Config "active" to DP activeBrightness and add DP activeDimmodeBrightness
* Change weather icons for exceptional (window-close)
* Add DasWetter / Add DasWetter in create AutoAlias / Const MinMax
* Add cardChart on PROD (implemented but working with v3.7.0 --> next TFT)
* Add Shuffle to Media Player
* Remove Old Speakerlist and Add 5 GridCard Control PageItems
* Add In_Sel PopUp to cardMedia
* Add alternate MRIcon Size
* Add popUpTimer / New ALIAS Type level.timer
* Add Fan / New ALIAS Type level.mode.fan
* Add InSel - InputSelector with Alias Type buttonSensor (Datapoint .VALUE)
2022-12-23 16:11:14 +01:00
Armilar
c2df6a953a v3.7.0 (Breaking Changes)
* Move Config "active" to DP activeBrightness and add DP activeDimmodeBrightness
* Change weather icons for exceptional (window-close)
* Add DasWetter / Add DasWetter in create AutoAlias / Const MinMax
* Add cardChart on PROD (implemented but working with v3.7.0 --> next TFT)
* Add Shuffle to Media Player
* Remove Old Speakerlist and Add 5 GridCard Control PageItems
* Add In_Sel PopUp to cardMedia
* Add alternate MRIcon Size
* Add popUpTimer / New ALIAS Type level.timer
* Add Fan / New ALIAS Type level.mode.fan
* Add InSel - InputSelector with Alias Type buttonSensor (Datapoint .VALUE)
2022-12-23 16:07:13 +01:00
Johannes
a476243a5f Update nspanel-lovelace-ui.py 2022-12-23 15:33:33 +01:00
Johannes Braun
d20e272cf6 Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui 2022-12-21 21:28:57 +01:00
Johannes Braun
7cef6c93e1 add timer gif 2022-12-21 21:28:44 +01:00
joBr99
42bcb6333c sync (add nextion2text) 2022-12-21 20:15:32 +00:00
Johannes Braun
b0a6d2a8a9 sync 2022-12-21 21:10:45 +01:00
Johannes Braun
5bfccca79d Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui 2022-12-21 21:05:45 +01:00
Johannes Braun
1f6a666b51 update us-l-i 2022-12-21 21:05:32 +01:00
joBr99
957d5f66b4 Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui (add nextion2text) 2022-12-21 20:03:00 +00:00
Johannes Braun
b180192a1e Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui 2022-12-21 21:00:07 +01:00
Johannes Braun
43896d8849 sync 2022-12-21 20:59:54 +01:00
joBr99
3cb291301f Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui (add nextion2text) 2022-12-21 19:52:31 +00:00
Johannes Braun
64ed90e8a6 Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui 2022-12-21 20:49:08 +01:00
Johannes Braun
02269ce6c7 sync 2022-12-21 20:49:00 +01:00
joBr99
302fe8778e sync (add nextion2text) 2022-12-21 19:30:31 +00:00
Johannes Braun
58ea81b484 sync 2022-12-21 20:26:10 +01:00
joBr99
c2d812ed41 Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui (add nextion2text) 2022-12-21 18:56:15 +00:00
Johannes Braun
c9e9b53119 Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui 2022-12-21 19:53:10 +01:00
Johannes Braun
80af9ab27d sync us-l 2022-12-21 19:52:55 +01:00
Johannes
afa22475f1 Update autoexec.be 2022-12-21 16:40:15 +01:00
joBr99
2cd79df2ea fix vis timer exit button (add nextion2text) 2022-12-21 12:55:06 +00:00
Johannes Braun
052edabec5 fix vis timer exit button 2022-12-21 13:50:36 +01:00
Johannes Braun
3a3ea4ff55 . 2022-12-21 07:39:45 +01:00
joBr99
1b017a2211 change timer from button to text (add nextion2text) 2022-12-21 06:08:48 +00:00
Johannes Braun
98a1ce3f19 change timer from button to text 2022-12-21 07:05:36 +01:00
Johannes
512cab2eda Update icons.py 2022-12-21 06:51:58 +01:00
Johannes Braun
d72b941620 fix tnf 2022-12-20 22:33:54 +01:00
Johannes Braun
ff35a55a0e Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui 2022-12-20 22:18:47 +01:00
Johannes Braun
19f5d5732b implement translation timer popup 2022-12-20 22:18:38 +01:00
joBr99
4b35f057ca fix buttons (add nextion2text) 2022-12-20 21:05:09 +00:00
Johannes Braun
7b060e29c0 fix buttons 2022-12-20 22:01:05 +01:00
Johannes
47658a8d84 fix state and state_not 2022-12-20 21:35:33 +01:00
Johannes
979fe3d63b Update pages.py 2022-12-20 20:39:36 +01:00
Johannes Braun
f88e15f75f reset sleep timer on update 2022-12-20 20:36:43 +01:00
Johannes Braun
482cab9e1a basic backend implementation for timer popup 2022-12-20 20:30:57 +01:00
joBr99
4400728194 added timer popup (add nextion2text) 2022-12-20 19:30:00 +00:00
Johannes Braun
c26cc91369 added timer popup 2022-12-20 20:26:12 +01:00
joBr99
bbed77f83f sync (add nextion2text) 2022-12-19 22:17:08 +00:00
Johannes Braun
2108086f58 sync 2022-12-19 23:13:32 +01:00
joBr99
6cbc54a925 move time (add nextion2text) 2022-12-19 21:57:58 +00:00
Johannes Braun
81ce6ecff8 move time 2022-12-19 22:53:39 +01:00
Johannes Braun
66626808de resize icon 2022-12-19 22:34:35 +01:00
Johannes Braun
f464214934 add tft 2022-12-19 18:33:41 +01:00
Johannes Braun
95d1fcfb63 remove alt screensaver test 2022-12-19 18:29:30 +01:00
joBr99
7d57342b7f upd docs (add nextion2text) 2022-12-19 15:52:51 +00:00
Johannes Braun
3d32a7456e upd docs 2022-12-19 16:49:18 +01:00
Johannes Braun
f8caa79e80 sync 2022-12-19 16:48:31 +01:00
Johannes Braun
2115a241c3 update docs for cardMedia 2022-12-19 16:28:07 +01:00
Johannes
511a7778ac Update config-screensaver.md 2022-12-19 16:10:37 +01:00
Johannes
d7f66d3db6 add example for #618 2022-12-19 16:09:06 +01:00
joBr99
72360d69ab Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui (add nextion2text) 2022-12-19 15:04:45 +00:00
Johannes Braun
9c1d3f654c Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui 2022-12-19 16:01:24 +01:00
Johannes Braun
c0edd35bf1 sync 2022-12-19 16:01:07 +01:00
Johannes
0307f1b62a fixes #621 2022-12-18 19:55:13 +01:00
Johannes
42b97f161d Update autoexec.be 2022-12-18 13:47:15 +01:00
Johannes
655e12fc5a Update autoexec.be 2022-12-18 12:52:56 +01:00
Johannes
bae9759020 Update autoexec.be 2022-12-18 10:10:32 +01:00
Johannes
25dced79d4 Change default to slower 115200 1.2 flashing for now 2022-12-18 01:07:00 +01:00
Johannes
3b1b2257fa fixes #622 2022-12-17 23:56:47 +01:00
Johannes
6af92d3443 Update README.md 2022-12-17 23:39:25 +01:00
Johannes
02e50171c6 Add Adv Flash with Start Baud on 9600 2022-12-17 23:34:52 +01:00
Johannes
607476b017 Update prepare_nspanel.md 2022-12-17 23:06:27 +01:00
Johannes
0b171c0fea Update prepare_nspanel.md 2022-12-17 22:41:33 +01:00
Johannes
e2e91adbb7 fix icon on screensaver 2022-12-15 00:09:28 +01:00
joBr99
253a34e9f4 fix status icon2 alt font (add nextion2text) 2022-12-14 23:02:30 +00:00
Johannes Braun
ce7c1ff9fe fix status icon2 alt font 2022-12-14 23:59:04 +01:00
Johannes
f8c1c19dae Implement alternative font size for status icons 2022-12-14 23:51:17 +01:00
joBr99
c2df414557 alternative font for status icons (add nextion2text) 2022-12-14 22:34:47 +00:00
Johannes Braun
17d36084b6 alternative font for status icons 2022-12-14 23:31:17 +01:00
Armilar
fa3dc3f523 v3.6.0.4
- Add bHome to Navigation
- Add changeable Center-Icon in cardPower with Color and Value
- Bugfix - Use MRIcons in Screensaver with null
- Add new DP's to show active page
- Add Sensor-Values to cardGrid
- Hotfix - Update screensaver temperature without weather forecast
2022-12-13 21:59:10 +01:00
Armilar
c84614163c v3.6.0.4
- Add bHome to Navigation
- Add changeable Center-Icon in cardPower with Color and Value
- Bugfix - Use MRIcons in Screensaver with null
- Add Sensor-Values to cardGrid
- Hotfix - Update screensaver temperature without weather forecast
2022-12-13 21:43:16 +01:00
joBr99
3be1a83330 add delay to temperature buttons on cardThermo #616 (add nextion2text) 2022-12-13 20:21:55 +00:00
Johannes Braun
edd888371a add delay to temperature buttons on cardThermo #616 2022-12-13 21:18:47 +01:00
Johannes Braun
e6c64c369d some icon refactoring 2022-12-13 09:06:36 +01:00
joBr99
6825b29ced increase limit for notify text on screensaver and activate isbr (add nextion2text) 2022-12-10 19:17:42 +00:00
Johannes Braun
183637c795 increase limit for notify text on screensaver and activate isbr 2022-12-10 20:14:13 +01:00
joBr99
308acc6171 Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui (add nextion2text) 2022-12-10 08:03:23 +00:00
Johannes Braun
1ffd492864 Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui 2022-12-10 08:59:30 +01:00
Johannes Braun
f11d309592 sync 2022-12-10 08:59:21 +01:00
joBr99
cf0fe88d11 sync us-l (add nextion2text) 2022-12-09 23:39:37 +00:00
Johannes Braun
a5658007de sync us-l 2022-12-10 00:36:27 +01:00
joBr99
50e143aa90 hide empty insel buttons (add nextion2text) 2022-12-09 23:24:09 +00:00
Johannes Braun
fa95aa50dc hide empty insel buttons 2022-12-10 00:20:43 +01:00
Johannes Braun
5dd0db2b2f let speaker sel actually select and fix update #608 2022-12-09 23:56:07 +01:00
Johannes Braun
e8639859db fix 2022-12-09 23:30:13 +01:00
Johannes Braun
d36e8e5b6e render detail pages also on cardMedia #608 2022-12-09 23:24:22 +01:00
Johannes Braun
167fb78b07 use status entity for speaker sel if configured #608 2022-12-09 23:23:18 +01:00
joBr99
853275d1ad sync new media page to US-L/P (add nextion2text) 2022-12-09 22:07:45 +00:00
Johannes Braun
5a08553ac6 sync new media page to US-L/P 2022-12-09 23:02:45 +01:00
Johannes Braun
eaaa89596d fix missing import in icons py 2022-12-09 15:43:18 +01:00
Johannes Braun
9e214b17f8 implement appdaemon side for #438 2022-12-09 15:39:58 +01:00
Johannes Braun
4e23de9304 fix upper icon #608 2022-12-09 15:02:16 +01:00
Johannes Braun
251eaa2378 Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui 2022-12-09 14:52:23 +01:00
Johannes Braun
ffb2f374a8 changed icon and updated fallback page; fixes #608 2022-12-09 14:52:14 +01:00
joBr99
8c35275924 add speaker selection (add nextion2text) 2022-12-08 22:30:25 +00:00
Johannes Braun
c74e5f8b52 add speaker selection 2022-12-08 23:27:11 +01:00
Johannes Braun
082a871f7d fix media page/callbacks 2022-12-08 22:51:36 +01:00
Johannes Braun
926dcff260 replace some of the get icon calls 2022-12-08 22:29:19 +01:00
Johannes Braun
f2325a2dc5 started refactoring get_icons 2022-12-08 21:51:43 +01:00
joBr99
d7b43b9975 added text to test page (add nextion2text) 2022-12-06 21:19:31 +00:00
Johannes Braun
aa4cabf930 added text to test page 2022-12-06 22:16:18 +01:00
Johannes Braun
a0f787832b Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui 2022-12-06 21:40:47 +01:00
Johannes Braun
a6a0e57213 fix icon 2022-12-06 21:40:39 +01:00
joBr99
fefce35237 replace icon with entities button (add nextion2text) 2022-12-06 20:06:32 +00:00
Johannes Braun
d6591d0638 replace icon with entities button 2022-12-06 21:03:09 +01:00
Johannes Braun
1851973a5a add type for mediabtn 2022-12-06 20:37:18 +01:00
Johannes Braun
233b6d54c7 fix 2022-12-06 19:19:00 +01:00
joBr99
8f2d445927 some changes for #608 (add nextion2text) 2022-12-06 18:05:28 +00:00
Johannes Braun
950dfe26d4 some changes for #608 2022-12-06 19:01:53 +01:00
Johannes Braun
6cf69e7f6c move bezel 2022-12-01 16:09:23 +01:00
joBr99
65e57c79bd resize bevel warning (add nextion2text) 2022-12-01 15:07:10 +00:00
Johannes Braun
38219d188e resize bevel warning 2022-12-01 16:02:00 +01:00
joBr99
9365c48d1a Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui (add nextion2text) 2022-11-30 23:21:33 +00:00
Johannes Braun
994eba88fb Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui 2022-12-01 00:18:26 +01:00
Johannes Braun
963afa1b63 add warning for us panel users 2022-12-01 00:18:16 +01:00
Johannes
afa091e29f Update prepare_nspanel.md 2022-11-30 19:38:58 +01:00
joBr99
6a8d4dad7d . (add nextion2text) 2022-11-30 18:11:51 +00:00
Johannes Braun
4cc097b8a2 . 2022-11-30 19:08:21 +01:00
joBr99
a70494b355 open select popup on cardGird direct (add nextion2text) 2022-11-30 16:01:16 +00:00
Johannes Braun
3bc42a9d0f open select popup on cardGird direct 2022-11-30 16:57:54 +01:00
Johannes Braun
40db52a450 Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui 2022-11-30 16:51:33 +01:00
Armilar
9aad672a47 v3.6.0.3 - Bugfix 2022-11-30 12:06:57 +01:00
Armilar
6d1d987ad8 v3.6.0.3 - Bugfix 2022-11-30 12:05:43 +01:00
Armilar
6115deebe9 v3.6.0.3 - Bugfix 2022-11-30 12:01:06 +01:00
Johannes Braun
6cf1f09579 . 2022-11-29 22:43:47 +01:00
Johannes
adaa5076d0 Update README.md 2022-11-29 21:06:49 +01:00
Johannes
ec7326c1ae Update README.md 2022-11-29 21:04:20 +01:00
Johannes
2af9ac5a49 Update README.md 2022-11-29 21:03:55 +01:00
Johannes
ffe21f1939 Update README.md 2022-11-29 21:03:27 +01:00
Johannes
cceab082c2 Update README.md 2022-11-29 21:00:22 +01:00
Johannes
dcbe5c3f71 Delete autoexec-beta.be 2022-11-29 20:56:02 +01:00
Johannes
7e9d2bccd1 bump tasmota driver version 2022-11-29 20:35:22 +01:00
Johannes
07f8a347ff Update pages.py 2022-11-29 19:04:28 +01:00
Armilar
527c5f5fcc v3.6.0.2 - BerryDriver 6 2022-11-29 19:02:13 +01:00
Armilar
8b0f4240e2 v3.6.0.2 - BerryDriver 6 2022-11-29 18:59:21 +01:00
Johannes Braun
89d5d3f47c move beta to release and bump version 2022-11-29 17:55:42 +01:00
Johannes
262201038e potential fix for #601 2022-11-29 17:44:46 +01:00
Johannes
cadb88b88c Update autoexec-oldstable.be 2022-11-29 17:19:09 +01:00
Johannes
1c1adb6b2e Update autoexec-beta.be 2022-11-29 00:48:33 +01:00
Johannes
1687a4bc01 Update autoexec-beta.be 2022-11-29 00:42:06 +01:00
Johannes
ce0133a8c0 Update controller.py 2022-11-28 17:37:58 +01:00
Johannes
f096bcb44d Update controller.py 2022-11-28 17:27:40 +01:00
Armilar
b31b521eb1 v3.6.0.1 - Bugfix bExit 2022-11-28 16:42:05 +01:00
Armilar
0a844179a5 v3.6.0.1 -Bugfix bExit 2022-11-28 16:39:34 +01:00
joBr99
2caa4b7a00 Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui (add nextion2text) 2022-11-27 12:27:07 +00:00
Johannes Braun
164e031118 Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui 2022-11-27 13:23:53 +01:00
Johannes Braun
7d513d8ff5 add font back to eu verison 2022-11-27 13:23:38 +01:00
Armilar
1bd82b6c53 Update README.md 2022-11-27 01:05:56 +01:00
Johannes
5060f454e6 Update README.md 2022-11-27 00:28:59 +01:00
joBr99
bcca70a604 Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui (add nextion2text) 2022-11-26 23:19:48 +00:00
Johannes Braun
2da02bf515 Merge branch 'main' of github.com:joBr99/nspanel-lovelace-ui 2022-11-27 00:16:06 +01:00
Johannes Braun
c82797e4e5 implement shuffle button 2022-11-27 00:15:52 +01:00
Johannes
dff517fddc fix #595 2022-11-26 23:33:17 +01:00
Armilar
4a1578c145 v3.6.0 - Release
* Upgrade TFT 45
* Add new Alias-Device Type cie (control colors with XY)
* Control Relay 1 + 2 via Datapoints
* Add Datapoint to Control Screensaver-Dimmode
* Change to Page after bExit 
* Add cardChart by fumanchi (only on DEV)
* Add Background Color Switch via DP
* Add cardMedia Colors
* Add cardThermo Popup
2022-11-26 23:17:19 +01:00
Armilar
648d8dbd71 v3.6.0 - Release
* Upgrade TFT 45
* Add new Alias-DeviceTyp cie (control colors with XY)
* Control Relay 1 + 2 via Datapoints
* Add Datapoint to Control Screensaver-Dimmode
* Change to Page after bExit 
* Add cardChart by fumanchi (only on DEV)
* Add Background Color Switch via DP
* Add cardMedia Colors
* Add cardThermo Popup
2022-11-26 23:15:48 +01:00
Armilar
c384f32941 v3.6.0 - Release
* Upgrade TFT 45
* Add new Alias-DeviceTyp cie (control colors with XY)
* Control Relay 1 + 2 via Datapoints
* Add Datapoint to Control Screensaver-Dimmode
* Change to Page after bExit 
* Add cardChart by fumanchi (only on DEV)
* Add Background Color Switch via DP
* Add cardMedia Colors
* Add cardThermostat Popup
2022-11-26 23:10:45 +01:00
joBr99
204128bd0f fix navigation after PR (add nextion2text) 2022-11-26 21:54:22 +00:00
Johannes Braun
f27e0746e3 fix navigation after PR 2022-11-26 22:51:37 +01:00
Johannes
aa04f6dd8f implements #595 2022-11-26 01:26:54 +01:00
fumanchi
53f9907a28 Card chart (#593)
* Initial import of cardChart

* iobroker nspanel type script changes regarding card chart

* Added payload definition/example

* iobroker nspanel type script changes regarding card chart

* Added payload definition/example

Co-authored-by: Johannes <johannes@braun-rheingau.de>
2022-11-24 16:09:14 +01:00
joBr99
f8c8c803eb Initial import of cardChart (#592) (add nextion2text) 2022-11-23 21:49:07 +00:00
fumanchi
193091b7d0 Initial import of cardChart (#592) 2022-11-23 22:45:17 +01:00
Johannes
b09ca03d33 Create autoexec-beta.be 2022-11-23 16:58:06 +01:00
214 changed files with 42946 additions and 7154 deletions

View File

@@ -5,10 +5,10 @@
# Comment that will be sent if an issue is judged to be closed.
comment: >-
This issue has been automatically closed because the TEMPLATE is missing or incomplete.
This issue has been automatically closed because the TEMPLATE (it's the stuff you deleted from the issue while opening) is missing or incomplete.
Filling the template is required so standard questions don't need to be asked again each time.
THe ability to provide assistance is greatly hampered if few minutes are not taken to complete the issue template
The ability to provide assistance is greatly hampered if few minutes are not taken to complete the issue template
with the requested information. The details requested potentially affect which options to pursue. The small amount
of time you will spend completing the template will also help the volunteers, providing assistance to you, to reduce
the time required to help you.
@@ -19,14 +19,16 @@ comment: >-
[Docs](https://docs.nspanel.pky.eu) for more information.
IF YOU THINK THIS IS WAS CLOSED AS A FALSE POSITIVE or you just didn't find a template that matches your request, please do not open another issue, closed issues will also be monitored.
issueConfigs:
# There can be several configs for different kind of issues.
- content:
# template 1: bug report
- "PROBLEM DESCRIPTION"
# - "REQUESTED INFORMATION"
# - "TO REPRODUCE"
# - "EXPECTED BEHAVIOUR"
- "REQUESTED INFORMATION"
- "TO REPRODUCE"
- "EXPECTED BEHAVIOUR"
- content:
# template 2: feature request
- "FEATURE DESCRIPTION"

View File

@@ -9,6 +9,7 @@ on:
- docs/*
- .github/workflows/docs.yml
- mkdocs.yml
- HMI/README.md
jobs:
deploy:
@@ -19,4 +20,5 @@ jobs:
with:
python-version: 3.x
- run: pip install mkdocs-material mkdocs-video markdown-include
- run: cp HMI/README.md docs/hmi-serial-protocol.md
- run: mkdocs gh-deploy --force

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,8 @@
--- HMI/n2t-out
+++ HMI/US/landscape/n2t-out
├── Program.s.txt
│ @@ -10,10 +10,7 @@
│ --- HMI/n2t-out/Program.s.txt
├── +++ HMI/US/landscape/n2t-out/Program.s.txt
│ @@ -10,10 +10,8 @@
│ int sleepValue=0
│ // dim value
│ int dimValue=40
@@ -11,8 +12,9 @@
│ int defaultBcoColor=6371
│ - // fix touch offset
│ - lcd_dev fffb 0002 0000 0020
- page pageStartup
├── pageStartup.txt
page pageStartup
│ --- HMI/n2t-out/pageStartup.txt
├── +++ HMI/US/landscape/n2t-out/pageStartup.txt
│ @@ -173,15 +173,15 @@
│ Max. Text Size : 10
@@ -30,21 +32,48 @@
│ crcputs sys0,2
│ crcputs tSend.txt,0
│ //send cmd
├── screensaver.txt
│ @@ -351,15 +351,15 @@
Text tTime
│ --- HMI/n2t-out/screensaver.txt
├── +++ HMI/US/landscape/n2t-out/screensaver.txt
@@ -29,17 +29,14 @@
│ }
│ tDate.txt=pageIcons.vaDate.txt
│ dim=dimValue
│ vis tSend,0
│ //page open event
│ // clear weather elements, to keep example content in HMI
│ - Postinitialize Event
│ - click m0,1
│ -
│ Variable (string) strCommand
│ Attributes
│ Scope : local
│ Text :
│ Max. Text Size: 200
│ Variable (string) strTmp
│ @@ -103,24 +100,14 @@
│ Value: 0
│ Variable (int32) ycR
│ Attributes
│ Scope: local
│ Value: 0
│ -Text m0
│ - 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 : 21:32
│ + Text : 21:32
│ Max. Text Size : 15
│ Text tTimeAdd
│ Attributes
│ Scope : local
│ Dragging : 0
│ Disable release event after dragging: 0

View File

@@ -14,3 +14,4 @@ Program.s
//color vars
int defaultFontColor=65535
int defaultBcoColor=6371
page pageStartup

View File

@@ -51,7 +51,7 @@ Page cardAlarm
if(b[sys0].type==98||b[sys0].type==116)
{
b[sys0].bco=defaultBcoColor
b[sys0].pco=defaultFontColor
//b[sys0].pco=defaultFontColor
}
}
if(defaultBcoColor==0)
@@ -72,6 +72,20 @@ Variable (string) entn
Text :
Max. Text Size: 80
Variable (string) nent1
Attributes
ID : 41
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent2
Attributes
ID : 40
Scope : local
Text :
Max. Text Size: 80
Variable (string) strCommand
Attributes
ID : 6
@@ -1014,14 +1028,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -1068,14 +1075,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -1096,9 +1096,9 @@ Hotspot mSwipeNext
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 472
x coordinate : 471
y coordinate : 5
Width : 8
Width : 9
Height : 310
Effect : load
Effect Priority : 0
@@ -1118,7 +1118,7 @@ Hotspot mSwipePrev
Opacity : 127
x coordinate : 0
y coordinate : 5
Width : 8
Width : 9
Height : 310
Effect : load
Effect Priority : 0
@@ -1223,86 +1223,80 @@ Timer tmSerial
{
//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")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
//text arm1
spstr strCommand.txt,arm1.txt,"~",3
spstr strCommand.txt,arm1.txt,"~",14
if(arm1.txt!="")
{
vis arm1,1
}
//id arm1
spstr strCommand.txt,va1.txt,"~",4
spstr strCommand.txt,va1.txt,"~",15
//text arm2
spstr strCommand.txt,arm2.txt,"~",5
spstr strCommand.txt,arm2.txt,"~",16
if(arm2.txt!="")
{
vis arm2,1
}
//id arm2
spstr strCommand.txt,va2.txt,"~",6
spstr strCommand.txt,va2.txt,"~",17
//text arm3
spstr strCommand.txt,arm3.txt,"~",7
spstr strCommand.txt,arm3.txt,"~",18
if(arm3.txt!="")
{
vis arm3,1
}
//id arm3
spstr strCommand.txt,va3.txt,"~",8
spstr strCommand.txt,va3.txt,"~",19
//text arm4
spstr strCommand.txt,arm4.txt,"~",9
spstr strCommand.txt,arm4.txt,"~",20
if(arm4.txt!="")
{
vis arm4,1
}
//id arm4
spstr strCommand.txt,va4.txt,"~",10
spstr strCommand.txt,va4.txt,"~",21
//icon
spstr strCommand.txt,tIcon.txt,"~",11
spstr strCommand.txt,tIcon.txt,"~",22
//icon color
spstr strCommand.txt,tTmp.txt,"~",12
spstr strCommand.txt,tTmp.txt,"~",23
covx tTmp.txt,sys0,0,0
tIcon.pco=sys0
//numpad status
spstr strCommand.txt,tTmp.txt,"~",13
spstr strCommand.txt,tTmp.txt,"~",24
if(tTmp.txt!="disable")
{
vis b0,1
@@ -1335,7 +1329,7 @@ Timer tmSerial
vis tCode,0
}
//flashing status
spstr strCommand.txt,tTmp.txt,"~",14
spstr strCommand.txt,tTmp.txt,"~",25
if(tTmp.txt=="enable")
{
tmFlash.en=1
@@ -1344,13 +1338,13 @@ Timer tmSerial
tmFlash.en=0
}
// extra button
spstr strCommand.txt,b9.txt,"~",15
spstr strCommand.txt,b9.txt,"~",26
if(b9.txt!="")
{
vis b9,1
spstr strCommand.txt,tTmp.txt,"~",16
spstr strCommand.txt,tTmp.txt,"~",27
covx tTmp.txt,b9.pco,0,0
spstr strCommand.txt,vaAddBtn.txt,"~",17
spstr strCommand.txt,vaAddBtn.txt,"~",28
}
}
if(tInstruction.txt=="time")
@@ -1455,6 +1449,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -0,0 +1,903 @@
Page cardChart
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
dim=dimValueNormal
vis p0,0
vis tSend,0
vis tInstruction,0
vis tTmp,0
vis tId,0
vis bPrev,0
vis bNext,0
cardChart.bco=defaultBcoColor
vis x0,0
x0.bco=defaultBcoColor
x0.borderc=defaultBcoColor
for(sys0=0;sys0<32;sys0++)
{
if(b[sys0].type==98||b[sys0].type==116)
{
b[sys0].bco=defaultBcoColor
b[sys0].pco=defaultFontColor
}
if(b[sys0].type==53&&defaultBcoColor==6371)
{
b[sys0].pic=1
b[sys0].pic2=2
}
if(b[sys0].type==53&&defaultBcoColor==0)
{
b[sys0].pic=10
b[sys0].pic2=11
}
}
Variable (string) entn
Attributes
ID : 6
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent1
Attributes
ID : 32
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent2
Attributes
ID : 31
Scope : local
Text :
Max. Text Size: 80
Variable (string) strCommand
Attributes
ID : 5
Scope : local
Text :
Max. Text Size: 275
Variable (string) strTmp
Attributes
ID : 18
Scope : local
Text :
Max. Text Size: 200
Variable (string) tId
Attributes
ID : 14
Scope : local
Text :
Max. Text Size: 20
Variable (string) tInstruction
Attributes
ID : 15
Scope : local
Text :
Max. Text Size: 20
Variable (string) tSend
Attributes
ID : 9
Scope : local
Text :
Max. Text Size: 200
Variable (string) tTmp
Attributes
ID : 13
Scope : local
Text :
Max. Text Size: 20
Variable (int32) vMax
Attributes
ID : 29
Scope: local
Value: 0
Variable (int32) vNValues
Attributes
ID : 17
Scope: local
Value: 0
Variable (int32) vaBottom
Attributes
ID : 22
Scope: local
Value: 0
Variable (int32) vaColorD
Attributes
ID : 28
Scope: local
Value: 0
Variable (int32) vaColorL
Attributes
ID : 27
Scope: local
Value: 0
Variable (int32) vaLast
Attributes
ID : 25
Scope: local
Value: 4294967295
Variable (int32) vaLeft
Attributes
ID : 23
Scope: local
Value: 0
Variable (int32) vaUnit
Attributes
ID : 20
Scope: local
Value: 0
Variable (int32) vaValue
Attributes
ID : 21
Scope: local
Value: 0
Variable (string) vaValues
Attributes
ID : 24
Scope : local
Text :
Max. Text Size: 100
Variable (int32) vaYUnit
Attributes
ID : 30
Scope: local
Value: 0
XFloat x0
Attributes
ID : 26
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 188
y coordinate : 84
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : border
Associated Keyboard : none
Border Color : 0
Border Width : 2
Font ID : 1
Back. Color : 0
Font Color : 50712
Horizontal Alignment : center
Vertical Alignment : center
Value : 0
Significant digits left : 0
Significant digits right : 1
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tHeading
Attributes
ID : 16
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 81
y coordinate : 26
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 :
Max. Text Size : 40
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 bNext
Attributes
ID : 2
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 406
y coordinate : 16
Width : 50
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Font ID : 3
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,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bPrev
Attributes
ID : 3
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 24
y coordinate : 16
Width : 50
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Font ID : 3
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,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Hotspot m0
Attributes
ID : 19
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 35
y coordinate : 90
Width : 410
Height : 220
Effect : load
Effect Priority : 0
Effect Time : 300
Events
Touch Press Event
if(vaLast.val>=0)
{
// spstr vaValues.txt,tTmp.txt,"~",vaLast.val
// covx tTmp.txt,vaValue.val,0,0
sys1=vaLast.val*5*vaUnit.val
sys1+=vaLeft.val
sya0=sys1/100
sya1=vaUnit.val*4+sys1/100
if(vaValue.val==0)
{
line sya0,vaBottom.val,sya1,vaBottom.val,vaColorD.val
}else
{
sys0=0
if(vaValue.val<0)
{
vaValue.val*=-1
sys0=1
}
fill sya0+1,-1*vaYUnit.val*vaValue.val+vaBottom.val+1,vaUnit.val*4/100,vaYUnit.val*vaValue.val-1,vaColorD.val
// line sya0+1,-10*vaValue.val+vaBottom.val,sya1-1,-10*vaValue.val+vaBottom.val,vaColorL.val
draw sya0,-1*vaYUnit.val*vaValue.val+vaBottom.val+1,sya1,vaBottom.val,vaColorL.val
if(sys0!=0)
{
sya1=-1*vaYUnit.val*vaValue.val+vaBottom.val
for(sys0=vaBottom.val;sys0>=sya1;sys0-=10)
{
sys2=sys0-5
if(sys2<sya1)
{
sys2=sya1
}
line vaUnit.val*2+sys1/100,sys0,vaUnit.val*2+sys1/100,sys2,vaColorL.val
}
}
}
}
sys0=tch0-m0.x-25-40*100/vaUnit.val
sys1=sys0%5
if(sys1<4&&sys0>=0)
{
vis x0,1
vaLast.val=sys0/5
// n0.val=sys0/5
spstr vaValues.txt,tTmp.txt,"~",vaLast.val
covx tTmp.txt,vaValue.val,0,0
// t0.txt=tTmp.txt
sys1=vaLast.val*5*vaUnit.val
sys1+=vaLeft.val
sya0=sys1/100
sya1=vaUnit.val*4+sys1/100
if(vaValue.val==0)
{
line sya0,vaBottom.val,sya1,vaBottom.val,vaColorL.val
x0.val=vaValue.val
}else
{
if(vaValue.val<0)
{
fill sya0+1,vaYUnit.val*vaValue.val+vaBottom.val+1,vaUnit.val*4/100,-1*vaYUnit.val*vaValue.val-1,vaColorL.val
x0.val=vaValue.val*-1
}else
{
fill sya0+1,-1*vaYUnit.val*vaValue.val+vaBottom.val+1,vaUnit.val*4/100,vaYUnit.val*vaValue.val-1,vaColorL.val
x0.val=vaValue.val
}
}
}else
{
vis x0,0
vaLast.val=-1
}
Hotspot mSwipeNext
Attributes
ID : 10
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 471
y coordinate : 5
Width : 9
Height : 310
Effect : load
Effect Priority : 0
Effect Time : 300
Events
Touch Press Event
click bNext,1
Hotspot mSwipePrev
Attributes
ID : 12
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 5
Width : 9
Height : 310
Effect : load
Effect Priority : 0
Effect Time : 300
Events
Touch Press Event
click bPrev,1
Hotspot mSwipeUp
Attributes
ID : 11
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 12
y coordinate : 0
Width : 426
Height : 9
Effect : load
Effect Priority : 0
Effect Time : 300
Events
Touch Press Event
click bPrev,1
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
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")
{
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
}
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
}
// extract color
spstr strCommand.txt,tTmp.txt,"~",14
covx tTmp.txt,vaColorL.val,0,0
// prepare dark color
sys0=vaColorL.val>>11 // red
vaColorD.val=sys0*8/10<<11 // store and shift
sys0=vaColorL.val>>5%64 // green
vaColorD.val=sys0*8/10<<5+vaColorD.val // store and shift
sys0=vaColorL.val%32
vaColorD.val=sys0*8/10+vaColorD.val // store and add
//
// detect nValues and maxValue
vNValues.val=0
spstr strCommand.txt,tTmp.txt,"~",vNValues.val+17
strlen tTmp.txt,sya0
while(sya0>0)
{
covx tTmp.txt,sya1,0,0
if(sya1>vMax.val)
{
vMax.val=sya1
}
// next
vNValues.val++
spstr strCommand.txt,tTmp.txt,"~",vNValues.val+17
strlen tTmp.txt,sya0
}
//
// calculate unit width
sys0=vNValues.val*4
sys0+=vNValues.val-1
vaUnit.val=m0.w-25-40*100
vaUnit.val/=sys0
vaBottom.val=m0.y+m0.h-24
vaLeft.val=m0.x+25+40*100
vaYUnit.val=m0.h-24/vMax.val
//
line m0.x+25+40-10,m0.y,m0.x+25+40-10,vaBottom.val+10,14823
line m0.x+25+40-5,vaBottom.val,m0.x+25+40-15,vaBottom.val,14823
spstr strCommand.txt,strTmp.txt,"~",16
sya1=0
spstr strTmp.txt,tTmp.txt,":",sya1
strlen tTmp.txt,sya0
while(sya0>0)
{
covx tTmp.txt,sys1,0,0
if(sys1<=vMax.val)
{
line m0.x+25+40-5,-1*vaYUnit.val*sys1+vaBottom.val,m0.x+25+40-15,-1*vaYUnit.val*sys1+vaBottom.val,14823
sys2=sys1%10
sys1/=10
if(sys1>0)
{
covx sys1,tTmp.txt,0,0
}else
{
tTmp.txt=""
}
if(sys2!=0)
{
covx sys2,tId.txt,0,0
tTmp.txt=tTmp.txt+"."+tId.txt
}
xstr m0.x+28,sys1*10+sys2*-1*vaYUnit.val+vaBottom.val-10,20,20,0,defaultFontColor,RED,2,1,3,tTmp.txt
}
// next
sya1++
spstr strTmp.txt,tTmp.txt,":",sya1
strlen tTmp.txt,sya0
}
//
// y achis label
spstr strCommand.txt,tTmp.txt,"~",15
// tTmp.txt="Gas [kW]"
strlen tTmp.txt,sys1
sya1=sys1*12+m0.h-48/2
for(sys0=0;sys0<sys1;sys0++)
{
substr tTmp.txt,strTmp.txt,sys0,1
xstr m0.x,sys0*-12+m0.y+sya1,30,20,6,defaultFontColor,RED,2,1,3,strTmp.txt
}
for(sys0=0;sys0<vNValues.val;sys0++)
{
if(sys0>0)
{
vaValues.txt+="~"
}
// extract next entry
spstr strCommand.txt,tTmp.txt,"~",sys0+17
// calculate left
sys1=sys0*5*vaUnit.val
sys1+=vaLeft.val
// if there is a colon in the obtained value we have a label/and gridline
spstr tTmp.txt,strTmp.txt,"^",1
strlen strTmp.txt,sya0
if(sya0>0)
{
// we have a label!!!
// -> extract label
sys2=vaUnit.val*2+sys1/100
// draw label
xstr sya0*-6+sys2,vaBottom.val+2,sya0*12,22,0,defaultFontColor,defaultBcoColor,1,1,3,strTmp.txt
// draw line
// line sys2,vaBottom.val,sys2,m0.y,defaultFontColor
sya1=1
//spstr tTmp.txt,strTmp.txt,":",0
spstr tTmp.txt,tTmp.txt,":",0
vaValues.txt+="-"
}else
{
sya1=0
}
vaValues.txt+=tTmp.txt
covx tTmp.txt,vaValue.val,0,0
sya0=sys1/100
if(vaValue.val==0)
{
line sya0,vaBottom.val,vaUnit.val*4+sys1/100,vaBottom.val,vaColorD.val
}else
{
fill sya0+1,-1*vaYUnit.val*vaValue.val+vaBottom.val+1,vaUnit.val*4/100,vaYUnit.val*vaValue.val-1,vaColorD.val
line sya0+1,-1*vaYUnit.val*vaValue.val+vaBottom.val,vaUnit.val*4+sys1/100-1,-1*vaYUnit.val*vaValue.val+vaBottom.val,vaColorL.val
draw sya0,-1*vaYUnit.val*vaValue.val+vaBottom.val+1,vaUnit.val*4+sys1/100,vaBottom.val,vaColorL.val
}
if(sya1>0)
{
sya1=-1*vaYUnit.val*vaValue.val+vaBottom.val
for(sya0=vaBottom.val-5;sya0>m0.y;sya0-=10)
{
sys1=sya0+5
if(sya0>=sya1)
{
line sys2,sya0,sys2,sys1,vaColorL.val
}else
{
if(sys1>=sya1)
{
line sys2,sya0,sys2,sya1-1,14823
line sys2,sya1,sys2,sys1,vaColorL.val
}else
{
line sys2,sya0,sys2,sys1,14823
}
}
}
}
}
}
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
// get value normal
spstr strCommand.txt,tTmp.txt,"~",2
covx tTmp.txt,dimValueNormal,0,0
dim=dimValueNormal
// get background color
spstr strCommand.txt,tTmp.txt,"~",3
if(tTmp.txt!="")
{
covx tTmp.txt,defaultBcoColor,0,0
}
// get font color
spstr strCommand.txt,tTmp.txt,"~",4
if(tTmp.txt!="")
{
covx tTmp.txt,defaultFontColor,0,0
}
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="pageType")
{
sleepValue=0
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
spstr strCommand.txt,pageIcons.tTmp3.txt,"~",4
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="screensaver")
{
page screensaver
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="popupShutter")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupShutter
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardThermo")
{
page cardThermo
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
if(tId.txt=="cardQR")
{
page cardQR
}
if(tId.txt=="cardPower")
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
}
Timer tmSleep
Attributes
ID : 7
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,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
}
}
TouchCap tc0
Attributes
ID : 8
Scope: local
Value: 0
Events
Touch Press Event
sleepValue=0

View File

@@ -25,7 +25,7 @@ Page cardEntities
//remove background & activate reparse mode
vis p0,0
recmod=1
bauds=115200
baud=115200
//debug stuff
vis tTmp,0
vis tSend,0
@@ -96,28 +96,42 @@ Page cardEntities
Variable (string) entn1
Attributes
ID : 44
ID : 42
Scope : local
Text :
Max. Text Size: 80
Variable (string) entn2
Attributes
ID : 45
ID : 43
Scope : local
Text :
Max. Text Size: 80
Variable (string) entn3
Attributes
ID : 46
ID : 44
Scope : local
Text :
Max. Text Size: 80
Variable (string) entn4
Attributes
ID : 47
ID : 45
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent1
Attributes
ID : 63
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent2
Attributes
ID : 64
Scope : local
Text :
Max. Text Size: 80
@@ -131,42 +145,42 @@ Variable (string) strCommand
Variable (string) tSend
Attributes
ID : 64
ID : 62
Scope : local
Text :
Max. Text Size: 200
Variable (string) type1
Attributes
ID : 40
ID : 38
Scope : local
Text :
Max. Text Size: 10
Variable (string) type2
Attributes
ID : 41
ID : 39
Scope : local
Text :
Max. Text Size: 10
Variable (string) type3
Attributes
ID : 42
ID : 40
Scope : local
Text :
Max. Text Size: 10
Variable (string) type4
Attributes
ID : 43
ID : 41
Scope : local
Text :
Max. Text Size: 10
Number nNum1
Attributes
ID : 53
ID : 51
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -196,7 +210,7 @@ Number nNum1
Number nNum2
Attributes
ID : 54
ID : 52
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -226,7 +240,7 @@ Number nNum2
Number nNum3
Attributes
ID : 55
ID : 53
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -256,7 +270,7 @@ Number nNum3
Number nNum4
Attributes
ID : 56
ID : 54
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -294,7 +308,7 @@ Text tEntity1
Opacity : 127
x coordinate : 92
y coordinate : 85
Width : 180
Width : 184
Height : 30
Effect : load
Effect Priority : 0
@@ -324,7 +338,7 @@ Text tEntity2
Opacity : 127
x coordinate : 93
y coordinate : 142
Width : 180
Width : 184
Height : 30
Effect : load
Effect Priority : 0
@@ -354,7 +368,7 @@ Text tEntity3
Opacity : 127
x coordinate : 93
y coordinate : 198
Width : 180
Width : 184
Height : 30
Effect : load
Effect Priority : 0
@@ -384,7 +398,7 @@ Text tEntity4
Opacity : 127
x coordinate : 93
y coordinate : 254
Width : 180
Width : 184
Height : 30
Effect : load
Effect Priority : 0
@@ -663,7 +677,7 @@ Picture p0
Slider hSlider1
Attributes
ID : 49
ID : 47
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -706,7 +720,7 @@ Slider hSlider1
Slider hSlider2
Attributes
ID : 50
ID : 48
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -749,7 +763,7 @@ Slider hSlider2
Slider hSlider3
Attributes
ID : 51
ID : 49
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -792,7 +806,7 @@ Slider hSlider3
Slider hSlider4
Attributes
ID : 52
ID : 50
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -1023,7 +1037,7 @@ Button bDown4
Button bNext
Attributes
ID : 33
ID : 65
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -1055,14 +1069,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardEntities,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -1077,7 +1084,7 @@ Button bNext
Button bPrev
Attributes
ID : 32
ID : 66
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -1109,14 +1116,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardEntities,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -1319,14 +1319,14 @@ Button bStop4
Button bText1
Attributes
ID : 60
ID : 58
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 276
y coordinate : 75
y coordinate : 74
Width : 166
Height : 50
Effect : load
@@ -1366,14 +1366,14 @@ Button bText1
Button bText2
Attributes
ID : 61
ID : 59
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 276
y coordinate : 131
y coordinate : 132
Width : 166
Height : 50
Effect : load
@@ -1413,7 +1413,7 @@ Button bText2
Button bText3
Attributes
ID : 62
ID : 60
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -1460,14 +1460,14 @@ Button bText3
Button bText4
Attributes
ID : 63
ID : 61
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 277
y coordinate : 245
y coordinate : 244
Width : 166
Height : 50
Effect : load
@@ -1875,7 +1875,7 @@ Dual-state Button btOnOff4
Hotspot m0
Attributes
ID : 38
ID : 36
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -1912,10 +1912,14 @@ Hotspot m0
{
page popupInSel
}
if(type1.txt=="timer")
{
page popupTimer
}
Hotspot m1
Attributes
ID : 37
ID : 35
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -1952,10 +1956,14 @@ Hotspot m1
{
page popupInSel
}
if(type2.txt=="timer")
{
page popupTimer
}
Hotspot m2
Attributes
ID : 36
ID : 34
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -1992,10 +2000,14 @@ Hotspot m2
{
page popupInSel
}
if(type3.txt=="timer")
{
page popupTimer
}
Hotspot m3
Attributes
ID : 39
ID : 37
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -2032,10 +2044,14 @@ Hotspot m3
{
page popupInSel
}
if(type4.txt=="timer")
{
page popupTimer
}
Hotspot mSpecial
Attributes
ID : 34
ID : 32
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -2061,15 +2077,15 @@ Hotspot mSpecial
Hotspot mSwipeNext
Attributes
ID : 57
ID : 55
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 472
x coordinate : 471
y coordinate : 5
Width : 8
Width : 9
Height : 310
Effect : load
Effect Priority : 0
@@ -2081,7 +2097,7 @@ Hotspot mSwipeNext
Hotspot mSwipePrev
Attributes
ID : 59
ID : 57
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -2089,7 +2105,7 @@ Hotspot mSwipePrev
Opacity : 127
x coordinate : 0
y coordinate : 5
Width : 8
Width : 9
Height : 310
Effect : load
Effect Priority : 0
@@ -2101,16 +2117,16 @@ Hotspot mSwipePrev
Hotspot mSwipeUp
Attributes
ID : 58
ID : 56
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 25
x coordinate : 27
y coordinate : 0
Width : 425
Height : 7
Width : 426
Height : 9
Effect : load
Effect Priority : 0
Effect Time : 300
@@ -2175,50 +2191,44 @@ Timer tmSerial
{
// command format: entityUpd,heading,navigation,[,type,internalName,iconId,displayName,optionalValue]x4
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
// get Type
spstr strCommand.txt,type1.txt,"~",3
spstr strCommand.txt,type1.txt,"~",14
// get internal name
spstr strCommand.txt,entn1.txt,"~",4
spstr strCommand.txt,entn1.txt,"~",15
if(type1.txt=="delete"||type1.txt=="")
{
vis bUp1,0
@@ -2233,14 +2243,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,tIcon1.txt,"~",5
spstr strCommand.txt,tIcon1.txt,"~",16
vis tIcon1,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",6
spstr strCommand.txt,tTmp.txt,"~",17
covx tTmp.txt,sys0,0,0
tIcon1.pco=sys0
// set name
spstr strCommand.txt,tEntity1.txt,"~",7
spstr strCommand.txt,tEntity1.txt,"~",18
vis tEntity1,1
}
if(type1.txt=="shutter")
@@ -2253,7 +2263,7 @@ Timer tmSerial
vis hSlider1,0
vis nNum1,0
// get Button State (optional Value)
spstr strCommand.txt,tId.txt,"~",8
spstr strCommand.txt,tId.txt,"~",19
// up button
spstr tId.txt,tTmp.txt,"|",3
if(tTmp.txt=="disable")
@@ -2304,11 +2314,11 @@ Timer tmSerial
vis hSlider1,0
vis nNum1,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",8
spstr strCommand.txt,tTmp.txt,"~",19
covx tTmp.txt,sys0,0,0
btOnOff1.val=sys0
}
if(type1.txt=="text")
if(type1.txt=="text"||type1.txt=="timer")
{
vis bUp1,0
vis bStop1,0
@@ -2321,7 +2331,7 @@ Timer tmSerial
bText1.pco=65535
bText1.pco2=65535
// get Text (optional Value)
spstr strCommand.txt,bText1.txt,"~",8
spstr strCommand.txt,bText1.txt,"~",19
}
if(type1.txt=="button"||type1.txt=="input_sel")
{
@@ -2336,7 +2346,7 @@ Timer tmSerial
bText1.pco=1374
bText1.pco2=1374
// get Text (optional Value)
spstr strCommand.txt,bText1.txt,"~",8
spstr strCommand.txt,bText1.txt,"~",19
}
if(type1.txt=="number")
{
@@ -2349,7 +2359,7 @@ Timer tmSerial
vis hSlider1,1
vis nNum1,1
// get config (optional Value) (use bText as variable)
spstr strCommand.txt,bText1.txt,"~",8
spstr strCommand.txt,bText1.txt,"~",19
//first value is current value
spstr bText1.txt,tTmp.txt,"|",0
covx tTmp.txt,sys0,0,0
@@ -2365,9 +2375,9 @@ Timer tmSerial
hSlider1.maxval=sys0
}
// get Type
spstr strCommand.txt,type2.txt,"~",9
spstr strCommand.txt,type2.txt,"~",20
// get internal name
spstr strCommand.txt,entn2.txt,"~",10
spstr strCommand.txt,entn2.txt,"~",21
if(type2.txt=="delete"||type2.txt=="")
{
vis bUp2,0
@@ -2382,14 +2392,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,tIcon2.txt,"~",11
spstr strCommand.txt,tIcon2.txt,"~",22
vis tIcon2,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",12
spstr strCommand.txt,tTmp.txt,"~",23
covx tTmp.txt,sys0,0,0
tIcon2.pco=sys0
// set name
spstr strCommand.txt,tEntity2.txt,"~",13
spstr strCommand.txt,tEntity2.txt,"~",24
vis tEntity2,1
}
if(type2.txt=="shutter")
@@ -2402,7 +2412,7 @@ Timer tmSerial
vis hSlider2,0
vis nNum2,0
// get Button State (optional Value)
spstr strCommand.txt,tId.txt,"~",14
spstr strCommand.txt,tId.txt,"~",25
// up button
spstr tId.txt,tTmp.txt,"|",3
if(tTmp.txt=="disable")
@@ -2453,11 +2463,11 @@ Timer tmSerial
vis hSlider2,0
vis nNum2,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",14
spstr strCommand.txt,tTmp.txt,"~",25
covx tTmp.txt,sys0,0,0
btOnOff2.val=sys0
}
if(type2.txt=="text")
if(type2.txt=="text"||type2.txt=="timer")
{
vis bUp2,0
vis bStop2,0
@@ -2470,7 +2480,7 @@ Timer tmSerial
bText2.pco=65535
bText2.pco2=65535
// get Text (optional Value)
spstr strCommand.txt,bText2.txt,"~",14
spstr strCommand.txt,bText2.txt,"~",25
}
if(type2.txt=="button"||type2.txt=="input_sel")
{
@@ -2485,7 +2495,7 @@ Timer tmSerial
bText2.pco=1374
bText2.pco2=1374
// get Text (optional Value)
spstr strCommand.txt,bText2.txt,"~",14
spstr strCommand.txt,bText2.txt,"~",25
}
if(type2.txt=="number")
{
@@ -2498,7 +2508,7 @@ Timer tmSerial
vis hSlider2,1
vis nNum2,1
// get config (optional Value) (use bText as variable)
spstr strCommand.txt,bText2.txt,"~",14
spstr strCommand.txt,bText2.txt,"~",25
//first value is current value
spstr bText2.txt,tTmp.txt,"|",0
covx tTmp.txt,sys0,0,0
@@ -2514,9 +2524,9 @@ Timer tmSerial
hSlider2.maxval=sys0
}
// get Type
spstr strCommand.txt,type3.txt,"~",15
spstr strCommand.txt,type3.txt,"~",26
// get internal name
spstr strCommand.txt,entn3.txt,"~",16
spstr strCommand.txt,entn3.txt,"~",27
if(type3.txt=="delete"||type3.txt=="")
{
vis bUp3,0
@@ -2531,14 +2541,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,tIcon3.txt,"~",17
spstr strCommand.txt,tIcon3.txt,"~",28
vis tIcon3,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",18
spstr strCommand.txt,tTmp.txt,"~",29
covx tTmp.txt,sys0,0,0
tIcon3.pco=sys0
// set name
spstr strCommand.txt,tEntity3.txt,"~",19
spstr strCommand.txt,tEntity3.txt,"~",30
vis tEntity3,1
}
if(type3.txt=="shutter")
@@ -2551,7 +2561,7 @@ Timer tmSerial
vis hSlider3,0
vis nNum3,0
// get Button State (optional Value)
spstr strCommand.txt,tId.txt,"~",20
spstr strCommand.txt,tId.txt,"~",31
// up button
spstr tId.txt,tTmp.txt,"|",3
if(tTmp.txt=="disable")
@@ -2602,11 +2612,11 @@ Timer tmSerial
vis hSlider3,0
vis nNum3,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",20
spstr strCommand.txt,tTmp.txt,"~",31
covx tTmp.txt,sys0,0,0
btOnOff3.val=sys0
}
if(type3.txt=="text")
if(type3.txt=="text"||type3.txt=="timer")
{
vis bUp3,0
vis bStop3,0
@@ -2619,7 +2629,7 @@ Timer tmSerial
bText3.pco=65535
bText3.pco2=65535
// get Text (optional Value)
spstr strCommand.txt,bText3.txt,"~",20
spstr strCommand.txt,bText3.txt,"~",31
}
if(type3.txt=="button"||type3.txt=="input_sel")
{
@@ -2634,7 +2644,7 @@ Timer tmSerial
bText3.pco=1374
bText3.pco2=1374
// get Text (optional Value)
spstr strCommand.txt,bText3.txt,"~",20
spstr strCommand.txt,bText3.txt,"~",31
}
if(type3.txt=="number")
{
@@ -2647,7 +2657,7 @@ Timer tmSerial
vis hSlider3,1
vis nNum3,1
// get config (optional Value) (use bText as variable)
spstr strCommand.txt,bText3.txt,"~",20
spstr strCommand.txt,bText3.txt,"~",31
//first value is current value
spstr bText3.txt,tTmp.txt,"|",0
covx tTmp.txt,sys0,0,0
@@ -2663,9 +2673,9 @@ Timer tmSerial
hSlider3.maxval=sys0
}
// get Type
spstr strCommand.txt,type4.txt,"~",21
spstr strCommand.txt,type4.txt,"~",32
// get internal name
spstr strCommand.txt,entn4.txt,"~",22
spstr strCommand.txt,entn4.txt,"~",33
if(type4.txt=="delete"||type4.txt=="")
{
vis bUp4,0
@@ -2680,14 +2690,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,tIcon4.txt,"~",23
spstr strCommand.txt,tIcon4.txt,"~",34
vis tIcon4,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",24
spstr strCommand.txt,tTmp.txt,"~",35
covx tTmp.txt,sys0,0,0
tIcon4.pco=sys0
// set name
spstr strCommand.txt,tEntity4.txt,"~",25
spstr strCommand.txt,tEntity4.txt,"~",36
vis tEntity4,1
}
if(type4.txt=="shutter")
@@ -2700,7 +2710,7 @@ Timer tmSerial
vis hSlider4,0
vis nNum4,0
// get Button State (optional Value)
spstr strCommand.txt,tId.txt,"~",26
spstr strCommand.txt,tId.txt,"~",37
// up button
spstr tId.txt,tTmp.txt,"|",3
if(tTmp.txt=="disable")
@@ -2751,11 +2761,11 @@ Timer tmSerial
vis hSlider4,0
vis nNum4,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",26
spstr strCommand.txt,tTmp.txt,"~",37
covx tTmp.txt,sys0,0,0
btOnOff4.val=sys0
}
if(type4.txt=="text")
if(type4.txt=="text"||type4.txt=="timer")
{
vis bUp4,0
vis bStop4,0
@@ -2768,7 +2778,7 @@ Timer tmSerial
bText4.pco=65535
bText4.pco2=65535
// get Text (optional Value)
spstr strCommand.txt,bText4.txt,"~",26
spstr strCommand.txt,bText4.txt,"~",37
}
if(type4.txt=="button"||type4.txt=="input_sel")
{
@@ -2783,7 +2793,7 @@ Timer tmSerial
bText4.pco=1374
bText4.pco2=1374
// get Text (optional Value)
spstr strCommand.txt,bText4.txt,"~",26
spstr strCommand.txt,bText4.txt,"~",37
}
if(type4.txt=="number")
{
@@ -2796,7 +2806,7 @@ Timer tmSerial
vis hSlider4,1
vis nNum4,1
// get config (optional Value) (use bText as variable)
spstr strCommand.txt,bText4.txt,"~",26
spstr strCommand.txt,bText4.txt,"~",37
//first value is current value
spstr bText4.txt,tTmp.txt,"|",0
covx tTmp.txt,sys0,0,0
@@ -2876,6 +2886,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
if(tInstruction.txt=="time")
{
@@ -2929,7 +2943,7 @@ Timer tmSerial
Timer tmSleep
Attributes
ID : 35
ID : 33
Scope : local
Period (ms): 1000
Enabled : yes
@@ -2960,7 +2974,7 @@ Timer tmSleep
TouchCap tc0
Attributes
ID : 48
ID : 46
Scope: local
Value: 0

View File

@@ -24,7 +24,7 @@ Page cardGrid
//remove background & activate reparse mode
vis p0,0
recmod=1
bauds=115200
baud=115200
//debug stuff
vis tTmp,0
vis tSend,0
@@ -96,12 +96,26 @@ Variable (string) entn6
Text :
Max. Text Size: 80
Variable (string) nent1
Attributes
ID : 42
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent2
Attributes
ID : 43
Scope : local
Text :
Max. Text Size: 80
Variable (string) strCommand
Attributes
ID : 4
Scope : local
Text :
Max. Text Size: 500
Max. Text Size: 700
Variable (string) tSend
Attributes
@@ -160,7 +174,7 @@ Text tEntity1
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 26
x coordinate : 21
y coordinate : 155
Width : 140
Height : 30
@@ -190,7 +204,7 @@ Text tEntity2
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 173
x coordinate : 168
y coordinate : 155
Width : 140
Height : 30
@@ -220,7 +234,7 @@ Text tEntity3
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 319
x coordinate : 314
y coordinate : 155
Width : 140
Height : 30
@@ -250,7 +264,7 @@ Text tEntity4
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 26
x coordinate : 21
y coordinate : 274
Width : 140
Height : 30
@@ -280,7 +294,7 @@ Text tEntity5
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 173
x coordinate : 168
y coordinate : 274
Width : 140
Height : 30
@@ -310,7 +324,7 @@ Text tEntity6
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 319
x coordinate : 314
y coordinate : 274
Width : 140
Height : 30
@@ -340,7 +354,7 @@ Text tHeading
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 131
x coordinate : 126
y coordinate : 26
Width : 227
Height : 30
@@ -370,7 +384,7 @@ Text tId
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 131
x coordinate : 126
y coordinate : 290
Width : 39
Height : 30
@@ -400,7 +414,7 @@ Text tInstruction
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 20
x coordinate : 15
y coordinate : 290
Width : 100
Height : 30
@@ -430,7 +444,7 @@ Text tTmp
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 420
x coordinate : 415
y coordinate : 290
Width : 34
Height : 30
@@ -477,7 +491,7 @@ Button bEntity1
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 26
x coordinate : 21
y coordinate : 75
Width : 140
Height : 80
@@ -512,6 +526,14 @@ Button bEntity1
{
page popupShutter
}
if(type1.txt=="input_sel")
{
page popupInSel
}
if(type1.txt=="timer")
{
page popupTimer
}
Touch Release Event
tmLP.en=0
@@ -536,7 +558,7 @@ Button bEntity2
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 173
x coordinate : 167
y coordinate : 75
Width : 140
Height : 80
@@ -571,6 +593,14 @@ Button bEntity2
{
page popupShutter
}
if(type2.txt=="input_sel")
{
page popupInSel
}
if(type2.txt=="timer")
{
page popupTimer
}
Touch Release Event
tmLP.en=0
@@ -595,7 +625,7 @@ Button bEntity3
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 319
x coordinate : 314
y coordinate : 75
Width : 140
Height : 80
@@ -630,6 +660,14 @@ Button bEntity3
{
page popupShutter
}
if(type3.txt=="input_sel")
{
page popupInSel
}
if(type3.txt=="timer")
{
page popupTimer
}
Touch Release Event
tmLP.en=0
@@ -654,7 +692,7 @@ Button bEntity4
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 26
x coordinate : 21
y coordinate : 194
Width : 140
Height : 80
@@ -689,6 +727,14 @@ Button bEntity4
{
page popupShutter
}
if(type4.txt=="input_sel")
{
page popupInSel
}
if(type4.txt=="timer")
{
page popupTimer
}
Touch Release Event
tmLP.en=0
@@ -713,7 +759,7 @@ Button bEntity5
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 173
x coordinate : 168
y coordinate : 194
Width : 140
Height : 80
@@ -748,6 +794,14 @@ Button bEntity5
{
page popupShutter
}
if(type5.txt=="input_sel")
{
page popupInSel
}
if(type5.txt=="timer")
{
page popupTimer
}
Touch Release Event
tmLP.en=0
@@ -772,7 +826,7 @@ Button bEntity6
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 319
x coordinate : 314
y coordinate : 194
Width : 140
Height : 80
@@ -807,6 +861,14 @@ Button bEntity6
{
page popupShutter
}
if(type6.txt=="input_sel")
{
page popupInSel
}
if(type6.txt=="timer")
{
page popupTimer
}
Touch Release Event
tmLP.en=0
@@ -831,7 +893,7 @@ Button bNext
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 411
x coordinate : 406
y coordinate : 16
Width : 50
Height : 50
@@ -857,14 +919,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardGrid,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -885,9 +940,9 @@ Button bPrev
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 29
x coordinate : 25
y coordinate : 16
Width : 50
Width : 49
Height : 50
Effect : load
Effect Priority : 0
@@ -911,14 +966,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardGrid,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -939,7 +987,7 @@ Hotspot mSpecial
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 328
x coordinate : 323
y coordinate : 0
Width : 83
Height : 67
@@ -965,9 +1013,9 @@ Hotspot mSwipeNext
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 472
x coordinate : 471
y coordinate : 5
Width : 8
Width : 9
Height : 310
Effect : load
Effect Priority : 0
@@ -987,7 +1035,7 @@ Hotspot mSwipePrev
Opacity : 127
x coordinate : 0
y coordinate : 5
Width : 7
Width : 9
Height : 310
Effect : load
Effect Priority : 0
@@ -1005,7 +1053,7 @@ Hotspot mSwipeUp
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 32
x coordinate : 27
y coordinate : 0
Width : 426
Height : 9
@@ -1034,10 +1082,6 @@ Timer tmLP
{
page popupFan
}
if(tTmp.txt=="input_sel")
{
page popupInSel
}
Timer tmSerial
Attributes
@@ -1095,50 +1139,44 @@ Timer tmSerial
{
// command format: entityUpd,heading,navigation,[,type,internalName,iconId,iconColor,displayName,optionalValue]x6
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
// get Type
spstr strCommand.txt,type1.txt,"~",3
spstr strCommand.txt,type1.txt,"~",14
// get internal name
spstr strCommand.txt,entn1.txt,"~",4
spstr strCommand.txt,entn1.txt,"~",15
if(type1.txt=="delete"||type1.txt=="")
{
vis tEntity1,0
@@ -1146,20 +1184,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity1.txt,"~",5
spstr strCommand.txt,bEntity1.txt,"~",16
vis bEntity1,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",6
spstr strCommand.txt,tTmp.txt,"~",17
covx tTmp.txt,sys0,0,0
bEntity1.pco=sys0
// set name
spstr strCommand.txt,tEntity1.txt,"~",7
spstr strCommand.txt,tEntity1.txt,"~",18
vis tEntity1,1
}
// get Type
spstr strCommand.txt,type2.txt,"~",9
spstr strCommand.txt,type2.txt,"~",20
// get internal name
spstr strCommand.txt,entn2.txt,"~",10
spstr strCommand.txt,entn2.txt,"~",21
if(type2.txt=="delete"||type2.txt=="")
{
vis tEntity2,0
@@ -1167,20 +1205,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity2.txt,"~",11
spstr strCommand.txt,bEntity2.txt,"~",22
vis bEntity2,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",12
spstr strCommand.txt,tTmp.txt,"~",23
covx tTmp.txt,sys0,0,0
bEntity2.pco=sys0
// set name
spstr strCommand.txt,tEntity2.txt,"~",13
spstr strCommand.txt,tEntity2.txt,"~",24
vis tEntity2,1
}
// get Type
spstr strCommand.txt,type3.txt,"~",15
spstr strCommand.txt,type3.txt,"~",26
// get internal name
spstr strCommand.txt,entn3.txt,"~",16
spstr strCommand.txt,entn3.txt,"~",27
if(type3.txt=="delete"||type3.txt=="")
{
vis tEntity3,0
@@ -1188,20 +1226,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity3.txt,"~",17
spstr strCommand.txt,bEntity3.txt,"~",28
vis bEntity3,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",18
spstr strCommand.txt,tTmp.txt,"~",29
covx tTmp.txt,sys0,0,0
bEntity3.pco=sys0
// set name
spstr strCommand.txt,tEntity3.txt,"~",19
spstr strCommand.txt,tEntity3.txt,"~",30
vis tEntity3,1
}
// get Type
spstr strCommand.txt,type4.txt,"~",21
spstr strCommand.txt,type4.txt,"~",32
// get internal name
spstr strCommand.txt,entn4.txt,"~",22
spstr strCommand.txt,entn4.txt,"~",33
if(type4.txt=="delete"||type4.txt=="")
{
vis tEntity4,0
@@ -1209,20 +1247,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity4.txt,"~",23
spstr strCommand.txt,bEntity4.txt,"~",34
vis bEntity4,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",24
spstr strCommand.txt,tTmp.txt,"~",35
covx tTmp.txt,sys0,0,0
bEntity4.pco=sys0
// set name
spstr strCommand.txt,tEntity4.txt,"~",25
spstr strCommand.txt,tEntity4.txt,"~",36
vis tEntity4,1
}
// get Type
spstr strCommand.txt,type5.txt,"~",27
spstr strCommand.txt,type5.txt,"~",38
// get internal name
spstr strCommand.txt,entn5.txt,"~",28
spstr strCommand.txt,entn5.txt,"~",39
if(type5.txt=="delete"||type5.txt=="")
{
vis tEntity5,0
@@ -1230,20 +1268,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity5.txt,"~",29
spstr strCommand.txt,bEntity5.txt,"~",40
vis bEntity5,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",30
spstr strCommand.txt,tTmp.txt,"~",41
covx tTmp.txt,sys0,0,0
bEntity5.pco=sys0
// set name
spstr strCommand.txt,tEntity5.txt,"~",31
spstr strCommand.txt,tEntity5.txt,"~",42
vis tEntity5,1
}
// get Type
spstr strCommand.txt,type6.txt,"~",33
spstr strCommand.txt,type6.txt,"~",44
// get internal name
spstr strCommand.txt,entn6.txt,"~",34
spstr strCommand.txt,entn6.txt,"~",45
if(type6.txt=="delete"||type6.txt=="")
{
vis tEntity6,0
@@ -1251,14 +1289,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity6.txt,"~",35
spstr strCommand.txt,bEntity6.txt,"~",46
vis bEntity6,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",36
spstr strCommand.txt,tTmp.txt,"~",47
covx tTmp.txt,sys0,0,0
bEntity6.pco=sys0
// set name
spstr strCommand.txt,tEntity6.txt,"~",37
spstr strCommand.txt,tEntity6.txt,"~",48
vis tEntity6,1
}
}
@@ -1326,6 +1364,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
if(tInstruction.txt=="time")
{

File diff suppressed because it is too large Load Diff

View File

@@ -65,6 +65,20 @@ Page cardPower
}
}
Variable (string) nent1
Attributes
ID : 43
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent2
Attributes
ID : 44
Scope : local
Text :
Max. Text Size: 80
Variable (string) strCommand
Attributes
ID : 5
@@ -801,14 +815,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardPower,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -855,14 +862,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -883,9 +883,9 @@ Hotspot mSwipeNext
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 472
x coordinate : 471
y coordinate : 5
Width : 8
Width : 9
Height : 310
Effect : load
Effect Priority : 0
@@ -923,7 +923,7 @@ Hotspot mSwipeUp
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 12
x coordinate : 27
y coordinate : 0
Width : 426
Height : 9
@@ -1061,63 +1061,57 @@ Timer tmSerial
{
// command format: entityUpd,heading,navigation,colorHome,iconHome[,iconColor,icon,speed,valueUp,valueDown]x6
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
// icon color home
spstr strCommand.txt,tTmp.txt,"~",3
spstr strCommand.txt,tTmp.txt,"~",14
covx tTmp.txt,t1.pco,0,0
// icon home
spstr strCommand.txt,t1.txt,"~",4
spstr strCommand.txt,t1.txt,"~",15
// text home
spstr strCommand.txt,tHome.txt,"~",5
spstr strCommand.txt,tHome.txt,"~",16
// iconColor
spstr strCommand.txt,tTmp.txt,"~",6
spstr strCommand.txt,tTmp.txt,"~",17
covx tTmp.txt,t0Icon.pco,0,0
// icon
spstr strCommand.txt,t0Icon.txt,"~",7
spstr strCommand.txt,t0Icon.txt,"~",18
// speed
spstr strCommand.txt,tTmp.txt,"~",8
spstr strCommand.txt,tTmp.txt,"~",19
covx tTmp.txt,t0Speed.val,0,0
// lower text
spstr strCommand.txt,t0u.txt,"~",9
spstr strCommand.txt,t0u.txt,"~",20
if(t0Icon.txt!="")
{
vis t0Icon,1
@@ -1130,15 +1124,15 @@ Timer tmSerial
vis h0,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",10
spstr strCommand.txt,tTmp.txt,"~",21
covx tTmp.txt,t1Icon.pco,0,0
// icon
spstr strCommand.txt,t1Icon.txt,"~",11
spstr strCommand.txt,t1Icon.txt,"~",22
// speed
spstr strCommand.txt,tTmp.txt,"~",12
spstr strCommand.txt,tTmp.txt,"~",23
covx tTmp.txt,t1Speed.val,0,0
// lower text
spstr strCommand.txt,t1u.txt,"~",13
spstr strCommand.txt,t1u.txt,"~",24
if(t1Icon.txt!="")
{
vis t1Icon,1
@@ -1151,15 +1145,15 @@ Timer tmSerial
vis h1,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",14
spstr strCommand.txt,tTmp.txt,"~",25
covx tTmp.txt,t2Icon.pco,0,0
// icon
spstr strCommand.txt,t2Icon.txt,"~",15
spstr strCommand.txt,t2Icon.txt,"~",26
// speed
spstr strCommand.txt,tTmp.txt,"~",16
spstr strCommand.txt,tTmp.txt,"~",27
covx tTmp.txt,t2Speed.val,0,0
// lower text
spstr strCommand.txt,t2u.txt,"~",17
spstr strCommand.txt,t2u.txt,"~",28
if(t2Icon.txt!="")
{
vis t2Icon,1
@@ -1172,15 +1166,15 @@ Timer tmSerial
vis h2,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",18
spstr strCommand.txt,tTmp.txt,"~",29
covx tTmp.txt,t3Icon.pco,0,0
// icon
spstr strCommand.txt,t3Icon.txt,"~",19
spstr strCommand.txt,t3Icon.txt,"~",30
// speed
spstr strCommand.txt,tTmp.txt,"~",20
spstr strCommand.txt,tTmp.txt,"~",31
covx tTmp.txt,t3Speed.val,0,0
// lower text
spstr strCommand.txt,t3u.txt,"~",21
spstr strCommand.txt,t3u.txt,"~",32
if(t3Icon.txt!="")
{
vis t3Icon,1
@@ -1193,15 +1187,15 @@ Timer tmSerial
vis h3,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",22
spstr strCommand.txt,tTmp.txt,"~",33
covx tTmp.txt,t4Icon.pco,0,0
// icon
spstr strCommand.txt,t4Icon.txt,"~",23
spstr strCommand.txt,t4Icon.txt,"~",34
// speed
spstr strCommand.txt,tTmp.txt,"~",24
spstr strCommand.txt,tTmp.txt,"~",35
covx tTmp.txt,t4Speed.val,0,0
// lower text
spstr strCommand.txt,t4u.txt,"~",25
spstr strCommand.txt,t4u.txt,"~",36
if(t4Icon.txt!="")
{
vis t4Icon,1
@@ -1214,15 +1208,15 @@ Timer tmSerial
vis h4,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",26
spstr strCommand.txt,tTmp.txt,"~",37
covx tTmp.txt,t5Icon.pco,0,0
// icon
spstr strCommand.txt,t5Icon.txt,"~",27
spstr strCommand.txt,t5Icon.txt,"~",38
// speed
spstr strCommand.txt,tTmp.txt,"~",28
spstr strCommand.txt,tTmp.txt,"~",39
covx tTmp.txt,t5Speed.val,0,0
// lower text
spstr strCommand.txt,t5u.txt,"~",29
spstr strCommand.txt,t5u.txt,"~",40
if(t5Icon.txt!="")
{
vis t5Icon,1
@@ -1299,6 +1293,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
if(tInstruction.txt=="time")
{

View File

@@ -81,12 +81,26 @@ Variable (string) entn2
Text :
Max. Text Size: 80
Variable (string) nent1
Attributes
ID : 32
Scope : local
Text :
Max. Text Size: 50
Variable (string) nent2
Attributes
ID : 33
Scope : local
Text :
Max. Text Size: 50
Variable (string) strCommand
Attributes
ID : 6
Scope : local
Text :
Max. Text Size: 275
Max. Text Size: 400
Variable (string) tId
Attributes
@@ -338,14 +352,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardQR,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -392,14 +399,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -636,9 +636,9 @@ Hotspot mSwipeNext
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 472
x coordinate : 471
y coordinate : 5
Width : 8
Width : 9
Height : 310
Effect : load
Effect Priority : 0
@@ -657,9 +657,9 @@ Hotspot mSwipePrev
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 5
Width : 9
Height : 310
y coordinate : 0
Width : 7
Height : 315
Effect : load
Effect Priority : 0
Effect Time : 300
@@ -745,52 +745,46 @@ Timer tmSerial
// command format: entityUpd,heading,navigation,textQR[,type,internalName,iconId,displayName,optionalValue]x2
//tHeading
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
//text qrcode
spstr strCommand.txt,vaQR.txt,"~",3
spstr strCommand.txt,vaQR.txt,"~",14
// get Type
spstr strCommand.txt,type1.txt,"~",4
spstr strCommand.txt,type1.txt,"~",15
// get internal name
spstr strCommand.txt,entn1.txt,"~",5
spstr strCommand.txt,entn1.txt,"~",16
if(type1.txt=="delete"||type1.txt=="")
{
vis btOnOff1,0
@@ -800,14 +794,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,tIcon1.txt,"~",6
spstr strCommand.txt,tIcon1.txt,"~",17
vis tIcon1,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",7
spstr strCommand.txt,tTmp.txt,"~",18
covx tTmp.txt,sys0,0,0
tIcon1.pco=sys0
// set name
spstr strCommand.txt,tEntity1.txt,"~",8
spstr strCommand.txt,tEntity1.txt,"~",19
vis tEntity1,1
}
if(type1.txt=="light")
@@ -815,7 +809,7 @@ Timer tmSerial
vis btOnOff1,1
vis bText1,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",9
spstr strCommand.txt,tTmp.txt,"~",20
covx tTmp.txt,sys0,0,0
btOnOff1.val=sys0
}
@@ -824,7 +818,7 @@ Timer tmSerial
vis btOnOff1,1
vis bText1,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",9
spstr strCommand.txt,tTmp.txt,"~",20
covx tTmp.txt,sys0,0,0
btOnOff1.val=sys0
}
@@ -836,7 +830,7 @@ Timer tmSerial
bText1.pco=65535
bText1.pco2=65535
// get Text (optional Value)
spstr strCommand.txt,bText1.txt,"~",9
spstr strCommand.txt,bText1.txt,"~",20
}
if(type1.txt=="button")
{
@@ -846,12 +840,12 @@ Timer tmSerial
bText1.pco=1374
bText1.pco2=1374
// get Text (optional Value)
spstr strCommand.txt,bText1.txt,"~",9
spstr strCommand.txt,bText1.txt,"~",20
}
// get Type
spstr strCommand.txt,type2.txt,"~",10
spstr strCommand.txt,type2.txt,"~",21
// get internal name
spstr strCommand.txt,entn2.txt,"~",11
spstr strCommand.txt,entn2.txt,"~",22
if(type2.txt=="delete"||type2.txt=="")
{
vis btOnOff2,0
@@ -861,14 +855,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,tIcon2.txt,"~",12
spstr strCommand.txt,tIcon2.txt,"~",23
vis tIcon2,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",13
spstr strCommand.txt,tTmp.txt,"~",24
covx tTmp.txt,sys0,0,0
tIcon2.pco=sys0
// set name
spstr strCommand.txt,tEntity2.txt,"~",14
spstr strCommand.txt,tEntity2.txt,"~",25
vis tEntity2,1
}
if(type2.txt=="light")
@@ -876,7 +870,7 @@ Timer tmSerial
vis btOnOff2,1
vis bText2,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",15
spstr strCommand.txt,tTmp.txt,"~",26
covx tTmp.txt,sys0,0,0
btOnOff2.val=sys0
}
@@ -885,7 +879,7 @@ Timer tmSerial
vis btOnOff2,1
vis bText2,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",15
spstr strCommand.txt,tTmp.txt,"~",26
covx tTmp.txt,sys0,0,0
btOnOff2.val=sys0
}
@@ -897,7 +891,7 @@ Timer tmSerial
bText2.pco=65535
bText2.pco2=65535
// get Text (optional Value)
spstr strCommand.txt,bText2.txt,"~",15
spstr strCommand.txt,bText2.txt,"~",26
}
if(type2.txt=="button")
{
@@ -907,7 +901,7 @@ Timer tmSerial
bText2.pco=1374
bText2.pco2=1374
// get Text (optional Value)
spstr strCommand.txt,bText2.txt,"~",15
spstr strCommand.txt,bText2.txt,"~",26
}
if(type2.txt=="delete"||type2.txt=="")
{
@@ -1022,6 +1016,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -72,12 +72,26 @@ Variable (string) entn
Text :
Max. Text Size: 80
Variable (string) nent1
Attributes
ID : 56
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent2
Attributes
ID : 55
Scope : local
Text :
Max. Text Size: 80
Variable (string) strCommand
Attributes
ID : 4
Scope : local
Text :
Max. Text Size: 250
Max. Text Size: 750
Variable (string) tId
Attributes
@@ -511,7 +525,7 @@ Text tHeading
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 1
Font ID : 2
Back. Color : 6371
Font Color : 65535
Horizontal Alignment : center
@@ -634,14 +648,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardThermo,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -688,14 +695,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardThermo,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -746,28 +746,7 @@ Dual-state Button bDown2
{
xTempDest2.val=xTempDest2.val-xTempStep1.val
}
// event,buttonPress2,entn,tempUpd,X
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="tempUpdHighLow,"
//convert temperature
covx xTempDest1.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
tSend.txt+="|"
covx xTempDest2.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,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
tmSendHighLow.en=1
Dual-state Button bUp2
Attributes
@@ -807,28 +786,7 @@ Dual-state Button bUp2
{
xTempDest2.val=xTempDest2.val+xTempStep1.val
}
// event,buttonPress2,entn,tempUpd,X
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="tempUpdHighLow,"
//convert temperature
covx xTempDest1.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
tSend.txt+="|"
covx xTempDest2.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,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
tmSendHighLow.en=1
Dual-state Button bt0
Attributes
@@ -1298,25 +1256,7 @@ Dual-state Button btDown
{
xTempDest.val=xTempDest.val-xTempStep1.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,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
tmSendTemp.en=1
Dual-state Button btDown1
Attributes
@@ -1356,28 +1296,7 @@ Dual-state Button btDown1
{
xTempDest1.val=xTempDest1.val-xTempStep1.val
}
// event,buttonPress2,entn,tempUpd,X
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="tempUpdHighLow,"
//convert temperature
covx xTempDest1.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
tSend.txt+="|"
covx xTempDest2.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,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
tmSendHighLow.en=1
Dual-state Button btUp
Attributes
@@ -1417,25 +1336,7 @@ Dual-state Button btUp
{
xTempDest.val=xTempDest.val+xTempStep1.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,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
tmSendTemp.en=1
Dual-state Button btUp1
Attributes
@@ -1475,28 +1376,7 @@ Dual-state Button btUp1
{
xTempDest1.val=xTempDest1.val+xTempStep1.val
}
// event,buttonPress2,entn,tempUpd,X
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="tempUpdHighLow,"
//convert temperature
covx xTempDest1.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
tSend.txt+="|"
covx xTempDest2.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,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
tmSendHighLow.en=1
Hotspot mSwipeNext
Attributes
@@ -1506,9 +1386,9 @@ Hotspot mSwipeNext
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 472
x coordinate : 471
y coordinate : 5
Width : 8
Width : 9
Height : 310
Effect : load
Effect Priority : 0
@@ -1526,7 +1406,7 @@ Hotspot mSwipePrev
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
x coordinate : 15
y coordinate : 5
Width : 9
Height : 310
@@ -1558,6 +1438,69 @@ Hotspot mSwipeUp
Touch Press Event
click bPrev,1
Timer tmSendHighLow
Attributes
ID : 54
Scope : local
Period (ms): 800
Enabled : no
Events
Timer Event
// event,buttonPress2,entn,tempUpd,X
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="tempUpdHighLow,"
//convert temperature
covx xTempDest1.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
tSend.txt+="|"
covx xTempDest2.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,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
tmSendHighLow.en=0
Timer tmSendTemp
Attributes
ID : 53
Scope : local
Period (ms): 800
Enabled : no
Events
Timer Event
// 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,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
tmSendTemp.en=0
Timer tmSerial
Attributes
ID : 3
@@ -1614,64 +1557,58 @@ Timer tmSerial
{
//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")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
//entity name
spstr strCommand.txt,entn.txt,"~",3
spstr strCommand.txt,entn.txt,"~",14
//currentTemp
spstr strCommand.txt,tCurTemp.txt,"~",4
spstr strCommand.txt,tCurTemp.txt,"~",15
//dstTemp
spstr strCommand.txt,tTmp.txt,"~",5
spstr strCommand.txt,tTmp.txt,"~",16
covx tTmp.txt,xTempDest1.val,0,0
xTempDest.val=xTempDest1.val
//status
spstr strCommand.txt,tStatus.txt,"~",6
spstr strCommand.txt,tStatus.txt,"~",17
//minTemp
spstr strCommand.txt,tTmp.txt,"~",7
spstr strCommand.txt,tTmp.txt,"~",18
covx tTmp.txt,xTempMin1.val,0,0
//maxTemp
spstr strCommand.txt,tTmp.txt,"~",8
spstr strCommand.txt,tTmp.txt,"~",19
covx tTmp.txt,xTempMax1.val,0,0
//tempStep
spstr strCommand.txt,tTmp.txt,"~",9
spstr strCommand.txt,tTmp.txt,"~",20
covx tTmp.txt,xTempStep1.val,0,0
// disable all buttons
vis bt0,0
@@ -1683,137 +1620,137 @@ Timer tmSerial
vis bt6,0
vis bt7,0
//bt0
spstr strCommand.txt,bt0.txt,"~",10
spstr strCommand.txt,bt0.txt,"~",21
if(bt0.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",11
spstr strCommand.txt,tTmp.txt,"~",22
covx tTmp.txt,bt0.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",12
spstr strCommand.txt,tTmp.txt,"~",23
covx tTmp.txt,bt0.val,0,0
// save action
spstr strCommand.txt,va0.txt,"~",13
spstr strCommand.txt,va0.txt,"~",24
//enable
vis bt0,1
}
//bt1
spstr strCommand.txt,bt1.txt,"~",14
spstr strCommand.txt,bt1.txt,"~",25
if(bt1.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",15
spstr strCommand.txt,tTmp.txt,"~",26
covx tTmp.txt,bt1.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",16
spstr strCommand.txt,tTmp.txt,"~",27
covx tTmp.txt,bt1.val,0,0
// save action
spstr strCommand.txt,va1.txt,"~",17
spstr strCommand.txt,va1.txt,"~",28
//enable
vis bt1,1
}
//bt2
spstr strCommand.txt,bt2.txt,"~",18
spstr strCommand.txt,bt2.txt,"~",29
if(bt2.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",19
spstr strCommand.txt,tTmp.txt,"~",30
covx tTmp.txt,bt2.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",20
spstr strCommand.txt,tTmp.txt,"~",31
covx tTmp.txt,bt2.val,0,0
// save action
spstr strCommand.txt,va2.txt,"~",21
spstr strCommand.txt,va2.txt,"~",32
//enable
vis bt2,1
}
//bt3
spstr strCommand.txt,bt3.txt,"~",22
spstr strCommand.txt,bt3.txt,"~",33
if(bt3.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",23
spstr strCommand.txt,tTmp.txt,"~",34
covx tTmp.txt,bt3.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",24
spstr strCommand.txt,tTmp.txt,"~",35
covx tTmp.txt,bt3.val,0,0
// save action
spstr strCommand.txt,va3.txt,"~",25
spstr strCommand.txt,va3.txt,"~",36
//enable
vis bt3,1
}
//bt4
spstr strCommand.txt,bt4.txt,"~",26
spstr strCommand.txt,bt4.txt,"~",37
if(bt4.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",27
spstr strCommand.txt,tTmp.txt,"~",38
covx tTmp.txt,bt4.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",28
spstr strCommand.txt,tTmp.txt,"~",39
covx tTmp.txt,bt4.val,0,0
// save action
spstr strCommand.txt,va4.txt,"~",29
spstr strCommand.txt,va4.txt,"~",40
//enable
vis bt4,1
}
//bt5
spstr strCommand.txt,bt5.txt,"~",30
spstr strCommand.txt,bt5.txt,"~",41
if(bt5.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",31
spstr strCommand.txt,tTmp.txt,"~",42
covx tTmp.txt,bt5.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",32
spstr strCommand.txt,tTmp.txt,"~",43
covx tTmp.txt,bt5.val,0,0
// save action
spstr strCommand.txt,va5.txt,"~",33
spstr strCommand.txt,va5.txt,"~",44
//enable
vis bt5,1
}
//bt6
spstr strCommand.txt,bt6.txt,"~",34
spstr strCommand.txt,bt6.txt,"~",45
if(bt6.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",35
spstr strCommand.txt,tTmp.txt,"~",46
covx tTmp.txt,bt6.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",36
spstr strCommand.txt,tTmp.txt,"~",47
covx tTmp.txt,bt6.val,0,0
// save action
spstr strCommand.txt,va6.txt,"~",37
spstr strCommand.txt,va6.txt,"~",48
//enable
vis bt6,1
}
//bt7
spstr strCommand.txt,bt7.txt,"~",38
spstr strCommand.txt,bt7.txt,"~",49
if(bt7.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",39
spstr strCommand.txt,tTmp.txt,"~",50
covx tTmp.txt,bt7.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",40
spstr strCommand.txt,tTmp.txt,"~",51
covx tTmp.txt,bt7.val,0,0
// save action
spstr strCommand.txt,va7.txt,"~",41
spstr strCommand.txt,va7.txt,"~",52
//enable
vis bt7,1
}
//Text tCurTempLbl
spstr strCommand.txt,tCurTempLbl.txt,"~",42
spstr strCommand.txt,tCurTempLbl.txt,"~",53
//Text tStateLbl
spstr strCommand.txt,tStateLbl.txt,"~",43
spstr strCommand.txt,tStateLbl.txt,"~",54
//Text tALbl
//spstr strCommand.txt,tALbl.txt,"~",44
//spstr strCommand.txt,tALbl.txt,"~",55
//Text tCF
spstr strCommand.txt,tCF.txt,"~",45
spstr strCommand.txt,tCF.txt,"~",56
tCF1.txt=tCF.txt
tCF2.txt=tCF.txt
//Second Temperature
spstr strCommand.txt,tTmp.txt,"~",46
spstr strCommand.txt,tTmp.txt,"~",57
if(tTmp.txt!="")
{
covx tTmp.txt,xTempDest2.val,0,0
@@ -1831,8 +1768,8 @@ Timer tmSerial
vis tCF2,1
}
//Show btDetail
spstr strCommand.txt,tTmp.txt,"~",47
if(tTmp.txt=="1")
spstr strCommand.txt,tTmp.txt,"~",58
if(tTmp.txt!="1")
{
vis btDetail,1
}else
@@ -1904,6 +1841,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
if(tInstruction.txt=="time")
{

View File

@@ -1,78 +1,86 @@
Program.s
0 Component(s)
11 Line(s) of event code
11 Unique line(s) of event code
12 Line(s) of event code
12 Unique line(s) of event code
pageIcons
7 Component(s)
0 Line(s) of event code
0 Unique line(s) of event code
cardQR
32 Component(s)
421 Line(s) of event code
242 Unique line(s) of event code
popupNotify
19 Component(s)
253 Line(s) of event code
164 Unique line(s) of event code
cardAlarm
40 Component(s)
439 Line(s) of event code
261 Unique line(s) of event code
pageStartup
19 Component(s)
177 Line(s) of event code
127 Unique line(s) of event code
257 Line(s) of event code
166 Unique line(s) of event code
popupShutter
25 Component(s)
394 Line(s) of event code
216 Unique line(s) of event code
popupFan
27 Component(s)
347 Line(s) of event code
202 Unique line(s) of event code
pageTest
14 Component(s)
14 Line(s) of event code
14 Unique line(s) of event code
popupLight
28 Component(s)
404 Line(s) of event code
223 Unique line(s) of event code
cardGrid
42 Component(s)
490 Line(s) of event code
286 Unique line(s) of event code
cardPower
43 Component(s)
435 Line(s) of event code
297 Unique line(s) of event code
cardMedia
34 Component(s)
421 Line(s) of event code
222 Unique line(s) of event code
cardThermo
53 Component(s)
608 Line(s) of event code
316 Unique line(s) of event code
screensaver
45 Component(s)
396 Line(s) of event code
294 Unique line(s) of event code
popupThermo
44 Component(s)
515 Line(s) of event code
272 Unique line(s) of event code
398 Line(s) of event code
218 Unique line(s) of event code
popupInSel
34 Component(s)
529 Line(s) of event code
257 Unique line(s) of event code
617 Line(s) of event code
295 Unique line(s) of event code
screensaver
46 Component(s)
429 Line(s) of event code
301 Unique line(s) of event code
popupLight
28 Component(s)
408 Line(s) of event code
225 Unique line(s) of event code
popupFan
27 Component(s)
351 Line(s) of event code
204 Unique line(s) of event code
popupTimer
42 Component(s)
512 Line(s) of event code
255 Unique line(s) of event code
pageStartup
19 Component(s)
181 Line(s) of event code
129 Unique line(s) of event code
cardChart
33 Component(s)
425 Line(s) of event code
290 Unique line(s) of event code
pageTest
21 Component(s)
66 Line(s) of event code
64 Unique line(s) of event code
cardGrid
44 Component(s)
511 Line(s) of event code
289 Unique line(s) of event code
cardMedia
59 Component(s)
637 Line(s) of event code
316 Unique line(s) of event code
cardThermo
57 Component(s)
528 Line(s) of event code
313 Unique line(s) of event code
cardPower
45 Component(s)
412 Line(s) of event code
289 Unique line(s) of event code
cardAlarm
42 Component(s)
415 Line(s) of event code
253 Unique line(s) of event code
cardQR
34 Component(s)
398 Line(s) of event code
232 Unique line(s) of event code
popupThermo
44 Component(s)
519 Line(s) of event code
274 Unique line(s) of event code
cardEntities
65 Component(s)
1165 Line(s) of event code
530 Unique line(s) of event code
67 Component(s)
1158 Line(s) of event code
526 Unique line(s) of event code
Total
17 Page(s)
571 Component(s)
7019 Line(s) of event code
1805 Unique line(s) of event code
19 Page(s)
693 Component(s)
8234 Line(s) of event code
2125 Unique line(s) of event code

View File

@@ -101,7 +101,7 @@ Text tTmp3
Send Component ID : disabled
Opacity : 127
x coordinate : 302
y coordinate : 152
y coordinate : 154
Width : 146
Height : 69
Effect : load

View File

@@ -402,7 +402,7 @@ Text tVersion
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : 45
Text : 47
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
@@ -655,6 +655,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -21,7 +21,60 @@ Page pageTest
Events
Preinitialize Event
vis p0,0
recmod=1
baud=115200
Variable (string) strCommand
Attributes
ID : 17
Scope : local
Text :
Max. Text Size: 20
Variable (string) tInstruction
Attributes
ID : 16
Scope : local
Text :
Max. Text Size: 30
Variable (string) tSend
Attributes
ID : 18
Scope : local
Text :
Max. Text Size: 40
Text tBench
Attributes
ID : 15
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 288
y coordinate : 90
Width : 152
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
Picture p0
Attributes
ID : 1
@@ -47,8 +100,8 @@ Button b0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 5
y coordinate : 12
x coordinate : 0
y coordinate : 0
Width : 100
Height : 50
Effect : load
@@ -119,8 +172,8 @@ Button b10
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 115
y coordinate : 128
x coordinate : 100
y coordinate : 98
Width : 100
Height : 50
Effect : load
@@ -155,8 +208,8 @@ Button b11
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 117
y coordinate : 184
x coordinate : 100
y coordinate : 145
Width : 100
Height : 50
Effect : load
@@ -183,6 +236,78 @@ Button b11
Touch Press Event
page cardGrid
Button b12
Attributes
ID : 19
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 242
Width : 100
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : 3D auto
Font ID : 1
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 : power
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
page cardPower
Button b13
Attributes
ID : 20
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 152
y coordinate : 245
Width : 100
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 : newtxt
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
Vertical Spacing : 0
Events
Touch Press Event
showqq
Button b2
Attributes
ID : 13
@@ -192,7 +317,7 @@ Button b2
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 244
y coordinate : 195
Width : 100
Height : 50
Effect : load
@@ -263,8 +388,8 @@ Button b4
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 7
y coordinate : 120
x coordinate : 0
y coordinate : 96
Width : 100
Height : 50
Effect : load
@@ -299,8 +424,8 @@ Button b5
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 111
y coordinate : 12
x coordinate : 100
y coordinate : 0
Width : 100
Height : 50
Effect : load
@@ -335,8 +460,8 @@ Button b6
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 5
y coordinate : 64
x coordinate : 0
y coordinate : 49
Width : 100
Height : 50
Effect : load
@@ -371,8 +496,8 @@ Button b7
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 113
y coordinate : 72
x coordinate : 100
y coordinate : 49
Width : 100
Height : 50
Effect : load
@@ -444,8 +569,8 @@ Button b9
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 6
y coordinate : 175
x coordinate : 0
y coordinate : 146
Width : 100
Height : 50
Effect : load
@@ -472,3 +597,83 @@ Button b9
Touch Press Event
page popupNotify
Timer tmSerial
Attributes
ID : 14
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=="ping")
{
spstr strCommand.txt,tBench.txt,"~",1
tSend.txt="pong,"+tBench.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
}

View File

@@ -914,6 +914,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -1014,6 +1014,90 @@ Button bModeNext
{
bMode12.pco=1374
}
if(bMode1.txt=="")
{
vis bMode1,0
}else
{
vis bMode1,1
}
if(bMode2.txt=="")
{
vis bMode2,0
}else
{
vis bMode2,1
}
if(bMode3.txt=="")
{
vis bMode3,0
}else
{
vis bMode3,1
}
if(bMode4.txt=="")
{
vis bMode4,0
}else
{
vis bMode4,1
}
if(bMode5.txt=="")
{
vis bMode5,0
}else
{
vis bMode5,1
}
if(bMode6.txt=="")
{
vis bMode6,0
}else
{
vis bMode6,1
}
if(bMode7.txt=="")
{
vis bMode7,0
}else
{
vis bMode7,1
}
if(bMode8.txt=="")
{
vis bMode8,0
}else
{
vis bMode8,1
}
if(bMode9.txt=="")
{
vis bMode9,0
}else
{
vis bMode9,1
}
if(bMode10.txt=="")
{
vis bMode10,0
}else
{
vis bMode10,1
}
if(bMode11.txt=="")
{
vis bMode11,0
}else
{
vis bMode11,1
}
if(bMode12.txt=="")
{
vis bMode12,0
}else
{
vis bMode12,1
}
Timer tmCooldown
Attributes
@@ -1277,6 +1361,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -681,8 +681,8 @@ Button bEffect
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 415
y coordinate : 79
x coordinate : 411
y coordinate : 95
Width : 50
Height : 50
Effect : load
@@ -721,7 +721,7 @@ Dual-state Button btOnOff1
Send Component ID : disabled
Opacity : 127
x coordinate : 356
y coordinate : 79
y coordinate : 95
Width : 50
Height : 50
Effect : load
@@ -1035,6 +1035,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -90,7 +90,7 @@ Text tHeading
Fill : solid color
Style : flat
Associated Keyboard : none
Font ID : 1
Font ID : 2
Back. Color : 6371
Font Color : 65535
Horizontal Alignment : left
@@ -364,7 +364,7 @@ Button b1
Effect Time : 300
Fill : solid color
Style : flat
Font ID : 1
Font ID : 2
Back. Color : 6371
Back. Picture ID (Pressed) : 8
Back. Color (Pressed) : 1024
@@ -413,7 +413,7 @@ Button b2
Effect Time : 300
Fill : solid color
Style : flat
Font ID : 1
Font ID : 2
Back. Color : 6371
Back. Picture ID (Pressed) : 8
Back. Color (Pressed) : 1024
@@ -670,6 +670,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -134,7 +134,7 @@ Text tEntity
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 81
x coordinate : 80
y coordinate : 48
Width : 195
Height : 30
@@ -164,7 +164,7 @@ Text tIcon1
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 28
x coordinate : 27
y coordinate : 63
Width : 45
Height : 30
@@ -194,7 +194,7 @@ Text tInfo1
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 81
x coordinate : 80
y coordinate : 76
Width : 195
Height : 30
@@ -224,7 +224,7 @@ Text tPosHeading
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 80
x coordinate : 79
y coordinate : 122
Width : 188
Height : 30
@@ -254,7 +254,7 @@ Text tTiltHeading
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 80
x coordinate : 79
y coordinate : 231
Width : 191
Height : 30
@@ -301,7 +301,7 @@ Slider hPosition
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 80
x coordinate : 79
y coordinate : 152
Width : 335
Height : 43
@@ -345,7 +345,7 @@ Slider hTilt
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 80
x coordinate : 79
y coordinate : 261
Width : 335
Height : 43
@@ -389,7 +389,7 @@ Button b0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 413
x coordinate : 412
y coordinate : 8
Width : 50
Height : 50
@@ -436,7 +436,7 @@ Button bDown1
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 402
x coordinate : 401
y coordinate : 95
Width : 50
Height : 50
@@ -483,7 +483,7 @@ Button bStop1
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 350
x coordinate : 349
y coordinate : 95
Width : 50
Height : 50
@@ -530,7 +530,7 @@ Button bTLeft
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 298
x coordinate : 297
y coordinate : 205
Width : 50
Height : 50
@@ -577,7 +577,7 @@ Button bTRight
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 402
x coordinate : 401
y coordinate : 205
Width : 50
Height : 50
@@ -624,7 +624,7 @@ Button bTStop
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 350
x coordinate : 349
y coordinate : 205
Width : 50
Height : 50
@@ -671,7 +671,7 @@ Button bUp1
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 298
x coordinate : 297
y coordinate : 95
Width : 50
Height : 50
@@ -984,6 +984,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -207,7 +207,7 @@ Text heading1
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 28
x coordinate : 26
y coordinate : 69
Width : 262
Height : 30
@@ -237,7 +237,7 @@ Text heading2
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 28
x coordinate : 26
y coordinate : 155
Width : 262
Height : 30
@@ -267,7 +267,7 @@ Text heading3
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 28
x coordinate : 26
y coordinate : 236
Width : 262
Height : 30
@@ -297,7 +297,7 @@ Text tEntity
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 109
x coordinate : 107
y coordinate : 21
Width : 263
Height : 30
@@ -327,7 +327,7 @@ Text tIcon1
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 28
x coordinate : 26
y coordinate : 21
Width : 45
Height : 30
@@ -374,7 +374,7 @@ Button b0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 414
x coordinate : 412
y coordinate : 8
Width : 50
Height : 50
@@ -421,7 +421,7 @@ Button bMode1
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 28
x coordinate : 26
y coordinate : 101
Width : 120
Height : 35
@@ -473,7 +473,7 @@ Button bMode2
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 152
x coordinate : 150
y coordinate : 101
Width : 120
Height : 35
@@ -525,7 +525,7 @@ Button bMode3
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 276
x coordinate : 274
y coordinate : 101
Width : 120
Height : 35
@@ -577,7 +577,7 @@ Button bModeNext
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 405
x coordinate : 403
y coordinate : 76
Width : 50
Height : 50
@@ -648,7 +648,7 @@ Button cMode1
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 28
x coordinate : 26
y coordinate : 187
Width : 120
Height : 35
@@ -700,7 +700,7 @@ Button cMode2
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 152
x coordinate : 150
y coordinate : 187
Width : 120
Height : 35
@@ -752,7 +752,7 @@ Button cMode3
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 276
x coordinate : 274
y coordinate : 187
Width : 120
Height : 35
@@ -804,7 +804,7 @@ Button cModeNext
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 405
x coordinate : 403
y coordinate : 162
Width : 50
Height : 50
@@ -874,7 +874,7 @@ Button dMode1
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 28
x coordinate : 26
y coordinate : 268
Width : 120
Height : 35
@@ -926,7 +926,7 @@ Button dMode2
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 152
x coordinate : 150
y coordinate : 268
Width : 120
Height : 35
@@ -978,7 +978,7 @@ Button dMode3
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 276
x coordinate : 274
y coordinate : 268
Width : 120
Height : 35
@@ -1030,7 +1030,7 @@ Button dModeNext
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 405
x coordinate : 403
y coordinate : 243
Width : 50
Height : 50
@@ -1372,6 +1372,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

File diff suppressed because it is too large Load Diff

View File

@@ -21,7 +21,7 @@ Page screensaver
Events
Preinitialize Event
recmod=1
bauds=115200
baud=115200
vis tInstruction,0
vis tTmp,0
vis p0,0
@@ -48,6 +48,13 @@ Variable (string) strCommand
Text :
Max. Text Size: 200
Variable (string) strTmp
Attributes
ID : 45
Scope : local
Text :
Max. Text Size: 2
Variable (string) tId
Attributes
ID : 16
@@ -126,8 +133,8 @@ Text t10
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 62
y coordinate : 199
x coordinate : 61
y coordinate : 201
Width : 360
Height : 2
Effect : load
@@ -156,8 +163,8 @@ Text tAMPM
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 359
y coordinate : 49
x coordinate : 358
y coordinate : 56
Width : 104
Height : 57
Effect : load
@@ -186,8 +193,8 @@ Text tDate
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 16
y coordinate : 162
x coordinate : 15
y coordinate : 165
Width : 450
Height : 32
Effect : load
@@ -216,8 +223,8 @@ Text tF1Icon
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 162
y coordinate : 243
x coordinate : 161
y coordinate : 245
Width : 40
Height : 35
Effect : load
@@ -246,8 +253,8 @@ Text tF2Icon
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 244
y coordinate : 243
x coordinate : 243
y coordinate : 245
Width : 40
Height : 35
Effect : load
@@ -276,8 +283,8 @@ Text tF3Icon
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 325
y coordinate : 243
x coordinate : 324
y coordinate : 245
Width : 40
Height : 35
Effect : load
@@ -306,8 +313,8 @@ Text tF4Icon
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 406
y coordinate : 243
x coordinate : 405
y coordinate : 245
Width : 40
Height : 35
Effect : load
@@ -336,8 +343,8 @@ Text tForecast1
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 144
y coordinate : 214
x coordinate : 143
y coordinate : 216
Width : 72
Height : 26
Effect : load
@@ -366,8 +373,8 @@ Text tForecast1Val
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 141
y coordinate : 280
x coordinate : 140
y coordinate : 282
Width : 71
Height : 25
Effect : load
@@ -396,8 +403,8 @@ Text tForecast2
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 228
y coordinate : 214
x coordinate : 227
y coordinate : 216
Width : 72
Height : 25
Effect : load
@@ -426,8 +433,8 @@ Text tForecast2Val
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 228
y coordinate : 281
x coordinate : 227
y coordinate : 283
Width : 72
Height : 25
Effect : load
@@ -456,8 +463,8 @@ Text tForecast3
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 309
y coordinate : 214
x coordinate : 308
y coordinate : 216
Width : 72
Height : 25
Effect : load
@@ -486,8 +493,8 @@ Text tForecast3Val
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 308
y coordinate : 281
x coordinate : 307
y coordinate : 283
Width : 71
Height : 25
Effect : load
@@ -516,8 +523,8 @@ Text tForecast4
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 390
y coordinate : 214
x coordinate : 389
y coordinate : 216
Width : 72
Height : 25
Effect : load
@@ -546,8 +553,8 @@ Text tForecast4Val
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 390
y coordinate : 281
x coordinate : 389
y coordinate : 283
Width : 72
Height : 25
Effect : load
@@ -576,10 +583,10 @@ Text tIcon1
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 16
x coordinate : 15
y coordinate : 0
Width : 85
Height : 38
Height : 45
Effect : load
Effect Priority : 0
Effect Time : 300
@@ -590,7 +597,7 @@ Text tIcon1
Back. Color : 0
Font Color : 17299
Horizontal Alignment : left
Vertical Alignment : center
Vertical Alignment : top
Input Type : character
Text :
Max. Text Size : 10
@@ -606,10 +613,10 @@ Text tIcon2
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 393
x coordinate : 380
y coordinate : 0
Width : 85
Height : 38
Height : 45
Effect : load
Effect Priority : 0
Effect Time : 300
@@ -620,7 +627,7 @@ Text tIcon2
Back. Color : 0
Font Color : 17299
Horizontal Alignment : right
Vertical Alignment : center
Vertical Alignment : top
Input Type : character
Text :
Max. Text Size : 10
@@ -636,8 +643,8 @@ Text tMR
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 160
y coordinate : 274
x coordinate : 159
y coordinate : 276
Width : 62
Height : 21
Effect : load
@@ -666,8 +673,8 @@ Text tMRIcon
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 117
y coordinate : 270
x coordinate : 116
y coordinate : 272
Width : 40
Height : 35
Effect : load
@@ -696,8 +703,8 @@ Text tMainIcon
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 42
y coordinate : 206
x coordinate : 41
y coordinate : 208
Width : 70
Height : 66
Effect : load
@@ -726,8 +733,8 @@ Text tMainIconAlt
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 16
y coordinate : 225
x coordinate : 15
y coordinate : 227
Width : 100
Height : 66
Effect : load
@@ -756,8 +763,8 @@ Text tMainText
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 23
y coordinate : 271
x coordinate : 22
y coordinate : 273
Width : 110
Height : 43
Effect : load
@@ -786,8 +793,8 @@ Text tMainTextAlt
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 120
y coordinate : 214
x coordinate : 119
y coordinate : 216
Width : 106
Height : 42
Effect : load
@@ -816,8 +823,8 @@ Text tNotifyHead
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 16
y coordinate : 205
x coordinate : 15
y coordinate : 207
Width : 450
Height : 58
Effect : load
@@ -846,8 +853,8 @@ Text tNotifyText
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 16
y coordinate : 262
x coordinate : 15
y coordinate : 264
Width : 450
Height : 47
Effect : load
@@ -863,8 +870,8 @@ Text tNotifyText
Vertical Alignment : top
Input Type : character
Text :
Max. Text Size : 35
Word wrap : disabled
Max. Text Size : 120
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
@@ -876,8 +883,8 @@ Text tTime
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 53
y coordinate : 18
x coordinate : 52
y coordinate : 25
Width : 376
Height : 112
Effect : load
@@ -892,7 +899,7 @@ Text tTime
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : 21:32
Text : 21:32
Max. Text Size : 15
Word wrap : disabled
Horizontal Spacing : 0
@@ -906,8 +913,8 @@ Text tTimeAdd
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 16
y coordinate : 130
x coordinate : 15
y coordinate : 134
Width : 450
Height : 32
Effect : load
@@ -1065,6 +1072,27 @@ Timer tmSerial
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="statusUpdate")
{
//statusIcon1
spstr strCommand.txt,tIcon1.txt,"~",1
spstr strCommand.txt,tTmp.txt,"~",2
covx tTmp.txt,tIcon1.pco,0,0
//statusIcon2
spstr strCommand.txt,tIcon2.txt,"~",3
spstr strCommand.txt,tTmp.txt,"~",4
covx tTmp.txt,tIcon2.pco,0,0
spstr strCommand.txt,tTmp.txt,"~",5
if(tTmp.txt!="")
{
tIcon1.font=3
}
spstr strCommand.txt,tTmp.txt,"~",6
if(tTmp.txt!="")
{
tIcon2.font=3
}
}
if(tInstruction.txt=="weatherUpdate"&&tNotifyHead.txt==""&&tNotifyText.txt=="")
{
vis tMainIcon,1
@@ -1139,6 +1167,16 @@ Timer tmSerial
spstr strCommand.txt,tIcon2.txt,"~",19
spstr strCommand.txt,tTmp.txt,"~",20
covx tTmp.txt,tIcon2.pco,0,0
spstr strCommand.txt,tTmp.txt,"~",21
if(tTmp.txt!="")
{
tIcon1.font=3
}
spstr strCommand.txt,tTmp.txt,"~",22
if(tTmp.txt!="")
{
tIcon2.font=3
}
}
if(tInstruction.txt=="color"&&tNotifyHead.txt==""&&tNotifyText.txt=="")
{
@@ -1319,6 +1357,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -14,3 +14,4 @@ Program.s
//color vars
int defaultFontColor=65535
int defaultBcoColor=6371
page pageStartup

View File

@@ -43,7 +43,7 @@ Page cardAlarm
if(b[sys0].type==98||b[sys0].type==116)
{
b[sys0].bco=defaultBcoColor
b[sys0].pco=defaultFontColor
//b[sys0].pco=defaultFontColor
}
}
if(defaultBcoColor==0)
@@ -63,6 +63,18 @@ Variable (string) entn
Text :
Max. Text Size: 80
Variable (string) nent1
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent2
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) strCommand
Attributes
Scope : local
@@ -482,14 +494,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -514,14 +519,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -640,86 +638,80 @@ Timer tmSerial
{
//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")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
//text arm1
spstr strCommand.txt,arm1.txt,"~",3
spstr strCommand.txt,arm1.txt,"~",14
if(arm1.txt!="")
{
vis arm1,1
}
//id arm1
spstr strCommand.txt,va1.txt,"~",4
spstr strCommand.txt,va1.txt,"~",15
//text arm2
spstr strCommand.txt,arm2.txt,"~",5
spstr strCommand.txt,arm2.txt,"~",16
if(arm2.txt!="")
{
vis arm2,1
}
//id arm2
spstr strCommand.txt,va2.txt,"~",6
spstr strCommand.txt,va2.txt,"~",17
//text arm3
spstr strCommand.txt,arm3.txt,"~",7
spstr strCommand.txt,arm3.txt,"~",18
if(arm3.txt!="")
{
vis arm3,1
}
//id arm3
spstr strCommand.txt,va3.txt,"~",8
spstr strCommand.txt,va3.txt,"~",19
//text arm4
spstr strCommand.txt,arm4.txt,"~",9
spstr strCommand.txt,arm4.txt,"~",20
if(arm4.txt!="")
{
vis arm4,1
}
//id arm4
spstr strCommand.txt,va4.txt,"~",10
spstr strCommand.txt,va4.txt,"~",21
//icon
spstr strCommand.txt,tIcon.txt,"~",11
spstr strCommand.txt,tIcon.txt,"~",22
//icon color
spstr strCommand.txt,tTmp.txt,"~",12
spstr strCommand.txt,tTmp.txt,"~",23
covx tTmp.txt,sys0,0,0
tIcon.pco=sys0
//numpad status
spstr strCommand.txt,tTmp.txt,"~",13
spstr strCommand.txt,tTmp.txt,"~",24
if(tTmp.txt!="disable")
{
vis b0,1
@@ -752,7 +744,7 @@ Timer tmSerial
vis tCode,0
}
//flashing status
spstr strCommand.txt,tTmp.txt,"~",14
spstr strCommand.txt,tTmp.txt,"~",25
if(tTmp.txt=="enable")
{
tmFlash.en=1
@@ -761,13 +753,13 @@ Timer tmSerial
tmFlash.en=0
}
// extra button
spstr strCommand.txt,b9.txt,"~",15
spstr strCommand.txt,b9.txt,"~",26
if(b9.txt!="")
{
vis b9,1
spstr strCommand.txt,tTmp.txt,"~",16
spstr strCommand.txt,tTmp.txt,"~",27
covx tTmp.txt,b9.pco,0,0
spstr strCommand.txt,vaAddBtn.txt,"~",17
spstr strCommand.txt,vaAddBtn.txt,"~",28
}
}
if(tInstruction.txt=="time")
@@ -872,6 +864,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -0,0 +1,739 @@
Page cardChart
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Events
Preinitialize Event
dim=dimValueNormal
vis p0,0
vis tSend,0
vis tInstruction,0
vis tTmp,0
vis tId,0
vis bPrev,0
vis bNext,0
cardChart.bco=defaultBcoColor
vis x0,0
x0.bco=defaultBcoColor
x0.borderc=defaultBcoColor
for(sys0=0;sys0<32;sys0++)
{
if(b[sys0].type==98||b[sys0].type==116)
{
b[sys0].bco=defaultBcoColor
b[sys0].pco=defaultFontColor
}
if(b[sys0].type==53&&defaultBcoColor==6371)
{
b[sys0].pic=1
b[sys0].pic2=2
}
if(b[sys0].type==53&&defaultBcoColor==0)
{
b[sys0].pic=10
b[sys0].pic2=11
}
}
Variable (string) entn
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent1
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent2
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) strCommand
Attributes
Scope : local
Text :
Max. Text Size: 275
Variable (string) strTmp
Attributes
Scope : local
Text :
Max. Text Size: 200
Variable (string) tId
Attributes
Scope : local
Text :
Max. Text Size: 20
Variable (string) tInstruction
Attributes
Scope : local
Text :
Max. Text Size: 20
Variable (string) tSend
Attributes
Scope : local
Text :
Max. Text Size: 200
Variable (string) tTmp
Attributes
Scope : local
Text :
Max. Text Size: 20
Variable (int32) vMax
Attributes
Scope: local
Value: 0
Variable (int32) vNValues
Attributes
Scope: local
Value: 0
Variable (int32) vaBottom
Attributes
Scope: local
Value: 0
Variable (int32) vaColorD
Attributes
Scope: local
Value: 0
Variable (int32) vaColorL
Attributes
Scope: local
Value: 0
Variable (int32) vaLast
Attributes
Scope: local
Value: 4294967295
Variable (int32) vaLeft
Attributes
Scope: local
Value: 0
Variable (int32) vaUnit
Attributes
Scope: local
Value: 0
Variable (int32) vaValue
Attributes
Scope: local
Value: 0
Variable (string) vaValues
Attributes
Scope : local
Text :
Max. Text Size: 100
Variable (int32) vaYUnit
Attributes
Scope: local
Value: 0
XFloat x0
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
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 40
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,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button 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,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Hotspot m0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Events
Touch Press Event
if(vaLast.val>=0)
{
// spstr vaValues.txt,tTmp.txt,"~",vaLast.val
// covx tTmp.txt,vaValue.val,0,0
sys1=vaLast.val*5*vaUnit.val
sys1+=vaLeft.val
sya0=sys1/100
sya1=vaUnit.val*4+sys1/100
if(vaValue.val==0)
{
line sya0,vaBottom.val,sya1,vaBottom.val,vaColorD.val
}else
{
sys0=0
if(vaValue.val<0)
{
vaValue.val*=-1
sys0=1
}
fill sya0+1,-1*vaYUnit.val*vaValue.val+vaBottom.val+1,vaUnit.val*4/100,vaYUnit.val*vaValue.val-1,vaColorD.val
// line sya0+1,-10*vaValue.val+vaBottom.val,sya1-1,-10*vaValue.val+vaBottom.val,vaColorL.val
draw sya0,-1*vaYUnit.val*vaValue.val+vaBottom.val+1,sya1,vaBottom.val,vaColorL.val
if(sys0!=0)
{
sya1=-1*vaYUnit.val*vaValue.val+vaBottom.val
for(sys0=vaBottom.val;sys0>=sya1;sys0-=10)
{
sys2=sys0-5
if(sys2<sya1)
{
sys2=sya1
}
line vaUnit.val*2+sys1/100,sys0,vaUnit.val*2+sys1/100,sys2,vaColorL.val
}
}
}
}
sys0=tch0-m0.x-25-40*100/vaUnit.val
sys1=sys0%5
if(sys1<4&&sys0>=0)
{
vis x0,1
vaLast.val=sys0/5
// n0.val=sys0/5
spstr vaValues.txt,tTmp.txt,"~",vaLast.val
covx tTmp.txt,vaValue.val,0,0
// t0.txt=tTmp.txt
sys1=vaLast.val*5*vaUnit.val
sys1+=vaLeft.val
sya0=sys1/100
sya1=vaUnit.val*4+sys1/100
if(vaValue.val==0)
{
line sya0,vaBottom.val,sya1,vaBottom.val,vaColorL.val
x0.val=vaValue.val
}else
{
if(vaValue.val<0)
{
fill sya0+1,vaYUnit.val*vaValue.val+vaBottom.val+1,vaUnit.val*4/100,-1*vaYUnit.val*vaValue.val-1,vaColorL.val
x0.val=vaValue.val*-1
}else
{
fill sya0+1,-1*vaYUnit.val*vaValue.val+vaBottom.val+1,vaUnit.val*4/100,vaYUnit.val*vaValue.val-1,vaColorL.val
x0.val=vaValue.val
}
}
}else
{
vis x0,0
vaLast.val=-1
}
Hotspot mSwipeNext
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Events
Touch Press Event
click bNext,1
Hotspot mSwipePrev
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Events
Touch Press Event
click bPrev,1
Hotspot mSwipeUp
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Events
Touch Press Event
click bPrev,1
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
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")
{
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
}
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
}
// extract color
spstr strCommand.txt,tTmp.txt,"~",14
covx tTmp.txt,vaColorL.val,0,0
// prepare dark color
sys0=vaColorL.val>>11 // red
vaColorD.val=sys0*8/10<<11 // store and shift
sys0=vaColorL.val>>5%64 // green
vaColorD.val=sys0*8/10<<5+vaColorD.val // store and shift
sys0=vaColorL.val%32
vaColorD.val=sys0*8/10+vaColorD.val // store and add
//
// detect nValues and maxValue
vNValues.val=0
spstr strCommand.txt,tTmp.txt,"~",vNValues.val+17
strlen tTmp.txt,sya0
while(sya0>0)
{
covx tTmp.txt,sya1,0,0
if(sya1>vMax.val)
{
vMax.val=sya1
}
// next
vNValues.val++
spstr strCommand.txt,tTmp.txt,"~",vNValues.val+17
strlen tTmp.txt,sya0
}
//
// calculate unit width
sys0=vNValues.val*4
sys0+=vNValues.val-1
vaUnit.val=m0.w-25-40*100
vaUnit.val/=sys0
vaBottom.val=m0.y+m0.h-24
vaLeft.val=m0.x+25+40*100
vaYUnit.val=m0.h-24/vMax.val
//
line m0.x+25+40-10,m0.y,m0.x+25+40-10,vaBottom.val+10,14823
line m0.x+25+40-5,vaBottom.val,m0.x+25+40-15,vaBottom.val,14823
spstr strCommand.txt,strTmp.txt,"~",16
sya1=0
spstr strTmp.txt,tTmp.txt,":",sya1
strlen tTmp.txt,sya0
while(sya0>0)
{
covx tTmp.txt,sys1,0,0
if(sys1<=vMax.val)
{
line m0.x+25+40-5,-1*vaYUnit.val*sys1+vaBottom.val,m0.x+25+40-15,-1*vaYUnit.val*sys1+vaBottom.val,14823
sys2=sys1%10
sys1/=10
if(sys1>0)
{
covx sys1,tTmp.txt,0,0
}else
{
tTmp.txt=""
}
if(sys2!=0)
{
covx sys2,tId.txt,0,0
tTmp.txt=tTmp.txt+"."+tId.txt
}
xstr m0.x+28,sys1*10+sys2*-1*vaYUnit.val+vaBottom.val-10,20,20,0,defaultFontColor,RED,2,1,3,tTmp.txt
}
// next
sya1++
spstr strTmp.txt,tTmp.txt,":",sya1
strlen tTmp.txt,sya0
}
//
// y achis label
spstr strCommand.txt,tTmp.txt,"~",15
// tTmp.txt="Gas [kW]"
strlen tTmp.txt,sys1
sya1=sys1*12+m0.h-48/2
for(sys0=0;sys0<sys1;sys0++)
{
substr tTmp.txt,strTmp.txt,sys0,1
xstr m0.x,sys0*-12+m0.y+sya1,30,20,6,defaultFontColor,RED,2,1,3,strTmp.txt
}
for(sys0=0;sys0<vNValues.val;sys0++)
{
if(sys0>0)
{
vaValues.txt+="~"
}
// extract next entry
spstr strCommand.txt,tTmp.txt,"~",sys0+17
// calculate left
sys1=sys0*5*vaUnit.val
sys1+=vaLeft.val
// if there is a colon in the obtained value we have a label/and gridline
spstr tTmp.txt,strTmp.txt,"^",1
strlen strTmp.txt,sya0
if(sya0>0)
{
// we have a label!!!
// -> extract label
sys2=vaUnit.val*2+sys1/100
// draw label
xstr sya0*-6+sys2,vaBottom.val+2,sya0*12,22,0,defaultFontColor,defaultBcoColor,1,1,3,strTmp.txt
// draw line
// line sys2,vaBottom.val,sys2,m0.y,defaultFontColor
sya1=1
//spstr tTmp.txt,strTmp.txt,":",0
spstr tTmp.txt,tTmp.txt,":",0
vaValues.txt+="-"
}else
{
sya1=0
}
vaValues.txt+=tTmp.txt
covx tTmp.txt,vaValue.val,0,0
sya0=sys1/100
if(vaValue.val==0)
{
line sya0,vaBottom.val,vaUnit.val*4+sys1/100,vaBottom.val,vaColorD.val
}else
{
fill sya0+1,-1*vaYUnit.val*vaValue.val+vaBottom.val+1,vaUnit.val*4/100,vaYUnit.val*vaValue.val-1,vaColorD.val
line sya0+1,-1*vaYUnit.val*vaValue.val+vaBottom.val,vaUnit.val*4+sys1/100-1,-1*vaYUnit.val*vaValue.val+vaBottom.val,vaColorL.val
draw sya0,-1*vaYUnit.val*vaValue.val+vaBottom.val+1,vaUnit.val*4+sys1/100,vaBottom.val,vaColorL.val
}
if(sya1>0)
{
sya1=-1*vaYUnit.val*vaValue.val+vaBottom.val
for(sya0=vaBottom.val-5;sya0>m0.y;sya0-=10)
{
sys1=sya0+5
if(sya0>=sya1)
{
line sys2,sya0,sys2,sys1,vaColorL.val
}else
{
if(sys1>=sya1)
{
line sys2,sya0,sys2,sya1-1,14823
line sys2,sya1,sys2,sys1,vaColorL.val
}else
{
line sys2,sya0,sys2,sys1,14823
}
}
}
}
}
}
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
// get value normal
spstr strCommand.txt,tTmp.txt,"~",2
covx tTmp.txt,dimValueNormal,0,0
dim=dimValueNormal
// get background color
spstr strCommand.txt,tTmp.txt,"~",3
if(tTmp.txt!="")
{
covx tTmp.txt,defaultBcoColor,0,0
}
// get font color
spstr strCommand.txt,tTmp.txt,"~",4
if(tTmp.txt!="")
{
covx tTmp.txt,defaultFontColor,0,0
}
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="pageType")
{
sleepValue=0
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
spstr strCommand.txt,pageIcons.tTmp3.txt,"~",4
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="screensaver")
{
page screensaver
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="popupShutter")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupShutter
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardThermo")
{
page cardThermo
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
if(tId.txt=="cardQR")
{
page cardQR
}
if(tId.txt=="cardPower")
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// 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,2
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

@@ -17,7 +17,7 @@ Page cardEntities
//remove background & activate reparse mode
vis p0,0
recmod=1
bauds=115200
baud=115200
//debug stuff
vis tTmp,0
vis tSend,0
@@ -110,6 +110,18 @@ Variable (string) entn4
Text :
Max. Text Size: 80
Variable (string) nent1
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent2
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) strCommand
Attributes
Scope : local
@@ -533,14 +545,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardEntities,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -565,14 +570,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardEntities,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -1023,6 +1021,10 @@ Hotspot m0
{
page popupInSel
}
if(type1.txt=="timer")
{
page popupTimer
}
Hotspot m1
Attributes
@@ -1054,6 +1056,10 @@ Hotspot m1
{
page popupInSel
}
if(type2.txt=="timer")
{
page popupTimer
}
Hotspot m2
Attributes
@@ -1085,6 +1091,10 @@ Hotspot m2
{
page popupInSel
}
if(type3.txt=="timer")
{
page popupTimer
}
Hotspot m3
Attributes
@@ -1116,6 +1126,10 @@ Hotspot m3
{
page popupInSel
}
if(type4.txt=="timer")
{
page popupTimer
}
Hotspot mSpecial
Attributes
@@ -1222,50 +1236,44 @@ Timer tmSerial
{
// command format: entityUpd,heading,navigation,[,type,internalName,iconId,displayName,optionalValue]x4
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
// get Type
spstr strCommand.txt,type1.txt,"~",3
spstr strCommand.txt,type1.txt,"~",14
// get internal name
spstr strCommand.txt,entn1.txt,"~",4
spstr strCommand.txt,entn1.txt,"~",15
if(type1.txt=="delete"||type1.txt=="")
{
vis bUp1,0
@@ -1280,14 +1288,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,tIcon1.txt,"~",5
spstr strCommand.txt,tIcon1.txt,"~",16
vis tIcon1,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",6
spstr strCommand.txt,tTmp.txt,"~",17
covx tTmp.txt,sys0,0,0
tIcon1.pco=sys0
// set name
spstr strCommand.txt,tEntity1.txt,"~",7
spstr strCommand.txt,tEntity1.txt,"~",18
vis tEntity1,1
}
if(type1.txt=="shutter")
@@ -1300,7 +1308,7 @@ Timer tmSerial
vis hSlider1,0
vis nNum1,0
// get Button State (optional Value)
spstr strCommand.txt,tId.txt,"~",8
spstr strCommand.txt,tId.txt,"~",19
// up button
spstr tId.txt,tTmp.txt,"|",3
if(tTmp.txt=="disable")
@@ -1351,11 +1359,11 @@ Timer tmSerial
vis hSlider1,0
vis nNum1,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",8
spstr strCommand.txt,tTmp.txt,"~",19
covx tTmp.txt,sys0,0,0
btOnOff1.val=sys0
}
if(type1.txt=="text")
if(type1.txt=="text"||type1.txt=="timer")
{
vis bUp1,0
vis bStop1,0
@@ -1368,7 +1376,7 @@ Timer tmSerial
bText1.pco=65535
bText1.pco2=65535
// get Text (optional Value)
spstr strCommand.txt,bText1.txt,"~",8
spstr strCommand.txt,bText1.txt,"~",19
}
if(type1.txt=="button"||type1.txt=="input_sel")
{
@@ -1383,7 +1391,7 @@ Timer tmSerial
bText1.pco=1374
bText1.pco2=1374
// get Text (optional Value)
spstr strCommand.txt,bText1.txt,"~",8
spstr strCommand.txt,bText1.txt,"~",19
}
if(type1.txt=="number")
{
@@ -1396,7 +1404,7 @@ Timer tmSerial
vis hSlider1,1
vis nNum1,1
// get config (optional Value) (use bText as variable)
spstr strCommand.txt,bText1.txt,"~",8
spstr strCommand.txt,bText1.txt,"~",19
//first value is current value
spstr bText1.txt,tTmp.txt,"|",0
covx tTmp.txt,sys0,0,0
@@ -1412,9 +1420,9 @@ Timer tmSerial
hSlider1.maxval=sys0
}
// get Type
spstr strCommand.txt,type2.txt,"~",9
spstr strCommand.txt,type2.txt,"~",20
// get internal name
spstr strCommand.txt,entn2.txt,"~",10
spstr strCommand.txt,entn2.txt,"~",21
if(type2.txt=="delete"||type2.txt=="")
{
vis bUp2,0
@@ -1429,14 +1437,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,tIcon2.txt,"~",11
spstr strCommand.txt,tIcon2.txt,"~",22
vis tIcon2,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",12
spstr strCommand.txt,tTmp.txt,"~",23
covx tTmp.txt,sys0,0,0
tIcon2.pco=sys0
// set name
spstr strCommand.txt,tEntity2.txt,"~",13
spstr strCommand.txt,tEntity2.txt,"~",24
vis tEntity2,1
}
if(type2.txt=="shutter")
@@ -1449,7 +1457,7 @@ Timer tmSerial
vis hSlider2,0
vis nNum2,0
// get Button State (optional Value)
spstr strCommand.txt,tId.txt,"~",14
spstr strCommand.txt,tId.txt,"~",25
// up button
spstr tId.txt,tTmp.txt,"|",3
if(tTmp.txt=="disable")
@@ -1500,11 +1508,11 @@ Timer tmSerial
vis hSlider2,0
vis nNum2,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",14
spstr strCommand.txt,tTmp.txt,"~",25
covx tTmp.txt,sys0,0,0
btOnOff2.val=sys0
}
if(type2.txt=="text")
if(type2.txt=="text"||type2.txt=="timer")
{
vis bUp2,0
vis bStop2,0
@@ -1517,7 +1525,7 @@ Timer tmSerial
bText2.pco=65535
bText2.pco2=65535
// get Text (optional Value)
spstr strCommand.txt,bText2.txt,"~",14
spstr strCommand.txt,bText2.txt,"~",25
}
if(type2.txt=="button"||type2.txt=="input_sel")
{
@@ -1532,7 +1540,7 @@ Timer tmSerial
bText2.pco=1374
bText2.pco2=1374
// get Text (optional Value)
spstr strCommand.txt,bText2.txt,"~",14
spstr strCommand.txt,bText2.txt,"~",25
}
if(type2.txt=="number")
{
@@ -1545,7 +1553,7 @@ Timer tmSerial
vis hSlider2,1
vis nNum2,1
// get config (optional Value) (use bText as variable)
spstr strCommand.txt,bText2.txt,"~",14
spstr strCommand.txt,bText2.txt,"~",25
//first value is current value
spstr bText2.txt,tTmp.txt,"|",0
covx tTmp.txt,sys0,0,0
@@ -1561,9 +1569,9 @@ Timer tmSerial
hSlider2.maxval=sys0
}
// get Type
spstr strCommand.txt,type3.txt,"~",15
spstr strCommand.txt,type3.txt,"~",26
// get internal name
spstr strCommand.txt,entn3.txt,"~",16
spstr strCommand.txt,entn3.txt,"~",27
if(type3.txt=="delete"||type3.txt=="")
{
vis bUp3,0
@@ -1578,14 +1586,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,tIcon3.txt,"~",17
spstr strCommand.txt,tIcon3.txt,"~",28
vis tIcon3,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",18
spstr strCommand.txt,tTmp.txt,"~",29
covx tTmp.txt,sys0,0,0
tIcon3.pco=sys0
// set name
spstr strCommand.txt,tEntity3.txt,"~",19
spstr strCommand.txt,tEntity3.txt,"~",30
vis tEntity3,1
}
if(type3.txt=="shutter")
@@ -1598,7 +1606,7 @@ Timer tmSerial
vis hSlider3,0
vis nNum3,0
// get Button State (optional Value)
spstr strCommand.txt,tId.txt,"~",20
spstr strCommand.txt,tId.txt,"~",31
// up button
spstr tId.txt,tTmp.txt,"|",3
if(tTmp.txt=="disable")
@@ -1649,11 +1657,11 @@ Timer tmSerial
vis hSlider3,0
vis nNum3,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",20
spstr strCommand.txt,tTmp.txt,"~",31
covx tTmp.txt,sys0,0,0
btOnOff3.val=sys0
}
if(type3.txt=="text")
if(type3.txt=="text"||type3.txt=="timer")
{
vis bUp3,0
vis bStop3,0
@@ -1666,7 +1674,7 @@ Timer tmSerial
bText3.pco=65535
bText3.pco2=65535
// get Text (optional Value)
spstr strCommand.txt,bText3.txt,"~",20
spstr strCommand.txt,bText3.txt,"~",31
}
if(type3.txt=="button"||type3.txt=="input_sel")
{
@@ -1681,7 +1689,7 @@ Timer tmSerial
bText3.pco=1374
bText3.pco2=1374
// get Text (optional Value)
spstr strCommand.txt,bText3.txt,"~",20
spstr strCommand.txt,bText3.txt,"~",31
}
if(type3.txt=="number")
{
@@ -1694,7 +1702,7 @@ Timer tmSerial
vis hSlider3,1
vis nNum3,1
// get config (optional Value) (use bText as variable)
spstr strCommand.txt,bText3.txt,"~",20
spstr strCommand.txt,bText3.txt,"~",31
//first value is current value
spstr bText3.txt,tTmp.txt,"|",0
covx tTmp.txt,sys0,0,0
@@ -1710,9 +1718,9 @@ Timer tmSerial
hSlider3.maxval=sys0
}
// get Type
spstr strCommand.txt,type4.txt,"~",21
spstr strCommand.txt,type4.txt,"~",32
// get internal name
spstr strCommand.txt,entn4.txt,"~",22
spstr strCommand.txt,entn4.txt,"~",33
if(type4.txt=="delete"||type4.txt=="")
{
vis bUp4,0
@@ -1727,14 +1735,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,tIcon4.txt,"~",23
spstr strCommand.txt,tIcon4.txt,"~",34
vis tIcon4,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",24
spstr strCommand.txt,tTmp.txt,"~",35
covx tTmp.txt,sys0,0,0
tIcon4.pco=sys0
// set name
spstr strCommand.txt,tEntity4.txt,"~",25
spstr strCommand.txt,tEntity4.txt,"~",36
vis tEntity4,1
}
if(type4.txt=="shutter")
@@ -1747,7 +1755,7 @@ Timer tmSerial
vis hSlider4,0
vis nNum4,0
// get Button State (optional Value)
spstr strCommand.txt,tId.txt,"~",26
spstr strCommand.txt,tId.txt,"~",37
// up button
spstr tId.txt,tTmp.txt,"|",3
if(tTmp.txt=="disable")
@@ -1798,11 +1806,11 @@ Timer tmSerial
vis hSlider4,0
vis nNum4,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",26
spstr strCommand.txt,tTmp.txt,"~",37
covx tTmp.txt,sys0,0,0
btOnOff4.val=sys0
}
if(type4.txt=="text")
if(type4.txt=="text"||type4.txt=="timer")
{
vis bUp4,0
vis bStop4,0
@@ -1815,7 +1823,7 @@ Timer tmSerial
bText4.pco=65535
bText4.pco2=65535
// get Text (optional Value)
spstr strCommand.txt,bText4.txt,"~",26
spstr strCommand.txt,bText4.txt,"~",37
}
if(type4.txt=="button"||type4.txt=="input_sel")
{
@@ -1830,7 +1838,7 @@ Timer tmSerial
bText4.pco=1374
bText4.pco2=1374
// get Text (optional Value)
spstr strCommand.txt,bText4.txt,"~",26
spstr strCommand.txt,bText4.txt,"~",37
}
if(type4.txt=="number")
{
@@ -1843,7 +1851,7 @@ Timer tmSerial
vis hSlider4,1
vis nNum4,1
// get config (optional Value) (use bText as variable)
spstr strCommand.txt,bText4.txt,"~",26
spstr strCommand.txt,bText4.txt,"~",37
//first value is current value
spstr bText4.txt,tTmp.txt,"|",0
covx tTmp.txt,sys0,0,0
@@ -1923,6 +1931,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
if(tInstruction.txt=="time")
{

View File

@@ -16,7 +16,7 @@ Page cardGrid
//remove background & activate reparse mode
vis p0,0
recmod=1
bauds=115200
baud=115200
//debug stuff
vis tTmp,0
vis tSend,0
@@ -82,11 +82,23 @@ Variable (string) entn6
Text :
Max. Text Size: 80
Variable (string) nent1
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent2
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) strCommand
Attributes
Scope : local
Text :
Max. Text Size: 500
Max. Text Size: 700
Variable (string) tSend
Attributes
@@ -258,6 +270,14 @@ Button bEntity1
{
page popupShutter
}
if(type1.txt=="input_sel")
{
page popupInSel
}
if(type1.txt=="timer")
{
page popupTimer
}
Touch Release Event
tmLP.en=0
@@ -295,6 +315,14 @@ Button bEntity2
{
page popupShutter
}
if(type2.txt=="input_sel")
{
page popupInSel
}
if(type2.txt=="timer")
{
page popupTimer
}
Touch Release Event
tmLP.en=0
@@ -332,6 +360,14 @@ Button bEntity3
{
page popupShutter
}
if(type3.txt=="input_sel")
{
page popupInSel
}
if(type3.txt=="timer")
{
page popupTimer
}
Touch Release Event
tmLP.en=0
@@ -369,6 +405,14 @@ Button bEntity4
{
page popupShutter
}
if(type4.txt=="input_sel")
{
page popupInSel
}
if(type4.txt=="timer")
{
page popupTimer
}
Touch Release Event
tmLP.en=0
@@ -406,6 +450,14 @@ Button bEntity5
{
page popupShutter
}
if(type5.txt=="input_sel")
{
page popupInSel
}
if(type5.txt=="timer")
{
page popupTimer
}
Touch Release Event
tmLP.en=0
@@ -443,6 +495,14 @@ Button bEntity6
{
page popupShutter
}
if(type6.txt=="input_sel")
{
page popupInSel
}
if(type6.txt=="timer")
{
page popupTimer
}
Touch Release Event
tmLP.en=0
@@ -471,14 +531,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardGrid,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -503,14 +556,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardGrid,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -589,10 +635,6 @@ Timer tmLP
{
page popupFan
}
if(tTmp.txt=="input_sel")
{
page popupInSel
}
Timer tmSerial
Attributes
@@ -649,50 +691,44 @@ Timer tmSerial
{
// command format: entityUpd,heading,navigation,[,type,internalName,iconId,iconColor,displayName,optionalValue]x6
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
// get Type
spstr strCommand.txt,type1.txt,"~",3
spstr strCommand.txt,type1.txt,"~",14
// get internal name
spstr strCommand.txt,entn1.txt,"~",4
spstr strCommand.txt,entn1.txt,"~",15
if(type1.txt=="delete"||type1.txt=="")
{
vis tEntity1,0
@@ -700,20 +736,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity1.txt,"~",5
spstr strCommand.txt,bEntity1.txt,"~",16
vis bEntity1,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",6
spstr strCommand.txt,tTmp.txt,"~",17
covx tTmp.txt,sys0,0,0
bEntity1.pco=sys0
// set name
spstr strCommand.txt,tEntity1.txt,"~",7
spstr strCommand.txt,tEntity1.txt,"~",18
vis tEntity1,1
}
// get Type
spstr strCommand.txt,type2.txt,"~",9
spstr strCommand.txt,type2.txt,"~",20
// get internal name
spstr strCommand.txt,entn2.txt,"~",10
spstr strCommand.txt,entn2.txt,"~",21
if(type2.txt=="delete"||type2.txt=="")
{
vis tEntity2,0
@@ -721,20 +757,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity2.txt,"~",11
spstr strCommand.txt,bEntity2.txt,"~",22
vis bEntity2,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",12
spstr strCommand.txt,tTmp.txt,"~",23
covx tTmp.txt,sys0,0,0
bEntity2.pco=sys0
// set name
spstr strCommand.txt,tEntity2.txt,"~",13
spstr strCommand.txt,tEntity2.txt,"~",24
vis tEntity2,1
}
// get Type
spstr strCommand.txt,type3.txt,"~",15
spstr strCommand.txt,type3.txt,"~",26
// get internal name
spstr strCommand.txt,entn3.txt,"~",16
spstr strCommand.txt,entn3.txt,"~",27
if(type3.txt=="delete"||type3.txt=="")
{
vis tEntity3,0
@@ -742,20 +778,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity3.txt,"~",17
spstr strCommand.txt,bEntity3.txt,"~",28
vis bEntity3,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",18
spstr strCommand.txt,tTmp.txt,"~",29
covx tTmp.txt,sys0,0,0
bEntity3.pco=sys0
// set name
spstr strCommand.txt,tEntity3.txt,"~",19
spstr strCommand.txt,tEntity3.txt,"~",30
vis tEntity3,1
}
// get Type
spstr strCommand.txt,type4.txt,"~",21
spstr strCommand.txt,type4.txt,"~",32
// get internal name
spstr strCommand.txt,entn4.txt,"~",22
spstr strCommand.txt,entn4.txt,"~",33
if(type4.txt=="delete"||type4.txt=="")
{
vis tEntity4,0
@@ -763,20 +799,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity4.txt,"~",23
spstr strCommand.txt,bEntity4.txt,"~",34
vis bEntity4,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",24
spstr strCommand.txt,tTmp.txt,"~",35
covx tTmp.txt,sys0,0,0
bEntity4.pco=sys0
// set name
spstr strCommand.txt,tEntity4.txt,"~",25
spstr strCommand.txt,tEntity4.txt,"~",36
vis tEntity4,1
}
// get Type
spstr strCommand.txt,type5.txt,"~",27
spstr strCommand.txt,type5.txt,"~",38
// get internal name
spstr strCommand.txt,entn5.txt,"~",28
spstr strCommand.txt,entn5.txt,"~",39
if(type5.txt=="delete"||type5.txt=="")
{
vis tEntity5,0
@@ -784,20 +820,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity5.txt,"~",29
spstr strCommand.txt,bEntity5.txt,"~",40
vis bEntity5,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",30
spstr strCommand.txt,tTmp.txt,"~",41
covx tTmp.txt,sys0,0,0
bEntity5.pco=sys0
// set name
spstr strCommand.txt,tEntity5.txt,"~",31
spstr strCommand.txt,tEntity5.txt,"~",42
vis tEntity5,1
}
// get Type
spstr strCommand.txt,type6.txt,"~",33
spstr strCommand.txt,type6.txt,"~",44
// get internal name
spstr strCommand.txt,entn6.txt,"~",34
spstr strCommand.txt,entn6.txt,"~",45
if(type6.txt=="delete"||type6.txt=="")
{
vis tEntity6,0
@@ -805,14 +841,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity6.txt,"~",35
spstr strCommand.txt,bEntity6.txt,"~",46
vis bEntity6,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",36
spstr strCommand.txt,tTmp.txt,"~",47
covx tTmp.txt,sys0,0,0
bEntity6.pco=sys0
// set name
spstr strCommand.txt,tEntity6.txt,"~",37
spstr strCommand.txt,tEntity6.txt,"~",48
vis tEntity6,1
}
}
@@ -880,6 +916,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
if(tInstruction.txt=="time")
{

File diff suppressed because it is too large Load Diff

View File

@@ -57,6 +57,18 @@ Page cardPower
}
}
Variable (string) nent1
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent2
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) strCommand
Attributes
Scope : local
@@ -346,14 +358,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardPower,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -378,14 +383,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -555,63 +553,57 @@ Timer tmSerial
{
// command format: entityUpd,heading,navigation,colorHome,iconHome[,iconColor,icon,speed,valueUp,valueDown]x6
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
// icon color home
spstr strCommand.txt,tTmp.txt,"~",3
spstr strCommand.txt,tTmp.txt,"~",14
covx tTmp.txt,t1.pco,0,0
// icon home
spstr strCommand.txt,t1.txt,"~",4
spstr strCommand.txt,t1.txt,"~",15
// text home
spstr strCommand.txt,tHome.txt,"~",5
spstr strCommand.txt,tHome.txt,"~",16
// iconColor
spstr strCommand.txt,tTmp.txt,"~",6
spstr strCommand.txt,tTmp.txt,"~",17
covx tTmp.txt,t0Icon.pco,0,0
// icon
spstr strCommand.txt,t0Icon.txt,"~",7
spstr strCommand.txt,t0Icon.txt,"~",18
// speed
spstr strCommand.txt,tTmp.txt,"~",8
spstr strCommand.txt,tTmp.txt,"~",19
covx tTmp.txt,t0Speed.val,0,0
// lower text
spstr strCommand.txt,t0u.txt,"~",9
spstr strCommand.txt,t0u.txt,"~",20
if(t0Icon.txt!="")
{
vis t0Icon,1
@@ -624,15 +616,15 @@ Timer tmSerial
vis h0,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",10
spstr strCommand.txt,tTmp.txt,"~",21
covx tTmp.txt,t1Icon.pco,0,0
// icon
spstr strCommand.txt,t1Icon.txt,"~",11
spstr strCommand.txt,t1Icon.txt,"~",22
// speed
spstr strCommand.txt,tTmp.txt,"~",12
spstr strCommand.txt,tTmp.txt,"~",23
covx tTmp.txt,t1Speed.val,0,0
// lower text
spstr strCommand.txt,t1u.txt,"~",13
spstr strCommand.txt,t1u.txt,"~",24
if(t1Icon.txt!="")
{
vis t1Icon,1
@@ -645,15 +637,15 @@ Timer tmSerial
vis h1,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",14
spstr strCommand.txt,tTmp.txt,"~",25
covx tTmp.txt,t2Icon.pco,0,0
// icon
spstr strCommand.txt,t2Icon.txt,"~",15
spstr strCommand.txt,t2Icon.txt,"~",26
// speed
spstr strCommand.txt,tTmp.txt,"~",16
spstr strCommand.txt,tTmp.txt,"~",27
covx tTmp.txt,t2Speed.val,0,0
// lower text
spstr strCommand.txt,t2u.txt,"~",17
spstr strCommand.txt,t2u.txt,"~",28
if(t2Icon.txt!="")
{
vis t2Icon,1
@@ -666,15 +658,15 @@ Timer tmSerial
vis h2,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",18
spstr strCommand.txt,tTmp.txt,"~",29
covx tTmp.txt,t3Icon.pco,0,0
// icon
spstr strCommand.txt,t3Icon.txt,"~",19
spstr strCommand.txt,t3Icon.txt,"~",30
// speed
spstr strCommand.txt,tTmp.txt,"~",20
spstr strCommand.txt,tTmp.txt,"~",31
covx tTmp.txt,t3Speed.val,0,0
// lower text
spstr strCommand.txt,t3u.txt,"~",21
spstr strCommand.txt,t3u.txt,"~",32
if(t3Icon.txt!="")
{
vis t3Icon,1
@@ -687,15 +679,15 @@ Timer tmSerial
vis h3,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",22
spstr strCommand.txt,tTmp.txt,"~",33
covx tTmp.txt,t4Icon.pco,0,0
// icon
spstr strCommand.txt,t4Icon.txt,"~",23
spstr strCommand.txt,t4Icon.txt,"~",34
// speed
spstr strCommand.txt,tTmp.txt,"~",24
spstr strCommand.txt,tTmp.txt,"~",35
covx tTmp.txt,t4Speed.val,0,0
// lower text
spstr strCommand.txt,t4u.txt,"~",25
spstr strCommand.txt,t4u.txt,"~",36
if(t4Icon.txt!="")
{
vis t4Icon,1
@@ -708,15 +700,15 @@ Timer tmSerial
vis h4,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",26
spstr strCommand.txt,tTmp.txt,"~",37
covx tTmp.txt,t5Icon.pco,0,0
// icon
spstr strCommand.txt,t5Icon.txt,"~",27
spstr strCommand.txt,t5Icon.txt,"~",38
// speed
spstr strCommand.txt,tTmp.txt,"~",28
spstr strCommand.txt,tTmp.txt,"~",39
covx tTmp.txt,t5Speed.val,0,0
// lower text
spstr strCommand.txt,t5u.txt,"~",29
spstr strCommand.txt,t5u.txt,"~",40
if(t5Icon.txt!="")
{
vis t5Icon,1
@@ -793,6 +785,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
if(tInstruction.txt=="time")
{

View File

@@ -70,11 +70,23 @@ Variable (string) entn2
Text :
Max. Text Size: 80
Variable (string) nent1
Attributes
Scope : local
Text :
Max. Text Size: 50
Variable (string) nent2
Attributes
Scope : local
Text :
Max. Text Size: 50
Variable (string) strCommand
Attributes
Scope : local
Text :
Max. Text Size: 275
Max. Text Size: 400
Variable (string) tId
Attributes
@@ -187,14 +199,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardQR,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -219,14 +224,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -446,52 +444,46 @@ Timer tmSerial
// command format: entityUpd,heading,navigation,textQR[,type,internalName,iconId,displayName,optionalValue]x2
//tHeading
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
//text qrcode
spstr strCommand.txt,vaQR.txt,"~",3
spstr strCommand.txt,vaQR.txt,"~",14
// get Type
spstr strCommand.txt,type1.txt,"~",4
spstr strCommand.txt,type1.txt,"~",15
// get internal name
spstr strCommand.txt,entn1.txt,"~",5
spstr strCommand.txt,entn1.txt,"~",16
if(type1.txt=="delete"||type1.txt=="")
{
vis btOnOff1,0
@@ -501,14 +493,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,tIcon1.txt,"~",6
spstr strCommand.txt,tIcon1.txt,"~",17
vis tIcon1,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",7
spstr strCommand.txt,tTmp.txt,"~",18
covx tTmp.txt,sys0,0,0
tIcon1.pco=sys0
// set name
spstr strCommand.txt,tEntity1.txt,"~",8
spstr strCommand.txt,tEntity1.txt,"~",19
vis tEntity1,1
}
if(type1.txt=="light")
@@ -516,7 +508,7 @@ Timer tmSerial
vis btOnOff1,1
vis bText1,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",9
spstr strCommand.txt,tTmp.txt,"~",20
covx tTmp.txt,sys0,0,0
btOnOff1.val=sys0
}
@@ -525,7 +517,7 @@ Timer tmSerial
vis btOnOff1,1
vis bText1,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",9
spstr strCommand.txt,tTmp.txt,"~",20
covx tTmp.txt,sys0,0,0
btOnOff1.val=sys0
}
@@ -537,7 +529,7 @@ Timer tmSerial
bText1.pco=65535
bText1.pco2=65535
// get Text (optional Value)
spstr strCommand.txt,bText1.txt,"~",9
spstr strCommand.txt,bText1.txt,"~",20
}
if(type1.txt=="button")
{
@@ -547,12 +539,12 @@ Timer tmSerial
bText1.pco=1374
bText1.pco2=1374
// get Text (optional Value)
spstr strCommand.txt,bText1.txt,"~",9
spstr strCommand.txt,bText1.txt,"~",20
}
// get Type
spstr strCommand.txt,type2.txt,"~",10
spstr strCommand.txt,type2.txt,"~",21
// get internal name
spstr strCommand.txt,entn2.txt,"~",11
spstr strCommand.txt,entn2.txt,"~",22
if(type2.txt=="delete"||type2.txt=="")
{
vis btOnOff2,0
@@ -562,14 +554,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,tIcon2.txt,"~",12
spstr strCommand.txt,tIcon2.txt,"~",23
vis tIcon2,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",13
spstr strCommand.txt,tTmp.txt,"~",24
covx tTmp.txt,sys0,0,0
tIcon2.pco=sys0
// set name
spstr strCommand.txt,tEntity2.txt,"~",14
spstr strCommand.txt,tEntity2.txt,"~",25
vis tEntity2,1
}
if(type2.txt=="light")
@@ -577,7 +569,7 @@ Timer tmSerial
vis btOnOff2,1
vis bText2,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",15
spstr strCommand.txt,tTmp.txt,"~",26
covx tTmp.txt,sys0,0,0
btOnOff2.val=sys0
}
@@ -586,7 +578,7 @@ Timer tmSerial
vis btOnOff2,1
vis bText2,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",15
spstr strCommand.txt,tTmp.txt,"~",26
covx tTmp.txt,sys0,0,0
btOnOff2.val=sys0
}
@@ -598,7 +590,7 @@ Timer tmSerial
bText2.pco=65535
bText2.pco2=65535
// get Text (optional Value)
spstr strCommand.txt,bText2.txt,"~",15
spstr strCommand.txt,bText2.txt,"~",26
}
if(type2.txt=="button")
{
@@ -608,7 +600,7 @@ Timer tmSerial
bText2.pco=1374
bText2.pco2=1374
// get Text (optional Value)
spstr strCommand.txt,bText2.txt,"~",15
spstr strCommand.txt,bText2.txt,"~",26
}
if(type2.txt=="delete"||type2.txt=="")
{
@@ -723,6 +715,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -63,11 +63,23 @@ Variable (string) entn
Text :
Max. Text Size: 80
Variable (string) nent1
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent2
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) strCommand
Attributes
Scope : local
Text :
Max. Text Size: 250
Max. Text Size: 750
Variable (string) tId
Attributes
@@ -294,14 +306,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardThermo,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -326,14 +331,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardThermo,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -362,28 +360,7 @@ Dual-state Button bDown2
{
xTempDest2.val=xTempDest2.val-xTempStep1.val
}
// event,buttonPress2,entn,tempUpd,X
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="tempUpdHighLow,"
//convert temperature
covx xTempDest1.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
tSend.txt+="|"
covx xTempDest2.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,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
tmSendHighLow.en=1
Dual-state Button bUp2
Attributes
@@ -401,28 +378,7 @@ Dual-state Button bUp2
{
xTempDest2.val=xTempDest2.val+xTempStep1.val
}
// event,buttonPress2,entn,tempUpd,X
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="tempUpdHighLow,"
//convert temperature
covx xTempDest1.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
tSend.txt+="|"
covx xTempDest2.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,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
tmSendHighLow.en=1
Dual-state Button bt0
Attributes
@@ -672,25 +628,7 @@ Dual-state Button btDown
{
xTempDest.val=xTempDest.val-xTempStep1.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,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
tmSendTemp.en=1
Dual-state Button btDown1
Attributes
@@ -708,28 +646,7 @@ Dual-state Button btDown1
{
xTempDest1.val=xTempDest1.val-xTempStep1.val
}
// event,buttonPress2,entn,tempUpd,X
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="tempUpdHighLow,"
//convert temperature
covx xTempDest1.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
tSend.txt+="|"
covx xTempDest2.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,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
tmSendHighLow.en=1
Dual-state Button btUp
Attributes
@@ -747,25 +664,7 @@ Dual-state Button btUp
{
xTempDest.val=xTempDest.val+xTempStep1.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,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
tmSendTemp.en=1
Dual-state Button btUp1
Attributes
@@ -783,28 +682,7 @@ Dual-state Button btUp1
{
xTempDest1.val=xTempDest1.val+xTempStep1.val
}
// event,buttonPress2,entn,tempUpd,X
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="tempUpdHighLow,"
//convert temperature
covx xTempDest1.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
tSend.txt+="|"
covx xTempDest2.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,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
tmSendHighLow.en=1
Hotspot mSwipeNext
Attributes
@@ -839,6 +717,67 @@ Hotspot mSwipeUp
Touch Press Event
click bPrev,1
Timer tmSendHighLow
Attributes
Scope : local
Period (ms): 800
Enabled : no
Events
Timer Event
// event,buttonPress2,entn,tempUpd,X
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="tempUpdHighLow,"
//convert temperature
covx xTempDest1.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
tSend.txt+="|"
covx xTempDest2.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,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
tmSendHighLow.en=0
Timer tmSendTemp
Attributes
Scope : local
Period (ms): 800
Enabled : no
Events
Timer Event
// 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,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
tmSendTemp.en=0
Timer tmSerial
Attributes
Scope : local
@@ -894,64 +833,58 @@ Timer tmSerial
{
//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")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
//entity name
spstr strCommand.txt,entn.txt,"~",3
spstr strCommand.txt,entn.txt,"~",14
//currentTemp
spstr strCommand.txt,tCurTemp.txt,"~",4
spstr strCommand.txt,tCurTemp.txt,"~",15
//dstTemp
spstr strCommand.txt,tTmp.txt,"~",5
spstr strCommand.txt,tTmp.txt,"~",16
covx tTmp.txt,xTempDest1.val,0,0
xTempDest.val=xTempDest1.val
//status
spstr strCommand.txt,tStatus.txt,"~",6
spstr strCommand.txt,tStatus.txt,"~",17
//minTemp
spstr strCommand.txt,tTmp.txt,"~",7
spstr strCommand.txt,tTmp.txt,"~",18
covx tTmp.txt,xTempMin1.val,0,0
//maxTemp
spstr strCommand.txt,tTmp.txt,"~",8
spstr strCommand.txt,tTmp.txt,"~",19
covx tTmp.txt,xTempMax1.val,0,0
//tempStep
spstr strCommand.txt,tTmp.txt,"~",9
spstr strCommand.txt,tTmp.txt,"~",20
covx tTmp.txt,xTempStep1.val,0,0
// disable all buttons
vis bt0,0
@@ -963,137 +896,137 @@ Timer tmSerial
vis bt6,0
vis bt7,0
//bt0
spstr strCommand.txt,bt0.txt,"~",10
spstr strCommand.txt,bt0.txt,"~",21
if(bt0.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",11
spstr strCommand.txt,tTmp.txt,"~",22
covx tTmp.txt,bt0.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",12
spstr strCommand.txt,tTmp.txt,"~",23
covx tTmp.txt,bt0.val,0,0
// save action
spstr strCommand.txt,va0.txt,"~",13
spstr strCommand.txt,va0.txt,"~",24
//enable
vis bt0,1
}
//bt1
spstr strCommand.txt,bt1.txt,"~",14
spstr strCommand.txt,bt1.txt,"~",25
if(bt1.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",15
spstr strCommand.txt,tTmp.txt,"~",26
covx tTmp.txt,bt1.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",16
spstr strCommand.txt,tTmp.txt,"~",27
covx tTmp.txt,bt1.val,0,0
// save action
spstr strCommand.txt,va1.txt,"~",17
spstr strCommand.txt,va1.txt,"~",28
//enable
vis bt1,1
}
//bt2
spstr strCommand.txt,bt2.txt,"~",18
spstr strCommand.txt,bt2.txt,"~",29
if(bt2.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",19
spstr strCommand.txt,tTmp.txt,"~",30
covx tTmp.txt,bt2.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",20
spstr strCommand.txt,tTmp.txt,"~",31
covx tTmp.txt,bt2.val,0,0
// save action
spstr strCommand.txt,va2.txt,"~",21
spstr strCommand.txt,va2.txt,"~",32
//enable
vis bt2,1
}
//bt3
spstr strCommand.txt,bt3.txt,"~",22
spstr strCommand.txt,bt3.txt,"~",33
if(bt3.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",23
spstr strCommand.txt,tTmp.txt,"~",34
covx tTmp.txt,bt3.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",24
spstr strCommand.txt,tTmp.txt,"~",35
covx tTmp.txt,bt3.val,0,0
// save action
spstr strCommand.txt,va3.txt,"~",25
spstr strCommand.txt,va3.txt,"~",36
//enable
vis bt3,1
}
//bt4
spstr strCommand.txt,bt4.txt,"~",26
spstr strCommand.txt,bt4.txt,"~",37
if(bt4.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",27
spstr strCommand.txt,tTmp.txt,"~",38
covx tTmp.txt,bt4.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",28
spstr strCommand.txt,tTmp.txt,"~",39
covx tTmp.txt,bt4.val,0,0
// save action
spstr strCommand.txt,va4.txt,"~",29
spstr strCommand.txt,va4.txt,"~",40
//enable
vis bt4,1
}
//bt5
spstr strCommand.txt,bt5.txt,"~",30
spstr strCommand.txt,bt5.txt,"~",41
if(bt5.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",31
spstr strCommand.txt,tTmp.txt,"~",42
covx tTmp.txt,bt5.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",32
spstr strCommand.txt,tTmp.txt,"~",43
covx tTmp.txt,bt5.val,0,0
// save action
spstr strCommand.txt,va5.txt,"~",33
spstr strCommand.txt,va5.txt,"~",44
//enable
vis bt5,1
}
//bt6
spstr strCommand.txt,bt6.txt,"~",34
spstr strCommand.txt,bt6.txt,"~",45
if(bt6.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",35
spstr strCommand.txt,tTmp.txt,"~",46
covx tTmp.txt,bt6.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",36
spstr strCommand.txt,tTmp.txt,"~",47
covx tTmp.txt,bt6.val,0,0
// save action
spstr strCommand.txt,va6.txt,"~",37
spstr strCommand.txt,va6.txt,"~",48
//enable
vis bt6,1
}
//bt7
spstr strCommand.txt,bt7.txt,"~",38
spstr strCommand.txt,bt7.txt,"~",49
if(bt7.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",39
spstr strCommand.txt,tTmp.txt,"~",50
covx tTmp.txt,bt7.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",40
spstr strCommand.txt,tTmp.txt,"~",51
covx tTmp.txt,bt7.val,0,0
// save action
spstr strCommand.txt,va7.txt,"~",41
spstr strCommand.txt,va7.txt,"~",52
//enable
vis bt7,1
}
//Text tCurTempLbl
spstr strCommand.txt,tCurTempLbl.txt,"~",42
spstr strCommand.txt,tCurTempLbl.txt,"~",53
//Text tStateLbl
spstr strCommand.txt,tStateLbl.txt,"~",43
spstr strCommand.txt,tStateLbl.txt,"~",54
//Text tALbl
//spstr strCommand.txt,tALbl.txt,"~",44
//spstr strCommand.txt,tALbl.txt,"~",55
//Text tCF
spstr strCommand.txt,tCF.txt,"~",45
spstr strCommand.txt,tCF.txt,"~",56
tCF1.txt=tCF.txt
tCF2.txt=tCF.txt
//Second Temperature
spstr strCommand.txt,tTmp.txt,"~",46
spstr strCommand.txt,tTmp.txt,"~",57
if(tTmp.txt!="")
{
covx tTmp.txt,xTempDest2.val,0,0
@@ -1111,8 +1044,8 @@ Timer tmSerial
vis tCF2,1
}
//Show btDetail
spstr strCommand.txt,tTmp.txt,"~",47
if(tTmp.txt=="1")
spstr strCommand.txt,tTmp.txt,"~",58
if(tTmp.txt!="1")
{
vis btDetail,1
}else
@@ -1184,6 +1117,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
if(tInstruction.txt=="time")
{

View File

@@ -152,7 +152,7 @@ Text tVersion
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 45
Text : 47
Max. Text Size : 10
Picture p0
@@ -360,6 +360,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -13,7 +13,37 @@ Page pageTest
Events
Preinitialize Event
vis p0,0
recmod=1
baud=115200
Variable (string) strCommand
Attributes
Scope : local
Text :
Max. Text Size: 20
Variable (string) tInstruction
Attributes
Scope : local
Text :
Max. Text Size: 30
Variable (string) tSend
Attributes
Scope : local
Text :
Max. Text Size: 40
Text tBench
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 20
Picture p0
Attributes
Scope : local
@@ -77,6 +107,34 @@ Button b11
Touch Press Event
page cardGrid
Button b12
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : power
Max. Text Size : 10
Events
Touch Press Event
page cardPower
Button b13
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
showqq
Button b2
Attributes
Scope : local
@@ -190,3 +248,82 @@ Button b9
Touch Press Event
page popupNotify
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=="ping")
{
spstr strCommand.txt,tBench.txt,"~",1
tSend.txt="pong,"+tBench.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
}

View File

@@ -623,6 +623,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -636,6 +636,90 @@ Button bModeNext
{
bMode12.pco=1374
}
if(bMode1.txt=="")
{
vis bMode1,0
}else
{
vis bMode1,1
}
if(bMode2.txt=="")
{
vis bMode2,0
}else
{
vis bMode2,1
}
if(bMode3.txt=="")
{
vis bMode3,0
}else
{
vis bMode3,1
}
if(bMode4.txt=="")
{
vis bMode4,0
}else
{
vis bMode4,1
}
if(bMode5.txt=="")
{
vis bMode5,0
}else
{
vis bMode5,1
}
if(bMode6.txt=="")
{
vis bMode6,0
}else
{
vis bMode6,1
}
if(bMode7.txt=="")
{
vis bMode7,0
}else
{
vis bMode7,1
}
if(bMode8.txt=="")
{
vis bMode8,0
}else
{
vis bMode8,1
}
if(bMode9.txt=="")
{
vis bMode9,0
}else
{
vis bMode9,1
}
if(bMode10.txt=="")
{
vis bMode10,0
}else
{
vis bMode10,1
}
if(bMode11.txt=="")
{
vis bMode11,0
}else
{
vis bMode11,1
}
if(bMode12.txt=="")
{
vis bMode12,0
}else
{
vis bMode12,1
}
Timer tmCooldown
Attributes
@@ -897,6 +981,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -686,6 +686,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -441,6 +441,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -675,6 +675,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -946,6 +946,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -0,0 +1,964 @@
Page popupTimer
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Events
Preinitialize Event
dim=dimValueNormal
//get entitiy name
tEntity.txt=pageIcons.tTmp1.txt
//get entity id
entn.txt=pageIcons.tTmp2.txt
tIcon1.txt=pageIcons.tTmp3.txt
tTime.txt=pageIcons.vaTime.txt
vis p0,0
vis tSend,0
vis tTmp,0
vis tInstruction,0
vis tId,0
vis bZ1P,0
vis bZ1M,0
vis bZ2P,0
vis bZ2M,0
vis bZ3P,0
vis bZ3M,0
vis bZ4P,0
vis bZ4M,0
vis t0,0
vis fToggleEdit,0
vis b1,0
vis b2,0
vis b3,0
//page open event
// event,pageOpenDetail,typeOfPage,tEntityName
// craft command
tSend.txt="event,pageOpenDetail,popupTimer,"+entn.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
popupTimer.bco=defaultBcoColor
for(sys0=0;sys0<34;sys0++)
{
if(b[sys0].type==98||b[sys0].type==116)
{
b[sys0].bco=defaultBcoColor
//b[sys0].pco=defaultFontColor
}
if(b[sys0].type==53&&defaultBcoColor==0)
{
b[sys0].pic=10
b[sys0].pic2=11
}
}
Variable (int32) editable
Attributes
Scope: local
Value: 1
Variable (string) entn
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (int32) mode
Attributes
Scope: local
Value: 1
Variable (int32) mode_temp
Attributes
Scope: local
Value: 0
Variable (string) strCommand
Attributes
Scope : local
Text :
Max. Text Size: 960
Variable (string) strTmp
Attributes
Scope : local
Text :
Max. Text Size: 20
Variable (string) tId
Attributes
Scope : local
Text :
Max. Text Size: 20
Variable (string) tInstruction
Attributes
Scope : local
Text :
Max. Text Size: 20
Variable (string) tSend
Attributes
Scope : local
Text :
Max. Text Size: 200
Variable (string) tTmp
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) va1
Attributes
Scope : local
Text :
Max. Text Size: 15
Variable (string) va2
Attributes
Scope : local
Text :
Max. Text Size: 15
Variable (string) va3
Attributes
Scope : local
Text :
Max. Text Size: 15
Variable (string) vaModeCur
Attributes
Scope : local
Text :
Max. Text Size: 40
Variable (string) vaModeList
Attributes
Scope : local
Text :
Max. Text Size: 900
Variable (int32) vaModePos
Attributes
Scope: local
Value: 0
Variable (string) vaType
Attributes
Scope : local
Text :
Max. Text Size: 20
Number n1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Value : 0
Events
Touch Press Event
if(n2.pco==63488)
{
n2.pco=defaultFontColor
}
if(editable.val==1)
{
if(n1.pco==63488)
{
n1.pco=defaultFontColor
}else
{
n1.pco=63488
}
}
if(n1.pco==63488||n2.pco==63488)
{
if(fToggleEdit.txt=="hidden")
{
click fToggleEdit,1
}
}else
{
if(fToggleEdit.txt=="shown")
{
click fToggleEdit,1
}
}
Number n2
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Value : 0
Events
Touch Press Event
if(n1.pco==63488)
{
n1.pco=defaultFontColor
}
if(editable.val==1)
{
if(n2.pco==63488)
{
n2.pco=defaultFontColor
}else
{
n2.pco=63488
}
}
if(n1.pco==63488||n2.pco==63488)
{
if(fToggleEdit.txt=="hidden")
{
click fToggleEdit,1
}
}else
{
if(fToggleEdit.txt=="shown")
{
click fToggleEdit,1
}
}
Text t0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : +/- 1 +/- 5 +/- 10 +/- 15
Max. Text Size : 60
Text tDP
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : :
Max. Text Size : 15
Text tEntity
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 25
Text tIcon1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
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
Picture p0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Button b0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tSend.txt="event,buttonPress2,popupLight,bExit"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button b1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : START
Max. Text Size : 45
Events
Touch Press Event
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="timer-"+va1.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button b2
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : CANCEL
Max. Text Size : 45
Events
Touch Press Event
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="timer-"+va2.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button b3
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : PAUSE
Max. Text Size : 45
Events
Touch Press Event
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="timer-"+va3.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bZ1M
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 5
Events
Touch Press Event
if(n1.pco==63488)
{
n1.val=n1.val-1
if(n1.val<0)
{
n1.val=0
}
}
if(n2.pco==63488)
{
n2.val=n2.val-1
if(n2.val<0)
{
n2.val=0
}
}
Button bZ1P
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 5
Events
Touch Press Event
if(n1.pco==63488)
{
n1.val=n1.val+1
if(n1.val>59)
{
n1.val=59
}
}
if(n2.pco==63488)
{
n2.val=n2.val+1
if(n2.val>59)
{
n2.val=59
}
}
Button bZ2M
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 5
Events
Touch Press Event
if(n1.pco==63488)
{
n1.val=n1.val-5
if(n1.val<0)
{
n1.val=0
}
}
if(n2.pco==63488)
{
n2.val=n2.val-5
if(n2.val<0)
{
n2.val=0
}
}
Button bZ2P
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 5
Events
Touch Press Event
if(n1.pco==63488)
{
n1.val=n1.val+5
if(n1.val>59)
{
n1.val=59
}
}
if(n2.pco==63488)
{
n2.val=n2.val+5
if(n2.val>59)
{
n2.val=59
}
}
Button bZ3M
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 5
Events
Touch Press Event
if(n1.pco==63488)
{
n1.val=n1.val-10
if(n1.val<0)
{
n1.val=0
}
}
if(n2.pco==63488)
{
n2.val=n2.val-10
if(n2.val<0)
{
n2.val=0
}
}
Button bZ3P
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 5
Events
Touch Press Event
if(n1.pco==63488)
{
n1.val=n1.val+10
if(n1.val>59)
{
n1.val=59
}
}
if(n2.pco==63488)
{
n2.val=n2.val+10
if(n2.val>59)
{
n2.val=59
}
}
Button bZ4M
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 5
Events
Touch Press Event
if(n1.pco==63488)
{
n1.val=n1.val-15
if(n1.val<0)
{
n1.val=0
}
}
if(n2.pco==63488)
{
n2.val=n2.val-15
if(n2.val<0)
{
n2.val=0
}
}
Button bZ4P
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 5
Events
Touch Press Event
if(n1.pco==63488)
{
n1.val=n1.val+15
if(n1.val>59)
{
n1.val=59
}
}
if(n2.pco==63488)
{
n2.val=n2.val+15
if(n2.val>59)
{
n2.val=59
}
}
Button fToggleEdit
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : hidden
Max. Text Size : 10
Events
Touch Press Event
if(editable.val==1&&fToggleEdit.txt=="hidden")
{
vis bZ1P,1
vis bZ1M,1
vis bZ2P,1
vis bZ2M,1
vis bZ3P,1
vis bZ3M,1
vis bZ4P,1
vis bZ4M,1
vis t0,1
vis b1,0
vis b2,0
vis b3,0
fToggleEdit.txt="shown"
}else
{
vis bZ1P,0
vis bZ1M,0
vis bZ2P,0
vis bZ2M,0
vis bZ3P,0
vis bZ3M,0
vis bZ4P,0
vis bZ4M,0
vis t0,0
if(va1.txt!="")
{
vis b1,1
}
if(va2.txt!="")
{
vis b2,1
}
if(va3.txt!="")
{
vis b3,1
}
fToggleEdit.txt="hidden"
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
covx n1.val,strTmp.txt,0,0
tSend.txt+="timer-start,00:"+strTmp.txt+":"
covx n2.val,strTmp.txt,0,0
tSend.txt+=strTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
}
Timer tmSerial
Attributes
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
ucopy payloadLength,2,2,0
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
// calculate crc
crcrest 1,0xFFFF
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
//crcputu 3,u[2]
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
crcputu 0,payloadLength-1
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
// compare crc with recived value
if(crcval==recvCrc)
{
// crc is okay
// here is the location where acual code should be
// write command to variable strCommand
ucopy strCommand.txt,4,payloadLength-5,0
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
spstr strCommand.txt,tInstruction.txt,"~",0
spstr strCommand.txt,tTmp.txt,"~",1
if(tInstruction.txt=="entityUpdateDetail"&&entn.txt==tTmp.txt)
{
// change icon
//spstr strCommand.txt,tIcon1.txt,"~",2
vis tIcon1,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",3
covx tTmp.txt,sys0,0,0
tIcon1.pco=sys0
//entity name
spstr strCommand.txt,entn.txt,"~",4
//time remaining minutes
spstr strCommand.txt,strTmp.txt,"~",5
covx strTmp.txt,n1.val,0,0
//time remaining seconds
spstr strCommand.txt,strTmp.txt,"~",6
covx strTmp.txt,n2.val,0,0
//editable flag
spstr strCommand.txt,strTmp.txt,"~",7
covx strTmp.txt,editable.val,0,0
//action b1
spstr strCommand.txt,va1.txt,"~",8
if(va1.txt=="")
{
vis b1,0
}else
{
vis b1,1
}
//action b2
spstr strCommand.txt,va2.txt,"~",9
if(va2.txt=="")
{
vis b2,0
}else
{
vis b2,1
}
//action b3
spstr strCommand.txt,va3.txt,"~",10
if(va3.txt=="")
{
vis b3,0
}else
{
vis b3,1
}
//label b1
spstr strCommand.txt,b1.txt,"~",11
//label b2
spstr strCommand.txt,b2.txt,"~",12
//label b3
spstr strCommand.txt,b3.txt,"~",13
sleepValue=0
}
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
tTime.txt=pageIcons.vaTime.txt
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
// get value normal
spstr strCommand.txt,tTmp.txt,"~",2
covx tTmp.txt,dimValueNormal,0,0
dim=dimValueNormal
// get background color
spstr strCommand.txt,tTmp.txt,"~",3
if(tTmp.txt!="")
{
covx tTmp.txt,defaultBcoColor,0,0
}
// get font color
spstr strCommand.txt,tTmp.txt,"~",4
if(tTmp.txt!="")
{
covx tTmp.txt,defaultFontColor,0,0
}
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="pageType")
{
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
spstr strCommand.txt,pageIcons.tTmp3.txt,"~",4
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="screensaver")
{
page screensaver
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="popupShutter")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupShutter
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardThermo")
{
page cardThermo
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
if(tId.txt=="cardQR")
{
page cardQR
}
if(tId.txt=="cardPower")
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// 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)
{
sleepValue+=1
if(sleepTimeout<=sleepValue)
{
sleepValue=0
click b0,1
click b0,0
}
}
TouchCap tc0
Attributes
Scope: local
Value: 0
Events
Touch Press Event
sleepValue=0

View File

@@ -13,7 +13,7 @@ Page screensaver
Events
Preinitialize Event
recmod=1
bauds=115200
baud=115200
vis tInstruction,0
vis tTmp,0
vis p0,0
@@ -39,6 +39,12 @@ Variable (string) strCommand
Text :
Max. Text Size: 200
Variable (string) strTmp
Attributes
Scope : local
Text :
Max. Text Size: 2
Variable (string) tId
Attributes
Scope : local
@@ -346,7 +352,7 @@ Text tNotifyText
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 35
Max. Text Size : 120
Text tTime
Attributes
@@ -355,7 +361,7 @@ Text tTime
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 21:32
Text : 21:32
Max. Text Size : 15
Text tTimeAdd
@@ -493,6 +499,27 @@ Timer tmSerial
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="statusUpdate")
{
//statusIcon1
spstr strCommand.txt,tIcon1.txt,"~",1
spstr strCommand.txt,tTmp.txt,"~",2
covx tTmp.txt,tIcon1.pco,0,0
//statusIcon2
spstr strCommand.txt,tIcon2.txt,"~",3
spstr strCommand.txt,tTmp.txt,"~",4
covx tTmp.txt,tIcon2.pco,0,0
spstr strCommand.txt,tTmp.txt,"~",5
if(tTmp.txt!="")
{
tIcon1.font=3
}
spstr strCommand.txt,tTmp.txt,"~",6
if(tTmp.txt!="")
{
tIcon2.font=3
}
}
if(tInstruction.txt=="weatherUpdate"&&tNotifyHead.txt==""&&tNotifyText.txt=="")
{
vis tMainIcon,1
@@ -567,6 +594,16 @@ Timer tmSerial
spstr strCommand.txt,tIcon2.txt,"~",19
spstr strCommand.txt,tTmp.txt,"~",20
covx tTmp.txt,tIcon2.pco,0,0
spstr strCommand.txt,tTmp.txt,"~",21
if(tTmp.txt!="")
{
tIcon1.font=3
}
spstr strCommand.txt,tTmp.txt,"~",22
if(tTmp.txt!="")
{
tIcon2.font=3
}
}
if(tInstruction.txt=="color"&&tNotifyHead.txt==""&&tNotifyText.txt=="")
{
@@ -747,6 +784,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,6 +1,7 @@
--- HMI/n2t-out
+++ HMI/US/portrait/n2t-out
├── Program.s.txt
│ --- HMI/n2t-out/Program.s.txt
├── +++ HMI/US/portrait/n2t-out/Program.s.txt
│ @@ -10,10 +10,10 @@
│ int sleepValue=0
│ // dim value
@@ -14,7 +15,8 @@
│ + // fix touch offset (Removed for US version)
│ + //lcd_dev fffb 0002 0000 0020
│ page pageStartup
├── cardEntities.txt
│ --- HMI/n2t-out/cardEntities.txt
├── +++ HMI/US/portrait/n2t-out/cardEntities.txt
│ @@ -61,14 +61,24 @@
│ vis tIcon4,0
│ vis tEntity4,0
@@ -40,28 +42,71 @@
│ {
│ b[sys0].bco=defaultBcoColor
│ b[sys0].pco=defaultFontColor
│ @@ -106,14 +116,20 @@
│ @@ -86,45 +96,57 @@
│ }
│ }
│ Variable (string) entn1
│ Attributes
│ Scope : local
│ Text :
│ - Max. Text Size: 80
│ + Max. Text Size: 65
│ Variable (string) entn2
│ Attributes
│ Scope : local
│ Text :
│ - Max. Text Size: 80
│ + Max. Text Size: 65
│ Variable (string) entn3
│ Attributes
│ Scope : local
│ Text :
│ - Max. Text Size: 80
│ + Max. Text Size: 65
│ Variable (string) entn4
│ Attributes
│ Scope : local
│ Text :
Max. Text Size: 80
- Max. Text Size: 80
+ Max. Text Size: 65
│ +
│ +Variable (string) entn5
│ + Attributes
│ + Scope : local
│ + Text :
│ + Max. Text Size: 80
│ + Max. Text Size: 65
│ +
│ +Variable (string) entn6
│ + Attributes
│ + Scope : local
│ + Text :
│ + Max. Text Size: 65
│ Variable (string) nent1
│ Attributes
│ Scope : local
│ Text :
│ - Max. Text Size: 80
│ + Max. Text Size: 40
│ Variable (string) nent2
│ Attributes
│ Scope : local
│ Text :
│ - Max. Text Size: 80
│ + Max. Text Size: 40
│ Variable (string) strCommand
│ Attributes
│ Scope : local
│ Text :
│ Max. Text Size: 500
Variable (string) tSend
│ @@ -142,14 +158,20 @@
@@ -154,14 +176,26 @@
│ Variable (string) type4
│ Attributes
@@ -75,6 +120,12 @@
│ + Text :
│ + Max. Text Size: 10
│ +
│ +Variable (string) type6
│ + Attributes
│ + Scope : local
│ + Text :
│ + Max. Text Size: 10
│ +
│ Number nNum1
│ Attributes
│ Scope : local
@@ -82,7 +133,7 @@
│ Disable release event after dragging: 0
│ Send Component ID : disabled
│ Associated Keyboard : none
│ @@ -178,14 +200,23 @@
│ @@ -190,14 +224,32 @@
│ Scope : local
│ Dragging : 0
│ Disable release event after dragging: 0
@@ -99,6 +150,15 @@
│ + 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 tEntity1
│ Attributes
│ Scope : local
@@ -106,7 +166,7 @@
│ Disable release event after dragging: 0
│ Send Component ID : disabled
│ Associated Keyboard : none
│ @@ -218,14 +249,24 @@
│ @@ -230,14 +282,34 @@
│ Dragging : 0
│ Disable release event after dragging: 0
│ Send Component ID : disabled
@@ -124,6 +184,16 @@
│ + 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 : tEntity5
│ + Max. Text Size : 30
│ +
│ Text tHeading
│ Attributes
│ Scope : local
@@ -131,7 +201,7 @@
│ Disable release event after dragging: 0
│ Send Component ID : disabled
│ Associated Keyboard : none
│ @@ -268,14 +309,24 @@
│ @@ -280,14 +352,34 @@
│ Dragging : 0
│ Disable release event after dragging: 0
│ Send Component ID : disabled
@@ -149,6 +219,16 @@
│ + Text : 
│ + Max. Text Size : 5
│ +
│ +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
│ +
│ Text tId
│ Attributes
│ Scope : local
@@ -156,7 +236,7 @@
│ Disable release event after dragging: 0
│ Send Component ID : disabled
│ Associated Keyboard : none
│ @@ -417,14 +468,42 @@
│ @@ -429,14 +521,70 @@
│ crcputs tSend.txt,0
│ //send cmd
│ printh 55 bb
@@ -192,6 +272,34 @@
│ + 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
│ + nNum5.val=hSlider5.val
│ + tSend.txt="event,buttonPress2,"+entn6.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,2
│ + crcputs tSend.txt,0
│ + //send cmd
│ + printh 55 bb
│ + prints sys0,2
│ + prints tSend.txt,0
│ + prints crcval,2
│ +
│ Button bDown1
│ Attributes
│ Scope : local
@@ -199,7 +307,7 @@
│ Disable release event after dragging: 0
│ Send Component ID : disabled
│ State : unpressed
│ @@ -517,14 +596,39 @@
│ @@ -529,14 +677,64 @@
│ crcputs tSend.txt,0
│ //send cmd
│ printh 55 bb
@@ -232,6 +340,31 @@
│ + 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,2
│ + crcputs tSend.txt,0
│ + //send cmd
│ + printh 55 bb
│ + prints sys0,2
│ + prints tSend.txt,0
│ + prints crcval,2
│ +
│ Button bNext
│ Attributes
│ Scope : local
@@ -239,7 +372,7 @@
│ Disable release event after dragging: 0
│ Send Component ID : disabled
│ State : unpressed
│ @@ -681,14 +785,39 @@
│ @@ -679,14 +877,64 @@
│ crcputs tSend.txt,0
│ //send cmd
│ printh 55 bb
@@ -272,6 +405,31 @@
│ + 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,2
│ + crcputs tSend.txt,0
│ + //send cmd
│ + printh 55 bb
│ + prints sys0,2
│ + prints tSend.txt,0
│ + prints crcval,2
│ +
│ Button bText1
│ Attributes
│ Scope : local
@@ -279,7 +437,7 @@
│ Disable release event after dragging: 0
│ Send Component ID : disabled
│ State : unpressed
│ @@ -781,14 +910,39 @@
│ @@ -779,14 +1027,64 @@
│ crcputs tSend.txt,0
│ //send cmd
│ printh 55 bb
@@ -312,6 +470,31 @@
│ + 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 :
│ + Max. Text Size : 45
│ +
│ + 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,2
│ + crcputs tSend.txt,0
│ + //send cmd
│ + printh 55 bb
│ + prints sys0,2
│ + prints tSend.txt,0
│ + prints crcval,2
│ +
│ Button bUp1
│ Attributes
│ Scope : local
@@ -319,7 +502,7 @@
│ Disable release event after dragging: 0
│ Send Component ID : disabled
│ State : unpressed
│ @@ -881,14 +1035,39 @@
│ @@ -879,14 +1177,64 @@
│ crcputs tSend.txt,0
│ //send cmd
│ printh 55 bb
@@ -352,6 +535,31 @@
│ + 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,2
│ + 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
@@ -359,7 +567,7 @@
│ Disable release event after dragging: 0
│ Send Component ID : disabled
│ State : unpressed
│ @@ -989,14 +1168,41 @@
│ @@ -987,14 +1335,68 @@
│ crcputs tSend.txt,0
│ //send cmd
│ printh 55 bb
@@ -394,6 +602,33 @@
│ + 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 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,2
│ + crcputs tSend.txt,0
│ + //send cmd
│ + printh 55 bb
│ + prints sys0,2
│ + prints tSend.txt,0
│ + prints crcval,2
│ +
│ Hotspot m0
│ Attributes
│ Scope : local
@@ -401,13 +636,13 @@
│ Disable release event after dragging: 0
│ Send Component ID : disabled
│ @@ -1113,14 +1319,45 @@
│ page popupFan
│ }
│ if(type4.txt=="input_sel")
│ {
│ @@ -1127,14 +1529,84 @@
│ page popupInSel
│ }
│ if(type4.txt=="timer")
│ {
│ page popupTimer
│ }
│ +Hotspot m4
│ + Attributes
@@ -439,6 +674,45 @@
│ + {
│ + page popupInSel
│ + }
│ + if(type5.txt=="timer")
│ + {
│ + page popupTimer
│ + }
│ +
│ +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
│ + pageIcons.tTmp3.txt=tIcon6.txt
│ + if(type6.txt=="shutter")
│ + {
│ + //popupShutter.tHeading.txt=tEntity5.txt
│ + page popupShutter
│ + }
│ + if(type6.txt=="light")
│ + {
│ + //popupLight.tEntity.txt=tEntity5.txt
│ + page popupLight
│ + }
│ + if(type6.txt=="fan")
│ + {
│ + page popupFan
│ + }
│ + if(type6.txt=="input_sel")
│ + {
│ + page popupInSel
│ + }
│ + if(type6.txt=="timer")
│ + {
│ + page popupTimer
│ + }
│ +
│ Hotspot mSpecial
│ Attributes
@@ -447,7 +721,7 @@
│ Disable release event after dragging: 0
│ Send Component ID : disabled
│ @@ -1854,14 +2091,163 @@
│ @@ -1862,14 +2334,312 @@
│ covx tTmp.txt,sys0,0,0
│ hSlider4.minval=sys0
│ //third value is max value
@@ -456,9 +730,9 @@
│ hSlider4.maxval=sys0
│ }
│ + // get Type
│ + spstr strCommand.txt,type5.txt,"~",27
│ + spstr strCommand.txt,type5.txt,"~",38
│ + // get internal name
│ + spstr strCommand.txt,entn5.txt,"~",28
│ + spstr strCommand.txt,entn5.txt,"~",39
│ + if(type5.txt=="delete"||type5.txt=="")
│ + {
│ + vis bUp5,0
@@ -473,14 +747,14 @@
│ + }else
│ + {
│ + // change icon
│ + spstr strCommand.txt,tIcon5.txt,"~",29
│ + spstr strCommand.txt,tIcon5.txt,"~",40
│ + vis tIcon5,1
│ + // change icon color
│ + spstr strCommand.txt,tTmp.txt,"~",30
│ + spstr strCommand.txt,tTmp.txt,"~",41
│ + covx tTmp.txt,sys0,0,0
│ + tIcon5.pco=sys0
│ + // set name
│ + spstr strCommand.txt,tEntity5.txt,"~",31
│ + spstr strCommand.txt,tEntity5.txt,"~",42
│ + vis tEntity5,1
│ + }
│ + if(type5.txt=="shutter")
@@ -493,7 +767,7 @@
│ + vis hSlider5,0
│ + vis nNum5,0
│ + // get Button State (optional Value)
│ + spstr strCommand.txt,tId.txt,"~",32
│ + spstr strCommand.txt,tId.txt,"~",43
│ + // up button
│ + spstr tId.txt,tTmp.txt,"|",3
│ + if(tTmp.txt=="disable")
@@ -544,11 +818,11 @@
│ + vis hSlider5,0
│ + vis nNum5,0
│ + // get Button State (optional Value)
│ + spstr strCommand.txt,tTmp.txt,"~",32
│ + spstr strCommand.txt,tTmp.txt,"~",43
│ + covx tTmp.txt,sys0,0,0
│ + btOnOff5.val=sys0
│ + }
│ + if(type5.txt=="text")
│ + if(type5.txt=="text"||type5.txt=="timer")
│ + {
│ + vis bUp5,0
│ + vis bStop5,0
@@ -561,7 +835,7 @@
│ + bText5.pco=65535
│ + bText5.pco2=65535
│ + // get Text (optional Value)
│ + spstr strCommand.txt,bText5.txt,"~",32
│ + spstr strCommand.txt,bText5.txt,"~",43
│ + }
│ + if(type5.txt=="button"||type5.txt=="input_sel")
│ + {
@@ -576,7 +850,7 @@
│ + bText5.pco=1374
│ + bText5.pco2=1374
│ + // get Text (optional Value)
│ + spstr strCommand.txt,bText5.txt,"~",32
│ + spstr strCommand.txt,bText5.txt,"~",43
│ + }
│ + if(type5.txt=="number")
│ + {
@@ -589,7 +863,7 @@
│ + vis hSlider5,1
│ + vis nNum5,1
│ + // get config (optional Value) (use bText as variable)
│ + spstr strCommand.txt,bText5.txt,"~",32
│ + spstr strCommand.txt,bText5.txt,"~",43
│ + //first value is current value
│ + spstr bText5.txt,tTmp.txt,"|",0
│ + covx tTmp.txt,sys0,0,0
@@ -604,6 +878,155 @@
│ + covx tTmp.txt,sys0,0,0
│ + hSlider5.maxval=sys0
│ + }
│ + // get Type
│ + spstr strCommand.txt,type6.txt,"~",44
│ + // get internal name
│ + spstr strCommand.txt,entn6.txt,"~",45
│ + 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,tIcon6.txt,"~",46
│ + vis tIcon6,1
│ + // change icon color
│ + spstr strCommand.txt,tTmp.txt,"~",47
│ + covx tTmp.txt,sys0,0,0
│ + tIcon6.pco=sys0
│ + // set name
│ + spstr strCommand.txt,tEntity6.txt,"~",48
│ + 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
│ + // get Button State (optional Value)
│ + spstr strCommand.txt,tId.txt,"~",49
│ + // up button
│ + spstr tId.txt,tTmp.txt,"|",3
│ + if(tTmp.txt=="disable")
│ + {
│ + bUp6.pco=27501
│ + spstr tId.txt,bUp6.txt,"|",0
│ + tsw bUp6,0
│ + }else if(tTmp.txt=="enable")
│ + {
│ + bUp6.pco=65535
│ + spstr tId.txt,bUp6.txt,"|",0
│ + tsw bUp6,1
│ + }
│ + // stop button
│ + spstr tId.txt,tTmp.txt,"|",4
│ + if(tTmp.txt=="disable")
│ + {
│ + bStop6.pco=27501
│ + spstr tId.txt,bStop6.txt,"|",1
│ + tsw bStop6,0
│ + }else if(tTmp.txt=="enable")
│ + {
│ + bStop6.pco=65535
│ + spstr tId.txt,bStop6.txt,"|",1
│ + tsw bStop6,1
│ + }
│ + // down button
│ + spstr tId.txt,tTmp.txt,"|",5
│ + if(tTmp.txt=="disable")
│ + {
│ + bDown6.pco=27501
│ + spstr tId.txt,bDown6.txt,"|",2
│ + tsw bDown6,0
│ + }else if(tTmp.txt=="enable")
│ + {
│ + bDown6.pco=65535
│ + spstr tId.txt,bDown6.txt,"|",2
│ + tsw bDown6,1
│ + }
│ + }
│ + if(type6.txt=="light"||type6.txt=="switch"||type6.txt=="fan")
│ + {
│ + 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,"~",49
│ + covx tTmp.txt,sys0,0,0
│ + btOnOff6.val=sys0
│ + }
│ + if(type6.txt=="text"||type6.txt=="timer")
│ + {
│ + 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,"~",49
│ + }
│ + if(type6.txt=="button"||type6.txt=="input_sel")
│ + {
│ + 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,"~",49
│ + }
│ + 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,"~",49
│ + //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")
│ {
@@ -611,7 +1034,8 @@
│ //command format pageType,specialPageName
│ //write name of speical page to tId
│ spstr strCommand.txt,tId.txt,"~",1
├── pageStartup.txt
│ --- HMI/n2t-out/pageStartup.txt
├── +++ HMI/US/portrait/n2t-out/pageStartup.txt
│ @@ -118,15 +118,15 @@
│ Text tMsg3
│ Attributes
@@ -646,3 +1070,60 @@
│ crcputs sys0,2
│ crcputs tSend.txt,0
│ //send cmd
│ --- HMI/n2t-out/screensaver.txt
├── +++ HMI/US/portrait/n2t-out/screensaver.txt
│ @@ -29,29 +29,20 @@
│ }
│ tDate.txt=pageIcons.vaDate.txt
│ dim=dimValue
│ vis tSend,0
│ //page open event
│ // clear weather elements, to keep example content in HMI
│ - Postinitialize Event
│ - click m0,1
│ -
│ Variable (string) strCommand
│ Attributes
│ Scope : local
│ Text :
│ Max. Text Size: 200
│ -Variable (string) strTmp
│ - Attributes
│ - Scope : local
│ - Text :
│ - Max. Text Size: 2
│ -
│ Variable (string) tId
│ Attributes
│ Scope : local
│ Text :
│ Max. Text Size: 25
│ Variable (string) tInstruction
│ @@ -103,24 +94,14 @@
│ Value: 0
│ Variable (int32) ycR
│ Attributes
│ Scope: local
│ Value: 0
│ -Text m0
│ - 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

View File

@@ -0,0 +1,513 @@
+++ /dev/fd/62 2023-01-05 18:06:15.475339237 +0000
+I/n2t-out/Program.s.txt
++ HMI/US/portrait/n2t-out/Program.s.txt
+I/n2t-out/cardEntities.txt
++ HMI/US/portrait/n2t-out/cardEntities.txt
+5 +96,57 @@
+ }
+ }
+
+e (string) entn1
+ributes
+ Scope : local
+ Text :
+ Max. Text Size: 80
+ Max. Text Size: 65
+
+e (string) entn2
+ributes
+ Scope : local
+ Text :
+ Max. Text Size: 80
+ Max. Text Size: 65
+
+e (string) entn3
+ributes
+ Scope : local
+ Text :
+ Max. Text Size: 80
+ Max. Text Size: 65
+ Max. Text Size: 65
+ Max. Text Size: 65
+
+e (string) entn6
+ributes
+ Scope : local
+ Text :
+ Max. Text Size: 65
+
+e (string) nent1
+ributes
+ Scope : local
+ Text :
+ Max. Text Size: 80
+ Max. Text Size: 40
+
+e (string) nent2
+ributes
+ Scope : local
+ Text :
+ Max. Text Size: 40
+14 +176,26 @@
+e (string) type6
+ributes
+ Scope : local
+ Text :
+ Max. Text Size: 10
+
+14 +224,32 @@
+nNum6
+ributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ Associated Keyboard : none
+ Value : 0
+
+14 +282,34 @@
+ntity6
+ributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ Associated Keyboard : none
+ Text : tEntity5
+ Max. Text Size : 30
+
+14 +352,34 @@
+con6
+ributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ Associated Keyboard : none
+ Text : 
+ Max. Text Size : 5
+
+14 +521,70 @@
+hSlider6
+ributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ Position : 50
+ Upper range limit : 100
+ Lower range limit : 0
+
+nts
+ Touch Release Event
+ nNum5.val=hSlider5.val
+ tSend.txt="event,buttonPress2,"+entn6.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,2
+ crcputs tSend.txt,0
+ //send cmd
+ printh 55 bb
+ prints sys0,2
+ prints tSend.txt,0
+ prints crcval,2
+
+14 +677,64 @@
+bDown6
+ributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ State : unpressed
+ Text : 
+ Max. Text Size : 10
+
+nts
+ 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,2
+ crcputs tSend.txt,0
+ //send cmd
+ printh 55 bb
+ prints sys0,2
+ prints tSend.txt,0
+ prints crcval,2
+
+14 +877,64 @@
+bStop6
+ributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ State : unpressed
+ Text : 
+ Max. Text Size : 10
+
+nts
+ 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,2
+ crcputs tSend.txt,0
+ //send cmd
+ printh 55 bb
+ prints sys0,2
+ prints tSend.txt,0
+ prints crcval,2
+
+14 +1027,64 @@
+bText6
+ributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ State : unpressed
+ Text :
+ Max. Text Size : 45
+
+nts
+ 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,2
+ crcputs tSend.txt,0
+ //send cmd
+ printh 55 bb
+ prints sys0,2
+ prints tSend.txt,0
+ prints crcval,2
+
+14 +1177,64 @@
+bUp6
+ributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ State : unpressed
+ Text : 
+ Max. Text Size : 10
+
+nts
+ 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,2
+ crcputs tSend.txt,0
+ //send cmd
+ printh 55 bb
+ prints sys0,2
+ prints tSend.txt,0
+ prints crcval,2
+
+14 +1335,68 @@
+ate Button btOnOff6
+ributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ State : unpressed
+ Text :
+ Max. Text Size : 10
+
+nts
+ Touch Press Event
+ tSend.txt="event,buttonPress2,"+entn6.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,2
+ crcputs tSend.txt,0
+ //send cmd
+ printh 55 bb
+ prints sys0,2
+ prints tSend.txt,0
+ prints crcval,2
+
+,14 +1529,84 @@
+ page popupInSel
+ if(type4.txt=="timer")
+ page popupTimer
+ if(type5.txt=="timer")
+ {
+ page popupTimer
+ }
+
+ m5
+ributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+
+nts
+ Touch Press Event
+ pageIcons.tTmp1.txt=tEntity6.txt
+ pageIcons.tTmp2.txt=entn6.txt
+ pageIcons.tTmp3.txt=tIcon6.txt
+ if(type6.txt=="shutter")
+ {
+ //popupShutter.tHeading.txt=tEntity5.txt
+ page popupShutter
+ }
+ if(type6.txt=="light")
+ {
+ //popupLight.tEntity.txt=tEntity5.txt
+ page popupLight
+ }
+ if(type6.txt=="fan")
+ {
+ page popupFan
+ }
+ if(type6.txt=="input_sel")
+ {
+ page popupInSel
+ }
+ if(type6.txt=="timer")
+ {
+ page popupTimer
+ }
+,14 +2334,312 @@
+ spstr strCommand.txt,type5.txt,"~",38
+ spstr strCommand.txt,entn5.txt,"~",39
+ spstr strCommand.txt,tIcon5.txt,"~",40
+ spstr strCommand.txt,tTmp.txt,"~",41
+ spstr strCommand.txt,tEntity5.txt,"~",42
+ spstr strCommand.txt,tId.txt,"~",43
+ spstr strCommand.txt,tTmp.txt,"~",43
+ if(type5.txt=="text"||type5.txt=="timer")
+ spstr strCommand.txt,bText5.txt,"~",43
+ spstr strCommand.txt,bText5.txt,"~",43
+ spstr strCommand.txt,bText5.txt,"~",43
+ // get Type
+ spstr strCommand.txt,type6.txt,"~",44
+ // get internal name
+ spstr strCommand.txt,entn6.txt,"~",45
+ 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,tIcon6.txt,"~",46
+ vis tIcon6,1
+ // change icon color
+ spstr strCommand.txt,tTmp.txt,"~",47
+ covx tTmp.txt,sys0,0,0
+ tIcon6.pco=sys0
+ // set name
+ spstr strCommand.txt,tEntity6.txt,"~",48
+ 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
+ // get Button State (optional Value)
+ spstr strCommand.txt,tId.txt,"~",49
+ // up button
+ spstr tId.txt,tTmp.txt,"|",3
+ if(tTmp.txt=="disable")
+ {
+ bUp6.pco=27501
+ spstr tId.txt,bUp6.txt,"|",0
+ tsw bUp6,0
+ }else if(tTmp.txt=="enable")
+ {
+ bUp6.pco=65535
+ spstr tId.txt,bUp6.txt,"|",0
+ tsw bUp6,1
+ }
+ // stop button
+ spstr tId.txt,tTmp.txt,"|",4
+ if(tTmp.txt=="disable")
+ {
+ bStop6.pco=27501
+ spstr tId.txt,bStop6.txt,"|",1
+ tsw bStop6,0
+ }else if(tTmp.txt=="enable")
+ {
+ bStop6.pco=65535
+ spstr tId.txt,bStop6.txt,"|",1
+ tsw bStop6,1
+ }
+ // down button
+ spstr tId.txt,tTmp.txt,"|",5
+ if(tTmp.txt=="disable")
+ {
+ bDown6.pco=27501
+ spstr tId.txt,bDown6.txt,"|",2
+ tsw bDown6,0
+ }else if(tTmp.txt=="enable")
+ {
+ bDown6.pco=65535
+ spstr tId.txt,bDown6.txt,"|",2
+ tsw bDown6,1
+ }
+ }
+ if(type6.txt=="light"||type6.txt=="switch"||type6.txt=="fan")
+ {
+ 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,"~",49
+ covx tTmp.txt,sys0,0,0
+ btOnOff6.val=sys0
+ }
+ if(type6.txt=="text"||type6.txt=="timer")
+ {
+ 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,"~",49
+ }
+ if(type6.txt=="button"||type6.txt=="input_sel")
+ {
+ 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,"~",49
+ }
+ 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,"~",49
+ //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
+ }
+I/n2t-out/pageStartup.txt
++ HMI/US/portrait/n2t-out/pageStartup.txt
+I/n2t-out/screensaver.txt
++ HMI/US/portrait/n2t-out/screensaver.txt
+9 +29,20 @@
+ }
+ tDate.txt=pageIcons.vaDate.txt
+ dim=dimValue
+ vis tSend,0
+ //page open event
+ // clear weather elements, to keep example content in HMI
+
+ Postinitialize Event
+ click m0,1
+
+e (string) strCommand
+ributes
+ Scope : local
+ Text :
+ Max. Text Size: 200
+
+e (string) strTmp
+ributes
+ Scope : local
+ Text :
+ Max. Text Size: 2
+
+e (string) tId
+ributes
+ Scope : local
+ Text :
+ Max. Text Size: 25
+
+e (string) tInstruction
+24 +94,14 @@
+ Value: 0
+
+e (int32) ycR
+ributes
+ Scope: local
+ Value: 0
+
+
+ributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ Associated Keyboard : none
+ Text :
+ Max. Text Size : 10
+
+0
+ributes
+ Scope : local
+ Dragging : 0
+ Disable release event after dragging: 0
+ Send Component ID : disabled
+ Associated Keyboard : none

View File

@@ -51,7 +51,7 @@ Page cardAlarm
if(b[sys0].type==98||b[sys0].type==116)
{
b[sys0].bco=defaultBcoColor
b[sys0].pco=defaultFontColor
//b[sys0].pco=defaultFontColor
}
}
if(defaultBcoColor==0)
@@ -72,6 +72,20 @@ Variable (string) entn
Text :
Max. Text Size: 80
Variable (string) nent1
Attributes
ID : 41
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent2
Attributes
ID : 40
Scope : local
Text :
Max. Text Size: 80
Variable (string) strCommand
Attributes
ID : 6
@@ -1014,14 +1028,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -1068,14 +1075,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -1223,86 +1223,80 @@ Timer tmSerial
{
//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")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
//text arm1
spstr strCommand.txt,arm1.txt,"~",3
spstr strCommand.txt,arm1.txt,"~",14
if(arm1.txt!="")
{
vis arm1,1
}
//id arm1
spstr strCommand.txt,va1.txt,"~",4
spstr strCommand.txt,va1.txt,"~",15
//text arm2
spstr strCommand.txt,arm2.txt,"~",5
spstr strCommand.txt,arm2.txt,"~",16
if(arm2.txt!="")
{
vis arm2,1
}
//id arm2
spstr strCommand.txt,va2.txt,"~",6
spstr strCommand.txt,va2.txt,"~",17
//text arm3
spstr strCommand.txt,arm3.txt,"~",7
spstr strCommand.txt,arm3.txt,"~",18
if(arm3.txt!="")
{
vis arm3,1
}
//id arm3
spstr strCommand.txt,va3.txt,"~",8
spstr strCommand.txt,va3.txt,"~",19
//text arm4
spstr strCommand.txt,arm4.txt,"~",9
spstr strCommand.txt,arm4.txt,"~",20
if(arm4.txt!="")
{
vis arm4,1
}
//id arm4
spstr strCommand.txt,va4.txt,"~",10
spstr strCommand.txt,va4.txt,"~",21
//icon
spstr strCommand.txt,tIcon.txt,"~",11
spstr strCommand.txt,tIcon.txt,"~",22
//icon color
spstr strCommand.txt,tTmp.txt,"~",12
spstr strCommand.txt,tTmp.txt,"~",23
covx tTmp.txt,sys0,0,0
tIcon.pco=sys0
//numpad status
spstr strCommand.txt,tTmp.txt,"~",13
spstr strCommand.txt,tTmp.txt,"~",24
if(tTmp.txt!="disable")
{
vis b0,1
@@ -1335,7 +1329,7 @@ Timer tmSerial
vis tCode,0
}
//flashing status
spstr strCommand.txt,tTmp.txt,"~",14
spstr strCommand.txt,tTmp.txt,"~",25
if(tTmp.txt=="enable")
{
tmFlash.en=1
@@ -1344,13 +1338,13 @@ Timer tmSerial
tmFlash.en=0
}
// extra button
spstr strCommand.txt,b9.txt,"~",15
spstr strCommand.txt,b9.txt,"~",26
if(b9.txt!="")
{
vis b9,1
spstr strCommand.txt,tTmp.txt,"~",16
spstr strCommand.txt,tTmp.txt,"~",27
covx tTmp.txt,b9.pco,0,0
spstr strCommand.txt,vaAddBtn.txt,"~",17
spstr strCommand.txt,vaAddBtn.txt,"~",28
}
}
if(tInstruction.txt=="time")
@@ -1455,6 +1449,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -0,0 +1,903 @@
Page cardChart
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
dim=dimValueNormal
vis p0,0
vis tSend,0
vis tInstruction,0
vis tTmp,0
vis tId,0
vis bPrev,0
vis bNext,0
cardChart.bco=defaultBcoColor
vis x0,0
x0.bco=defaultBcoColor
x0.borderc=defaultBcoColor
for(sys0=0;sys0<32;sys0++)
{
if(b[sys0].type==98||b[sys0].type==116)
{
b[sys0].bco=defaultBcoColor
b[sys0].pco=defaultFontColor
}
if(b[sys0].type==53&&defaultBcoColor==6371)
{
b[sys0].pic=1
b[sys0].pic2=2
}
if(b[sys0].type==53&&defaultBcoColor==0)
{
b[sys0].pic=10
b[sys0].pic2=11
}
}
Variable (string) entn
Attributes
ID : 4
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent1
Attributes
ID : 32
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent2
Attributes
ID : 31
Scope : local
Text :
Max. Text Size: 80
Variable (string) strCommand
Attributes
ID : 3
Scope : local
Text :
Max. Text Size: 275
Variable (string) strTmp
Attributes
ID : 13
Scope : local
Text :
Max. Text Size: 200
Variable (string) tId
Attributes
ID : 10
Scope : local
Text :
Max. Text Size: 20
Variable (string) tInstruction
Attributes
ID : 11
Scope : local
Text :
Max. Text Size: 20
Variable (string) tSend
Attributes
ID : 7
Scope : local
Text :
Max. Text Size: 200
Variable (string) tTmp
Attributes
ID : 9
Scope : local
Text :
Max. Text Size: 20
Variable (int32) vMax
Attributes
ID : 24
Scope: local
Value: 0
Variable (int32) vNValues
Attributes
ID : 12
Scope: local
Value: 0
Variable (int32) vaBottom
Attributes
ID : 17
Scope: local
Value: 0
Variable (int32) vaColorD
Attributes
ID : 23
Scope: local
Value: 0
Variable (int32) vaColorL
Attributes
ID : 22
Scope: local
Value: 0
Variable (int32) vaLast
Attributes
ID : 20
Scope: local
Value: 4294967295
Variable (int32) vaLeft
Attributes
ID : 18
Scope: local
Value: 0
Variable (int32) vaUnit
Attributes
ID : 15
Scope: local
Value: 0
Variable (int32) vaValue
Attributes
ID : 16
Scope: local
Value: 0
Variable (string) vaValues
Attributes
ID : 19
Scope : local
Text :
Max. Text Size: 100
Variable (int32) vaYUnit
Attributes
ID : 25
Scope: local
Value: 0
XFloat x0
Attributes
ID : 21
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 108
y coordinate : 77
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : border
Associated Keyboard : none
Border Color : 0
Border Width : 2
Font ID : 1
Back. Color : 0
Font Color : 50712
Horizontal Alignment : center
Vertical Alignment : center
Value : 0
Significant digits left : 0
Significant digits right : 1
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tHeading
Attributes
ID : 27
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 66
y coordinate : 26
Width : 184
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 :
Max. Text Size : 40
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 bNext
Attributes
ID : 28
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 262
y coordinate : 16
Width : 50
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Font ID : 3
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,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bPrev
Attributes
ID : 26
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 9
y coordinate : 16
Width : 50
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Font ID : 3
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,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Hotspot m0
Attributes
ID : 14
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 20
y coordinate : 90
Width : 280
Height : 370
Effect : load
Effect Priority : 0
Effect Time : 300
Events
Touch Press Event
if(vaLast.val>=0)
{
// spstr vaValues.txt,tTmp.txt,"~",vaLast.val
// covx tTmp.txt,vaValue.val,0,0
sys1=vaLast.val*5*vaUnit.val
sys1+=vaLeft.val
sya0=sys1/100
sya1=vaUnit.val*4+sys1/100
if(vaValue.val==0)
{
line sya0,vaBottom.val,sya1,vaBottom.val,vaColorD.val
}else
{
sys0=0
if(vaValue.val<0)
{
vaValue.val*=-1
sys0=1
}
fill sya0+1,-1*vaYUnit.val*vaValue.val+vaBottom.val+1,vaUnit.val*4/100,vaYUnit.val*vaValue.val-1,vaColorD.val
// line sya0+1,-10*vaValue.val+vaBottom.val,sya1-1,-10*vaValue.val+vaBottom.val,vaColorL.val
draw sya0,-1*vaYUnit.val*vaValue.val+vaBottom.val+1,sya1,vaBottom.val,vaColorL.val
if(sys0!=0)
{
sya1=-1*vaYUnit.val*vaValue.val+vaBottom.val
for(sys0=vaBottom.val;sys0>=sya1;sys0-=10)
{
sys2=sys0-5
if(sys2<sya1)
{
sys2=sya1
}
line vaUnit.val*2+sys1/100,sys0,vaUnit.val*2+sys1/100,sys2,vaColorL.val
}
}
}
}
sys0=tch0-m0.x-25-40*100/vaUnit.val
sys1=sys0%5
if(sys1<4&&sys0>=0)
{
vis x0,1
vaLast.val=sys0/5
// n0.val=sys0/5
spstr vaValues.txt,tTmp.txt,"~",vaLast.val
covx tTmp.txt,vaValue.val,0,0
// t0.txt=tTmp.txt
sys1=vaLast.val*5*vaUnit.val
sys1+=vaLeft.val
sya0=sys1/100
sya1=vaUnit.val*4+sys1/100
if(vaValue.val==0)
{
line sya0,vaBottom.val,sya1,vaBottom.val,vaColorL.val
x0.val=vaValue.val
}else
{
if(vaValue.val<0)
{
fill sya0+1,vaYUnit.val*vaValue.val+vaBottom.val+1,vaUnit.val*4/100,-1*vaYUnit.val*vaValue.val-1,vaColorL.val
x0.val=vaValue.val*-1
}else
{
fill sya0+1,-1*vaYUnit.val*vaValue.val+vaBottom.val+1,vaUnit.val*4/100,vaYUnit.val*vaValue.val-1,vaColorL.val
x0.val=vaValue.val
}
}
}else
{
vis x0,0
vaLast.val=-1
}
Hotspot mSwipeNext
Attributes
ID : 29
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 311
y coordinate : 5
Width : 7
Height : 475
Effect : load
Effect Priority : 0
Effect Time : 300
Events
Touch Press Event
click bNext,1
Hotspot mSwipePrev
Attributes
ID : 8
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 5
Width : 9
Height : 310
Effect : load
Effect Priority : 0
Effect Time : 300
Events
Touch Press Event
click bPrev,1
Hotspot mSwipeUp
Attributes
ID : 30
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 10
y coordinate : 0
Width : 298
Height : 8
Effect : load
Effect Priority : 0
Effect Time : 300
Events
Touch Press Event
click bPrev,1
Timer tmSerial
Attributes
ID : 2
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
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")
{
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
}
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
}
// extract color
spstr strCommand.txt,tTmp.txt,"~",14
covx tTmp.txt,vaColorL.val,0,0
// prepare dark color
sys0=vaColorL.val>>11 // red
vaColorD.val=sys0*8/10<<11 // store and shift
sys0=vaColorL.val>>5%64 // green
vaColorD.val=sys0*8/10<<5+vaColorD.val // store and shift
sys0=vaColorL.val%32
vaColorD.val=sys0*8/10+vaColorD.val // store and add
//
// detect nValues and maxValue
vNValues.val=0
spstr strCommand.txt,tTmp.txt,"~",vNValues.val+17
strlen tTmp.txt,sya0
while(sya0>0)
{
covx tTmp.txt,sya1,0,0
if(sya1>vMax.val)
{
vMax.val=sya1
}
// next
vNValues.val++
spstr strCommand.txt,tTmp.txt,"~",vNValues.val+17
strlen tTmp.txt,sya0
}
//
// calculate unit width
sys0=vNValues.val*4
sys0+=vNValues.val-1
vaUnit.val=m0.w-25-40*100
vaUnit.val/=sys0
vaBottom.val=m0.y+m0.h-24
vaLeft.val=m0.x+25+40*100
vaYUnit.val=m0.h-24/vMax.val
//
line m0.x+25+40-10,m0.y,m0.x+25+40-10,vaBottom.val+10,14823
line m0.x+25+40-5,vaBottom.val,m0.x+25+40-15,vaBottom.val,14823
spstr strCommand.txt,strTmp.txt,"~",16
sya1=0
spstr strTmp.txt,tTmp.txt,":",sya1
strlen tTmp.txt,sya0
while(sya0>0)
{
covx tTmp.txt,sys1,0,0
if(sys1<=vMax.val)
{
line m0.x+25+40-5,-1*vaYUnit.val*sys1+vaBottom.val,m0.x+25+40-15,-1*vaYUnit.val*sys1+vaBottom.val,14823
sys2=sys1%10
sys1/=10
if(sys1>0)
{
covx sys1,tTmp.txt,0,0
}else
{
tTmp.txt=""
}
if(sys2!=0)
{
covx sys2,tId.txt,0,0
tTmp.txt=tTmp.txt+"."+tId.txt
}
xstr m0.x+28,sys1*10+sys2*-1*vaYUnit.val+vaBottom.val-10,20,20,0,defaultFontColor,RED,2,1,3,tTmp.txt
}
// next
sya1++
spstr strTmp.txt,tTmp.txt,":",sya1
strlen tTmp.txt,sya0
}
//
// y achis label
spstr strCommand.txt,tTmp.txt,"~",15
// tTmp.txt="Gas [kW]"
strlen tTmp.txt,sys1
sya1=sys1*12+m0.h-48/2
for(sys0=0;sys0<sys1;sys0++)
{
substr tTmp.txt,strTmp.txt,sys0,1
xstr m0.x,sys0*-12+m0.y+sya1,30,20,6,defaultFontColor,RED,2,1,3,strTmp.txt
}
for(sys0=0;sys0<vNValues.val;sys0++)
{
if(sys0>0)
{
vaValues.txt+="~"
}
// extract next entry
spstr strCommand.txt,tTmp.txt,"~",sys0+17
// calculate left
sys1=sys0*5*vaUnit.val
sys1+=vaLeft.val
// if there is a colon in the obtained value we have a label/and gridline
spstr tTmp.txt,strTmp.txt,"^",1
strlen strTmp.txt,sya0
if(sya0>0)
{
// we have a label!!!
// -> extract label
sys2=vaUnit.val*2+sys1/100
// draw label
xstr sya0*-6+sys2,vaBottom.val+2,sya0*12,22,0,defaultFontColor,defaultBcoColor,1,1,3,strTmp.txt
// draw line
// line sys2,vaBottom.val,sys2,m0.y,defaultFontColor
sya1=1
//spstr tTmp.txt,strTmp.txt,":",0
spstr tTmp.txt,tTmp.txt,":",0
vaValues.txt+="-"
}else
{
sya1=0
}
vaValues.txt+=tTmp.txt
covx tTmp.txt,vaValue.val,0,0
sya0=sys1/100
if(vaValue.val==0)
{
line sya0,vaBottom.val,vaUnit.val*4+sys1/100,vaBottom.val,vaColorD.val
}else
{
fill sya0+1,-1*vaYUnit.val*vaValue.val+vaBottom.val+1,vaUnit.val*4/100,vaYUnit.val*vaValue.val-1,vaColorD.val
line sya0+1,-1*vaYUnit.val*vaValue.val+vaBottom.val,vaUnit.val*4+sys1/100-1,-1*vaYUnit.val*vaValue.val+vaBottom.val,vaColorL.val
draw sya0,-1*vaYUnit.val*vaValue.val+vaBottom.val+1,vaUnit.val*4+sys1/100,vaBottom.val,vaColorL.val
}
if(sya1>0)
{
sya1=-1*vaYUnit.val*vaValue.val+vaBottom.val
for(sya0=vaBottom.val-5;sya0>m0.y;sya0-=10)
{
sys1=sya0+5
if(sya0>=sya1)
{
line sys2,sya0,sys2,sys1,vaColorL.val
}else
{
if(sys1>=sya1)
{
line sys2,sya0,sys2,sya1-1,14823
line sys2,sya1,sys2,sys1,vaColorL.val
}else
{
line sys2,sya0,sys2,sys1,14823
}
}
}
}
}
}
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
// get value normal
spstr strCommand.txt,tTmp.txt,"~",2
covx tTmp.txt,dimValueNormal,0,0
dim=dimValueNormal
// get background color
spstr strCommand.txt,tTmp.txt,"~",3
if(tTmp.txt!="")
{
covx tTmp.txt,defaultBcoColor,0,0
}
// get font color
spstr strCommand.txt,tTmp.txt,"~",4
if(tTmp.txt!="")
{
covx tTmp.txt,defaultFontColor,0,0
}
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="pageType")
{
sleepValue=0
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
spstr strCommand.txt,pageIcons.tTmp3.txt,"~",4
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="screensaver")
{
page screensaver
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="popupShutter")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupShutter
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardThermo")
{
page cardThermo
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
if(tId.txt=="cardQR")
{
page cardQR
}
if(tId.txt=="cardPower")
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
}
Timer tmSleep
Attributes
ID : 5
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,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
}
}
TouchCap tc0
Attributes
ID : 6
Scope: local
Value: 0
Events
Touch Press Event
sleepValue=0

File diff suppressed because it is too large Load Diff

View File

@@ -24,7 +24,7 @@ Page cardGrid
//remove background & activate reparse mode
vis p0,0
recmod=1
bauds=115200
baud=115200
//debug stuff
vis tTmp,0
vis tSend,0
@@ -96,12 +96,26 @@ Variable (string) entn6
Text :
Max. Text Size: 80
Variable (string) nent1
Attributes
ID : 43
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent2
Attributes
ID : 42
Scope : local
Text :
Max. Text Size: 80
Variable (string) strCommand
Attributes
ID : 4
Scope : local
Text :
Max. Text Size: 500
Max. Text Size: 700
Variable (string) tSend
Attributes
@@ -512,6 +526,14 @@ Button bEntity1
{
page popupShutter
}
if(type1.txt=="input_sel")
{
page popupInSel
}
if(type1.txt=="timer")
{
page popupTimer
}
Touch Release Event
tmLP.en=0
@@ -571,6 +593,14 @@ Button bEntity2
{
page popupShutter
}
if(type2.txt=="input_sel")
{
page popupInSel
}
if(type2.txt=="timer")
{
page popupTimer
}
Touch Release Event
tmLP.en=0
@@ -630,6 +660,14 @@ Button bEntity3
{
page popupShutter
}
if(type3.txt=="input_sel")
{
page popupInSel
}
if(type3.txt=="timer")
{
page popupTimer
}
Touch Release Event
tmLP.en=0
@@ -689,6 +727,14 @@ Button bEntity4
{
page popupShutter
}
if(type4.txt=="input_sel")
{
page popupInSel
}
if(type4.txt=="timer")
{
page popupTimer
}
Touch Release Event
tmLP.en=0
@@ -748,6 +794,14 @@ Button bEntity5
{
page popupShutter
}
if(type5.txt=="input_sel")
{
page popupInSel
}
if(type5.txt=="timer")
{
page popupTimer
}
Touch Release Event
tmLP.en=0
@@ -807,6 +861,14 @@ Button bEntity6
{
page popupShutter
}
if(type6.txt=="input_sel")
{
page popupInSel
}
if(type6.txt=="timer")
{
page popupTimer
}
Touch Release Event
tmLP.en=0
@@ -857,14 +919,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardGrid,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -911,14 +966,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardGrid,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -1034,10 +1082,6 @@ Timer tmLP
{
page popupFan
}
if(tTmp.txt=="input_sel")
{
page popupInSel
}
Timer tmSerial
Attributes
@@ -1095,50 +1139,44 @@ Timer tmSerial
{
// command format: entityUpd,heading,navigation,[,type,internalName,iconId,iconColor,displayName,optionalValue]x6
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
// get Type
spstr strCommand.txt,type1.txt,"~",3
spstr strCommand.txt,type1.txt,"~",14
// get internal name
spstr strCommand.txt,entn1.txt,"~",4
spstr strCommand.txt,entn1.txt,"~",15
if(type1.txt=="delete"||type1.txt=="")
{
vis tEntity1,0
@@ -1146,20 +1184,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity1.txt,"~",5
spstr strCommand.txt,bEntity1.txt,"~",16
vis bEntity1,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",6
spstr strCommand.txt,tTmp.txt,"~",17
covx tTmp.txt,sys0,0,0
bEntity1.pco=sys0
// set name
spstr strCommand.txt,tEntity1.txt,"~",7
spstr strCommand.txt,tEntity1.txt,"~",18
vis tEntity1,1
}
// get Type
spstr strCommand.txt,type2.txt,"~",9
spstr strCommand.txt,type2.txt,"~",20
// get internal name
spstr strCommand.txt,entn2.txt,"~",10
spstr strCommand.txt,entn2.txt,"~",21
if(type2.txt=="delete"||type2.txt=="")
{
vis tEntity2,0
@@ -1167,20 +1205,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity2.txt,"~",11
spstr strCommand.txt,bEntity2.txt,"~",22
vis bEntity2,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",12
spstr strCommand.txt,tTmp.txt,"~",23
covx tTmp.txt,sys0,0,0
bEntity2.pco=sys0
// set name
spstr strCommand.txt,tEntity2.txt,"~",13
spstr strCommand.txt,tEntity2.txt,"~",24
vis tEntity2,1
}
// get Type
spstr strCommand.txt,type3.txt,"~",15
spstr strCommand.txt,type3.txt,"~",26
// get internal name
spstr strCommand.txt,entn3.txt,"~",16
spstr strCommand.txt,entn3.txt,"~",27
if(type3.txt=="delete"||type3.txt=="")
{
vis tEntity3,0
@@ -1188,20 +1226,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity3.txt,"~",17
spstr strCommand.txt,bEntity3.txt,"~",28
vis bEntity3,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",18
spstr strCommand.txt,tTmp.txt,"~",29
covx tTmp.txt,sys0,0,0
bEntity3.pco=sys0
// set name
spstr strCommand.txt,tEntity3.txt,"~",19
spstr strCommand.txt,tEntity3.txt,"~",30
vis tEntity3,1
}
// get Type
spstr strCommand.txt,type4.txt,"~",21
spstr strCommand.txt,type4.txt,"~",32
// get internal name
spstr strCommand.txt,entn4.txt,"~",22
spstr strCommand.txt,entn4.txt,"~",33
if(type4.txt=="delete"||type4.txt=="")
{
vis tEntity4,0
@@ -1209,20 +1247,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity4.txt,"~",23
spstr strCommand.txt,bEntity4.txt,"~",34
vis bEntity4,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",24
spstr strCommand.txt,tTmp.txt,"~",35
covx tTmp.txt,sys0,0,0
bEntity4.pco=sys0
// set name
spstr strCommand.txt,tEntity4.txt,"~",25
spstr strCommand.txt,tEntity4.txt,"~",36
vis tEntity4,1
}
// get Type
spstr strCommand.txt,type5.txt,"~",27
spstr strCommand.txt,type5.txt,"~",38
// get internal name
spstr strCommand.txt,entn5.txt,"~",28
spstr strCommand.txt,entn5.txt,"~",39
if(type5.txt=="delete"||type5.txt=="")
{
vis tEntity5,0
@@ -1230,20 +1268,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity5.txt,"~",29
spstr strCommand.txt,bEntity5.txt,"~",40
vis bEntity5,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",30
spstr strCommand.txt,tTmp.txt,"~",41
covx tTmp.txt,sys0,0,0
bEntity5.pco=sys0
// set name
spstr strCommand.txt,tEntity5.txt,"~",31
spstr strCommand.txt,tEntity5.txt,"~",42
vis tEntity5,1
}
// get Type
spstr strCommand.txt,type6.txt,"~",33
spstr strCommand.txt,type6.txt,"~",44
// get internal name
spstr strCommand.txt,entn6.txt,"~",34
spstr strCommand.txt,entn6.txt,"~",45
if(type6.txt=="delete"||type6.txt=="")
{
vis tEntity6,0
@@ -1251,14 +1289,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity6.txt,"~",35
spstr strCommand.txt,bEntity6.txt,"~",46
vis bEntity6,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",36
spstr strCommand.txt,tTmp.txt,"~",47
covx tTmp.txt,sys0,0,0
bEntity6.pco=sys0
// set name
spstr strCommand.txt,tEntity6.txt,"~",37
spstr strCommand.txt,tEntity6.txt,"~",48
vis tEntity6,1
}
}
@@ -1326,6 +1364,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
if(tInstruction.txt=="time")
{

File diff suppressed because it is too large Load Diff

View File

@@ -65,6 +65,20 @@ Page cardPower
}
}
Variable (string) nent1
Attributes
ID : 44
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent2
Attributes
ID : 43
Scope : local
Text :
Max. Text Size: 80
Variable (string) strCommand
Attributes
ID : 5
@@ -801,14 +815,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardPower,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -855,14 +862,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -1061,63 +1061,57 @@ Timer tmSerial
{
// command format: entityUpd,heading,navigation,colorHome,iconHome[,iconColor,icon,speed,valueUp,valueDown]x6
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
// icon color home
spstr strCommand.txt,tTmp.txt,"~",3
spstr strCommand.txt,tTmp.txt,"~",14
covx tTmp.txt,t1.pco,0,0
// icon home
spstr strCommand.txt,t1.txt,"~",4
spstr strCommand.txt,t1.txt,"~",15
// text home
spstr strCommand.txt,tHome.txt,"~",5
spstr strCommand.txt,tHome.txt,"~",16
// iconColor
spstr strCommand.txt,tTmp.txt,"~",6
spstr strCommand.txt,tTmp.txt,"~",17
covx tTmp.txt,t0Icon.pco,0,0
// icon
spstr strCommand.txt,t0Icon.txt,"~",7
spstr strCommand.txt,t0Icon.txt,"~",18
// speed
spstr strCommand.txt,tTmp.txt,"~",8
spstr strCommand.txt,tTmp.txt,"~",19
covx tTmp.txt,t0Speed.val,0,0
// lower text
spstr strCommand.txt,t0u.txt,"~",9
spstr strCommand.txt,t0u.txt,"~",20
if(t0Icon.txt!="")
{
vis t0Icon,1
@@ -1130,15 +1124,15 @@ Timer tmSerial
vis h0,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",10
spstr strCommand.txt,tTmp.txt,"~",21
covx tTmp.txt,t1Icon.pco,0,0
// icon
spstr strCommand.txt,t1Icon.txt,"~",11
spstr strCommand.txt,t1Icon.txt,"~",22
// speed
spstr strCommand.txt,tTmp.txt,"~",12
spstr strCommand.txt,tTmp.txt,"~",23
covx tTmp.txt,t1Speed.val,0,0
// lower text
spstr strCommand.txt,t1u.txt,"~",13
spstr strCommand.txt,t1u.txt,"~",24
if(t1Icon.txt!="")
{
vis t1Icon,1
@@ -1151,15 +1145,15 @@ Timer tmSerial
vis h1,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",14
spstr strCommand.txt,tTmp.txt,"~",25
covx tTmp.txt,t2Icon.pco,0,0
// icon
spstr strCommand.txt,t2Icon.txt,"~",15
spstr strCommand.txt,t2Icon.txt,"~",26
// speed
spstr strCommand.txt,tTmp.txt,"~",16
spstr strCommand.txt,tTmp.txt,"~",27
covx tTmp.txt,t2Speed.val,0,0
// lower text
spstr strCommand.txt,t2u.txt,"~",17
spstr strCommand.txt,t2u.txt,"~",28
if(t2Icon.txt!="")
{
vis t2Icon,1
@@ -1172,15 +1166,15 @@ Timer tmSerial
vis h2,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",18
spstr strCommand.txt,tTmp.txt,"~",29
covx tTmp.txt,t3Icon.pco,0,0
// icon
spstr strCommand.txt,t3Icon.txt,"~",19
spstr strCommand.txt,t3Icon.txt,"~",30
// speed
spstr strCommand.txt,tTmp.txt,"~",20
spstr strCommand.txt,tTmp.txt,"~",31
covx tTmp.txt,t3Speed.val,0,0
// lower text
spstr strCommand.txt,t3u.txt,"~",21
spstr strCommand.txt,t3u.txt,"~",32
if(t3Icon.txt!="")
{
vis t3Icon,1
@@ -1193,15 +1187,15 @@ Timer tmSerial
vis h3,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",22
spstr strCommand.txt,tTmp.txt,"~",33
covx tTmp.txt,t4Icon.pco,0,0
// icon
spstr strCommand.txt,t4Icon.txt,"~",23
spstr strCommand.txt,t4Icon.txt,"~",34
// speed
spstr strCommand.txt,tTmp.txt,"~",24
spstr strCommand.txt,tTmp.txt,"~",35
covx tTmp.txt,t4Speed.val,0,0
// lower text
spstr strCommand.txt,t4u.txt,"~",25
spstr strCommand.txt,t4u.txt,"~",36
if(t4Icon.txt!="")
{
vis t4Icon,1
@@ -1214,15 +1208,15 @@ Timer tmSerial
vis h4,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",26
spstr strCommand.txt,tTmp.txt,"~",37
covx tTmp.txt,t5Icon.pco,0,0
// icon
spstr strCommand.txt,t5Icon.txt,"~",27
spstr strCommand.txt,t5Icon.txt,"~",38
// speed
spstr strCommand.txt,tTmp.txt,"~",28
spstr strCommand.txt,tTmp.txt,"~",39
covx tTmp.txt,t5Speed.val,0,0
// lower text
spstr strCommand.txt,t5u.txt,"~",29
spstr strCommand.txt,t5u.txt,"~",40
if(t5Icon.txt!="")
{
vis t5Icon,1
@@ -1299,6 +1293,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
if(tInstruction.txt=="time")
{

View File

@@ -81,12 +81,26 @@ Variable (string) entn2
Text :
Max. Text Size: 80
Variable (string) nent1
Attributes
ID : 33
Scope : local
Text :
Max. Text Size: 50
Variable (string) nent2
Attributes
ID : 32
Scope : local
Text :
Max. Text Size: 50
Variable (string) strCommand
Attributes
ID : 6
Scope : local
Text :
Max. Text Size: 275
Max. Text Size: 400
Variable (string) tId
Attributes
@@ -338,14 +352,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardQR,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -392,14 +399,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -745,52 +745,46 @@ Timer tmSerial
// command format: entityUpd,heading,navigation,textQR[,type,internalName,iconId,displayName,optionalValue]x2
//tHeading
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
//text qrcode
spstr strCommand.txt,vaQR.txt,"~",3
spstr strCommand.txt,vaQR.txt,"~",14
// get Type
spstr strCommand.txt,type1.txt,"~",4
spstr strCommand.txt,type1.txt,"~",15
// get internal name
spstr strCommand.txt,entn1.txt,"~",5
spstr strCommand.txt,entn1.txt,"~",16
if(type1.txt=="delete"||type1.txt=="")
{
vis btOnOff1,0
@@ -800,14 +794,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,tIcon1.txt,"~",6
spstr strCommand.txt,tIcon1.txt,"~",17
vis tIcon1,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",7
spstr strCommand.txt,tTmp.txt,"~",18
covx tTmp.txt,sys0,0,0
tIcon1.pco=sys0
// set name
spstr strCommand.txt,tEntity1.txt,"~",8
spstr strCommand.txt,tEntity1.txt,"~",19
vis tEntity1,1
}
if(type1.txt=="light")
@@ -815,7 +809,7 @@ Timer tmSerial
vis btOnOff1,1
vis bText1,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",9
spstr strCommand.txt,tTmp.txt,"~",20
covx tTmp.txt,sys0,0,0
btOnOff1.val=sys0
}
@@ -824,7 +818,7 @@ Timer tmSerial
vis btOnOff1,1
vis bText1,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",9
spstr strCommand.txt,tTmp.txt,"~",20
covx tTmp.txt,sys0,0,0
btOnOff1.val=sys0
}
@@ -836,7 +830,7 @@ Timer tmSerial
bText1.pco=65535
bText1.pco2=65535
// get Text (optional Value)
spstr strCommand.txt,bText1.txt,"~",9
spstr strCommand.txt,bText1.txt,"~",20
}
if(type1.txt=="button")
{
@@ -846,12 +840,12 @@ Timer tmSerial
bText1.pco=1374
bText1.pco2=1374
// get Text (optional Value)
spstr strCommand.txt,bText1.txt,"~",9
spstr strCommand.txt,bText1.txt,"~",20
}
// get Type
spstr strCommand.txt,type2.txt,"~",10
spstr strCommand.txt,type2.txt,"~",21
// get internal name
spstr strCommand.txt,entn2.txt,"~",11
spstr strCommand.txt,entn2.txt,"~",22
if(type2.txt=="delete"||type2.txt=="")
{
vis btOnOff2,0
@@ -861,14 +855,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,tIcon2.txt,"~",12
spstr strCommand.txt,tIcon2.txt,"~",23
vis tIcon2,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",13
spstr strCommand.txt,tTmp.txt,"~",24
covx tTmp.txt,sys0,0,0
tIcon2.pco=sys0
// set name
spstr strCommand.txt,tEntity2.txt,"~",14
spstr strCommand.txt,tEntity2.txt,"~",25
vis tEntity2,1
}
if(type2.txt=="light")
@@ -876,7 +870,7 @@ Timer tmSerial
vis btOnOff2,1
vis bText2,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",15
spstr strCommand.txt,tTmp.txt,"~",26
covx tTmp.txt,sys0,0,0
btOnOff2.val=sys0
}
@@ -885,7 +879,7 @@ Timer tmSerial
vis btOnOff2,1
vis bText2,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",15
spstr strCommand.txt,tTmp.txt,"~",26
covx tTmp.txt,sys0,0,0
btOnOff2.val=sys0
}
@@ -897,7 +891,7 @@ Timer tmSerial
bText2.pco=65535
bText2.pco2=65535
// get Text (optional Value)
spstr strCommand.txt,bText2.txt,"~",15
spstr strCommand.txt,bText2.txt,"~",26
}
if(type2.txt=="button")
{
@@ -907,7 +901,7 @@ Timer tmSerial
bText2.pco=1374
bText2.pco2=1374
// get Text (optional Value)
spstr strCommand.txt,bText2.txt,"~",15
spstr strCommand.txt,bText2.txt,"~",26
}
if(type2.txt=="delete"||type2.txt=="")
{
@@ -1022,6 +1016,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

File diff suppressed because it is too large Load Diff

View File

@@ -10,69 +10,77 @@ pageTest
14 Component(s)
14 Line(s) of event code
14 Unique line(s) of event code
cardGrid
42 Component(s)
490 Line(s) of event code
286 Unique line(s) of event code
popupShutter
25 Component(s)
394 Line(s) of event code
216 Unique line(s) of event code
pageStartup
19 Component(s)
177 Line(s) of event code
127 Unique line(s) of event code
popupThermo
44 Component(s)
515 Line(s) of event code
272 Unique line(s) of event code
popupInSel
34 Component(s)
529 Line(s) of event code
257 Unique line(s) of event code
cardQR
32 Component(s)
421 Line(s) of event code
242 Unique line(s) of event code
popupNotify
19 Component(s)
253 Line(s) of event code
164 Unique line(s) of event code
181 Line(s) of event code
129 Unique line(s) of event code
popupLight
28 Component(s)
404 Line(s) of event code
223 Unique line(s) of event code
408 Line(s) of event code
225 Unique line(s) of event code
popupNotify
19 Component(s)
257 Line(s) of event code
166 Unique line(s) of event code
popupFan
27 Component(s)
347 Line(s) of event code
202 Unique line(s) of event code
cardMedia
351 Line(s) of event code
204 Unique line(s) of event code
cardQR
34 Component(s)
421 Line(s) of event code
222 Unique line(s) of event code
398 Line(s) of event code
232 Unique line(s) of event code
cardPower
43 Component(s)
435 Line(s) of event code
297 Unique line(s) of event code
cardAlarm
40 Component(s)
439 Line(s) of event code
261 Unique line(s) of event code
cardThermo
53 Component(s)
608 Line(s) of event code
316 Unique line(s) of event code
45 Component(s)
412 Line(s) of event code
289 Unique line(s) of event code
screensaver
45 Component(s)
396 Line(s) of event code
294 Unique line(s) of event code
429 Line(s) of event code
301 Unique line(s) of event code
popupShutter
25 Component(s)
398 Line(s) of event code
218 Unique line(s) of event code
popupThermo
44 Component(s)
519 Line(s) of event code
274 Unique line(s) of event code
cardGrid
44 Component(s)
511 Line(s) of event code
289 Unique line(s) of event code
cardChart
33 Component(s)
425 Line(s) of event code
290 Unique line(s) of event code
cardMedia
59 Component(s)
637 Line(s) of event code
316 Unique line(s) of event code
cardAlarm
42 Component(s)
415 Line(s) of event code
253 Unique line(s) of event code
cardThermo
57 Component(s)
528 Line(s) of event code
313 Unique line(s) of event code
popupTimer
42 Component(s)
512 Line(s) of event code
255 Unique line(s) of event code
popupInSel
34 Component(s)
617 Line(s) of event code
295 Unique line(s) of event code
cardEntities
77 Component(s)
1391 Line(s) of event code
617 Unique line(s) of event code
91 Component(s)
1609 Line(s) of event code
690 Unique line(s) of event code
Total
17 Page(s)
583 Component(s)
7246 Line(s) of event code
1880 Unique line(s) of event code
19 Page(s)
709 Component(s)
8633 Line(s) of event code
2247 Unique line(s) of event code

View File

@@ -402,7 +402,7 @@ Text tVersion
Horizontal Alignment : center
Vertical Alignment : center
Input Type : character
Text : 45
Text : 47
Max. Text Size : 10
Word wrap : disabled
Horizontal Spacing : 0
@@ -655,6 +655,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -914,6 +914,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -1014,6 +1014,90 @@ Button bModeNext
{
bMode12.pco=1374
}
if(bMode1.txt=="")
{
vis bMode1,0
}else
{
vis bMode1,1
}
if(bMode2.txt=="")
{
vis bMode2,0
}else
{
vis bMode2,1
}
if(bMode3.txt=="")
{
vis bMode3,0
}else
{
vis bMode3,1
}
if(bMode4.txt=="")
{
vis bMode4,0
}else
{
vis bMode4,1
}
if(bMode5.txt=="")
{
vis bMode5,0
}else
{
vis bMode5,1
}
if(bMode6.txt=="")
{
vis bMode6,0
}else
{
vis bMode6,1
}
if(bMode7.txt=="")
{
vis bMode7,0
}else
{
vis bMode7,1
}
if(bMode8.txt=="")
{
vis bMode8,0
}else
{
vis bMode8,1
}
if(bMode9.txt=="")
{
vis bMode9,0
}else
{
vis bMode9,1
}
if(bMode10.txt=="")
{
vis bMode10,0
}else
{
vis bMode10,1
}
if(bMode11.txt=="")
{
vis bMode11,0
}else
{
vis bMode11,1
}
if(bMode12.txt=="")
{
vis bMode12,0
}else
{
vis bMode12,1
}
Timer tmCooldown
Attributes
@@ -1277,6 +1361,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -1035,6 +1035,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -670,6 +670,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -984,6 +984,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -1372,6 +1372,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

File diff suppressed because it is too large Load Diff

View File

@@ -21,7 +21,7 @@ Page screensaver
Events
Preinitialize Event
recmod=1
bauds=115200
baud=115200
vis tInstruction,0
vis tTmp,0
vis p0,0
@@ -126,9 +126,9 @@ Text t10
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 49
y coordinate : 240
Width : 225
x coordinate : 53
y coordinate : 245
Width : 215
Height : 2
Effect : load
Effect Priority : 0
@@ -576,10 +576,10 @@ Text tIcon1
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 8
x coordinate : 0
y coordinate : 227
Width : 33
Height : 30
Width : 45
Height : 45
Effect : load
Effect Priority : 0
Effect Time : 300
@@ -589,7 +589,7 @@ Text tIcon1
Font ID : 1
Back. Color : 0
Font Color : 17299
Horizontal Alignment : center
Horizontal Alignment : left
Vertical Alignment : center
Input Type : character
Text :
@@ -606,10 +606,10 @@ Text tIcon2
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 282
x coordinate : 275
y coordinate : 227
Width : 33
Height : 30
Width : 45
Height : 45
Effect : load
Effect Priority : 0
Effect Time : 300
@@ -619,7 +619,7 @@ Text tIcon2
Font ID : 1
Back. Color : 0
Font Color : 17299
Horizontal Alignment : center
Horizontal Alignment : right
Vertical Alignment : center
Input Type : character
Text :
@@ -817,7 +817,7 @@ Text tNotifyHead
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 257
y coordinate : 272
Width : 320
Height : 58
Effect : load
@@ -847,7 +847,7 @@ Text tNotifyText
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 315
y coordinate : 330
Width : 320
Height : 58
Effect : load
@@ -863,8 +863,8 @@ Text tNotifyText
Vertical Alignment : center
Input Type : character
Text :
Max. Text Size : 35
Word wrap : disabled
Max. Text Size : 120
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
@@ -1065,6 +1065,27 @@ Timer tmSerial
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="statusUpdate")
{
//statusIcon1
spstr strCommand.txt,tIcon1.txt,"~",1
spstr strCommand.txt,tTmp.txt,"~",2
covx tTmp.txt,tIcon1.pco,0,0
//statusIcon2
spstr strCommand.txt,tIcon2.txt,"~",3
spstr strCommand.txt,tTmp.txt,"~",4
covx tTmp.txt,tIcon2.pco,0,0
spstr strCommand.txt,tTmp.txt,"~",5
if(tTmp.txt!="")
{
tIcon1.font=3
}
spstr strCommand.txt,tTmp.txt,"~",6
if(tTmp.txt!="")
{
tIcon2.font=3
}
}
if(tInstruction.txt=="weatherUpdate"&&tNotifyHead.txt==""&&tNotifyText.txt=="")
{
vis tMainIcon,1
@@ -1139,6 +1160,16 @@ Timer tmSerial
spstr strCommand.txt,tIcon2.txt,"~",19
spstr strCommand.txt,tTmp.txt,"~",20
covx tTmp.txt,tIcon2.pco,0,0
spstr strCommand.txt,tTmp.txt,"~",21
if(tTmp.txt!="")
{
tIcon1.font=3
}
spstr strCommand.txt,tTmp.txt,"~",22
if(tTmp.txt!="")
{
tIcon2.font=3
}
}
if(tInstruction.txt=="color"&&tNotifyHead.txt==""&&tNotifyText.txt=="")
{
@@ -1319,6 +1350,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -43,7 +43,7 @@ Page cardAlarm
if(b[sys0].type==98||b[sys0].type==116)
{
b[sys0].bco=defaultBcoColor
b[sys0].pco=defaultFontColor
//b[sys0].pco=defaultFontColor
}
}
if(defaultBcoColor==0)
@@ -63,6 +63,18 @@ Variable (string) entn
Text :
Max. Text Size: 80
Variable (string) nent1
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent2
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) strCommand
Attributes
Scope : local
@@ -482,14 +494,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -514,14 +519,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -640,86 +638,80 @@ Timer tmSerial
{
//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")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
//text arm1
spstr strCommand.txt,arm1.txt,"~",3
spstr strCommand.txt,arm1.txt,"~",14
if(arm1.txt!="")
{
vis arm1,1
}
//id arm1
spstr strCommand.txt,va1.txt,"~",4
spstr strCommand.txt,va1.txt,"~",15
//text arm2
spstr strCommand.txt,arm2.txt,"~",5
spstr strCommand.txt,arm2.txt,"~",16
if(arm2.txt!="")
{
vis arm2,1
}
//id arm2
spstr strCommand.txt,va2.txt,"~",6
spstr strCommand.txt,va2.txt,"~",17
//text arm3
spstr strCommand.txt,arm3.txt,"~",7
spstr strCommand.txt,arm3.txt,"~",18
if(arm3.txt!="")
{
vis arm3,1
}
//id arm3
spstr strCommand.txt,va3.txt,"~",8
spstr strCommand.txt,va3.txt,"~",19
//text arm4
spstr strCommand.txt,arm4.txt,"~",9
spstr strCommand.txt,arm4.txt,"~",20
if(arm4.txt!="")
{
vis arm4,1
}
//id arm4
spstr strCommand.txt,va4.txt,"~",10
spstr strCommand.txt,va4.txt,"~",21
//icon
spstr strCommand.txt,tIcon.txt,"~",11
spstr strCommand.txt,tIcon.txt,"~",22
//icon color
spstr strCommand.txt,tTmp.txt,"~",12
spstr strCommand.txt,tTmp.txt,"~",23
covx tTmp.txt,sys0,0,0
tIcon.pco=sys0
//numpad status
spstr strCommand.txt,tTmp.txt,"~",13
spstr strCommand.txt,tTmp.txt,"~",24
if(tTmp.txt!="disable")
{
vis b0,1
@@ -752,7 +744,7 @@ Timer tmSerial
vis tCode,0
}
//flashing status
spstr strCommand.txt,tTmp.txt,"~",14
spstr strCommand.txt,tTmp.txt,"~",25
if(tTmp.txt=="enable")
{
tmFlash.en=1
@@ -761,13 +753,13 @@ Timer tmSerial
tmFlash.en=0
}
// extra button
spstr strCommand.txt,b9.txt,"~",15
spstr strCommand.txt,b9.txt,"~",26
if(b9.txt!="")
{
vis b9,1
spstr strCommand.txt,tTmp.txt,"~",16
spstr strCommand.txt,tTmp.txt,"~",27
covx tTmp.txt,b9.pco,0,0
spstr strCommand.txt,vaAddBtn.txt,"~",17
spstr strCommand.txt,vaAddBtn.txt,"~",28
}
}
if(tInstruction.txt=="time")
@@ -872,6 +864,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -0,0 +1,739 @@
Page cardChart
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Events
Preinitialize Event
dim=dimValueNormal
vis p0,0
vis tSend,0
vis tInstruction,0
vis tTmp,0
vis tId,0
vis bPrev,0
vis bNext,0
cardChart.bco=defaultBcoColor
vis x0,0
x0.bco=defaultBcoColor
x0.borderc=defaultBcoColor
for(sys0=0;sys0<32;sys0++)
{
if(b[sys0].type==98||b[sys0].type==116)
{
b[sys0].bco=defaultBcoColor
b[sys0].pco=defaultFontColor
}
if(b[sys0].type==53&&defaultBcoColor==6371)
{
b[sys0].pic=1
b[sys0].pic2=2
}
if(b[sys0].type==53&&defaultBcoColor==0)
{
b[sys0].pic=10
b[sys0].pic2=11
}
}
Variable (string) entn
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent1
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent2
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) strCommand
Attributes
Scope : local
Text :
Max. Text Size: 275
Variable (string) strTmp
Attributes
Scope : local
Text :
Max. Text Size: 200
Variable (string) tId
Attributes
Scope : local
Text :
Max. Text Size: 20
Variable (string) tInstruction
Attributes
Scope : local
Text :
Max. Text Size: 20
Variable (string) tSend
Attributes
Scope : local
Text :
Max. Text Size: 200
Variable (string) tTmp
Attributes
Scope : local
Text :
Max. Text Size: 20
Variable (int32) vMax
Attributes
Scope: local
Value: 0
Variable (int32) vNValues
Attributes
Scope: local
Value: 0
Variable (int32) vaBottom
Attributes
Scope: local
Value: 0
Variable (int32) vaColorD
Attributes
Scope: local
Value: 0
Variable (int32) vaColorL
Attributes
Scope: local
Value: 0
Variable (int32) vaLast
Attributes
Scope: local
Value: 4294967295
Variable (int32) vaLeft
Attributes
Scope: local
Value: 0
Variable (int32) vaUnit
Attributes
Scope: local
Value: 0
Variable (int32) vaValue
Attributes
Scope: local
Value: 0
Variable (string) vaValues
Attributes
Scope : local
Text :
Max. Text Size: 100
Variable (int32) vaYUnit
Attributes
Scope: local
Value: 0
XFloat x0
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
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 40
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,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button 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,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Hotspot m0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Events
Touch Press Event
if(vaLast.val>=0)
{
// spstr vaValues.txt,tTmp.txt,"~",vaLast.val
// covx tTmp.txt,vaValue.val,0,0
sys1=vaLast.val*5*vaUnit.val
sys1+=vaLeft.val
sya0=sys1/100
sya1=vaUnit.val*4+sys1/100
if(vaValue.val==0)
{
line sya0,vaBottom.val,sya1,vaBottom.val,vaColorD.val
}else
{
sys0=0
if(vaValue.val<0)
{
vaValue.val*=-1
sys0=1
}
fill sya0+1,-1*vaYUnit.val*vaValue.val+vaBottom.val+1,vaUnit.val*4/100,vaYUnit.val*vaValue.val-1,vaColorD.val
// line sya0+1,-10*vaValue.val+vaBottom.val,sya1-1,-10*vaValue.val+vaBottom.val,vaColorL.val
draw sya0,-1*vaYUnit.val*vaValue.val+vaBottom.val+1,sya1,vaBottom.val,vaColorL.val
if(sys0!=0)
{
sya1=-1*vaYUnit.val*vaValue.val+vaBottom.val
for(sys0=vaBottom.val;sys0>=sya1;sys0-=10)
{
sys2=sys0-5
if(sys2<sya1)
{
sys2=sya1
}
line vaUnit.val*2+sys1/100,sys0,vaUnit.val*2+sys1/100,sys2,vaColorL.val
}
}
}
}
sys0=tch0-m0.x-25-40*100/vaUnit.val
sys1=sys0%5
if(sys1<4&&sys0>=0)
{
vis x0,1
vaLast.val=sys0/5
// n0.val=sys0/5
spstr vaValues.txt,tTmp.txt,"~",vaLast.val
covx tTmp.txt,vaValue.val,0,0
// t0.txt=tTmp.txt
sys1=vaLast.val*5*vaUnit.val
sys1+=vaLeft.val
sya0=sys1/100
sya1=vaUnit.val*4+sys1/100
if(vaValue.val==0)
{
line sya0,vaBottom.val,sya1,vaBottom.val,vaColorL.val
x0.val=vaValue.val
}else
{
if(vaValue.val<0)
{
fill sya0+1,vaYUnit.val*vaValue.val+vaBottom.val+1,vaUnit.val*4/100,-1*vaYUnit.val*vaValue.val-1,vaColorL.val
x0.val=vaValue.val*-1
}else
{
fill sya0+1,-1*vaYUnit.val*vaValue.val+vaBottom.val+1,vaUnit.val*4/100,vaYUnit.val*vaValue.val-1,vaColorL.val
x0.val=vaValue.val
}
}
}else
{
vis x0,0
vaLast.val=-1
}
Hotspot mSwipeNext
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Events
Touch Press Event
click bNext,1
Hotspot mSwipePrev
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Events
Touch Press Event
click bPrev,1
Hotspot mSwipeUp
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Events
Touch Press Event
click bPrev,1
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
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")
{
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
}
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
}
// extract color
spstr strCommand.txt,tTmp.txt,"~",14
covx tTmp.txt,vaColorL.val,0,0
// prepare dark color
sys0=vaColorL.val>>11 // red
vaColorD.val=sys0*8/10<<11 // store and shift
sys0=vaColorL.val>>5%64 // green
vaColorD.val=sys0*8/10<<5+vaColorD.val // store and shift
sys0=vaColorL.val%32
vaColorD.val=sys0*8/10+vaColorD.val // store and add
//
// detect nValues and maxValue
vNValues.val=0
spstr strCommand.txt,tTmp.txt,"~",vNValues.val+17
strlen tTmp.txt,sya0
while(sya0>0)
{
covx tTmp.txt,sya1,0,0
if(sya1>vMax.val)
{
vMax.val=sya1
}
// next
vNValues.val++
spstr strCommand.txt,tTmp.txt,"~",vNValues.val+17
strlen tTmp.txt,sya0
}
//
// calculate unit width
sys0=vNValues.val*4
sys0+=vNValues.val-1
vaUnit.val=m0.w-25-40*100
vaUnit.val/=sys0
vaBottom.val=m0.y+m0.h-24
vaLeft.val=m0.x+25+40*100
vaYUnit.val=m0.h-24/vMax.val
//
line m0.x+25+40-10,m0.y,m0.x+25+40-10,vaBottom.val+10,14823
line m0.x+25+40-5,vaBottom.val,m0.x+25+40-15,vaBottom.val,14823
spstr strCommand.txt,strTmp.txt,"~",16
sya1=0
spstr strTmp.txt,tTmp.txt,":",sya1
strlen tTmp.txt,sya0
while(sya0>0)
{
covx tTmp.txt,sys1,0,0
if(sys1<=vMax.val)
{
line m0.x+25+40-5,-1*vaYUnit.val*sys1+vaBottom.val,m0.x+25+40-15,-1*vaYUnit.val*sys1+vaBottom.val,14823
sys2=sys1%10
sys1/=10
if(sys1>0)
{
covx sys1,tTmp.txt,0,0
}else
{
tTmp.txt=""
}
if(sys2!=0)
{
covx sys2,tId.txt,0,0
tTmp.txt=tTmp.txt+"."+tId.txt
}
xstr m0.x+28,sys1*10+sys2*-1*vaYUnit.val+vaBottom.val-10,20,20,0,defaultFontColor,RED,2,1,3,tTmp.txt
}
// next
sya1++
spstr strTmp.txt,tTmp.txt,":",sya1
strlen tTmp.txt,sya0
}
//
// y achis label
spstr strCommand.txt,tTmp.txt,"~",15
// tTmp.txt="Gas [kW]"
strlen tTmp.txt,sys1
sya1=sys1*12+m0.h-48/2
for(sys0=0;sys0<sys1;sys0++)
{
substr tTmp.txt,strTmp.txt,sys0,1
xstr m0.x,sys0*-12+m0.y+sya1,30,20,6,defaultFontColor,RED,2,1,3,strTmp.txt
}
for(sys0=0;sys0<vNValues.val;sys0++)
{
if(sys0>0)
{
vaValues.txt+="~"
}
// extract next entry
spstr strCommand.txt,tTmp.txt,"~",sys0+17
// calculate left
sys1=sys0*5*vaUnit.val
sys1+=vaLeft.val
// if there is a colon in the obtained value we have a label/and gridline
spstr tTmp.txt,strTmp.txt,"^",1
strlen strTmp.txt,sya0
if(sya0>0)
{
// we have a label!!!
// -> extract label
sys2=vaUnit.val*2+sys1/100
// draw label
xstr sya0*-6+sys2,vaBottom.val+2,sya0*12,22,0,defaultFontColor,defaultBcoColor,1,1,3,strTmp.txt
// draw line
// line sys2,vaBottom.val,sys2,m0.y,defaultFontColor
sya1=1
//spstr tTmp.txt,strTmp.txt,":",0
spstr tTmp.txt,tTmp.txt,":",0
vaValues.txt+="-"
}else
{
sya1=0
}
vaValues.txt+=tTmp.txt
covx tTmp.txt,vaValue.val,0,0
sya0=sys1/100
if(vaValue.val==0)
{
line sya0,vaBottom.val,vaUnit.val*4+sys1/100,vaBottom.val,vaColorD.val
}else
{
fill sya0+1,-1*vaYUnit.val*vaValue.val+vaBottom.val+1,vaUnit.val*4/100,vaYUnit.val*vaValue.val-1,vaColorD.val
line sya0+1,-1*vaYUnit.val*vaValue.val+vaBottom.val,vaUnit.val*4+sys1/100-1,-1*vaYUnit.val*vaValue.val+vaBottom.val,vaColorL.val
draw sya0,-1*vaYUnit.val*vaValue.val+vaBottom.val+1,vaUnit.val*4+sys1/100,vaBottom.val,vaColorL.val
}
if(sya1>0)
{
sya1=-1*vaYUnit.val*vaValue.val+vaBottom.val
for(sya0=vaBottom.val-5;sya0>m0.y;sya0-=10)
{
sys1=sya0+5
if(sya0>=sya1)
{
line sys2,sya0,sys2,sys1,vaColorL.val
}else
{
if(sys1>=sya1)
{
line sys2,sya0,sys2,sya1-1,14823
line sys2,sya1,sys2,sys1,vaColorL.val
}else
{
line sys2,sya0,sys2,sys1,14823
}
}
}
}
}
}
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
// get value normal
spstr strCommand.txt,tTmp.txt,"~",2
covx tTmp.txt,dimValueNormal,0,0
dim=dimValueNormal
// get background color
spstr strCommand.txt,tTmp.txt,"~",3
if(tTmp.txt!="")
{
covx tTmp.txt,defaultBcoColor,0,0
}
// get font color
spstr strCommand.txt,tTmp.txt,"~",4
if(tTmp.txt!="")
{
covx tTmp.txt,defaultFontColor,0,0
}
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="pageType")
{
sleepValue=0
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
spstr strCommand.txt,pageIcons.tTmp3.txt,"~",4
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="screensaver")
{
page screensaver
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="popupShutter")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupShutter
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardThermo")
{
page cardThermo
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
if(tId.txt=="cardQR")
{
page cardQR
}
if(tId.txt=="cardPower")
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// 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,2
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

File diff suppressed because it is too large Load Diff

View File

@@ -16,7 +16,7 @@ Page cardGrid
//remove background & activate reparse mode
vis p0,0
recmod=1
bauds=115200
baud=115200
//debug stuff
vis tTmp,0
vis tSend,0
@@ -82,11 +82,23 @@ Variable (string) entn6
Text :
Max. Text Size: 80
Variable (string) nent1
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent2
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) strCommand
Attributes
Scope : local
Text :
Max. Text Size: 500
Max. Text Size: 700
Variable (string) tSend
Attributes
@@ -258,6 +270,14 @@ Button bEntity1
{
page popupShutter
}
if(type1.txt=="input_sel")
{
page popupInSel
}
if(type1.txt=="timer")
{
page popupTimer
}
Touch Release Event
tmLP.en=0
@@ -295,6 +315,14 @@ Button bEntity2
{
page popupShutter
}
if(type2.txt=="input_sel")
{
page popupInSel
}
if(type2.txt=="timer")
{
page popupTimer
}
Touch Release Event
tmLP.en=0
@@ -332,6 +360,14 @@ Button bEntity3
{
page popupShutter
}
if(type3.txt=="input_sel")
{
page popupInSel
}
if(type3.txt=="timer")
{
page popupTimer
}
Touch Release Event
tmLP.en=0
@@ -369,6 +405,14 @@ Button bEntity4
{
page popupShutter
}
if(type4.txt=="input_sel")
{
page popupInSel
}
if(type4.txt=="timer")
{
page popupTimer
}
Touch Release Event
tmLP.en=0
@@ -406,6 +450,14 @@ Button bEntity5
{
page popupShutter
}
if(type5.txt=="input_sel")
{
page popupInSel
}
if(type5.txt=="timer")
{
page popupTimer
}
Touch Release Event
tmLP.en=0
@@ -443,6 +495,14 @@ Button bEntity6
{
page popupShutter
}
if(type6.txt=="input_sel")
{
page popupInSel
}
if(type6.txt=="timer")
{
page popupTimer
}
Touch Release Event
tmLP.en=0
@@ -471,14 +531,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardGrid,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -503,14 +556,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardGrid,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -589,10 +635,6 @@ Timer tmLP
{
page popupFan
}
if(tTmp.txt=="input_sel")
{
page popupInSel
}
Timer tmSerial
Attributes
@@ -649,50 +691,44 @@ Timer tmSerial
{
// command format: entityUpd,heading,navigation,[,type,internalName,iconId,iconColor,displayName,optionalValue]x6
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
// get Type
spstr strCommand.txt,type1.txt,"~",3
spstr strCommand.txt,type1.txt,"~",14
// get internal name
spstr strCommand.txt,entn1.txt,"~",4
spstr strCommand.txt,entn1.txt,"~",15
if(type1.txt=="delete"||type1.txt=="")
{
vis tEntity1,0
@@ -700,20 +736,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity1.txt,"~",5
spstr strCommand.txt,bEntity1.txt,"~",16
vis bEntity1,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",6
spstr strCommand.txt,tTmp.txt,"~",17
covx tTmp.txt,sys0,0,0
bEntity1.pco=sys0
// set name
spstr strCommand.txt,tEntity1.txt,"~",7
spstr strCommand.txt,tEntity1.txt,"~",18
vis tEntity1,1
}
// get Type
spstr strCommand.txt,type2.txt,"~",9
spstr strCommand.txt,type2.txt,"~",20
// get internal name
spstr strCommand.txt,entn2.txt,"~",10
spstr strCommand.txt,entn2.txt,"~",21
if(type2.txt=="delete"||type2.txt=="")
{
vis tEntity2,0
@@ -721,20 +757,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity2.txt,"~",11
spstr strCommand.txt,bEntity2.txt,"~",22
vis bEntity2,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",12
spstr strCommand.txt,tTmp.txt,"~",23
covx tTmp.txt,sys0,0,0
bEntity2.pco=sys0
// set name
spstr strCommand.txt,tEntity2.txt,"~",13
spstr strCommand.txt,tEntity2.txt,"~",24
vis tEntity2,1
}
// get Type
spstr strCommand.txt,type3.txt,"~",15
spstr strCommand.txt,type3.txt,"~",26
// get internal name
spstr strCommand.txt,entn3.txt,"~",16
spstr strCommand.txt,entn3.txt,"~",27
if(type3.txt=="delete"||type3.txt=="")
{
vis tEntity3,0
@@ -742,20 +778,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity3.txt,"~",17
spstr strCommand.txt,bEntity3.txt,"~",28
vis bEntity3,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",18
spstr strCommand.txt,tTmp.txt,"~",29
covx tTmp.txt,sys0,0,0
bEntity3.pco=sys0
// set name
spstr strCommand.txt,tEntity3.txt,"~",19
spstr strCommand.txt,tEntity3.txt,"~",30
vis tEntity3,1
}
// get Type
spstr strCommand.txt,type4.txt,"~",21
spstr strCommand.txt,type4.txt,"~",32
// get internal name
spstr strCommand.txt,entn4.txt,"~",22
spstr strCommand.txt,entn4.txt,"~",33
if(type4.txt=="delete"||type4.txt=="")
{
vis tEntity4,0
@@ -763,20 +799,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity4.txt,"~",23
spstr strCommand.txt,bEntity4.txt,"~",34
vis bEntity4,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",24
spstr strCommand.txt,tTmp.txt,"~",35
covx tTmp.txt,sys0,0,0
bEntity4.pco=sys0
// set name
spstr strCommand.txt,tEntity4.txt,"~",25
spstr strCommand.txt,tEntity4.txt,"~",36
vis tEntity4,1
}
// get Type
spstr strCommand.txt,type5.txt,"~",27
spstr strCommand.txt,type5.txt,"~",38
// get internal name
spstr strCommand.txt,entn5.txt,"~",28
spstr strCommand.txt,entn5.txt,"~",39
if(type5.txt=="delete"||type5.txt=="")
{
vis tEntity5,0
@@ -784,20 +820,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity5.txt,"~",29
spstr strCommand.txt,bEntity5.txt,"~",40
vis bEntity5,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",30
spstr strCommand.txt,tTmp.txt,"~",41
covx tTmp.txt,sys0,0,0
bEntity5.pco=sys0
// set name
spstr strCommand.txt,tEntity5.txt,"~",31
spstr strCommand.txt,tEntity5.txt,"~",42
vis tEntity5,1
}
// get Type
spstr strCommand.txt,type6.txt,"~",33
spstr strCommand.txt,type6.txt,"~",44
// get internal name
spstr strCommand.txt,entn6.txt,"~",34
spstr strCommand.txt,entn6.txt,"~",45
if(type6.txt=="delete"||type6.txt=="")
{
vis tEntity6,0
@@ -805,14 +841,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity6.txt,"~",35
spstr strCommand.txt,bEntity6.txt,"~",46
vis bEntity6,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",36
spstr strCommand.txt,tTmp.txt,"~",47
covx tTmp.txt,sys0,0,0
bEntity6.pco=sys0
// set name
spstr strCommand.txt,tEntity6.txt,"~",37
spstr strCommand.txt,tEntity6.txt,"~",48
vis tEntity6,1
}
}
@@ -880,6 +916,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
if(tInstruction.txt=="time")
{

File diff suppressed because it is too large Load Diff

View File

@@ -57,6 +57,18 @@ Page cardPower
}
}
Variable (string) nent1
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent2
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) strCommand
Attributes
Scope : local
@@ -346,14 +358,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardPower,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -378,14 +383,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -555,63 +553,57 @@ Timer tmSerial
{
// command format: entityUpd,heading,navigation,colorHome,iconHome[,iconColor,icon,speed,valueUp,valueDown]x6
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
// icon color home
spstr strCommand.txt,tTmp.txt,"~",3
spstr strCommand.txt,tTmp.txt,"~",14
covx tTmp.txt,t1.pco,0,0
// icon home
spstr strCommand.txt,t1.txt,"~",4
spstr strCommand.txt,t1.txt,"~",15
// text home
spstr strCommand.txt,tHome.txt,"~",5
spstr strCommand.txt,tHome.txt,"~",16
// iconColor
spstr strCommand.txt,tTmp.txt,"~",6
spstr strCommand.txt,tTmp.txt,"~",17
covx tTmp.txt,t0Icon.pco,0,0
// icon
spstr strCommand.txt,t0Icon.txt,"~",7
spstr strCommand.txt,t0Icon.txt,"~",18
// speed
spstr strCommand.txt,tTmp.txt,"~",8
spstr strCommand.txt,tTmp.txt,"~",19
covx tTmp.txt,t0Speed.val,0,0
// lower text
spstr strCommand.txt,t0u.txt,"~",9
spstr strCommand.txt,t0u.txt,"~",20
if(t0Icon.txt!="")
{
vis t0Icon,1
@@ -624,15 +616,15 @@ Timer tmSerial
vis h0,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",10
spstr strCommand.txt,tTmp.txt,"~",21
covx tTmp.txt,t1Icon.pco,0,0
// icon
spstr strCommand.txt,t1Icon.txt,"~",11
spstr strCommand.txt,t1Icon.txt,"~",22
// speed
spstr strCommand.txt,tTmp.txt,"~",12
spstr strCommand.txt,tTmp.txt,"~",23
covx tTmp.txt,t1Speed.val,0,0
// lower text
spstr strCommand.txt,t1u.txt,"~",13
spstr strCommand.txt,t1u.txt,"~",24
if(t1Icon.txt!="")
{
vis t1Icon,1
@@ -645,15 +637,15 @@ Timer tmSerial
vis h1,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",14
spstr strCommand.txt,tTmp.txt,"~",25
covx tTmp.txt,t2Icon.pco,0,0
// icon
spstr strCommand.txt,t2Icon.txt,"~",15
spstr strCommand.txt,t2Icon.txt,"~",26
// speed
spstr strCommand.txt,tTmp.txt,"~",16
spstr strCommand.txt,tTmp.txt,"~",27
covx tTmp.txt,t2Speed.val,0,0
// lower text
spstr strCommand.txt,t2u.txt,"~",17
spstr strCommand.txt,t2u.txt,"~",28
if(t2Icon.txt!="")
{
vis t2Icon,1
@@ -666,15 +658,15 @@ Timer tmSerial
vis h2,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",18
spstr strCommand.txt,tTmp.txt,"~",29
covx tTmp.txt,t3Icon.pco,0,0
// icon
spstr strCommand.txt,t3Icon.txt,"~",19
spstr strCommand.txt,t3Icon.txt,"~",30
// speed
spstr strCommand.txt,tTmp.txt,"~",20
spstr strCommand.txt,tTmp.txt,"~",31
covx tTmp.txt,t3Speed.val,0,0
// lower text
spstr strCommand.txt,t3u.txt,"~",21
spstr strCommand.txt,t3u.txt,"~",32
if(t3Icon.txt!="")
{
vis t3Icon,1
@@ -687,15 +679,15 @@ Timer tmSerial
vis h3,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",22
spstr strCommand.txt,tTmp.txt,"~",33
covx tTmp.txt,t4Icon.pco,0,0
// icon
spstr strCommand.txt,t4Icon.txt,"~",23
spstr strCommand.txt,t4Icon.txt,"~",34
// speed
spstr strCommand.txt,tTmp.txt,"~",24
spstr strCommand.txt,tTmp.txt,"~",35
covx tTmp.txt,t4Speed.val,0,0
// lower text
spstr strCommand.txt,t4u.txt,"~",25
spstr strCommand.txt,t4u.txt,"~",36
if(t4Icon.txt!="")
{
vis t4Icon,1
@@ -708,15 +700,15 @@ Timer tmSerial
vis h4,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",26
spstr strCommand.txt,tTmp.txt,"~",37
covx tTmp.txt,t5Icon.pco,0,0
// icon
spstr strCommand.txt,t5Icon.txt,"~",27
spstr strCommand.txt,t5Icon.txt,"~",38
// speed
spstr strCommand.txt,tTmp.txt,"~",28
spstr strCommand.txt,tTmp.txt,"~",39
covx tTmp.txt,t5Speed.val,0,0
// lower text
spstr strCommand.txt,t5u.txt,"~",29
spstr strCommand.txt,t5u.txt,"~",40
if(t5Icon.txt!="")
{
vis t5Icon,1
@@ -793,6 +785,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
if(tInstruction.txt=="time")
{

View File

@@ -70,11 +70,23 @@ Variable (string) entn2
Text :
Max. Text Size: 80
Variable (string) nent1
Attributes
Scope : local
Text :
Max. Text Size: 50
Variable (string) nent2
Attributes
Scope : local
Text :
Max. Text Size: 50
Variable (string) strCommand
Attributes
Scope : local
Text :
Max. Text Size: 275
Max. Text Size: 400
Variable (string) tId
Attributes
@@ -187,14 +199,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardQR,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -219,14 +224,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -446,52 +444,46 @@ Timer tmSerial
// command format: entityUpd,heading,navigation,textQR[,type,internalName,iconId,displayName,optionalValue]x2
//tHeading
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
//text qrcode
spstr strCommand.txt,vaQR.txt,"~",3
spstr strCommand.txt,vaQR.txt,"~",14
// get Type
spstr strCommand.txt,type1.txt,"~",4
spstr strCommand.txt,type1.txt,"~",15
// get internal name
spstr strCommand.txt,entn1.txt,"~",5
spstr strCommand.txt,entn1.txt,"~",16
if(type1.txt=="delete"||type1.txt=="")
{
vis btOnOff1,0
@@ -501,14 +493,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,tIcon1.txt,"~",6
spstr strCommand.txt,tIcon1.txt,"~",17
vis tIcon1,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",7
spstr strCommand.txt,tTmp.txt,"~",18
covx tTmp.txt,sys0,0,0
tIcon1.pco=sys0
// set name
spstr strCommand.txt,tEntity1.txt,"~",8
spstr strCommand.txt,tEntity1.txt,"~",19
vis tEntity1,1
}
if(type1.txt=="light")
@@ -516,7 +508,7 @@ Timer tmSerial
vis btOnOff1,1
vis bText1,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",9
spstr strCommand.txt,tTmp.txt,"~",20
covx tTmp.txt,sys0,0,0
btOnOff1.val=sys0
}
@@ -525,7 +517,7 @@ Timer tmSerial
vis btOnOff1,1
vis bText1,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",9
spstr strCommand.txt,tTmp.txt,"~",20
covx tTmp.txt,sys0,0,0
btOnOff1.val=sys0
}
@@ -537,7 +529,7 @@ Timer tmSerial
bText1.pco=65535
bText1.pco2=65535
// get Text (optional Value)
spstr strCommand.txt,bText1.txt,"~",9
spstr strCommand.txt,bText1.txt,"~",20
}
if(type1.txt=="button")
{
@@ -547,12 +539,12 @@ Timer tmSerial
bText1.pco=1374
bText1.pco2=1374
// get Text (optional Value)
spstr strCommand.txt,bText1.txt,"~",9
spstr strCommand.txt,bText1.txt,"~",20
}
// get Type
spstr strCommand.txt,type2.txt,"~",10
spstr strCommand.txt,type2.txt,"~",21
// get internal name
spstr strCommand.txt,entn2.txt,"~",11
spstr strCommand.txt,entn2.txt,"~",22
if(type2.txt=="delete"||type2.txt=="")
{
vis btOnOff2,0
@@ -562,14 +554,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,tIcon2.txt,"~",12
spstr strCommand.txt,tIcon2.txt,"~",23
vis tIcon2,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",13
spstr strCommand.txt,tTmp.txt,"~",24
covx tTmp.txt,sys0,0,0
tIcon2.pco=sys0
// set name
spstr strCommand.txt,tEntity2.txt,"~",14
spstr strCommand.txt,tEntity2.txt,"~",25
vis tEntity2,1
}
if(type2.txt=="light")
@@ -577,7 +569,7 @@ Timer tmSerial
vis btOnOff2,1
vis bText2,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",15
spstr strCommand.txt,tTmp.txt,"~",26
covx tTmp.txt,sys0,0,0
btOnOff2.val=sys0
}
@@ -586,7 +578,7 @@ Timer tmSerial
vis btOnOff2,1
vis bText2,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",15
spstr strCommand.txt,tTmp.txt,"~",26
covx tTmp.txt,sys0,0,0
btOnOff2.val=sys0
}
@@ -598,7 +590,7 @@ Timer tmSerial
bText2.pco=65535
bText2.pco2=65535
// get Text (optional Value)
spstr strCommand.txt,bText2.txt,"~",15
spstr strCommand.txt,bText2.txt,"~",26
}
if(type2.txt=="button")
{
@@ -608,7 +600,7 @@ Timer tmSerial
bText2.pco=1374
bText2.pco2=1374
// get Text (optional Value)
spstr strCommand.txt,bText2.txt,"~",15
spstr strCommand.txt,bText2.txt,"~",26
}
if(type2.txt=="delete"||type2.txt=="")
{
@@ -723,6 +715,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -63,11 +63,23 @@ Variable (string) entn
Text :
Max. Text Size: 80
Variable (string) nent1
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent2
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) strCommand
Attributes
Scope : local
Text :
Max. Text Size: 250
Max. Text Size: 750
Variable (string) tId
Attributes
@@ -294,14 +306,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardThermo,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -326,14 +331,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardThermo,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -362,28 +360,7 @@ Dual-state Button bDown2
{
xTempDest2.val=xTempDest2.val-xTempStep1.val
}
// event,buttonPress2,entn,tempUpd,X
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="tempUpdHighLow,"
//convert temperature
covx xTempDest1.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
tSend.txt+="|"
covx xTempDest2.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,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
tmSendHighLow.en=1
Dual-state Button bUp2
Attributes
@@ -401,28 +378,7 @@ Dual-state Button bUp2
{
xTempDest2.val=xTempDest2.val+xTempStep1.val
}
// event,buttonPress2,entn,tempUpd,X
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="tempUpdHighLow,"
//convert temperature
covx xTempDest1.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
tSend.txt+="|"
covx xTempDest2.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,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
tmSendHighLow.en=1
Dual-state Button bt0
Attributes
@@ -672,25 +628,7 @@ Dual-state Button btDown
{
xTempDest.val=xTempDest.val-xTempStep1.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,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
tmSendTemp.en=1
Dual-state Button btDown1
Attributes
@@ -708,28 +646,7 @@ Dual-state Button btDown1
{
xTempDest1.val=xTempDest1.val-xTempStep1.val
}
// event,buttonPress2,entn,tempUpd,X
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="tempUpdHighLow,"
//convert temperature
covx xTempDest1.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
tSend.txt+="|"
covx xTempDest2.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,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
tmSendHighLow.en=1
Dual-state Button btUp
Attributes
@@ -747,25 +664,7 @@ Dual-state Button btUp
{
xTempDest.val=xTempDest.val+xTempStep1.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,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
tmSendTemp.en=1
Dual-state Button btUp1
Attributes
@@ -783,28 +682,7 @@ Dual-state Button btUp1
{
xTempDest1.val=xTempDest1.val+xTempStep1.val
}
// event,buttonPress2,entn,tempUpd,X
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="tempUpdHighLow,"
//convert temperature
covx xTempDest1.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
tSend.txt+="|"
covx xTempDest2.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,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
tmSendHighLow.en=1
Hotspot mSwipeNext
Attributes
@@ -839,6 +717,67 @@ Hotspot mSwipeUp
Touch Press Event
click bPrev,1
Timer tmSendHighLow
Attributes
Scope : local
Period (ms): 800
Enabled : no
Events
Timer Event
// event,buttonPress2,entn,tempUpd,X
//craft command
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="tempUpdHighLow,"
//convert temperature
covx xTempDest1.val,tTmp.txt,0,0
tSend.txt+=tTmp.txt
tSend.txt+="|"
covx xTempDest2.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,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
tmSendHighLow.en=0
Timer tmSendTemp
Attributes
Scope : local
Period (ms): 800
Enabled : no
Events
Timer Event
// 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,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
tmSendTemp.en=0
Timer tmSerial
Attributes
Scope : local
@@ -894,64 +833,58 @@ Timer tmSerial
{
//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")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
//entity name
spstr strCommand.txt,entn.txt,"~",3
spstr strCommand.txt,entn.txt,"~",14
//currentTemp
spstr strCommand.txt,tCurTemp.txt,"~",4
spstr strCommand.txt,tCurTemp.txt,"~",15
//dstTemp
spstr strCommand.txt,tTmp.txt,"~",5
spstr strCommand.txt,tTmp.txt,"~",16
covx tTmp.txt,xTempDest1.val,0,0
xTempDest.val=xTempDest1.val
//status
spstr strCommand.txt,tStatus.txt,"~",6
spstr strCommand.txt,tStatus.txt,"~",17
//minTemp
spstr strCommand.txt,tTmp.txt,"~",7
spstr strCommand.txt,tTmp.txt,"~",18
covx tTmp.txt,xTempMin1.val,0,0
//maxTemp
spstr strCommand.txt,tTmp.txt,"~",8
spstr strCommand.txt,tTmp.txt,"~",19
covx tTmp.txt,xTempMax1.val,0,0
//tempStep
spstr strCommand.txt,tTmp.txt,"~",9
spstr strCommand.txt,tTmp.txt,"~",20
covx tTmp.txt,xTempStep1.val,0,0
// disable all buttons
vis bt0,0
@@ -963,137 +896,137 @@ Timer tmSerial
vis bt6,0
vis bt7,0
//bt0
spstr strCommand.txt,bt0.txt,"~",10
spstr strCommand.txt,bt0.txt,"~",21
if(bt0.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",11
spstr strCommand.txt,tTmp.txt,"~",22
covx tTmp.txt,bt0.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",12
spstr strCommand.txt,tTmp.txt,"~",23
covx tTmp.txt,bt0.val,0,0
// save action
spstr strCommand.txt,va0.txt,"~",13
spstr strCommand.txt,va0.txt,"~",24
//enable
vis bt0,1
}
//bt1
spstr strCommand.txt,bt1.txt,"~",14
spstr strCommand.txt,bt1.txt,"~",25
if(bt1.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",15
spstr strCommand.txt,tTmp.txt,"~",26
covx tTmp.txt,bt1.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",16
spstr strCommand.txt,tTmp.txt,"~",27
covx tTmp.txt,bt1.val,0,0
// save action
spstr strCommand.txt,va1.txt,"~",17
spstr strCommand.txt,va1.txt,"~",28
//enable
vis bt1,1
}
//bt2
spstr strCommand.txt,bt2.txt,"~",18
spstr strCommand.txt,bt2.txt,"~",29
if(bt2.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",19
spstr strCommand.txt,tTmp.txt,"~",30
covx tTmp.txt,bt2.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",20
spstr strCommand.txt,tTmp.txt,"~",31
covx tTmp.txt,bt2.val,0,0
// save action
spstr strCommand.txt,va2.txt,"~",21
spstr strCommand.txt,va2.txt,"~",32
//enable
vis bt2,1
}
//bt3
spstr strCommand.txt,bt3.txt,"~",22
spstr strCommand.txt,bt3.txt,"~",33
if(bt3.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",23
spstr strCommand.txt,tTmp.txt,"~",34
covx tTmp.txt,bt3.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",24
spstr strCommand.txt,tTmp.txt,"~",35
covx tTmp.txt,bt3.val,0,0
// save action
spstr strCommand.txt,va3.txt,"~",25
spstr strCommand.txt,va3.txt,"~",36
//enable
vis bt3,1
}
//bt4
spstr strCommand.txt,bt4.txt,"~",26
spstr strCommand.txt,bt4.txt,"~",37
if(bt4.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",27
spstr strCommand.txt,tTmp.txt,"~",38
covx tTmp.txt,bt4.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",28
spstr strCommand.txt,tTmp.txt,"~",39
covx tTmp.txt,bt4.val,0,0
// save action
spstr strCommand.txt,va4.txt,"~",29
spstr strCommand.txt,va4.txt,"~",40
//enable
vis bt4,1
}
//bt5
spstr strCommand.txt,bt5.txt,"~",30
spstr strCommand.txt,bt5.txt,"~",41
if(bt5.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",31
spstr strCommand.txt,tTmp.txt,"~",42
covx tTmp.txt,bt5.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",32
spstr strCommand.txt,tTmp.txt,"~",43
covx tTmp.txt,bt5.val,0,0
// save action
spstr strCommand.txt,va5.txt,"~",33
spstr strCommand.txt,va5.txt,"~",44
//enable
vis bt5,1
}
//bt6
spstr strCommand.txt,bt6.txt,"~",34
spstr strCommand.txt,bt6.txt,"~",45
if(bt6.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",35
spstr strCommand.txt,tTmp.txt,"~",46
covx tTmp.txt,bt6.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",36
spstr strCommand.txt,tTmp.txt,"~",47
covx tTmp.txt,bt6.val,0,0
// save action
spstr strCommand.txt,va6.txt,"~",37
spstr strCommand.txt,va6.txt,"~",48
//enable
vis bt6,1
}
//bt7
spstr strCommand.txt,bt7.txt,"~",38
spstr strCommand.txt,bt7.txt,"~",49
if(bt7.txt!="")
{
// set text color on active state
spstr strCommand.txt,tTmp.txt,"~",39
spstr strCommand.txt,tTmp.txt,"~",50
covx tTmp.txt,bt7.pco2,0,0
// set state
spstr strCommand.txt,tTmp.txt,"~",40
spstr strCommand.txt,tTmp.txt,"~",51
covx tTmp.txt,bt7.val,0,0
// save action
spstr strCommand.txt,va7.txt,"~",41
spstr strCommand.txt,va7.txt,"~",52
//enable
vis bt7,1
}
//Text tCurTempLbl
spstr strCommand.txt,tCurTempLbl.txt,"~",42
spstr strCommand.txt,tCurTempLbl.txt,"~",53
//Text tStateLbl
spstr strCommand.txt,tStateLbl.txt,"~",43
spstr strCommand.txt,tStateLbl.txt,"~",54
//Text tALbl
//spstr strCommand.txt,tALbl.txt,"~",44
//spstr strCommand.txt,tALbl.txt,"~",55
//Text tCF
spstr strCommand.txt,tCF.txt,"~",45
spstr strCommand.txt,tCF.txt,"~",56
tCF1.txt=tCF.txt
tCF2.txt=tCF.txt
//Second Temperature
spstr strCommand.txt,tTmp.txt,"~",46
spstr strCommand.txt,tTmp.txt,"~",57
if(tTmp.txt!="")
{
covx tTmp.txt,xTempDest2.val,0,0
@@ -1111,8 +1044,8 @@ Timer tmSerial
vis tCF2,1
}
//Show btDetail
spstr strCommand.txt,tTmp.txt,"~",47
if(tTmp.txt=="1")
spstr strCommand.txt,tTmp.txt,"~",58
if(tTmp.txt!="1")
{
vis btDetail,1
}else
@@ -1184,6 +1117,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
if(tInstruction.txt=="time")
{

View File

@@ -152,7 +152,7 @@ Text tVersion
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : 45
Text : 47
Max. Text Size : 10
Picture p0
@@ -360,6 +360,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -623,6 +623,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -636,6 +636,90 @@ Button bModeNext
{
bMode12.pco=1374
}
if(bMode1.txt=="")
{
vis bMode1,0
}else
{
vis bMode1,1
}
if(bMode2.txt=="")
{
vis bMode2,0
}else
{
vis bMode2,1
}
if(bMode3.txt=="")
{
vis bMode3,0
}else
{
vis bMode3,1
}
if(bMode4.txt=="")
{
vis bMode4,0
}else
{
vis bMode4,1
}
if(bMode5.txt=="")
{
vis bMode5,0
}else
{
vis bMode5,1
}
if(bMode6.txt=="")
{
vis bMode6,0
}else
{
vis bMode6,1
}
if(bMode7.txt=="")
{
vis bMode7,0
}else
{
vis bMode7,1
}
if(bMode8.txt=="")
{
vis bMode8,0
}else
{
vis bMode8,1
}
if(bMode9.txt=="")
{
vis bMode9,0
}else
{
vis bMode9,1
}
if(bMode10.txt=="")
{
vis bMode10,0
}else
{
vis bMode10,1
}
if(bMode11.txt=="")
{
vis bMode11,0
}else
{
vis bMode11,1
}
if(bMode12.txt=="")
{
vis bMode12,0
}else
{
vis bMode12,1
}
Timer tmCooldown
Attributes
@@ -897,6 +981,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -686,6 +686,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -441,6 +441,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -675,6 +675,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -946,6 +946,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -0,0 +1,964 @@
Page popupTimer
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID : disabled
Events
Preinitialize Event
dim=dimValueNormal
//get entitiy name
tEntity.txt=pageIcons.tTmp1.txt
//get entity id
entn.txt=pageIcons.tTmp2.txt
tIcon1.txt=pageIcons.tTmp3.txt
tTime.txt=pageIcons.vaTime.txt
vis p0,0
vis tSend,0
vis tTmp,0
vis tInstruction,0
vis tId,0
vis bZ1P,0
vis bZ1M,0
vis bZ2P,0
vis bZ2M,0
vis bZ3P,0
vis bZ3M,0
vis bZ4P,0
vis bZ4M,0
vis t0,0
vis fToggleEdit,0
vis b1,0
vis b2,0
vis b3,0
//page open event
// event,pageOpenDetail,typeOfPage,tEntityName
// craft command
tSend.txt="event,pageOpenDetail,popupTimer,"+entn.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
popupTimer.bco=defaultBcoColor
for(sys0=0;sys0<34;sys0++)
{
if(b[sys0].type==98||b[sys0].type==116)
{
b[sys0].bco=defaultBcoColor
//b[sys0].pco=defaultFontColor
}
if(b[sys0].type==53&&defaultBcoColor==0)
{
b[sys0].pic=10
b[sys0].pic2=11
}
}
Variable (int32) editable
Attributes
Scope: local
Value: 1
Variable (string) entn
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (int32) mode
Attributes
Scope: local
Value: 1
Variable (int32) mode_temp
Attributes
Scope: local
Value: 0
Variable (string) strCommand
Attributes
Scope : local
Text :
Max. Text Size: 960
Variable (string) strTmp
Attributes
Scope : local
Text :
Max. Text Size: 20
Variable (string) tId
Attributes
Scope : local
Text :
Max. Text Size: 20
Variable (string) tInstruction
Attributes
Scope : local
Text :
Max. Text Size: 20
Variable (string) tSend
Attributes
Scope : local
Text :
Max. Text Size: 200
Variable (string) tTmp
Attributes
Scope : local
Text :
Max. Text Size: 80
Variable (string) va1
Attributes
Scope : local
Text :
Max. Text Size: 15
Variable (string) va2
Attributes
Scope : local
Text :
Max. Text Size: 15
Variable (string) va3
Attributes
Scope : local
Text :
Max. Text Size: 15
Variable (string) vaModeCur
Attributes
Scope : local
Text :
Max. Text Size: 40
Variable (string) vaModeList
Attributes
Scope : local
Text :
Max. Text Size: 900
Variable (int32) vaModePos
Attributes
Scope: local
Value: 0
Variable (string) vaType
Attributes
Scope : local
Text :
Max. Text Size: 20
Number n1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Value : 0
Events
Touch Press Event
if(n2.pco==63488)
{
n2.pco=defaultFontColor
}
if(editable.val==1)
{
if(n1.pco==63488)
{
n1.pco=defaultFontColor
}else
{
n1.pco=63488
}
}
if(n1.pco==63488||n2.pco==63488)
{
if(fToggleEdit.txt=="hidden")
{
click fToggleEdit,1
}
}else
{
if(fToggleEdit.txt=="shown")
{
click fToggleEdit,1
}
}
Number n2
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Value : 0
Events
Touch Press Event
if(n1.pco==63488)
{
n1.pco=defaultFontColor
}
if(editable.val==1)
{
if(n2.pco==63488)
{
n2.pco=defaultFontColor
}else
{
n2.pco=63488
}
}
if(n1.pco==63488||n2.pco==63488)
{
if(fToggleEdit.txt=="hidden")
{
click fToggleEdit,1
}
}else
{
if(fToggleEdit.txt=="shown")
{
click fToggleEdit,1
}
}
Text t0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : +/- 1 +/- 5 +/- 10 +/- 15
Max. Text Size : 60
Text tDP
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text : :
Max. Text Size : 15
Text tEntity
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 25
Text tIcon1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 10
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
Picture p0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Button b0
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 10
Events
Touch Press Event
tSend.txt="event,buttonPress2,popupLight,bExit"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button b1
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : START
Max. Text Size : 45
Events
Touch Press Event
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="timer-"+va1.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button b2
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : CANCEL
Max. Text Size : 45
Events
Touch Press Event
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="timer-"+va2.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button b3
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : PAUSE
Max. Text Size : 45
Events
Touch Press Event
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
tSend.txt+="timer-"+va3.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bZ1M
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 5
Events
Touch Press Event
if(n1.pco==63488)
{
n1.val=n1.val-1
if(n1.val<0)
{
n1.val=0
}
}
if(n2.pco==63488)
{
n2.val=n2.val-1
if(n2.val<0)
{
n2.val=0
}
}
Button bZ1P
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 5
Events
Touch Press Event
if(n1.pco==63488)
{
n1.val=n1.val+1
if(n1.val>59)
{
n1.val=59
}
}
if(n2.pco==63488)
{
n2.val=n2.val+1
if(n2.val>59)
{
n2.val=59
}
}
Button bZ2M
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 5
Events
Touch Press Event
if(n1.pco==63488)
{
n1.val=n1.val-5
if(n1.val<0)
{
n1.val=0
}
}
if(n2.pco==63488)
{
n2.val=n2.val-5
if(n2.val<0)
{
n2.val=0
}
}
Button bZ2P
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 5
Events
Touch Press Event
if(n1.pco==63488)
{
n1.val=n1.val+5
if(n1.val>59)
{
n1.val=59
}
}
if(n2.pco==63488)
{
n2.val=n2.val+5
if(n2.val>59)
{
n2.val=59
}
}
Button bZ3M
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 5
Events
Touch Press Event
if(n1.pco==63488)
{
n1.val=n1.val-10
if(n1.val<0)
{
n1.val=0
}
}
if(n2.pco==63488)
{
n2.val=n2.val-10
if(n2.val<0)
{
n2.val=0
}
}
Button bZ3P
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 5
Events
Touch Press Event
if(n1.pco==63488)
{
n1.val=n1.val+10
if(n1.val>59)
{
n1.val=59
}
}
if(n2.pco==63488)
{
n2.val=n2.val+10
if(n2.val>59)
{
n2.val=59
}
}
Button bZ4M
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 5
Events
Touch Press Event
if(n1.pco==63488)
{
n1.val=n1.val-15
if(n1.val<0)
{
n1.val=0
}
}
if(n2.pco==63488)
{
n2.val=n2.val-15
if(n2.val<0)
{
n2.val=0
}
}
Button bZ4P
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : 
Max. Text Size : 5
Events
Touch Press Event
if(n1.pco==63488)
{
n1.val=n1.val+15
if(n1.val>59)
{
n1.val=59
}
}
if(n2.pco==63488)
{
n2.val=n2.val+15
if(n2.val>59)
{
n2.val=59
}
}
Button fToggleEdit
Attributes
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
State : unpressed
Text : hidden
Max. Text Size : 10
Events
Touch Press Event
if(editable.val==1&&fToggleEdit.txt=="hidden")
{
vis bZ1P,1
vis bZ1M,1
vis bZ2P,1
vis bZ2M,1
vis bZ3P,1
vis bZ3M,1
vis bZ4P,1
vis bZ4M,1
vis t0,1
vis b1,0
vis b2,0
vis b3,0
fToggleEdit.txt="shown"
}else
{
vis bZ1P,0
vis bZ1M,0
vis bZ2P,0
vis bZ2M,0
vis bZ3P,0
vis bZ3M,0
vis bZ4P,0
vis bZ4M,0
vis t0,0
if(va1.txt!="")
{
vis b1,1
}
if(va2.txt!="")
{
vis b2,1
}
if(va3.txt!="")
{
vis b3,1
}
fToggleEdit.txt="hidden"
tSend.txt="event,buttonPress2,"
tSend.txt+=entn.txt+","
covx n1.val,strTmp.txt,0,0
tSend.txt+="timer-start,00:"+strTmp.txt+":"
covx n2.val,strTmp.txt,0,0
tSend.txt+=strTmp.txt
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
}
Timer tmSerial
Attributes
Scope : local
Period (ms): 50
Enabled : yes
Events
Timer Event
// data available
if(usize>1)
{
bufferPos=0
while(bufferPos<usize)
{
// check for 0x55 0xBB - Command Init Secuence
if(u[bufferPos]==187&&u[bufferPos-1]==85)
{
//remove garbage at the start of the buffer if there's any to free buffer for command
if(u[bufferPos]!=1)
{
udelete bufferPos-1
}
//instruction is now aligned with buffer, because we deleted garbage before instrcution
//get length after init sequence (check if there are more than to bytes in buffer)
if(3<usize)
{
// check if serial buffer has reached the announced length
ucopy payloadLength,2,2,0
// we are only checking payload length so we have to skip first 3 bytes (init+payload length) (-1 because of < instead of <=)
payloadLength+=3
// payload length does also not contain crc, so we are adding another 2 bytes for crc
payloadLength+=2
if(payloadLength<usize)
{
// calculate crc
crcrest 1,0xFFFF
// u[2] contains payload legth at 3rd pos in buffer, we are calculating crc from 3rd pos with number of bytes from payload length
//crcputu 3,u[2]
// u[2] cotnains payload length, we are calculating a crc over the whole message, so we have to add 3 to the length from u[2]
crcputu 0,payloadLength-1
// get recived crc to be able to compare it
ucopy recvCrc,payloadLength-1,2,0
// compare crc with recived value
if(crcval==recvCrc)
{
// crc is okay
// here is the location where acual code should be
// write command to variable strCommand
ucopy strCommand.txt,4,payloadLength-5,0
// write instruction to tInstuction (debug output, but used as variable here, ui elements will be disabled by default)
spstr strCommand.txt,tInstruction.txt,"~",0
spstr strCommand.txt,tTmp.txt,"~",1
if(tInstruction.txt=="entityUpdateDetail"&&entn.txt==tTmp.txt)
{
// change icon
//spstr strCommand.txt,tIcon1.txt,"~",2
vis tIcon1,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",3
covx tTmp.txt,sys0,0,0
tIcon1.pco=sys0
//entity name
spstr strCommand.txt,entn.txt,"~",4
//time remaining minutes
spstr strCommand.txt,strTmp.txt,"~",5
covx strTmp.txt,n1.val,0,0
//time remaining seconds
spstr strCommand.txt,strTmp.txt,"~",6
covx strTmp.txt,n2.val,0,0
//editable flag
spstr strCommand.txt,strTmp.txt,"~",7
covx strTmp.txt,editable.val,0,0
//action b1
spstr strCommand.txt,va1.txt,"~",8
if(va1.txt=="")
{
vis b1,0
}else
{
vis b1,1
}
//action b2
spstr strCommand.txt,va2.txt,"~",9
if(va2.txt=="")
{
vis b2,0
}else
{
vis b2,1
}
//action b3
spstr strCommand.txt,va3.txt,"~",10
if(va3.txt=="")
{
vis b3,0
}else
{
vis b3,1
}
//label b1
spstr strCommand.txt,b1.txt,"~",11
//label b2
spstr strCommand.txt,b2.txt,"~",12
//label b3
spstr strCommand.txt,b3.txt,"~",13
sleepValue=0
}
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
tTime.txt=pageIcons.vaTime.txt
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
// get value normal
spstr strCommand.txt,tTmp.txt,"~",2
covx tTmp.txt,dimValueNormal,0,0
dim=dimValueNormal
// get background color
spstr strCommand.txt,tTmp.txt,"~",3
if(tTmp.txt!="")
{
covx tTmp.txt,defaultBcoColor,0,0
}
// get font color
spstr strCommand.txt,tTmp.txt,"~",4
if(tTmp.txt!="")
{
covx tTmp.txt,defaultFontColor,0,0
}
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="pageType")
{
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
spstr strCommand.txt,pageIcons.tTmp3.txt,"~",4
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="screensaver")
{
page screensaver
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="popupShutter")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupShutter
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardThermo")
{
page cardThermo
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
if(tId.txt=="cardQR")
{
page cardQR
}
if(tId.txt=="cardPower")
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// 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)
{
sleepValue+=1
if(sleepTimeout<=sleepValue)
{
sleepValue=0
click b0,1
click b0,0
}
}
TouchCap tc0
Attributes
Scope: local
Value: 0
Events
Touch Press Event
sleepValue=0

View File

@@ -13,7 +13,7 @@ Page screensaver
Events
Preinitialize Event
recmod=1
bauds=115200
baud=115200
vis tInstruction,0
vis tTmp,0
vis p0,0
@@ -346,7 +346,7 @@ Text tNotifyText
Send Component ID : disabled
Associated Keyboard : none
Text :
Max. Text Size : 35
Max. Text Size : 120
Text tTime
Attributes
@@ -493,6 +493,27 @@ Timer tmSerial
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="statusUpdate")
{
//statusIcon1
spstr strCommand.txt,tIcon1.txt,"~",1
spstr strCommand.txt,tTmp.txt,"~",2
covx tTmp.txt,tIcon1.pco,0,0
//statusIcon2
spstr strCommand.txt,tIcon2.txt,"~",3
spstr strCommand.txt,tTmp.txt,"~",4
covx tTmp.txt,tIcon2.pco,0,0
spstr strCommand.txt,tTmp.txt,"~",5
if(tTmp.txt!="")
{
tIcon1.font=3
}
spstr strCommand.txt,tTmp.txt,"~",6
if(tTmp.txt!="")
{
tIcon2.font=3
}
}
if(tInstruction.txt=="weatherUpdate"&&tNotifyHead.txt==""&&tNotifyText.txt=="")
{
vis tMainIcon,1
@@ -567,6 +588,16 @@ Timer tmSerial
spstr strCommand.txt,tIcon2.txt,"~",19
spstr strCommand.txt,tTmp.txt,"~",20
covx tTmp.txt,tIcon2.pco,0,0
spstr strCommand.txt,tTmp.txt,"~",21
if(tTmp.txt!="")
{
tIcon1.font=3
}
spstr strCommand.txt,tTmp.txt,"~",22
if(tTmp.txt!="")
{
tIcon2.font=3
}
}
if(tInstruction.txt=="color"&&tNotifyHead.txt==""&&tNotifyText.txt=="")
{
@@ -747,6 +778,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

Binary file not shown.

Binary file not shown.

View File

@@ -3,19 +3,65 @@ import json
from collections import defaultdict
keys = {
'frontend.ui.card.light.brightness': 'lights.Brightness',
# 'frontend.ui.card.light.brightness': 'lights.Color',
'frontend.ui.card.light.color_temperature': 'lights.Temperature',
'backend.component.binary_sensor.state.window.off': 'window.closed',
'backend.component.binary_sensor.state.window.on': 'window.opened',
'backend.component.binary_sensor.state.door.off': 'door.closed',
'backend.component.binary_sensor.state.door.on': 'door.opened',
'frontend.ui.card.lock.lock': 'lock.LOCK',
'frontend.ui.card.lock.unlock': 'lock.UNLOCK',
'frontend.ui.card.cover.position': 'blinds.Position',
'frontend.ui.card.climate.currently': 'thermostat.Currently',
'frontend.ui.panel.config.devices.entities.state': 'thermostat.State',
'frontend.ui.card.climate.operation': 'thermostat.Action',
'frontend.ui.card.light.brightness': 'lights.Brightness',
'frontend.ui.card.light.color_temperature': 'lights.Temperature',
'backend.component.binary_sensor.state.window.off': 'window.closed',
'backend.component.binary_sensor.state.window.on': 'window.opened',
'backend.component.binary_sensor.state.door.off': 'door.closed',
'backend.component.binary_sensor.state.door.on': 'door.opened',
'frontend.ui.card.lock.lock': 'lock.LOCK',
'frontend.ui.card.lock.unlock': 'lock.UNLOCK',
'frontend.ui.card.cover.position': 'blinds.Position',
'frontend.ui.card.climate.currently': 'thermostat.Currently',
'frontend.ui.panel.config.devices.entities.state': 'thermostat.State',
'frontend.ui.card.climate.operation': 'thermostat.Action',
'frontend.ui.card.button.press': 'button.press',
'frontend.ui.card.script.run': 'script.run',
'frontend.ui.card.scene.activate': 'scene.activate',
'frontend.ui.card.vacuum.actions.start_cleaning': 'vacuum.start_cleaning',
'frontend.ui.card.vacuum.actions.return_to_base': 'vacuum.return_to_base',
'frontend.ui.card.cover.tilt_position': 'blinds.tilt_position',
'frontend.ui.card.fan.speed': 'fan.speed',
'frontend.ui.card.timer.actions.start': 'timer.start',
'frontend.ui.card.timer.actions.pause': 'timer.pause',
'frontend.ui.card.timer.actions.cancel': 'timer.cancel',
'frontend.ui.card.timer.actions.finish': 'timer.finish',
'frontend.state_badge.alarm_control_panel.armed': 'alarm_control_panel.armed',
'frontend.state_badge.alarm_control_panel.armed_away': 'alarm_control_panel.armed_away',
'frontend.state_badge.alarm_control_panel.armed_custom_bypass': 'alarm_control_panel.armed_custom_bypass',
'frontend.state_badge.alarm_control_panel.armed_home': 'alarm_control_panel.armed_home',
'frontend.state_badge.alarm_control_panel.armed_night': 'alarm_control_panel.armed_night',
'frontend.state_badge.alarm_control_panel.armed_vacation': 'alarm_control_panel.armed_vacation',
'frontend.state_badge.alarm_control_panel.arming': 'alarm_control_panel.arming',
'frontend.state_badge.alarm_control_panel.disarmed': 'alarm_control_panel.disarmed',
'frontend.state_badge.alarm_control_panel.disarming': 'alarm_control_panel.disarming',
'frontend.state_badge.alarm_control_panel.pending': 'alarm_control_panel.pending',
'frontend.state_badge.alarm_control_panel.triggered': 'alarm_control_panel.triggered',
'frontend.state_attributes.climate.hvac_action.cooling': 'hvac_action.cooling',
'frontend.state_attributes.climate.hvac_action.drying': 'hvac_action.drying',
'frontend.state_attributes.climate.hvac_action.fan': 'hvac_action.fan',
'frontend.state_attributes.climate.hvac_action.heating': 'hvac_action.heating',
'frontend.state_attributes.climate.hvac_action.idle': 'hvac_action.idle',
'frontend.state_attributes.climate.hvac_action.off': 'hvac_action.off',
'frontend.ui.card.alarm_control_panel.arm_away': 'alarm_control_panel.arm_away',
'frontend.ui.card.alarm_control_panel.arm_custom_bypass': 'alarm_control_panel.arm_custom_bypass',
'frontend.ui.card.alarm_control_panel.arm_home': 'alarm_control_panel.arm_home',
'frontend.ui.card.alarm_control_panel.arm_night': 'alarm_control_panel.arm_night',
'frontend.ui.card.alarm_control_panel.arm_vacation': 'alarm_control_panel.arm_vacation',
'frontend.ui.card.alarm_control_panel.clear_code': 'alarm_control_panel.clear_code',
'frontend.ui.card.alarm_control_panel.code': 'alarm_control_panel.code',
'frontend.ui.card.alarm_control_panel.disarm': 'alarm_control_panel.disarm',
'backend.component.climate.state._.off': 'climate.off',
'backend.component.climate.state._.heat': 'climate.heat',
'backend.component.climate.state._.cool': 'climate.cool',
'backend.component.climate.state._.heat_cool': 'climate.heat_cool',
'backend.component.climate.state._.auto': 'climate.auto',
'backend.component.climate.state._.dry': 'climate.dry',
'backend.component.climate.state._.fan_only': 'climate.fan_only',
'backend.component.timer.state._.active': 'timer.active',
'backend.component.timer.state._.idle': 'timer.idle',
'backend.component.timer.state._.paused': 'timer.paused',
}
@@ -51,7 +97,8 @@ def lookup(path_frontend_file, path_backend_file, lookupstr):
if k in res:
res = res[k]
if type(res) is not str:
print("Warning result is not a String")
print(f"Warning result is not a String: {lookupstr}")
res = ""
return res
def get_translation(locale, lookupstr):
@@ -69,5 +116,5 @@ for src, dst in keys.items():
#print(json.dumps(out, indent=4, ensure_ascii=False))
with open("ioBroker_NSPanel_locales.json", "wb") as text_file:
with open("ioBroker_NSPanel_locales_beta.json", "wb") as text_file:
text_file.write(json.dumps(out, indent=4, ensure_ascii=False).encode('utf8'))

View File

@@ -6,7 +6,7 @@ head = sharedhead + """
spstr strCommand.txt,tHeading.txt,"~",1
""" + navigation
print(head)
start = 3
start = 14
for i in range(1,5):
idxstart = start + (i-1)*6
item = f"""
@@ -110,7 +110,7 @@ for i in range(1,5):
covx tTmp.txt,sys0,0,0
btOnOff{i}.val=sys0
}}
if(type{i}.txt=="text")
if(type{i}.txt=="text"||type{i}.txt=="timer")
{{
vis bUp{i},0
vis bStop{i},0

View File

@@ -6,7 +6,7 @@ head = sharedhead + """
spstr strCommand.txt,tHeading.txt,"~",1
""" + navigation
print(head)
start = 3
start = 14
for i in range(1,7):
idxstart = start + (i-1)*6
item = f"""

View File

@@ -0,0 +1,89 @@
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)
print("""
//entity name
spstr strCommand.txt,entn.txt,"~",14
//title
spstr strCommand.txt,tTitle.txt,"~",15
//title farbe
spstr strCommand.txt,tTmp.txt,"~",16
if(tTmp.txt!="")
{
covx tTmp.txt,tTitle.pco,0,0
}
//author
spstr strCommand.txt,tAuthor.txt,"~",17
//author farbe
spstr strCommand.txt,tTmp.txt,"~",18
if(tTmp.txt!="")
{
covx tTmp.txt,tAuthor.pco,0,0
}
//volume
spstr strCommand.txt,tTmp.txt,"~",19
covx tTmp.txt,sys0,0,0
hVolume.val=sys0
//icon
spstr strCommand.txt,tPlayPause.txt,"~",20
// on off button
spstr strCommand.txt,tTmp.txt,"~",21
if(tTmp.txt=="disable")
{
vis t5,0
}else
{
vis t5,1
covx tTmp.txt,t5.pco,0,0
}
// shuffel btn
spstr strCommand.txt,tTmp.txt,"~",22
if(tTmp.txt=="disable")
{
vis tShuffle,0
}else
{
vis tShuffle,1
tShuffle.txt=tTmp.txt
}
""")
start = 23
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,bEntity{i}.txt,"~",{idxstart+2}
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

@@ -5,16 +5,16 @@ head = sharedhead + """
// command format: entityUpd,heading,navigation,colorHome,iconHome[,iconColor,icon,speed,valueUp,valueDown]x6
spstr strCommand.txt,tHeading.txt,"~",1
""" + navigation + """
// icon color home
spstr strCommand.txt,tTmp.txt,"~",3
// icon color home
spstr strCommand.txt,tTmp.txt,"~",14
covx tTmp.txt,t1.pco,0,0
// icon home
spstr strCommand.txt,t1.txt,"~",4
spstr strCommand.txt,t1.txt,"~",15
// text home
spstr strCommand.txt,tHome.txt,"~",5
spstr strCommand.txt,tHome.txt,"~",16
"""
print(head)
start = 6
start = 17
for i in range(0,6):
idxstart = start + (i)*4
item = f"""

View File

@@ -8,23 +8,23 @@ text = sharedhead + """
text += """
//entity name
spstr strCommand.txt,entn.txt,"~",3
spstr strCommand.txt,entn.txt,"~",14
//currentTemp
spstr strCommand.txt,tCurTemp.txt,"~",4
spstr strCommand.txt,tCurTemp.txt,"~",15
//dstTemp
spstr strCommand.txt,tTmp.txt,"~",5
spstr strCommand.txt,tTmp.txt,"~",16
covx tTmp.txt,xTempDest1.val,0,0
xTempDest.val=xTempDest1.val
//status
spstr strCommand.txt,tStatus.txt,"~",6
spstr strCommand.txt,tStatus.txt,"~",17
//minTemp
spstr strCommand.txt,tTmp.txt,"~",7
spstr strCommand.txt,tTmp.txt,"~",18
covx tTmp.txt,xTempMin1.val,0,0
//maxTemp
spstr strCommand.txt,tTmp.txt,"~",8
spstr strCommand.txt,tTmp.txt,"~",19
covx tTmp.txt,xTempMax1.val,0,0
//tempStep
spstr strCommand.txt,tTmp.txt,"~",9
spstr strCommand.txt,tTmp.txt,"~",20
covx tTmp.txt,xTempStep1.val,0,0
// disable all buttons
vis bt0,0
@@ -37,7 +37,7 @@ text += """
vis bt7,0
"""
start = 10
start = 21
for i in range(0,8):
idxstart = start + i*4
text += f"""
@@ -59,17 +59,17 @@ for i in range(0,8):
text += """
//Text tCurTempLbl
spstr strCommand.txt,tCurTempLbl.txt,"~",42
spstr strCommand.txt,tCurTempLbl.txt,"~",53
//Text tStateLbl
spstr strCommand.txt,tStateLbl.txt,"~",43
spstr strCommand.txt,tStateLbl.txt,"~",54
//Text tALbl
spstr strCommand.txt,tALbl.txt,"~",44
spstr strCommand.txt,tALbl.txt,"~",55
//Text tCF
spstr strCommand.txt,tCF.txt,"~",45
spstr strCommand.txt,tCF.txt,"~",56
tCF1.txt=tCF.txt
tCF2.txt=tCF.txt
//Second Temperature
spstr strCommand.txt,tTmp.txt,"~",46
spstr strCommand.txt,tTmp.txt,"~",57
if(tTmp.txt!="")
{
covx tTmp.txt,xTempDest2.val,0,0
@@ -87,7 +87,7 @@ text += """
vis tCF2,1
}
//Show btDetail
spstr strCommand.txt,tTmp.txt,"~",47
spstr strCommand.txt,tTmp.txt,"~",58
if(tTmp.txt!="1")
{
vis btDetail,1

360
HMI/code_gen/pages/out.txt Normal file
View File

@@ -0,0 +1,360 @@
// 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,colorHome,iconHome[,iconColor,icon,speed,valueUp,valueDown]x6
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
}
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
}
// icon color home
spstr strCommand.txt,tTmp.txt,"~",14
covx tTmp.txt,t1.pco,0,0
// icon home
spstr strCommand.txt,t1.txt,"~",15
// text home
spstr strCommand.txt,tHome.txt,"~",16
// iconColor
spstr strCommand.txt,tTmp.txt,"~",17
covx tTmp.txt,t0Icon.pco,0,0
// icon
spstr strCommand.txt,t0Icon.txt,"~",18
// speed
spstr strCommand.txt,tTmp.txt,"~",19
covx tTmp.txt,t0Speed.val,0,0
// lower text
spstr strCommand.txt,t0u.txt,"~",20
if(t0Icon.txt!="")
{
vis t0Icon,1
vis t0u,1
vis h0,1
}else
{
vis t0Icon,0
vis t0u,0
vis h0,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",21
covx tTmp.txt,t1Icon.pco,0,0
// icon
spstr strCommand.txt,t1Icon.txt,"~",22
// speed
spstr strCommand.txt,tTmp.txt,"~",23
covx tTmp.txt,t1Speed.val,0,0
// lower text
spstr strCommand.txt,t1u.txt,"~",24
if(t1Icon.txt!="")
{
vis t1Icon,1
vis t1u,1
vis h1,1
}else
{
vis t1Icon,0
vis t1u,0
vis h1,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",25
covx tTmp.txt,t2Icon.pco,0,0
// icon
spstr strCommand.txt,t2Icon.txt,"~",26
// speed
spstr strCommand.txt,tTmp.txt,"~",27
covx tTmp.txt,t2Speed.val,0,0
// lower text
spstr strCommand.txt,t2u.txt,"~",28
if(t2Icon.txt!="")
{
vis t2Icon,1
vis t2u,1
vis h2,1
}else
{
vis t2Icon,0
vis t2u,0
vis h2,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",29
covx tTmp.txt,t3Icon.pco,0,0
// icon
spstr strCommand.txt,t3Icon.txt,"~",30
// speed
spstr strCommand.txt,tTmp.txt,"~",31
covx tTmp.txt,t3Speed.val,0,0
// lower text
spstr strCommand.txt,t3u.txt,"~",32
if(t3Icon.txt!="")
{
vis t3Icon,1
vis t3u,1
vis h3,1
}else
{
vis t3Icon,0
vis t3u,0
vis h3,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",33
covx tTmp.txt,t4Icon.pco,0,0
// icon
spstr strCommand.txt,t4Icon.txt,"~",34
// speed
spstr strCommand.txt,tTmp.txt,"~",35
covx tTmp.txt,t4Speed.val,0,0
// lower text
spstr strCommand.txt,t4u.txt,"~",36
if(t4Icon.txt!="")
{
vis t4Icon,1
vis t4u,1
vis h4,1
}else
{
vis t4Icon,0
vis t4u,0
vis h4,0
}
// iconColor
spstr strCommand.txt,tTmp.txt,"~",37
covx tTmp.txt,t5Icon.pco,0,0
// icon
spstr strCommand.txt,t5Icon.txt,"~",38
// speed
spstr strCommand.txt,tTmp.txt,"~",39
covx tTmp.txt,t5Speed.val,0,0
// lower text
spstr strCommand.txt,t5u.txt,"~",40
if(t5Icon.txt!="")
{
vis t5Icon,1
vis t5u,1
vis h5,1
}else
{
vis t5Icon,0
vis t5u,0
vis h5,0
}
}
if(tInstruction.txt=="pageType")
{
sleepValue=0
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
spstr strCommand.txt,pageIcons.tTmp3.txt,"~",4
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="screensaver")
{
page screensaver
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="popupShutter")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupShutter
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardThermo")
{
page cardThermo
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
if(tId.txt=="cardQR")
{
page cardQR
}
if(tId.txt=="cardPower")
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
// get value normal
spstr strCommand.txt,tTmp.txt,"~",2
covx tTmp.txt,dimValueNormal,0,0
dim=dimValueNormal
// get background color
spstr strCommand.txt,tTmp.txt,"~",3
if(tTmp.txt!="")
{
covx tTmp.txt,defaultBcoColor,0,0
}
// get font color
spstr strCommand.txt,tTmp.txt,"~",4
if(tTmp.txt!="")
{
covx tTmp.txt,defaultFontColor,0,0
}
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
}

View File

@@ -109,6 +109,10 @@ sharedfoot = """
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
if(tInstruction.txt=="time")
{
@@ -162,44 +166,39 @@ sharedfoot = """
"""
navigation = """
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
"""

BIN
HMI/fonts/monospace90.zi Normal file

Binary file not shown.

View File

@@ -51,7 +51,7 @@ Page cardAlarm
if(b[sys0].type==98||b[sys0].type==116)
{
b[sys0].bco=defaultBcoColor
b[sys0].pco=defaultFontColor
//b[sys0].pco=defaultFontColor
}
}
if(defaultBcoColor==0)
@@ -72,6 +72,20 @@ Variable (string) entn
Text :
Max. Text Size: 80
Variable (string) nent1
Attributes
ID : 41
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent2
Attributes
ID : 40
Scope : local
Text :
Max. Text Size: 80
Variable (string) strCommand
Attributes
ID : 6
@@ -1014,14 +1028,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -1068,14 +1075,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardAlarm,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -1223,86 +1223,80 @@ Timer tmSerial
{
//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")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
//text arm1
spstr strCommand.txt,arm1.txt,"~",3
spstr strCommand.txt,arm1.txt,"~",14
if(arm1.txt!="")
{
vis arm1,1
}
//id arm1
spstr strCommand.txt,va1.txt,"~",4
spstr strCommand.txt,va1.txt,"~",15
//text arm2
spstr strCommand.txt,arm2.txt,"~",5
spstr strCommand.txt,arm2.txt,"~",16
if(arm2.txt!="")
{
vis arm2,1
}
//id arm2
spstr strCommand.txt,va2.txt,"~",6
spstr strCommand.txt,va2.txt,"~",17
//text arm3
spstr strCommand.txt,arm3.txt,"~",7
spstr strCommand.txt,arm3.txt,"~",18
if(arm3.txt!="")
{
vis arm3,1
}
//id arm3
spstr strCommand.txt,va3.txt,"~",8
spstr strCommand.txt,va3.txt,"~",19
//text arm4
spstr strCommand.txt,arm4.txt,"~",9
spstr strCommand.txt,arm4.txt,"~",20
if(arm4.txt!="")
{
vis arm4,1
}
//id arm4
spstr strCommand.txt,va4.txt,"~",10
spstr strCommand.txt,va4.txt,"~",21
//icon
spstr strCommand.txt,tIcon.txt,"~",11
spstr strCommand.txt,tIcon.txt,"~",22
//icon color
spstr strCommand.txt,tTmp.txt,"~",12
spstr strCommand.txt,tTmp.txt,"~",23
covx tTmp.txt,sys0,0,0
tIcon.pco=sys0
//numpad status
spstr strCommand.txt,tTmp.txt,"~",13
spstr strCommand.txt,tTmp.txt,"~",24
if(tTmp.txt!="disable")
{
vis b0,1
@@ -1335,7 +1329,7 @@ Timer tmSerial
vis tCode,0
}
//flashing status
spstr strCommand.txt,tTmp.txt,"~",14
spstr strCommand.txt,tTmp.txt,"~",25
if(tTmp.txt=="enable")
{
tmFlash.en=1
@@ -1344,13 +1338,13 @@ Timer tmSerial
tmFlash.en=0
}
// extra button
spstr strCommand.txt,b9.txt,"~",15
spstr strCommand.txt,b9.txt,"~",26
if(b9.txt!="")
{
vis b9,1
spstr strCommand.txt,tTmp.txt,"~",16
spstr strCommand.txt,tTmp.txt,"~",27
covx tTmp.txt,b9.pco,0,0
spstr strCommand.txt,vaAddBtn.txt,"~",17
spstr strCommand.txt,vaAddBtn.txt,"~",28
}
}
if(tInstruction.txt=="time")
@@ -1455,6 +1449,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1

View File

@@ -0,0 +1,903 @@
Page cardChart
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
dim=dimValueNormal
vis p0,0
vis tSend,0
vis tInstruction,0
vis tTmp,0
vis tId,0
vis bPrev,0
vis bNext,0
cardChart.bco=defaultBcoColor
vis x0,0
x0.bco=defaultBcoColor
x0.borderc=defaultBcoColor
for(sys0=0;sys0<32;sys0++)
{
if(b[sys0].type==98||b[sys0].type==116)
{
b[sys0].bco=defaultBcoColor
b[sys0].pco=defaultFontColor
}
if(b[sys0].type==53&&defaultBcoColor==6371)
{
b[sys0].pic=1
b[sys0].pic2=2
}
if(b[sys0].type==53&&defaultBcoColor==0)
{
b[sys0].pic=10
b[sys0].pic2=11
}
}
Variable (string) entn
Attributes
ID : 6
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent1
Attributes
ID : 32
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent2
Attributes
ID : 31
Scope : local
Text :
Max. Text Size: 80
Variable (string) strCommand
Attributes
ID : 5
Scope : local
Text :
Max. Text Size: 275
Variable (string) strTmp
Attributes
ID : 18
Scope : local
Text :
Max. Text Size: 200
Variable (string) tId
Attributes
ID : 14
Scope : local
Text :
Max. Text Size: 20
Variable (string) tInstruction
Attributes
ID : 15
Scope : local
Text :
Max. Text Size: 20
Variable (string) tSend
Attributes
ID : 9
Scope : local
Text :
Max. Text Size: 200
Variable (string) tTmp
Attributes
ID : 13
Scope : local
Text :
Max. Text Size: 20
Variable (int32) vMax
Attributes
ID : 29
Scope: local
Value: 0
Variable (int32) vNValues
Attributes
ID : 17
Scope: local
Value: 0
Variable (int32) vaBottom
Attributes
ID : 22
Scope: local
Value: 0
Variable (int32) vaColorD
Attributes
ID : 28
Scope: local
Value: 0
Variable (int32) vaColorL
Attributes
ID : 27
Scope: local
Value: 0
Variable (int32) vaLast
Attributes
ID : 25
Scope: local
Value: 4294967295
Variable (int32) vaLeft
Attributes
ID : 23
Scope: local
Value: 0
Variable (int32) vaUnit
Attributes
ID : 20
Scope: local
Value: 0
Variable (int32) vaValue
Attributes
ID : 21
Scope: local
Value: 0
Variable (string) vaValues
Attributes
ID : 24
Scope : local
Text :
Max. Text Size: 100
Variable (int32) vaYUnit
Attributes
ID : 30
Scope: local
Value: 0
XFloat x0
Attributes
ID : 26
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 173
y coordinate : 84
Width : 100
Height : 30
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : border
Associated Keyboard : none
Border Color : 0
Border Width : 2
Font ID : 1
Back. Color : 0
Font Color : 50712
Horizontal Alignment : center
Vertical Alignment : center
Value : 0
Significant digits left : 0
Significant digits right : 1
Word wrap : enabled
Horizontal Spacing : 0
Vertical Spacing : 0
Text tHeading
Attributes
ID : 16
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 66
y coordinate : 26
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 :
Max. Text Size : 40
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 bNext
Attributes
ID : 2
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 391
y coordinate : 16
Width : 50
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Font ID : 3
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,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Button bPrev
Attributes
ID : 3
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 9
y coordinate : 16
Width : 50
Height : 50
Effect : load
Effect Priority : 0
Effect Time : 300
Fill : solid color
Style : flat
Font ID : 3
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,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
crcputh 55 bb
crcputs sys0,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
Hotspot m0
Attributes
ID : 19
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 20
y coordinate : 90
Width : 410
Height : 220
Effect : load
Effect Priority : 0
Effect Time : 300
Events
Touch Press Event
if(vaLast.val>=0)
{
// spstr vaValues.txt,tTmp.txt,"~",vaLast.val
// covx tTmp.txt,vaValue.val,0,0
sys1=vaLast.val*5*vaUnit.val
sys1+=vaLeft.val
sya0=sys1/100
sya1=vaUnit.val*4+sys1/100
if(vaValue.val==0)
{
line sya0,vaBottom.val,sya1,vaBottom.val,vaColorD.val
}else
{
sys0=0
if(vaValue.val<0)
{
vaValue.val*=-1
sys0=1
}
fill sya0+1,-1*vaYUnit.val*vaValue.val+vaBottom.val+1,vaUnit.val*4/100,vaYUnit.val*vaValue.val-1,vaColorD.val
// line sya0+1,-10*vaValue.val+vaBottom.val,sya1-1,-10*vaValue.val+vaBottom.val,vaColorL.val
draw sya0,-1*vaYUnit.val*vaValue.val+vaBottom.val+1,sya1,vaBottom.val,vaColorL.val
if(sys0!=0)
{
sya1=-1*vaYUnit.val*vaValue.val+vaBottom.val
for(sys0=vaBottom.val;sys0>=sya1;sys0-=10)
{
sys2=sys0-5
if(sys2<sya1)
{
sys2=sya1
}
line vaUnit.val*2+sys1/100,sys0,vaUnit.val*2+sys1/100,sys2,vaColorL.val
}
}
}
}
sys0=tch0-m0.x-25-40*100/vaUnit.val
sys1=sys0%5
if(sys1<4&&sys0>=0)
{
vis x0,1
vaLast.val=sys0/5
// n0.val=sys0/5
spstr vaValues.txt,tTmp.txt,"~",vaLast.val
covx tTmp.txt,vaValue.val,0,0
// t0.txt=tTmp.txt
sys1=vaLast.val*5*vaUnit.val
sys1+=vaLeft.val
sya0=sys1/100
sya1=vaUnit.val*4+sys1/100
if(vaValue.val==0)
{
line sya0,vaBottom.val,sya1,vaBottom.val,vaColorL.val
x0.val=vaValue.val
}else
{
if(vaValue.val<0)
{
fill sya0+1,vaYUnit.val*vaValue.val+vaBottom.val+1,vaUnit.val*4/100,-1*vaYUnit.val*vaValue.val-1,vaColorL.val
x0.val=vaValue.val*-1
}else
{
fill sya0+1,-1*vaYUnit.val*vaValue.val+vaBottom.val+1,vaUnit.val*4/100,vaYUnit.val*vaValue.val-1,vaColorL.val
x0.val=vaValue.val
}
}
}else
{
vis x0,0
vaLast.val=-1
}
Hotspot mSwipeNext
Attributes
ID : 10
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 440
y coordinate : 5
Width : 39
Height : 310
Effect : load
Effect Priority : 0
Effect Time : 300
Events
Touch Press Event
click bNext,1
Hotspot mSwipePrev
Attributes
ID : 12
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 0
y coordinate : 5
Width : 9
Height : 310
Effect : load
Effect Priority : 0
Effect Time : 300
Events
Touch Press Event
click bPrev,1
Hotspot mSwipeUp
Attributes
ID : 11
Scope : local
Dragging : 0
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 12
y coordinate : 0
Width : 426
Height : 9
Effect : load
Effect Priority : 0
Effect Time : 300
Events
Touch Press Event
click bPrev,1
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
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")
{
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
}
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
}
// extract color
spstr strCommand.txt,tTmp.txt,"~",14
covx tTmp.txt,vaColorL.val,0,0
// prepare dark color
sys0=vaColorL.val>>11 // red
vaColorD.val=sys0*8/10<<11 // store and shift
sys0=vaColorL.val>>5%64 // green
vaColorD.val=sys0*8/10<<5+vaColorD.val // store and shift
sys0=vaColorL.val%32
vaColorD.val=sys0*8/10+vaColorD.val // store and add
//
// detect nValues and maxValue
vNValues.val=0
spstr strCommand.txt,tTmp.txt,"~",vNValues.val+17
strlen tTmp.txt,sya0
while(sya0>0)
{
covx tTmp.txt,sya1,0,0
if(sya1>vMax.val)
{
vMax.val=sya1
}
// next
vNValues.val++
spstr strCommand.txt,tTmp.txt,"~",vNValues.val+17
strlen tTmp.txt,sya0
}
//
// calculate unit width
sys0=vNValues.val*4
sys0+=vNValues.val-1
vaUnit.val=m0.w-25-40*100
vaUnit.val/=sys0
vaBottom.val=m0.y+m0.h-24
vaLeft.val=m0.x+25+40*100
vaYUnit.val=m0.h-24/vMax.val
//
line m0.x+25+40-10,m0.y,m0.x+25+40-10,vaBottom.val+10,14823
line m0.x+25+40-5,vaBottom.val,m0.x+25+40-15,vaBottom.val,14823
spstr strCommand.txt,strTmp.txt,"~",16
sya1=0
spstr strTmp.txt,tTmp.txt,":",sya1
strlen tTmp.txt,sya0
while(sya0>0)
{
covx tTmp.txt,sys1,0,0
if(sys1<=vMax.val)
{
line m0.x+25+40-5,-1*vaYUnit.val*sys1+vaBottom.val,m0.x+25+40-15,-1*vaYUnit.val*sys1+vaBottom.val,14823
sys2=sys1%10
sys1/=10
if(sys1>0)
{
covx sys1,tTmp.txt,0,0
}else
{
tTmp.txt=""
}
if(sys2!=0)
{
covx sys2,tId.txt,0,0
tTmp.txt=tTmp.txt+"."+tId.txt
}
xstr m0.x+28,sys1*10+sys2*-1*vaYUnit.val+vaBottom.val-10,20,20,0,defaultFontColor,RED,2,1,3,tTmp.txt
}
// next
sya1++
spstr strTmp.txt,tTmp.txt,":",sya1
strlen tTmp.txt,sya0
}
//
// y achis label
spstr strCommand.txt,tTmp.txt,"~",15
// tTmp.txt="Gas [kW]"
strlen tTmp.txt,sys1
sya1=sys1*12+m0.h-48/2
for(sys0=0;sys0<sys1;sys0++)
{
substr tTmp.txt,strTmp.txt,sys0,1
xstr m0.x,sys0*-12+m0.y+sya1,30,20,6,defaultFontColor,RED,2,1,3,strTmp.txt
}
for(sys0=0;sys0<vNValues.val;sys0++)
{
if(sys0>0)
{
vaValues.txt+="~"
}
// extract next entry
spstr strCommand.txt,tTmp.txt,"~",sys0+17
// calculate left
sys1=sys0*5*vaUnit.val
sys1+=vaLeft.val
// if there is a colon in the obtained value we have a label/and gridline
spstr tTmp.txt,strTmp.txt,"^",1
strlen strTmp.txt,sya0
if(sya0>0)
{
// we have a label!!!
// -> extract label
sys2=vaUnit.val*2+sys1/100
// draw label
xstr sya0*-6+sys2,vaBottom.val+2,sya0*12,22,0,defaultFontColor,defaultBcoColor,1,1,3,strTmp.txt
// draw line
// line sys2,vaBottom.val,sys2,m0.y,defaultFontColor
sya1=1
//spstr tTmp.txt,strTmp.txt,":",0
spstr tTmp.txt,tTmp.txt,":",0
vaValues.txt+="-"
}else
{
sya1=0
}
vaValues.txt+=tTmp.txt
covx tTmp.txt,vaValue.val,0,0
sya0=sys1/100
if(vaValue.val==0)
{
line sya0,vaBottom.val,vaUnit.val*4+sys1/100,vaBottom.val,vaColorD.val
}else
{
fill sya0+1,-1*vaYUnit.val*vaValue.val+vaBottom.val+1,vaUnit.val*4/100,vaYUnit.val*vaValue.val-1,vaColorD.val
line sya0+1,-1*vaYUnit.val*vaValue.val+vaBottom.val,vaUnit.val*4+sys1/100-1,-1*vaYUnit.val*vaValue.val+vaBottom.val,vaColorL.val
draw sya0,-1*vaYUnit.val*vaValue.val+vaBottom.val+1,vaUnit.val*4+sys1/100,vaBottom.val,vaColorL.val
}
if(sya1>0)
{
sya1=-1*vaYUnit.val*vaValue.val+vaBottom.val
for(sya0=vaBottom.val-5;sya0>m0.y;sya0-=10)
{
sys1=sya0+5
if(sya0>=sya1)
{
line sys2,sya0,sys2,sys1,vaColorL.val
}else
{
if(sys1>=sya1)
{
line sys2,sya0,sys2,sya1-1,14823
line sys2,sya1,sys2,sys1,vaColorL.val
}else
{
line sys2,sya0,sys2,sys1,14823
}
}
}
}
}
}
if(tInstruction.txt=="time")
{
// get set time to global variable
spstr strCommand.txt,pageIcons.vaTime.txt,"~",1
}
if(tInstruction.txt=="date")
{
// get set date to global variable
spstr strCommand.txt,pageIcons.vaDate.txt,"~",1
}
if(tInstruction.txt=="dimmode")
{
// get value
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,dimValue,0,0
// get value normal
spstr strCommand.txt,tTmp.txt,"~",2
covx tTmp.txt,dimValueNormal,0,0
dim=dimValueNormal
// get background color
spstr strCommand.txt,tTmp.txt,"~",3
if(tTmp.txt!="")
{
covx tTmp.txt,defaultBcoColor,0,0
}
// get font color
spstr strCommand.txt,tTmp.txt,"~",4
if(tTmp.txt!="")
{
covx tTmp.txt,defaultFontColor,0,0
}
}
if(tInstruction.txt=="timeout")
{
//set timeout to global var
spstr strCommand.txt,tTmp.txt,"~",1
covx tTmp.txt,sleepTimeout,0,0
}
if(tInstruction.txt=="pageType")
{
sleepValue=0
//command format pageType,specialPageName
//write name of speical page to tId
spstr strCommand.txt,tId.txt,"~",1
//save second arg if there's one
spstr strCommand.txt,tTmp.txt,"~",2
//save third arg if there's one
spstr strCommand.txt,pageIcons.tTmp2.txt,"~",3
spstr strCommand.txt,pageIcons.tTmp3.txt,"~",4
//we are going to exit this page with this command, so we have to clear the buffer, so we are not getting into a stupid loop ...
udelete payloadLength-1
bufferPos=0
if(tId.txt=="pageStartup")
{
page pageStartup
}
if(tId.txt=="screensaver")
{
page screensaver
}
if(tId.txt=="cardEntities")
{
page cardEntities
}
if(tId.txt=="cardGrid")
{
page cardGrid
}
if(tId.txt=="popupLight")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupLight
}
if(tId.txt=="popupShutter")
{
pageIcons.tTmp1.txt=tTmp.txt
page popupShutter
}
if(tId.txt=="popupNotify")
{
page popupNotify
}
if(tId.txt=="cardThermo")
{
page cardThermo
}
if(tId.txt=="cardMedia")
{
page cardMedia
}
if(tId.txt=="cardAlarm")
{
page cardAlarm
}
if(tId.txt=="cardQR")
{
page cardQR
}
if(tId.txt=="cardPower")
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
// end of user code
udelete payloadLength-1
bufferPos=0
}
}
}
}
// next character
bufferPos++
}
}
Timer tmSleep
Attributes
ID : 7
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,2
crcputs tSend.txt,0
//send cmd
printh 55 bb
prints sys0,2
prints tSend.txt,0
prints crcval,2
}
}
TouchCap tc0
Attributes
ID : 8
Scope: local
Value: 0
Events
Touch Press Event
sleepValue=0

View File

@@ -25,7 +25,7 @@ Page cardEntities
//remove background & activate reparse mode
vis p0,0
recmod=1
bauds=115200
baud=115200
//debug stuff
vis tTmp,0
vis tSend,0
@@ -96,28 +96,42 @@ Page cardEntities
Variable (string) entn1
Attributes
ID : 44
ID : 42
Scope : local
Text :
Max. Text Size: 80
Variable (string) entn2
Attributes
ID : 45
ID : 43
Scope : local
Text :
Max. Text Size: 80
Variable (string) entn3
Attributes
ID : 46
ID : 44
Scope : local
Text :
Max. Text Size: 80
Variable (string) entn4
Attributes
ID : 47
ID : 45
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent1
Attributes
ID : 63
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent2
Attributes
ID : 64
Scope : local
Text :
Max. Text Size: 80
@@ -131,42 +145,42 @@ Variable (string) strCommand
Variable (string) tSend
Attributes
ID : 64
ID : 62
Scope : local
Text :
Max. Text Size: 200
Variable (string) type1
Attributes
ID : 40
ID : 38
Scope : local
Text :
Max. Text Size: 10
Variable (string) type2
Attributes
ID : 41
ID : 39
Scope : local
Text :
Max. Text Size: 10
Variable (string) type3
Attributes
ID : 42
ID : 40
Scope : local
Text :
Max. Text Size: 10
Variable (string) type4
Attributes
ID : 43
ID : 41
Scope : local
Text :
Max. Text Size: 10
Number nNum1
Attributes
ID : 53
ID : 51
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -196,7 +210,7 @@ Number nNum1
Number nNum2
Attributes
ID : 54
ID : 52
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -226,7 +240,7 @@ Number nNum2
Number nNum3
Attributes
ID : 55
ID : 53
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -256,7 +270,7 @@ Number nNum3
Number nNum4
Attributes
ID : 56
ID : 54
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -663,7 +677,7 @@ Picture p0
Slider hSlider1
Attributes
ID : 49
ID : 47
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -706,7 +720,7 @@ Slider hSlider1
Slider hSlider2
Attributes
ID : 50
ID : 48
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -749,7 +763,7 @@ Slider hSlider2
Slider hSlider3
Attributes
ID : 51
ID : 49
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -792,7 +806,7 @@ Slider hSlider3
Slider hSlider4
Attributes
ID : 52
ID : 50
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -1023,7 +1037,7 @@ Button bDown4
Button bNext
Attributes
ID : 33
ID : 65
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -1055,14 +1069,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardEntities,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -1077,7 +1084,7 @@ Button bNext
Button bPrev
Attributes
ID : 32
ID : 66
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -1109,14 +1116,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardEntities,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -1319,7 +1319,7 @@ Button bStop4
Button bText1
Attributes
ID : 60
ID : 58
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -1366,7 +1366,7 @@ Button bText1
Button bText2
Attributes
ID : 61
ID : 59
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -1413,7 +1413,7 @@ Button bText2
Button bText3
Attributes
ID : 62
ID : 60
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -1460,7 +1460,7 @@ Button bText3
Button bText4
Attributes
ID : 63
ID : 61
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -1875,7 +1875,7 @@ Dual-state Button btOnOff4
Hotspot m0
Attributes
ID : 38
ID : 36
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -1912,10 +1912,14 @@ Hotspot m0
{
page popupInSel
}
if(type1.txt=="timer")
{
page popupTimer
}
Hotspot m1
Attributes
ID : 37
ID : 35
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -1952,10 +1956,14 @@ Hotspot m1
{
page popupInSel
}
if(type2.txt=="timer")
{
page popupTimer
}
Hotspot m2
Attributes
ID : 36
ID : 34
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -1992,10 +2000,14 @@ Hotspot m2
{
page popupInSel
}
if(type3.txt=="timer")
{
page popupTimer
}
Hotspot m3
Attributes
ID : 39
ID : 37
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -2032,10 +2044,14 @@ Hotspot m3
{
page popupInSel
}
if(type4.txt=="timer")
{
page popupTimer
}
Hotspot mSpecial
Attributes
ID : 34
ID : 32
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -2061,7 +2077,7 @@ Hotspot mSpecial
Hotspot mSwipeNext
Attributes
ID : 57
ID : 55
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -2081,7 +2097,7 @@ Hotspot mSwipeNext
Hotspot mSwipePrev
Attributes
ID : 59
ID : 57
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -2101,7 +2117,7 @@ Hotspot mSwipePrev
Hotspot mSwipeUp
Attributes
ID : 58
ID : 56
Scope : local
Dragging : 0
Disable release event after dragging: 0
@@ -2175,50 +2191,44 @@ Timer tmSerial
{
// command format: entityUpd,heading,navigation,[,type,internalName,iconId,displayName,optionalValue]x4
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
// get Type
spstr strCommand.txt,type1.txt,"~",3
spstr strCommand.txt,type1.txt,"~",14
// get internal name
spstr strCommand.txt,entn1.txt,"~",4
spstr strCommand.txt,entn1.txt,"~",15
if(type1.txt=="delete"||type1.txt=="")
{
vis bUp1,0
@@ -2233,14 +2243,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,tIcon1.txt,"~",5
spstr strCommand.txt,tIcon1.txt,"~",16
vis tIcon1,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",6
spstr strCommand.txt,tTmp.txt,"~",17
covx tTmp.txt,sys0,0,0
tIcon1.pco=sys0
// set name
spstr strCommand.txt,tEntity1.txt,"~",7
spstr strCommand.txt,tEntity1.txt,"~",18
vis tEntity1,1
}
if(type1.txt=="shutter")
@@ -2253,7 +2263,7 @@ Timer tmSerial
vis hSlider1,0
vis nNum1,0
// get Button State (optional Value)
spstr strCommand.txt,tId.txt,"~",8
spstr strCommand.txt,tId.txt,"~",19
// up button
spstr tId.txt,tTmp.txt,"|",3
if(tTmp.txt=="disable")
@@ -2304,11 +2314,11 @@ Timer tmSerial
vis hSlider1,0
vis nNum1,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",8
spstr strCommand.txt,tTmp.txt,"~",19
covx tTmp.txt,sys0,0,0
btOnOff1.val=sys0
}
if(type1.txt=="text")
if(type1.txt=="text"||type1.txt=="timer")
{
vis bUp1,0
vis bStop1,0
@@ -2321,7 +2331,7 @@ Timer tmSerial
bText1.pco=65535
bText1.pco2=65535
// get Text (optional Value)
spstr strCommand.txt,bText1.txt,"~",8
spstr strCommand.txt,bText1.txt,"~",19
}
if(type1.txt=="button"||type1.txt=="input_sel")
{
@@ -2336,7 +2346,7 @@ Timer tmSerial
bText1.pco=1374
bText1.pco2=1374
// get Text (optional Value)
spstr strCommand.txt,bText1.txt,"~",8
spstr strCommand.txt,bText1.txt,"~",19
}
if(type1.txt=="number")
{
@@ -2349,7 +2359,7 @@ Timer tmSerial
vis hSlider1,1
vis nNum1,1
// get config (optional Value) (use bText as variable)
spstr strCommand.txt,bText1.txt,"~",8
spstr strCommand.txt,bText1.txt,"~",19
//first value is current value
spstr bText1.txt,tTmp.txt,"|",0
covx tTmp.txt,sys0,0,0
@@ -2365,9 +2375,9 @@ Timer tmSerial
hSlider1.maxval=sys0
}
// get Type
spstr strCommand.txt,type2.txt,"~",9
spstr strCommand.txt,type2.txt,"~",20
// get internal name
spstr strCommand.txt,entn2.txt,"~",10
spstr strCommand.txt,entn2.txt,"~",21
if(type2.txt=="delete"||type2.txt=="")
{
vis bUp2,0
@@ -2382,14 +2392,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,tIcon2.txt,"~",11
spstr strCommand.txt,tIcon2.txt,"~",22
vis tIcon2,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",12
spstr strCommand.txt,tTmp.txt,"~",23
covx tTmp.txt,sys0,0,0
tIcon2.pco=sys0
// set name
spstr strCommand.txt,tEntity2.txt,"~",13
spstr strCommand.txt,tEntity2.txt,"~",24
vis tEntity2,1
}
if(type2.txt=="shutter")
@@ -2402,7 +2412,7 @@ Timer tmSerial
vis hSlider2,0
vis nNum2,0
// get Button State (optional Value)
spstr strCommand.txt,tId.txt,"~",14
spstr strCommand.txt,tId.txt,"~",25
// up button
spstr tId.txt,tTmp.txt,"|",3
if(tTmp.txt=="disable")
@@ -2453,11 +2463,11 @@ Timer tmSerial
vis hSlider2,0
vis nNum2,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",14
spstr strCommand.txt,tTmp.txt,"~",25
covx tTmp.txt,sys0,0,0
btOnOff2.val=sys0
}
if(type2.txt=="text")
if(type2.txt=="text"||type2.txt=="timer")
{
vis bUp2,0
vis bStop2,0
@@ -2470,7 +2480,7 @@ Timer tmSerial
bText2.pco=65535
bText2.pco2=65535
// get Text (optional Value)
spstr strCommand.txt,bText2.txt,"~",14
spstr strCommand.txt,bText2.txt,"~",25
}
if(type2.txt=="button"||type2.txt=="input_sel")
{
@@ -2485,7 +2495,7 @@ Timer tmSerial
bText2.pco=1374
bText2.pco2=1374
// get Text (optional Value)
spstr strCommand.txt,bText2.txt,"~",14
spstr strCommand.txt,bText2.txt,"~",25
}
if(type2.txt=="number")
{
@@ -2498,7 +2508,7 @@ Timer tmSerial
vis hSlider2,1
vis nNum2,1
// get config (optional Value) (use bText as variable)
spstr strCommand.txt,bText2.txt,"~",14
spstr strCommand.txt,bText2.txt,"~",25
//first value is current value
spstr bText2.txt,tTmp.txt,"|",0
covx tTmp.txt,sys0,0,0
@@ -2514,9 +2524,9 @@ Timer tmSerial
hSlider2.maxval=sys0
}
// get Type
spstr strCommand.txt,type3.txt,"~",15
spstr strCommand.txt,type3.txt,"~",26
// get internal name
spstr strCommand.txt,entn3.txt,"~",16
spstr strCommand.txt,entn3.txt,"~",27
if(type3.txt=="delete"||type3.txt=="")
{
vis bUp3,0
@@ -2531,14 +2541,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,tIcon3.txt,"~",17
spstr strCommand.txt,tIcon3.txt,"~",28
vis tIcon3,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",18
spstr strCommand.txt,tTmp.txt,"~",29
covx tTmp.txt,sys0,0,0
tIcon3.pco=sys0
// set name
spstr strCommand.txt,tEntity3.txt,"~",19
spstr strCommand.txt,tEntity3.txt,"~",30
vis tEntity3,1
}
if(type3.txt=="shutter")
@@ -2551,7 +2561,7 @@ Timer tmSerial
vis hSlider3,0
vis nNum3,0
// get Button State (optional Value)
spstr strCommand.txt,tId.txt,"~",20
spstr strCommand.txt,tId.txt,"~",31
// up button
spstr tId.txt,tTmp.txt,"|",3
if(tTmp.txt=="disable")
@@ -2602,11 +2612,11 @@ Timer tmSerial
vis hSlider3,0
vis nNum3,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",20
spstr strCommand.txt,tTmp.txt,"~",31
covx tTmp.txt,sys0,0,0
btOnOff3.val=sys0
}
if(type3.txt=="text")
if(type3.txt=="text"||type3.txt=="timer")
{
vis bUp3,0
vis bStop3,0
@@ -2619,7 +2629,7 @@ Timer tmSerial
bText3.pco=65535
bText3.pco2=65535
// get Text (optional Value)
spstr strCommand.txt,bText3.txt,"~",20
spstr strCommand.txt,bText3.txt,"~",31
}
if(type3.txt=="button"||type3.txt=="input_sel")
{
@@ -2634,7 +2644,7 @@ Timer tmSerial
bText3.pco=1374
bText3.pco2=1374
// get Text (optional Value)
spstr strCommand.txt,bText3.txt,"~",20
spstr strCommand.txt,bText3.txt,"~",31
}
if(type3.txt=="number")
{
@@ -2647,7 +2657,7 @@ Timer tmSerial
vis hSlider3,1
vis nNum3,1
// get config (optional Value) (use bText as variable)
spstr strCommand.txt,bText3.txt,"~",20
spstr strCommand.txt,bText3.txt,"~",31
//first value is current value
spstr bText3.txt,tTmp.txt,"|",0
covx tTmp.txt,sys0,0,0
@@ -2663,9 +2673,9 @@ Timer tmSerial
hSlider3.maxval=sys0
}
// get Type
spstr strCommand.txt,type4.txt,"~",21
spstr strCommand.txt,type4.txt,"~",32
// get internal name
spstr strCommand.txt,entn4.txt,"~",22
spstr strCommand.txt,entn4.txt,"~",33
if(type4.txt=="delete"||type4.txt=="")
{
vis bUp4,0
@@ -2680,14 +2690,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,tIcon4.txt,"~",23
spstr strCommand.txt,tIcon4.txt,"~",34
vis tIcon4,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",24
spstr strCommand.txt,tTmp.txt,"~",35
covx tTmp.txt,sys0,0,0
tIcon4.pco=sys0
// set name
spstr strCommand.txt,tEntity4.txt,"~",25
spstr strCommand.txt,tEntity4.txt,"~",36
vis tEntity4,1
}
if(type4.txt=="shutter")
@@ -2700,7 +2710,7 @@ Timer tmSerial
vis hSlider4,0
vis nNum4,0
// get Button State (optional Value)
spstr strCommand.txt,tId.txt,"~",26
spstr strCommand.txt,tId.txt,"~",37
// up button
spstr tId.txt,tTmp.txt,"|",3
if(tTmp.txt=="disable")
@@ -2751,11 +2761,11 @@ Timer tmSerial
vis hSlider4,0
vis nNum4,0
// get Button State (optional Value)
spstr strCommand.txt,tTmp.txt,"~",26
spstr strCommand.txt,tTmp.txt,"~",37
covx tTmp.txt,sys0,0,0
btOnOff4.val=sys0
}
if(type4.txt=="text")
if(type4.txt=="text"||type4.txt=="timer")
{
vis bUp4,0
vis bStop4,0
@@ -2768,7 +2778,7 @@ Timer tmSerial
bText4.pco=65535
bText4.pco2=65535
// get Text (optional Value)
spstr strCommand.txt,bText4.txt,"~",26
spstr strCommand.txt,bText4.txt,"~",37
}
if(type4.txt=="button"||type4.txt=="input_sel")
{
@@ -2783,7 +2793,7 @@ Timer tmSerial
bText4.pco=1374
bText4.pco2=1374
// get Text (optional Value)
spstr strCommand.txt,bText4.txt,"~",26
spstr strCommand.txt,bText4.txt,"~",37
}
if(type4.txt=="number")
{
@@ -2796,7 +2806,7 @@ Timer tmSerial
vis hSlider4,1
vis nNum4,1
// get config (optional Value) (use bText as variable)
spstr strCommand.txt,bText4.txt,"~",26
spstr strCommand.txt,bText4.txt,"~",37
//first value is current value
spstr bText4.txt,tTmp.txt,"|",0
covx tTmp.txt,sys0,0,0
@@ -2876,6 +2886,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
if(tInstruction.txt=="time")
{
@@ -2929,7 +2943,7 @@ Timer tmSerial
Timer tmSleep
Attributes
ID : 35
ID : 33
Scope : local
Period (ms): 1000
Enabled : yes
@@ -2960,7 +2974,7 @@ Timer tmSleep
TouchCap tc0
Attributes
ID : 48
ID : 46
Scope: local
Value: 0

View File

@@ -24,7 +24,7 @@ Page cardGrid
//remove background & activate reparse mode
vis p0,0
recmod=1
bauds=115200
baud=115200
//debug stuff
vis tTmp,0
vis tSend,0
@@ -96,12 +96,26 @@ Variable (string) entn6
Text :
Max. Text Size: 80
Variable (string) nent1
Attributes
ID : 42
Scope : local
Text :
Max. Text Size: 80
Variable (string) nent2
Attributes
ID : 43
Scope : local
Text :
Max. Text Size: 80
Variable (string) strCommand
Attributes
ID : 4
Scope : local
Text :
Max. Text Size: 500
Max. Text Size: 700
Variable (string) tSend
Attributes
@@ -512,6 +526,14 @@ Button bEntity1
{
page popupShutter
}
if(type1.txt=="input_sel")
{
page popupInSel
}
if(type1.txt=="timer")
{
page popupTimer
}
Touch Release Event
tmLP.en=0
@@ -571,6 +593,14 @@ Button bEntity2
{
page popupShutter
}
if(type2.txt=="input_sel")
{
page popupInSel
}
if(type2.txt=="timer")
{
page popupTimer
}
Touch Release Event
tmLP.en=0
@@ -630,6 +660,14 @@ Button bEntity3
{
page popupShutter
}
if(type3.txt=="input_sel")
{
page popupInSel
}
if(type3.txt=="timer")
{
page popupTimer
}
Touch Release Event
tmLP.en=0
@@ -689,6 +727,14 @@ Button bEntity4
{
page popupShutter
}
if(type4.txt=="input_sel")
{
page popupInSel
}
if(type4.txt=="timer")
{
page popupTimer
}
Touch Release Event
tmLP.en=0
@@ -748,6 +794,14 @@ Button bEntity5
{
page popupShutter
}
if(type5.txt=="input_sel")
{
page popupInSel
}
if(type5.txt=="timer")
{
page popupTimer
}
Touch Release Event
tmLP.en=0
@@ -807,6 +861,14 @@ Button bEntity6
{
page popupShutter
}
if(type6.txt=="input_sel")
{
page popupInSel
}
if(type6.txt=="timer")
{
page popupTimer
}
Touch Release Event
tmLP.en=0
@@ -857,14 +919,7 @@ Button bNext
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardGrid,"
if(bNext.txt=="")
{
tSend.txt+="bHome"
}else
{
tSend.txt+="bNext"
}
tSend.txt="event,buttonPress2,"+nent2.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -885,9 +940,9 @@ Button bPrev
Disable release event after dragging: 0
Send Component ID : disabled
Opacity : 127
x coordinate : 9
x coordinate : 10
y coordinate : 16
Width : 50
Width : 49
Height : 50
Effect : load
Effect Priority : 0
@@ -911,14 +966,7 @@ Button bPrev
Events
Touch Press Event
tSend.txt="event,buttonPress2,cardGrid,"
if(bPrev.txt=="")
{
tSend.txt+="bUp"
}else
{
tSend.txt+="bPrev"
}
tSend.txt="event,buttonPress2,"+nent1.txt+",button"
//send calc crc
btlen tSend.txt,sys0
crcrest 1,0xffff // reset CRC
@@ -1034,10 +1082,6 @@ Timer tmLP
{
page popupFan
}
if(tTmp.txt=="input_sel")
{
page popupInSel
}
Timer tmSerial
Attributes
@@ -1095,50 +1139,44 @@ Timer tmSerial
{
// command format: entityUpd,heading,navigation,[,type,internalName,iconId,iconColor,displayName,optionalValue]x6
spstr strCommand.txt,tHeading.txt,"~",1
// navigation icons
spstr strCommand.txt,tId.txt,"~",2
spstr tId.txt,tTmp.txt,"|",0
if(tTmp.txt=="0")
// navigation icon left
spstr strCommand.txt,tTmp.txt,"~",2 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bPrev,0
tsw mSwipePrev,0
tsw mSwipeUp,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent1.txt,"~",3
// change icon
spstr strCommand.txt,bPrev.txt,"~",4
// change icon color
spstr strCommand.txt,tTmp.txt,"~",5
covx tTmp.txt,sys0,0,0
bPrev.pco=sys0
vis bPrev,1
tsw mSwipePrev,1
tsw mSwipeUp,0
bPrev.txt=""
}
if(tTmp.txt=="2")
{
vis bPrev,1
tsw mSwipePrev,0
tsw mSwipeUp,1
bPrev.txt=""
}
spstr tId.txt,tTmp.txt,"|",1
if(tTmp.txt=="0")
// navigation icon right
spstr strCommand.txt,tTmp.txt,"~",8 //type
if(tTmp.txt=="delete"||tTmp.txt=="")
{
vis bNext,0
tsw mSwipeNext,0
}
if(tTmp.txt=="1")
}else
{
// get internal name
spstr strCommand.txt,nent2.txt,"~",9
// change icon
spstr strCommand.txt,bNext.txt,"~",10
// change icon color
spstr strCommand.txt,tTmp.txt,"~",11
covx tTmp.txt,sys0,0,0
bNext.pco=sys0
vis bNext,1
tsw mSwipeNext,1
bNext.txt=""
}
if(tTmp.txt=="2")
{
vis bNext,1
bNext.txt=""
}
// get Type
spstr strCommand.txt,type1.txt,"~",3
spstr strCommand.txt,type1.txt,"~",14
// get internal name
spstr strCommand.txt,entn1.txt,"~",4
spstr strCommand.txt,entn1.txt,"~",15
if(type1.txt=="delete"||type1.txt=="")
{
vis tEntity1,0
@@ -1146,20 +1184,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity1.txt,"~",5
spstr strCommand.txt,bEntity1.txt,"~",16
vis bEntity1,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",6
spstr strCommand.txt,tTmp.txt,"~",17
covx tTmp.txt,sys0,0,0
bEntity1.pco=sys0
// set name
spstr strCommand.txt,tEntity1.txt,"~",7
spstr strCommand.txt,tEntity1.txt,"~",18
vis tEntity1,1
}
// get Type
spstr strCommand.txt,type2.txt,"~",9
spstr strCommand.txt,type2.txt,"~",20
// get internal name
spstr strCommand.txt,entn2.txt,"~",10
spstr strCommand.txt,entn2.txt,"~",21
if(type2.txt=="delete"||type2.txt=="")
{
vis tEntity2,0
@@ -1167,20 +1205,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity2.txt,"~",11
spstr strCommand.txt,bEntity2.txt,"~",22
vis bEntity2,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",12
spstr strCommand.txt,tTmp.txt,"~",23
covx tTmp.txt,sys0,0,0
bEntity2.pco=sys0
// set name
spstr strCommand.txt,tEntity2.txt,"~",13
spstr strCommand.txt,tEntity2.txt,"~",24
vis tEntity2,1
}
// get Type
spstr strCommand.txt,type3.txt,"~",15
spstr strCommand.txt,type3.txt,"~",26
// get internal name
spstr strCommand.txt,entn3.txt,"~",16
spstr strCommand.txt,entn3.txt,"~",27
if(type3.txt=="delete"||type3.txt=="")
{
vis tEntity3,0
@@ -1188,20 +1226,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity3.txt,"~",17
spstr strCommand.txt,bEntity3.txt,"~",28
vis bEntity3,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",18
spstr strCommand.txt,tTmp.txt,"~",29
covx tTmp.txt,sys0,0,0
bEntity3.pco=sys0
// set name
spstr strCommand.txt,tEntity3.txt,"~",19
spstr strCommand.txt,tEntity3.txt,"~",30
vis tEntity3,1
}
// get Type
spstr strCommand.txt,type4.txt,"~",21
spstr strCommand.txt,type4.txt,"~",32
// get internal name
spstr strCommand.txt,entn4.txt,"~",22
spstr strCommand.txt,entn4.txt,"~",33
if(type4.txt=="delete"||type4.txt=="")
{
vis tEntity4,0
@@ -1209,20 +1247,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity4.txt,"~",23
spstr strCommand.txt,bEntity4.txt,"~",34
vis bEntity4,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",24
spstr strCommand.txt,tTmp.txt,"~",35
covx tTmp.txt,sys0,0,0
bEntity4.pco=sys0
// set name
spstr strCommand.txt,tEntity4.txt,"~",25
spstr strCommand.txt,tEntity4.txt,"~",36
vis tEntity4,1
}
// get Type
spstr strCommand.txt,type5.txt,"~",27
spstr strCommand.txt,type5.txt,"~",38
// get internal name
spstr strCommand.txt,entn5.txt,"~",28
spstr strCommand.txt,entn5.txt,"~",39
if(type5.txt=="delete"||type5.txt=="")
{
vis tEntity5,0
@@ -1230,20 +1268,20 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity5.txt,"~",29
spstr strCommand.txt,bEntity5.txt,"~",40
vis bEntity5,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",30
spstr strCommand.txt,tTmp.txt,"~",41
covx tTmp.txt,sys0,0,0
bEntity5.pco=sys0
// set name
spstr strCommand.txt,tEntity5.txt,"~",31
spstr strCommand.txt,tEntity5.txt,"~",42
vis tEntity5,1
}
// get Type
spstr strCommand.txt,type6.txt,"~",33
spstr strCommand.txt,type6.txt,"~",44
// get internal name
spstr strCommand.txt,entn6.txt,"~",34
spstr strCommand.txt,entn6.txt,"~",45
if(type6.txt=="delete"||type6.txt=="")
{
vis tEntity6,0
@@ -1251,14 +1289,14 @@ Timer tmSerial
}else
{
// change icon
spstr strCommand.txt,bEntity6.txt,"~",35
spstr strCommand.txt,bEntity6.txt,"~",46
vis bEntity6,1
// change icon color
spstr strCommand.txt,tTmp.txt,"~",36
spstr strCommand.txt,tTmp.txt,"~",47
covx tTmp.txt,sys0,0,0
bEntity6.pco=sys0
// set name
spstr strCommand.txt,tEntity6.txt,"~",37
spstr strCommand.txt,tEntity6.txt,"~",48
vis tEntity6,1
}
}
@@ -1326,6 +1364,10 @@ Timer tmSerial
{
page cardPower
}
if(tId.txt=="cardChart")
{
page cardChart
}
}
if(tInstruction.txt=="time")
{

File diff suppressed because it is too large Load Diff

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