An Open Source Frsky Telemetry Script for the Horus X10,X12 and Taranis X9D,X9E and QX7 radios

Weather not conducive for flying just yet…possibly this weekend.

I flew with it and it worked well. I wasn’t looking at the HUD but messages and flight mode announcements seem to come through promptly. On GitHub Florin has raised some concerns over 10hz using too much bandwidth though, turns out there is only enough for ~32 messages/second in total.

@yaapu, I’m curious if you are programming the PWM transmission for different flight modes, or if you are receiving that information and vocalizing it from the mavlink messages.

Allowing more than 6 flight modes was brought up at the developers call yesterday. There are many schools of thought on how many modes to allow and how to parameterize them, but would you provide any ideas/suggestions on the best way to allow more than 6 flight modes? I’m asking for your opinion here.

Some initial thoughts are to just add another 2 or 3 position switch to double or triple the options, maybe add another channel, etc. however some of that may get complicated. If the modes are controlled by a smaller range of PWM on 1 channel, is there an easy way to choose the mode from the full list of 20 within your program and set that mode to active? https://github.com/ArduPilot/ardupilot/issues/8031 might give you some ideas of a proposal.

…that was my concern too, bandwidth is limited.
I guess the idea behind what C&T did was to prioritize attitude telemetry packets to get a decent hud experience, The lcd refresh rate is 20Hz so ideally 20 msg/sec should be “dedicated” to the HUD leaving only 12 msg/sec for everything else.

Hi Nathan,
I vocalize flight modes from the the frsky telemetry packets not from mavlink messages.
I decode packet 0x5001 and lookup the value in a table

flightMode = bit32.extract(VALUE,0,5)

I don’t think that “writing” channel values from a telemetry script would be a good idea, but it’s just my personal opinion.

1 Like

Interesting point. Would you please explain a little more.

…you can set channel values from a mix script but you would not have acces to the lcd

https://opentx.gitbooks.io/opentx-2-2-lua-reference-guide/content/mix.html

Haha. I get it – right at the top:

WARNING - Do not use Lua mix scripts for controlling any aspect of your model that could cause a crash if script stops executing.

1 Like

@Naterater
I can easily set in under 5 minutes, 3, 6, 9,12, 27, etc, etc…PWM outputs on a Taranis on a single RC channel without requiring any Lua scripting. It’s just a matter of allocating enough 2 and 3 position switches to achieve that, or even just using one single momentary switch…

It won’t be practical and easy to use.

The scripting that is used on the Taranis uses FrSky telemetry that encapsulates a series of messages and values from the FC.
Consider that as a derivation of what is done with Mavlink, although in this case only as a receiver.

But please explain how would you switch flight modes on a radio…

Either switches, or like the newer radios have - programmable touchscreen displays. Select the flight mode that I want an click OK. No need for numerous-channel transmitters when you could get the full functionality with an inexpensive one like Turnigy Evolution Digital AFHDS 2A. https://hobbyking.com/en_us/turnigy-evolution-fpv-radio-mode-2-white.html

I don’t want to hi-jack this thread here, my idea was applicable to changing flight modes graphically instead of physically.

Hmm… I might have missed those radios with active touchscreens where flight functions are controlled…and that can enable enough channel mixes and/or logical switches to do what you want. And that one is not certainly one of those…

Sorry Alex :wink:

@yaapu
A friend of mine asked if you could have the display more similar to HUD on Mission Planner.
Told him, that unless we had a color lcd and a lot more pixels on the X9D that would be a bit hard :slight_smile:

Hi,
@LuisVale, yes my HUD resembles a lot the Mission Planner HUD, it would be nice to add more info, like bank angle for instance, but after adding the dark “ground” I’m afraid I don’t have any cpu left to add anything more, guess it will stay the way it is!

Thankyou for your work on this excellent lua script. I have started using it but have a problem in that the voltage from the FLVSS displays as zero. My Taranis X9D+ shows the data from the FrSky sensor correctly and the script does show the voltage from the fc. Can you suggest a solution?
Fc is Pixhawk 2.1 cube running Arducopter on a hexacopter. I have the passthrough cable daisy chained via the FLVSS. Everything else appears to work fine although i have only just started experimenting with the script.
Mike

Hi Michael,
did you try to remove all the Cel* sensors and rediscover them?
btw did you add them manually or through discovery?

Alex thankyou for your advice. I deleted the sensors and rediscovered them and all now works fine. I think I previously manually added them but am not sure now.
Mike

1 Like

Excellent work! in addition to flying AP I also use iNav on some plane…I was wondering if this script would work with non AP, Frsky telemetry streams…such as native Frsky and iNav systems…if I can normally discover all those sensors, would this script display them?
thanks

Hi Henry,
this version of the script would not work, you would need an iNAV specific version.

cheers,

Hi,

fantastic script, thank you!

Unfortunately I have a problem setting it up. I have installed the latest Arducopter version for hexarotors, have set serial 2 to protocol 10 and have connected a r-xsr via an inverter. I use an Taranis 9d+ with the latest firmware (eu lbt lua) and this luac script (latest = everything downloaded yesterday).

I deleted all sensors and searched for new ones. I found 3 sensors, the Rx-data and a GPS sensor which displays valid data. On the display config page I selected the yaapu9 script. I had to rename the lua without c because otherwise I got a script panic message when switching to the telemetry page.

When I now switch to the telemetry script page (by long pressing the page button), I get the message “No telemetry screens”. I cannot enter the configuration menu by long pressing menu, but I can reset by long pressing enter.

Can someone help me to fix that?

SOLVED: did not activate luac when flashing the firmware of the Taranis 9d+.

It is now working, its fantastic!

I would be ready to translate to German, but I could only start in about 4 weeks. Please contact me if the translation is still missing in 4 weeks… .

Thx,
Tobias

Glad you made it work!
German would be nice and your help very much appreciated.

2 Likes