OpenTX 2.1 telemetry system preview

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
User avatar
Kilrah
Posts: 11108
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

OpenTX 2.1 telemetry system preview

Post by Kilrah »

IMG_1822_r.jpg
The main improvement for OpenTX 2.1 and result of a few months of work is a complete rework of how telemetry is handled.
The existing system in 2.0 and older is based on 2 old systems that imposed too many limitations compared to what today's equipment is capable of:
  • The FrSky D system, which assumed a "frozen" environment with a given number of sensor types and count
  • The 9X and its limited resources that required telemetry handling to be optimized to that system and tightly nested with the display and menus to save memory, making it very rigid with any modification being complex, not evolutive at all.
The best was thus to wipe everything related to it and start from scratch, with the same "generic" approach used for all other aspects of the firmware to allow for maximum flexibility and to make it future-proof by making future changes easy. It is even ready to accept completely new telemetry protocols easily.

A few keypoints of the result:
  • Each value sent down is treated as a separate "sensor" with its own properties (unit, decimal precision, ratio/offset) and options (auto offset, filtering, persistent storage at power off, logging enabled). Each sensor has its own user-defined name and keeps track of its own min/max value.
  • In the case of the FrSky system, these sensors are auto-discovered anytime the radio and receiver/sensors are powered up.
  • Sensors can be duplicated, so for example a given value e.g. altitude from the same vario sensor can be displayed/announced/logged simultaneously in different units, or with different options (absolute altitude and altitude above start point with auto or manual offset,...)
  • Multiple physical sensors returning the same value are supported as long as there is a way to differentiate them. With the FrSky S-port system it means you can connect any number of identical sensors as long as you make sure to change the IDs of sensors with the FrSky SBUS servo channel changer (SCC) as required so each ID is unique in the smart port chain (explained in the sensor's and SCC's manuals). If you want to measure individual motor currents of your octocopter with 8 FCS-40A sensors, no problem.
  • "Calculated" virtual sensors can be manually created to combine values or extract extra data. Values can be added, averaged or multiplied, the minimum or maximum of a set of up to 4 values van be extracted. This also takes care of "special cases" like calculating GPS distance (2D or 3D), getting the value of a particular cell of a lipo cell sensor, calculating mAh consumption etc. For example Power can be calculated easily by multiplying the related voltage and current, total voltages of multiple lipo cell sensors can be added to get the total voltage of series-wired packs, the minimum cell of each of them can be extracted and the lowest of all can be found using the Minimum function.
  • Each sensor can be reset individually with a special function, so no more losing all your min/max values when you just want to reset altitude offset to start point.
Of course every sensor can be used everywhere like before for voice announcements, in logical switches, in inputs for proportional actions, and can be displayed on custom telemetry screens. One big advantage is that values can be seen directly on the telemetry setup page, so no need to add one to a custom screen just to have a look at it once. New data reception is visualised, and loss of a sensor is automatically detected.

2.1 is still pretty much in alpha state but the new system is available to try for motivated testers who understand how important it is to back up their firmware and settings in the 2.1 nightly builds. Most of the sensor handling is finished and should cover all previous use cases and a lot more. There are still a few broken things (e.g voice announcement units) and unimplemented things (e.g. sensor loss warnings). Any feedback and issue reports are welcome, we've certainly overlooked a few usage cases.
Note that due to pretty much having nothing in common with the old system all settings related to telemetry will be lost when going from 2.0 to 2.1. Model conversion isn't finished in the nightly builds anyway, best to test with a blank eeprom.

A few screenshots:
RSSI and RX voltage come straight from the receiver
RSSI and RX voltage come straight from the receiver
RPM sensor with its 2 temp sensors, one displayed as °F and one as °C, GPS speed displayed both in km/h and kts
RPM sensor with its 2 temp sensors, one displayed as °F and one as °C, GPS speed displayed both in km/h and kts
3 different current sensors
3 different current sensors
Altitude from vario sensor, both with and without auto offset
Altitude from vario sensor, both with and without auto offset
A bunch of analog values from 2 SP2UART sensors, 2 cell sensors and their total
A bunch of analog values from 2 SP2UART sensors, 2 cell sensors and their total
Min cell of each cell sensor, and min of all
Min cell of each cell sensor, and min of all
IMG_1823_ss.jpg
Standard sensor configuration details
Standard sensor configuration details
Adding 2 values
Adding 2 values
Finding lowest cell
Finding lowest cell
Finding the minimum value of a set
Finding the minimum value of a set

