RadioMaster TX16s: where do I activate LUA and telemetry scripts

openTx has introduced a range of new features, ideas and bling. It is fast becoming the firmware of choice for many users. openTx will run on ALL current hardware platforms, including the gruvin9x and sky9x boards. Work has already started to support the new FrSky X9D radio!
Post Reply
wilopaan
Posts: 131
Joined: Sun Sep 09, 2018 6:09 pm
Country: -

RadioMaster TX16s: where do I activate LUA and telemetry scripts

Post by wilopaan » Fri May 22, 2020 7:00 pm

Hi all,

just wanted to move my telemetry scripts from my Jumper T12 to my new TX16s. So I copied the scripts to the TELEMETRY and MIXES folders in SCRIPTS.

But (dump question): where is the screen to

1) acticate MIXES scripts
2) select a telemetry scripts for a telemetry screen?

In the OpenTX version for the jumper it was pretty easy to find. But with the OpenTX they delivered for the TX16s I just can't find the screens where to setup this stuff up.

Thanks!


wilopaan
Posts: 131
Joined: Sun Sep 09, 2018 6:09 pm
Country: -

Re: RadioMaster TX16s: where do I activate LUA and telemetry scripts

Post by wilopaan » Fri May 22, 2020 8:18 pm

Ok, built a new firmware with LUA enabled.

But still missing the telemetry scripts

User avatar
Kilrah
Posts: 10558
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: RadioMaster TX16s: where do I activate LUA and telemetry scripts

Post by Kilrah » Fri May 22, 2020 8:40 pm

There are no telemetry scripts on any of the color radios in OpenTX, widgets are used instead.

lshems
Posts: 47
Joined: Tue Sep 15, 2015 5:36 pm
Country: -

Re: RadioMaster TX16s: where do I activate LUA and telemetry scripts

Post by lshems » Sat May 23, 2020 8:04 am


wilopaan
Posts: 131
Joined: Sun Sep 09, 2018 6:09 pm
Country: -

Re: RadioMaster TX16s: where do I activate LUA and telemetry scripts

Post by wilopaan » Sat May 23, 2020 11:18 am

Kilrah wrote:
Fri May 22, 2020 8:40 pm
There are no telemetry scripts on any of the color radios in OpenTX, widgets are used instead.
Ok, thank you.

I used the telemetry scripts and their event-handling to create some interactive functionality. How can I do that now? Are widget script capable of processing button events?


User avatar
Kilrah
Posts: 10558
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: RadioMaster TX16s: where do I activate LUA and telemetry scripts

Post by Kilrah » Sat May 23, 2020 11:37 am

Not at this point, planned for 2.4.

wilopaan
Posts: 131
Joined: Sun Sep 09, 2018 6:09 pm
Country: -

Re: RadioMaster TX16s: where do I activate LUA and telemetry scripts

Post by wilopaan » Sat May 23, 2020 11:41 am

Kilrah wrote:
Sat May 23, 2020 11:37 am
Not at this point, planned for 2.4.
Just figured out, that I may be use a TOOLS script. Looks not very different to telemetry scripts ...

wilopaan
Posts: 131
Joined: Sun Sep 09, 2018 6:09 pm
Country: -

Re: RadioMaster TX16s: where do I activate LUA and telemetry scripts

Post by wilopaan » Sat May 23, 2020 12:02 pm

Mmh, next problem: print() is not working in companion? How to debug things then?

lshems
Posts: 47
Joined: Tue Sep 15, 2015 5:36 pm
Country: -

Re: RE: Re: RadioMaster TX16s: where do I activate LUA and telemetry scripts

Post by lshems » Sat May 23, 2020 9:29 pm

wilopaan wrote:Mmh, next problem: print() is not working in companion? How to debug things then?
Why not? Should.

lshems
Posts: 47
Joined: Tue Sep 15, 2015 5:36 pm
Country: -

Re: RE: Re: RadioMaster TX16s: where do I activate LUA and telemetry scripts

Post by lshems » Sat May 23, 2020 9:31 pm

