Tools for OpenTx Program Development - RC Groups
Shop our Airplanes Products Drone Products Sales
Thread Tools
Jan 25, 2018, 05:35 PM
Registered User
mikeshellim's Avatar
Discussion

Tools for OpenTx Program Development


OpenTx is an incredibly powerful operating system, and with each new version come enhancements which further extend its capabilities. However the editing facilities in both OpenTx and Companion have not always kept pace, and a number of users have developed their own tools using Lua and other methods to help improve the programming experience. This thread will hopefully provide a central discussion point.

Examples of 'tools': configurators for logical switches and channels, simulators, documenters... anything which improves the experience of programming OpenTx setups, especially for complex F3X sailplanes. This is quite a specialised thread, hopefully we can stay on topic and help each other create great setups in OpenTx.
Sign up now
to remove ads between posts
Jan 25, 2018, 05:43 PM
Registered User
mikeshellim's Avatar
Some free tools already available:

If you have any suggestions or experience of these tools or your own ones, please keep em coming - it might also give the Devs some ideas for enhancements.
Last edited by mikeshellim; Jan 25, 2018 at 06:05 PM.
Jan 26, 2018, 06:20 AM
Registered User
Mike, I hope this will not be OT here - otherwise please feel free to delete.

I am coming from HOTT and Spektrum and I am a software engineer. I finally made my way to OpenTX / Companion / Taranis X9D plus. The programming caps on this platform are outstanding!

I am still trying to find my best workflow with the available tools. I basically want to have all models on the TX as similar as possible, i.e. flight mode change always on SG, similar telemetry screens and alarms. No matter if a quad or a plane. So all models will have stuff in common, say some mix entries for SG, some logical switches and some special functions.

How can I keep those consistent between models? Are there tools? What's the best practice? Are there "global" parts between models?

I am currently aware of two roads to go:

* Creating a model from scratch: I found that in companion I could drag and drop the mix entries between models. Thats not bad. But I cannot figure out how to do that for other stuff like i.e. special functions. I could "clone" many of my common settings this way.

* Cloning a model from an existing one: with all the mixes, special functions, telemetry etc. in place, rename model and then just bind to new receiver and edit the model specific stuff, ie. channel mapping or servo directions.

Is there a better way to deal with it?

I could well imagine to write LUA stuff later or create some add on tools to deal with OpenTX. But first things first.
Jan 26, 2018, 09:50 AM
Jesper Frickmann
jfrickmann's Avatar
Quote:
Originally Posted by spinner_deluxe
...I am still trying to find my best workflow with the available tools. I basically want to have all models on the TX as similar as possible, i.e. flight mode change always on SG, similar telemetry screens and alarms. No matter if a quad or a plane. So all models will have stuff in common, say some mix entries for SG, some logical switches and some special functions.

How can I keep those consistent between models? Are there tools? What's the best practice? Are there "global" parts between models?

I am currently aware of two roads to go:

* Creating a model from scratch: I found that in companion I could drag and drop the mix entries between models. Thats not bad. But I cannot figure out how to do that for other stuff like i.e. special functions. I could "clone" many of my common settings this way.

* Cloning a model from an existing one: with all the mixes, special functions, telemetry etc. in place, rename model and then just bind to new receiver and edit the model specific stuff, ie. channel mapping or servo directions.

Is there a better way to deal with it?

I could well imagine to write LUA stuff later or create some add on tools to deal with OpenTX. But first things first.
If you are using a current program template, then modify it for your own needs, e.g. by re-assigning switches etc. the way that you like it, and then use that template for all of your models.

If you create your own program, then I suggest the following "better practice" for switches:



Assign all of the physical switches to logical switches in the first lines of the logical switches. Then go from the logical instead of the physical switch. That way, people using the template only need to change that one logical switch line to re-assign the physical switch.

Jesper
Last edited by jfrickmann; Jan 26, 2018 at 10:04 AM.
Jan 26, 2018, 10:02 AM
Jesper Frickmann
jfrickmann's Avatar

Logical switch editor


This Lua script can be used to easily move logical switches around. Run it as a one-time script. Use +/- or rotary to select a line. Press ENTER to move.

It updates references between logical switches, but not references from flight modes, mixes, special functions etc. to logical switches - so you still have to do that manually.

LS manipulation with Lua is practically undocumented, so I have had to do my own probing to make it work. There may be errors, although it worked fine for me when I tested it. It may also be subject to breaking when new OpenTX versions come out. I have developed and tested on 2.2.1.

So make a copy of your program before you start, and do some testing in Companion afterwards to make sure that things work as expected!

Jesper

P.S. A good use of this program would be to set up physical switches as logical switches in an existing template, as I explained in my previous post.
Jan 26, 2018, 10:10 AM
Registered User
Great advice! Thank you both. I'll check the template idea first. Those better switches .. sounds convincing... the additional paramaters of a logical switch might be useful for special cases anyway.

...and the LUA for logical switches might be handy anyway.
Jan 26, 2018, 10:12 AM
Jesper Frickmann
jfrickmann's Avatar

Channel configurator


This Lua script can be used to easily move mixes and output channels around. Run it as a one-time script. Use ± or rotary to select a channel. Press ENTER to edit. Use ± or rotary to select what to edit. The following items can be edited.
  1. Servo direction.
  2. The entire servo interval. This keeps the center point in the middle between min. and max. and moves all three points up or down. If necessary, the interval is scaled to avoid exceeding ±125%. I believe that this is what most people want!
  3. Servo end points. Adjusts the range while keeping the end points symmetrical around the center.
  4. Minimum point.
  5. Center point.
  6. Maximum point.
  7. Channel number. This moves the channel up or down on the list. All mixer lines and the output line are moved.