mpjf01
Posts: 367
Joined: Thu Jul 26, 2012 3:07 am
Country: -
Location: Adelaide, Australia

Re: OpenTX 2.1 telemetry system preview

Post by mpjf01 »

I've not used the nightly builds before. Is there a description of the process that needs to be employed to use them somewhere, a search hasn't helped so far?
rdeanchurch
Posts: 750
Joined: Tue Dec 27, 2011 11:22 pm
Country: United States
Location: Carson City, Nv

Re: OpenTX 2.1 telemetry system preview

Post by rdeanchurch »

And further to mpjf01 question, can OpenTXCompanion for 2.1 co-exist with OTXComp.2.0.15 so if I download I, do I have both or are they mutually exclusive an OTCComp2.1 will replace OPTComp2.0.15?

I have two Txs and could experiment with one, but need to keep the other ready to fly and modify/add models.
Dean
OldDmbThms: 1. Takeoff, 2. Crash, 3. Repair, GOTO 1
mpjf01
Posts: 367
Joined: Thu Jul 26, 2012 3:07 am
Country: -
Location: Adelaide, Australia

Re: OpenTX 2.1 telemetry system preview

Post by mpjf01 »

The two versions of Companion can co-exist, I discovered that much. But now my radio won't connect as the STM32 driver is missing. I'm wondering which version of the Taranisxx.bin to download, there's a .bin and a X9E.bin (I have an early radio, A model).
User avatar
Kilrah
Posts: 11108
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: OpenTX 2.1 telemetry system preview

Post by Kilrah »

The reference for the 2.0 nightly builds is probably still a good guide:
viewtopic.php?f=45&t=5163

Yes companion 2.1 will install separately from 2.0. 2.1 companion and firmware will never be offered as an upgrade to 2.0 users, they will have to go grab it themselves if they want it. Should hopefully cut down on the number of people who install it without knowing what they're doing and mess up their configurations. Both will stay available in parallel.

You'll want to use either the taranis or taranis-plus builds as applicable for your hardware. X9E is for the not yet available tray version.

You can flash in all usual ways i.e. from PC in bootloader mode, from SD card in bootloader mode, from PC in dfu mode (powered off).

Again, back up everything before playing.

mpjf01
Posts: 367
Joined: Thu Jul 26, 2012 3:07 am
Country: -
Location: Adelaide, Australia

Re: OpenTX 2.1 telemetry system preview

Post by mpjf01 »

I have installed Companion 2.1 on two different PCs now, XP and W7. When I try to flash the OpenTx-Taranis.bin file using Companion with the Tx off I get a DFU-Util error.

Filter on vendor = 0x0483 product = 0xdf11
Opening DFU capable USB device... Cannot open device

If I go to this .bin which I have put in the Firmwares directory on my SD card and tell it to "Flash Bootloader" it does something, but the firmware is not uploaded. No errors.

For the past several years I have upgraded firmware using the TX off mode and it has worked perfectly, including this morning with 2.0.15. Do I have to do something different with this test version?
User avatar
Kilrah
Posts: 11108
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: OpenTX 2.1 telemetry system preview

Post by Kilrah »

No, absolutely identical.

Flashing from the SD card requires going into bootloader mode i.e. with horizontal trims held inwards while powering up. That's where you flash firmware, what you did only updates said bootloader.
mpjf01
Posts: 367
Joined: Thu Jul 26, 2012 3:07 am
Country: -
Location: Adelaide, Australia

Re: OpenTX 2.1 telemetry system preview

Post by mpjf01 »

Of course, must be getting old. Thanks. I now have the firmware loaded from the card.

I can communicate between the PC and the radio in bootloader mode, copy models to and fro. But with radio off I still am getting DFU device error as above.
offers
Posts: 81
Joined: Tue Jan 22, 2013 4:14 pm
Country: -

Re: OpenTX 2.1 telemetry system preview

Post by offers »

This anticipated enhancements looks very cool!!

I think that if there will be NO automatic conversion for the models (including the telemetry)
Then a major change in the version naming should be considered