wilopaan wrote:
Kilrah wrote:
Fri May 22, 2020 8:40 pm
There are no telemetry scripts on any of the color radios in OpenTX, widgets are used instead.
Ok, thank you.

I used the telemetry scripts and their event-handling to create some interactive functionality. How can I do that now? Are widget script capable of processing button events?
No, but switch events.

I use two three state switches to simulate plus/minus and enter/exit.

Works as a charm, even with a repeat function when holding in plus or minus for a longer time.

wilopaan
Posts: 131
Joined: Sun Sep 09, 2018 6:09 pm
Country: -

Re: RadioMaster TX16s: where do I activate LUA and telemetry scripts

Post by wilopaan » Sat May 23, 2020 9:31 pm

There is no output from the scripts in the debugging console and after some seconds it crashes with "too much open files"

wilopaan
Posts: 131
Joined: Sun Sep 09, 2018 6:09 pm
Country: -

Re: RE: Re: RadioMaster TX16s: where do I activate LUA and telemetry scripts

Post by wilopaan » Sat May 23, 2020 9:33 pm

lshems wrote:
Sat May 23, 2020 9:31 pm
wilopaan wrote:
Kilrah wrote:
Fri May 22, 2020 8:40 pm
There are no telemetry scripts on any of the color radios in OpenTX, widgets are used instead.
Ok, thank you.

I used the telemetry scripts and their event-handling to create some interactive functionality. How can I do that now? Are widget script capable of processing button events?
No, but switch events.

I use two three state switches to simulate plus/minus and enter/exit.

Works as a charm, even with a repeat function when holding in plus or minus for a longer time.
What do you mean with switch events?
Do you have to poll the switches, that is selft-generate kind-of event?

lshems
Posts: 47
Joined: Tue Sep 15, 2015 5:36 pm
Country: -

Re: RE: Re: RadioMaster TX16s: where do I activate LUA and telemetry scripts

Post by lshems » Sun May 24, 2020 1:45 am

wilopaan wrote:There is no output from the scripts in the debugging console and after some seconds it crashes with "too much open files"
Then you do probably something wrong. Don't write to the debug screen every cycle a lot of data. It will crash indeed.

lshems
Posts: 47
Joined: Tue Sep 15, 2015 5:36 pm
Country: -

Re: RE: Re: RE: Re: RadioMaster TX16s: where do I activate LUA and telemetry scripts

Post by lshems » Sun May 24, 2020 1:45 am

wilopaan wrote:
lshems wrote:
Sat May 23, 2020 9:31 pm
wilopaan wrote: Ok, thank you.

I used the telemetry scripts and their event-handling to create some interactive functionality. How can I do that now? Are widget script capable of processing button events?
No, but switch events.

I use two three state switches to simulate plus/minus and enter/exit.

Works as a charm, even with a repeat function when holding in plus or minus for a longer time.
What do you mean with switch events?
Do you have to poll the switches, that is selft-generate kind-of event?
Yep.

rdeanchurch
Posts: 696
Joined: Tue Dec 27, 2011 11:22 pm
Country: United States
Location: Carson City, Nv

Re: RadioMaster TX16s: where do I activate LUA and telemetry scripts

Post by rdeanchurch » Sun May 24, 2020 2:18 am

There are 'switches' which are 2 or 3 position toggle and there are navigation buttons/rotaries that generate EVENTS.
Events are auto updated by the Operating System, Switches must be polled to get current status.
Dean
OldDmbThms: 1. Takeoff, 2. Crash, 3. Repair, GOTO 1

wilopaan
Posts: 131
Joined: Sun Sep 09, 2018 6:09 pm
Country: -

Re: RadioMaster TX16s: where do I activate LUA and telemetry scripts

Post by wilopaan » Sun May 24, 2020 6:00 am

Ok, the frequency the tools-scripts are called seems to be much higher than telemetry scripts. So the debug sometimes yields a kind of overflow.

The good thing is, that porting telemetrie scripts to tools scripts is easy (well, no lcd.drawScreenTitle() ?). One drawback is, that running a tools script occupies the full screen.