Press EXIT when you are done.

It updates references between mixes, but not references from flight modes, logical switches, special functions etc. to mixes - so you still have to do that manually. Make a copy of your program before you start, and do some testing in Companion afterwards to make sure that things work as expected!

Jesper
Jan 29, 2018, 12:53 AM
Sir Tim Rowledge
rowledge's Avatar
Currently the Companion tools are very much modelled on the display on the tx, which makes some sense for explaining how to use it. Unfortunately it
A) doesn’t take advantage of the much better display and memory available on a ‘real’ computer , and
B) doesn’t provide any tools to cross reference information within the model.
As an example, it would be nice to be able to choose a longer name for curves and mixes etc for use within Companion- something more meaningful than 3 letters would help me a lot. Clearly this would be some sort of mapping since there is good reason for the on-tx limit. And clearly it might end up making on-tx programming more difficult.
As another example, it is a bit of a pain to work out where a curve or mix etc is actually used. The only ‘easy ‘ way I’ve found is to print the model to PDF (simple enough on a Mac, obviously) and use Preview’s text search. That’s not the most effective way we could imagine. A plain text search is a long way from the best way to find details about structured information but in small programs such as we can build in opentx it would be decent enough to really help. Finding every instance of ‘ail’ even in ‘aileron’, ‘mail’,and ‘extrailluminated’ instead of ‘ail’-the-mix is painful in a major program but tolerable in 10-100 lines.
A way to have an equivalent of subroutines would be nice too. I’ve been using Mike Shellim’s esoarplus code a lot recently and even with the huge effort he’s made to be clear and documented it is still hard to separate out the motor arming ‘macro’ for example. With macros/subroutines it would be possible to cope with him coming up with an improvement without doing a major rewrite.
I wish I could say “but wait! I have a solution right here!” but I don’t. Think of this as a fantasy request for someone that is looking for a project.
Feb 19, 2018, 02:52 PM
Have Fun and Just Fly!
l shems's Avatar
Deleted on first request.
Last edited by l shems; Apr 15, 2018 at 08:59 AM.
Apr 15, 2018, 03:09 AM
Have Fun and Just Fly!
l shems's Avatar
https://www.rcgroups.com/forums/show....php?t=3065291

Check out this repository.
Apr 15, 2018, 03:45 AM
Registered User
Quote:
Originally Posted by l shems
Not for free, but reasonably priced.
If people find it problematic, I'll delete the post.
I find it problematic.
Apr 15, 2018, 10:39 AM
Registered User
Quote:
Originally Posted by toton
I find it problematic.
Me to. All OpenTX tools, widgets ect should be free. But that is just my opinion.
Apr 15, 2018, 02:15 PM
Have Fun and Just Fly!
l shems's Avatar
Quote:
Originally Posted by Tadango
Me to. All OpenTX tools, widgets ect should be free. But that is just my opinion.
Hi,

Little late to the party. I had already deleted the post on first request.

Perhaps you didn't notice.

( I get mails of the latest post, so I can imagine you responded to tontons request, without kniwing that was already granted.)
Apr 15, 2018, 04:30 PM
Registered User
ridgerunr's Avatar
Quote:
Originally Posted by jfrickmann
... If you create your own program, then I suggest the following "better practice" for switches:

...
I can see some benefits, but also some drawbacks to using this technique.
  • When looking through the FLIGHT MODES, INPUTS, MIXER and SPECIAL FUNCTIONS screens on the Tx, the actual assigned switch is obfuscated and not readily apparent (you would need to switch to the LOGICAL SWITCHES page to figure it out.)
  • Adds an unnecessary level of indirection.
  • Eats up a bunch of logical switches.
I prefer to spend the time at the model creation stage to choose the switch mapping and make sure everything is right, (and I rarely need to change switch assignments.)

That said, if you do change switch assignments frequently, your technique is quite clever!
Apr 15, 2018, 04:38 PM
Registered User
ridgerunr's Avatar
Quote:
Originally Posted by spinner_deluxe
... * Cloning a model from an existing one: with all the mixes, special functions, telemetry etc. in place, rename model and then just bind to new receiver and edit the model specific stuff, ie. channel mapping or servo directions. ...
After 5 years working with OTX, (mostly CP Helis), this "Road 2" method is the one I use. Just set up a baseline template model with all the needed features for a model type (Plank, Multi, Heli, etc.), then copy it to an empty slot. As you say, all you then need to do is rename it and make any needed changes.

Easy, peasy!


Quick Reply
Message:

Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion Taranis/Horus/OpenTX radio mods and programming for F3X/ TD Miami Mike Multi Task F3X 83 Apr 09, 2017 05:09 AM
Discussion OpenTX LED programming problem arkennedy75 Radios 0 Apr 11, 2016 07:22 PM
Discussion What Drawing Tools For Fast Development Of Simulator Airfield Sceneries? JD-Slow-Thumbs CAD/CAM 1 May 04, 2012 01:48 AM
Discussion Canon Hackers Developement Kit (CHDK) New AP Tool For Me larry baraniuk Aerial Photography 6 Oct 17, 2011 10:56 PM