i.e. version 3.0 instead of 2.1
Helle
Posts: 577
Joined: Sat Jul 21, 2012 7:08 am
Country: -

Re: OpenTX 2.1 telemetry system preview

Post by Helle »

Hy,

The new telemety works with ID and Sub ID adress list

We need a complete list of the ID and Sub ID
for the sensors from

Frsky Sensors
OpenX Sensor 0x1B
SM Unisens-E 0x53
.....
Some sensors could send direct Power (Voltage * Current)
Some sensors could send direct Consumption (Voltage * Current * Time) in mAh or in %
How to handle this?

Some ID has to change, is this direct from TX possible?

Most Sensors send more then 1 Parameter, how to handel it?

How to work with 2 same sensors 2x6 cells?
User avatar
Kilrah
Posts: 11108
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: OpenTX 2.1 telemetry system preview

Post by Kilrah »

Everything's explained in my post.

Try it and you'll understand, pretty easy.
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: OpenTX 2.1 telemetry system preview

Post by MikeB »

How will you handle Spektrum type telemetry?

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
xtrmtrk
Posts: 19
Joined: Fri Jun 08, 2012 6:25 am
Country: -

Re: OpenTX 2.1 telemetry system preview

Post by xtrmtrk »

I just downloaded last night's Companion build and am starting to play with the new telemetry. I have two immediate questions -
  • How do we know the ID of the different sensors? (Do we need to actually have it running on a Taranis and have sensors plunged in to discover them, or can we do it all in the simulator, knowing the IDs?).
  • Is there a good tutorial/description/set of examples somewhere of how to create telemetry screens with scripting?
Thanks.


EDIT: I found these "sensor data IDs" in the source code. Are they good to use? Or do we want use "FrSky new DATA IDs" when defining telemetry sources?

// Default sensor data IDs (Physical IDs + CRC)
#define DATA_ID_VARIO 0x00 // 0
#define DATA_ID_FLVSS 0xA1 // 1
#define DATA_ID_FAS 0x22 // 2
#define DATA_ID_GPS 0x83 // 3
#define DATA_ID_RPM 0xE4 // 4
#define DATA_ID_SP2UH 0x45 // 5
#define DATA_ID_SP2UR 0xC6 // 6
User avatar
Kilrah
Posts: 11108
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: OpenTX 2.1 telemetry system preview

Post by Kilrah »

If you have a smart port sensor you need the new IDs for the 4-digit data ID, and the physical ID would by default be those in comment above+1. So an altitude value from the vario sensor is by default 0100 / 1

But it's really meant to be used with the autodiscovery feature. I can't imagine setting all the IDs manually, if I need to setup a new model and want to configure telemetry-related stuff in companion I'd just connect everything in the model, power up, let the radio discover the sensors, then load in companion and continue from there.

No doc about lua yet. Not sure access to telemetry values has even been coded yet in 2.1.

EDIT: actually not sure if you mean lua doc in general or for 2.1. In general there is a PDF and sample scripts in the doc / downloads sections on open-tx.org.
User avatar
Kilrah
Posts: 11108
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: OpenTX 2.1 telemetry system preview

Post by Kilrah »

MikeB wrote:How will you handle Spektrum type telemetry?
Would just need to write a new decoder for it and make it feed the same system. But since it's not a thing as far as I'm aware...
Helle
Posts: 577
Joined: Sat Jul 21, 2012 7:08 am
Country: -

Re: OpenTX 2.1 telemetry system preview

Post by Helle »

2 Bayte ID-Code