Are there any other obstacles using a tools script for kind of userinterface to some special functionality (sending special channel values to some special hw connected to the receiver)? Do tools scripts infer with the normal function of the radio, e.g. causing some delay?

lshems
Posts: 47
Joined: Tue Sep 15, 2015 5:36 pm
Country: -

Re: RE: Re: RadioMaster TX16s: where do I activate LUA and telemetry scripts

Post by lshems » Sun May 24, 2020 7:59 am

rdeanchurch wrote:There are 'switches' which are 2 or 3 position toggle and there are navigation buttons/rotaries that generate EVENTS.
Events are auto updated by the Operating System, Switches must be polled to get current status.
You can generate events yourself, especially if you have to call the run script from the background.

lshems
Posts: 47
Joined: Tue Sep 15, 2015 5:36 pm
Country: -

Re: RE: Re: RadioMaster TX16s: where do I activate LUA and telemetry scripts

Post by lshems » Sun May 24, 2020 8:00 am

wilopaan wrote:Ok, the frequency the tools-scripts are called seems to be much higher than telemetry scripts. So the debug sometimes yields a kind of overflow.

The good thing is, that porting telemetrie scripts to tools scripts is easy (well, no lcd.drawScreenTitle() ?). One drawback is, that running a tools script occupies the full screen.

Are there any other obstacles using a tools script for kind of userinterface to some special functionality (sending special channel values to some special hw connected to the receiver)? Do tools scripts infer with the normal function of the radio, e.g. causing some delay?
Yes, NO MIXER SCRIPTS OR FUNCTION SCRIPTS OR WIDGETS are running at the same time.

For many not feasible during flight.

wilopaan
Posts: 131
Joined: Sun Sep 09, 2018 6:09 pm
Country: -

Re: RadioMaster TX16s: where do I activate LUA and telemetry scripts

Post by wilopaan » Sun May 24, 2020 9:00 am

Does that mean, that the e.g. mixer scripts are generally disabled when the tools script runs. Or are they called round robin?

lshems
Posts: 47
Joined: Tue Sep 15, 2015 5:36 pm
Country: -

Re: RE: Re: RadioMaster TX16s: where do I activate LUA and telemetry scripts

Post by lshems » Sun May 24, 2020 9:24 am

wilopaan wrote:Does that mean, that the e.g. mixer scripts are generally disabled when the tools script runs. Or are they called round robin?
Disabled.

'tool' scripts run exclusive.

wilopaan
Posts: 131
Joined: Sun Sep 09, 2018 6:09 pm
Country: -

Re: RE: Re: RadioMaster TX16s: where do I activate LUA and telemetry scripts

Post by wilopaan » Sun May 24, 2020 9:31 am

lshems wrote:
Sun May 24, 2020 9:24 am
wilopaan wrote:Does that mean, that the e.g. mixer scripts are generally disabled when the tools script runs. Or are they called round robin?
Disabled.

'tool' scripts run exclusive.
Ok, thats no good news.

Then I have to use some switches or pots ... until the widgets support events from the ui-buttons

lshems
Posts: 47
Joined: Tue Sep 15, 2015 5:36 pm
Country: -

Re: RE: Re: RE: Re: RadioMaster TX16s: where do I activate LUA and telemetry scripts

Post by lshems » Sun May 24, 2020 10:04 am

wilopaan wrote:
lshems wrote:
Sun May 24, 2020 9:24 am
wilopaan wrote:Does that mean, that the e.g. mixer scripts are generally disabled when the tools script runs. Or are they called round robin?
Disabled.

'tool' scripts run exclusive.
Ok, thats no good news.

Then I have to use some switches or pots ... until the widgets support events from the ui-buttons
Make sure to do that in the function that's called when the display is active for that widget, to prevent unwanted change of settings or stuff.

wilopaan
Posts: 131
Joined: Sun Sep 09, 2018 6:09 pm
Country: -

Re: RadioMaster TX16s: where do I activate LUA and telemetry scripts

Post by wilopaan » Mon May 25, 2020 5:33 am

I am using the trim buttons t6 and t5 for now.
A little bit annoying is, da one has to disable them in flightmodes and define inputs for them.


Post Reply

Return to “openTx”