Lua skripty OpenTx2: Porovnání verzí
Z Wiki OpenTX
(Založena nová stránka: ====Opentx 2.x přináší novinku v podobě možnosti skriptování v jazyce Lua.==== Skripty Lua jsou jekési miniaplikace, které mohou doplnit funkčnost rádia o n…) |
|||
Řádek 8: | Řádek 8: | ||
====Speciálním použitím Lua skriptu je průvodce nastavením modelu.==== | ====Speciálním použitím Lua skriptu je průvodce nastavením modelu.==== | ||
+ | |||
+ | Now - OpenTX 2.0.3 - we have 3 kinds of Lua scripts, the 3rd category is "function scripts" that are available in the Special Functions screen. | ||
+ | |||
+ | I am adding a new (4th) category which will be the telemetry scripts. Theorically you will be able to have up to 7 custom telemetry screens, all written in Lua. | ||
+ | |||
+ | Then we will have a 5th category which will be the templates scripts, those scripts will be available in a contextual menu, just as the Wizard. | ||
+ | |||
+ | One limitation (due to RAM usage) is on the scripts count, 7 is the maximum (shared in all categories). | ||
+ | |||
+ | Also in OpenTX 2.0.3 I changed the directories, here is the new structure on the SD card: | ||
+ | /SCRIPTS/ | ||
+ | /SCRIPTS/MIXES/ | ||
+ | /SCRIPTS/FUNCTIONS/ | ||
+ | /SCRIPTS/WIZARD/ | ||
+ | |||
+ | In OpenTX 2.0.4 you will put your telemetry scripts like this (you will be able to have different scripts on a per model basis): | ||
+ | /SCRIPTS/<MODELNAME>/telemXX.lua | ||
+ | |||
+ | And in OpenTX 2.0.5 you will put your templates scripts here: | ||
+ | /SCRIPTS/TEMPLATES/ | ||
+ | |||
+ | Enjoy! | ||
+ | Bertrand |
Verze z 18. 6. 2014, 19:53
Opentx 2.x přináší novinku v podobě možnosti skriptování v jazyce Lua.
Skripty Lua jsou jekési miniaplikace, které mohou doplnit funkčnost rádia o nevídané funkce. Jejich výhodou je jejich modulárnost. Nejsou součástí firmware, ale zpouští se přímo z SD karty. Mohou fungovat v několika režimech:
- jednorázový skript, který provede nějakou operaci a poté se ukončí
- skript který funguje neustále na pozadí
Speciálním použitím Lua skriptu je průvodce nastavením modelu.
Now - OpenTX 2.0.3 - we have 3 kinds of Lua scripts, the 3rd category is "function scripts" that are available in the Special Functions screen.
I am adding a new (4th) category which will be the telemetry scripts. Theorically you will be able to have up to 7 custom telemetry screens, all written in Lua.
Then we will have a 5th category which will be the templates scripts, those scripts will be available in a contextual menu, just as the Wizard.
One limitation (due to RAM usage) is on the scripts count, 7 is the maximum (shared in all categories).
Also in OpenTX 2.0.3 I changed the directories, here is the new structure on the SD card: /SCRIPTS/ /SCRIPTS/MIXES/ /SCRIPTS/FUNCTIONS/ /SCRIPTS/WIZARD/
In OpenTX 2.0.4 you will put your telemetry scripts like this (you will be able to have different scripts on a per model basis): /SCRIPTS/<MODELNAME>/telemXX.lua
And in OpenTX 2.0.5 you will put your templates scripts here: /SCRIPTS/TEMPLATES/
Enjoy! Bertrand