// FrSky new DATA IDs (2 bytes)
RSSI_ID F101
ADC1_ID F102
ADC2_ID F103
BATT_ID F104
SWR_ID F105
T1_FIRST_ID 0400
T1_LAST_ID 040F
T2_FIRST_ID 0410
T2_LAST_ID 041F
RPM_FIRST_ID 0500
RPM_LAST_ID 050F
FUEL_FIRST_ID 0600
FUEL_LAST_ID 060F
ALT_FIRST_ID 0100
ALT_LAST_ID 010F
VARIO_FIRST_ID 0110
VARIO_LAST_ID 011F
ACCX_FIRST_ID 0700
ACCX_LAST_ID 070F
ACCY_FIRST_ID 0710
ACCY_LAST_ID 071F
ACCZ_FIRST_ID 0720
ACCZ_LAST_ID 072F
CURR_FIRST_ID 0200
CURR_LAST_ID 020F
VFAS_FIRST_ID 0210
VFAS_LAST_ID 021F
CELLS_FIRST_ID 0300
CELLS_LAST_ID 030F
GPS_LONG_LATI_FIRST_ID 0800
GPS_LONG_LATI_LAST_ID 080F
GPS_ALT_FIRST_ID 0820
GPS_ALT_LAST_ID 082F
GPS_SPEED_FIRST_ID 0830
GPS_SPEED_LAST_ID 083F
GPS_COURS_FIRST_ID 0840
GPS_COURS_LAST_ID 084F
GPS_TIME_DATE_FIRST_ID 0850
GPS_TIME_DATE_LAST_ID 085F

// FrSky wrong IDs ?
BETA_VARIO_ID 8030
BETA_BARO_ALT_ID 8010

Setting-Example from V2.099 ID
Name-----ID-------??----
RSSI F101 25
SWR F105 25
Temp1 0400 5
Temp2 0410 5
Alt 0100 1
Cels 0300 2
Curr 0200 3
RPM 0500 5
Fuel 0A10 11

Some Question where is the docu for the Sub-ID
RSSI has ID F101 ok, but why 25
Curr has ID 0200 ok, but why 3
Fuel has ID 0A10 ok, but why 11

-------------------------------------------------------
How to programm a non Frsky-Sensor with ID and Sub-ID
The SM Unisens-E sends 7 Values and has normal ID 0x53
Voltage
Current
Power
Consumption
RPM
Alt
Vario
User avatar
Kilrah
Posts: 11108
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: OpenTX 2.1 telemetry system preview

Post by Kilrah »

Helle wrote: Some Question where is the docu for the Sub-ID
RSSI has ID F101 ok, but why 25
Curr has ID 0200 ok, but why 3
Fuel has ID 0A10 ok, but why 11
Again see the first post.
With the FrSky S-port system it means you can connect any number of identical sensors as long as you make sure to change the IDs of sensors with the FrSky SBUS servo channel changer (SCC) as required so each ID is unique in the smart port chain (explained in the sensor's and SCC's manuals).
Helle wrote: How to programm a non Frsky-Sensor with ID and Sub-ID
The SM Unisens-E sends 7 Values and has normal ID 0x53
Plug it in and it will work, it obviously sends the same IDs as FrSky sensors as that's the only way it can work now.
User avatar
Henning
Posts: 14
Joined: Fri Feb 15, 2013 8:28 am
Country: Germany

Re: OpenTX 2.1 telemetry system preview (want to do Jeti Dup

Post by Henning »

Hello Kilrah,

whow - that concept is what I have been waiting for ;-)

I run all my 9X and 9XRs with Jeti Duplex and started a implementation of the Duplex EX protocol also which runs basically already... So I would like to understand the new telemetry concept, perhaps I could support to implement Duplex EX as another telemetric protocol besides FRSKY.

To do this, it would be important to have a real flexible handling of IDs and sensor channel names. With Duplex EX, every sensor tells the transmitter a sensor name / sensor serial number of its own choice. Sending the real date, it describes then for every sensor channel:
- ID of sensor channel [byte]
- name of sensor channel [ascii] (e.g. "Height"), sent with low prio
- unit of the transmitted value [ascii] (e.g. "m"), sent with low prio
- format of transmitted value [binary] (e.g. 22 bit signed with 2 bits for sign and dp)
- transmitted value itself [binary 6 or 14 or 22 bit]

The format can even change during transmission, e.g. "0 m" height can be coded into 6 bit format, "855.24 m" would use 22 bit format in the same telemetric sensor some minutes later...

2 Questions:
1) Do you think this "flexible handling" can be part of the concept?
2) What chances do you see to pack an implementation into the limited memory of
a) 9X M64 b) 9XR M128 ?

Happy easter weekend!
Regards,
Henning
User avatar
Kilrah
Posts: 11108
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: OpenTX 2.1 telemetry system preview (want to do Jeti Dup

Post by Kilrah »

Henning wrote: 1) Do you think this "flexible handling" can be part of the concept?
It should work as is. You would write a Jeti parser that converts whatever data is received into the OpenTX internal format. The data is stored in a 32-bit int, so whether you get 6bit data or 22bit data doesn't matter, you simply convert that to 32bit int*100, configure the sensor's precision as 2 decimals and you're there. Set the sensor's unit as appropriate, and same for name truncating/adapting as required.
Henning wrote: 2) What chances do you see to pack an implementation into the limited memory of
a) 9X M64 b) 9XR M128 ?
Inexistent... we won't even try. It's pretty intensive on resources especially on eeprom and RAM as everything is dynamic and must retain configuration... If someone else wants to have a go...
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: OpenTX 2.1 telemetry system preview

Post by MikeB »

We are waiting for HK to put the DSM2/x telemetry module for the 9XR-PRO up on their site, it has been tested and been ready for months. I'm also testing another make that I have working on the SKY board, 9XR-PRO and Taranis.

Sounds like openTx is turning into openTaranis, if it hasn't already done so!

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
Kilrah
Posts: 11108
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

OpenTX 2.1 telemetry system preview

Post by Kilrah »

No, but it has been "about to come out" for more than a year now. So the day it does and someone actually shows interest we'll see about it, but until then we're making better use of our time... Enough work on other products and features that are a bit more "certain" and for which we actually got requests, documentation and samples.
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: OpenTX 2.1 telemetry system preview

Post by MikeB »

The "other make" I refer to is much more certain!

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
Henning
Posts: 14
Joined: Fri Feb 15, 2013 8:28 am
Country: Germany

Re: OpenTX 2.1 telemetry system preview

Post by Henning »

Hello Kilrah,

OK - I understand...

So I will shift priorities, getting a Taranis board first if this is the platform needed... ;-)

Nervertheless I don't give up the hope to get something "stripped down" running on the 9XR M128 boards which are so cheap at HK. They just fit fine into the old mc2020 transmitter housing:
MPX mc2020 9XR retrofit

Regards,
Henning
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: OpenTX 2.1 telemetry system preview

Post by jhsa »

the 9XR has apparently been discontinued..

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
Kilrah
Posts: 11108
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

OpenTX 2.1 telemetry system preview

Post by Kilrah »

MikeB wrote:The "other make" I refer to is much more certain!
That's good! But then we don't know anything about it, and as there's no standard format for spektrum telemetry I imagine it's different that the HK one...
User avatar
Kilrah
Posts: 11108
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

OpenTX 2.1 telemetry system preview

Post by Kilrah »

jhsa wrote:the 9XR has apparently been discontinued..
Interesting, guess they didn't sell many of those anymore since the pro came out.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: OpenTX 2.1 telemetry system preview

Post by jhsa »

Don't know, maybe it makes no sense.. for me it does as it is an even cheaper platform.. The same as the 9x.. Apparently this one continues to sell well.. I just got a reminder today that it got back in stock..

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
Daedalus66
Posts: 1844
Joined: Tue Dec 27, 2011 8:22 pm
Country: -
Location: Ottawa

Re: OpenTX 2.1 telemetry system preview

Post by Daedalus66 »

The 9XR has quite a lot of competition. Apart from the 9x, there are newer Orange, FlySky and Turnigy radios in the same price range. I know they don't do all the same things, but from the point of view of most of HK's customers, they are all possible alternative basic radios. It makes sense for HK to drop the basic 9XR in favor of the Pro, which is in a different class and offers better value for the customer (and more profit for HK).
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: OpenTX 2.1 telemetry system preview

Post by MikeB »

Kilrah wrote:That's good! But then we don't know anything about it, and as there's no standard format for spektrum telemetry I imagine it's different that the HK one...
No, exactly the same, and is pretty much standard. The Spektrum telemetry sends 16 byte frames with standard contents, and these are just passed on by the modules.

I can't find the link to it at the moment.

Mike.

Edit: Found it: http://www.deviationtx.com/forum/protoc ... t?start=60.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
bertrand35
9x Developer
Posts: 2764
Joined: Fri Dec 30, 2011 11:11 pm
Country: -

Re: OpenTX 2.1 telemetry system preview

Post by bertrand35 »

MikeB wrote:
Sounds like openTx is turning into openTaranis, if it hasn't already done so!

Mike.
No :)

Post Reply

Return to “openTx”