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

So far I tried it with two different DIY cable, now I ordered C&T cable, if problem still comes up with it, I’ll open up an issue.

Hello!
I was thinking to use this lua in horus x10s using crossfire, this could be possible?
Because i am reading a lot but i didn’t find nothing about this lua and crossfire

Won’t work with Crossfire. I use DragonLink, but Crossfire is pretty much the same thing - it is converted MavLink telemetry and cannot use ArduPilot passthru. I have custom scripts I have written for DragonLink because it converts MavLink to FrSky at the UEXP port on the transmitter and feeds it into the serial port in the Taranis. But those won’t work with Crossfire either because of different sensor ID’s in their version of converted MavLink.

I think Team Black Sheep has a lua script available for Crossfire.

Crossfire works on the Taranis X9D but not in the Horus X10S. Has been half disabled by Frsky very slow. To get it working you have to use your soldering equipment to remove a resister. You can find advise on YouTube.

Hi Ruben,
frsky passthrough won’t work natively with crossfire but if it’s able to provide mavlink on the ground it might be possible to use @Eric_Stockenstrom MavlinkToPassthru firmware in what he calls “ground mode”.
The idea is FC->mavlink->crossfireTX->radio->crossfireRX->mavlink->converter->frskypassthru->LUA
I know that this approach works with other mavlink capable long range system, such as Dragonlink and ULRS, I have no direct experience but it might work,

Eric’ code is here

cheers,

Alex

I have a problem with 1.6 script version (not tried with 1.7)
Most times battery percentage goes zero - telemetry screen freezes. Also the “sensor lost” message played.
And when it freezes - it freezes forever. Taranis doesn’t react on any button press.
Fortunately all the sticks, switches and transmitter still works fine.
One more fact, every time it freeze, after turn-off and on the taranis - it always says ‘No SD card’ message. After turning off and on second time it starts normally.

I’m using latest OpenTX 2.2.2
How could I diagnose that?

Hi Sergey,
that happens if reported battery mAh is bigger than battery capacity, I fixed that bug in my dev version.
Right now negative battery percentage is not supported.
Please check if you’re getting correct battery capacity from telemetry, if not you can set it from the script menu

cheers,

Alex

Hi Alex,
Thank you for the info. Could you please clarify how that could be fixed? Or are you planning to fix that in next version?
That looks critical because usually you set for example 9000mah when in fact your battery is 9300mah.

I saw two places in the source codes where remaining percentage goes negative in that case but still not clear what exact operation force OpenTx to freeze.

not fixed in master, fixed in my dev (local) version :slight_smile:

Alex, how do you think that case also worth creating an issue to OpenTX?
An error within LUA shall not lead to a complete loss of screen control, I believe.

mhmm, the error is caused by a call to a lua draw function, OpenTX never checks the arguments to be correct, even on the Horus an attempt to draw off screen freezes the lua subsystem, it’s not a real “bug” but rather an attempt to save memory and favor speed

1 Like

Alex, I just found your project and immediately installed in my x12. I’m using the craft $ theory cable with cube black, latest master. All works very well, looks great and a perfect addition. Thank you. I have just a question about sensors on the horus model telemetry page. I get RSSI, RxBt, Cels (2), GPS. All other sensors sometimes show up with values but are dimmed out with no instance ID and are not listed on the telemetry page on Companion. All values show up on the Horus screen and function perfectly. Is this normal or did I miss something? I have deleted and discovered sensors several time with the same results.

Thanks again for getting Horus on Passthrough,

Cheers RB

Hi Randy,
did you follow the wiki to discover the sensors for the horus, the procedure differs from the usual way of doing it.

these are the relevant links

you need to run discovery and while it is running press rtn to go back to the widget, this way discovery will run while the widget feeds the sensors to OpenTX, when you go back to the model telemetry page to stop discovery the sensors should be there. For this to work you need your craft powered up and sending valid telemetry data!

let me know if this solves your issue!

Note: sensor discovery is not necessary for the script to work as you’ve already found out.

Alex

Thanks Alex, seems to be working as designed. Am I right in assuming that all but the first five are only live while the widget is running? If I go back to the telemetry screen they are all live for a few seconds and then go to black font and die. When i go back and forth from widget to telemetry it follows the pattern every time.

Thanks RB

yes, those are “injected” by the widget, when the widget is paused they “die” after a few seconds.

Ale.

@yaapu Don’t know if you saw, but it might start to get to do interesting things :wink:

TLDR: Lua scripting on ArduPilot

:wink:

all I can say is WOW :slight_smile:

Hi Alex, In case we change to TBS Crossfire 8/12CH Diversity Receiver what changes to make in the connection? Previously we used the telemetry cable to the smartport, but for the crossfire we do not need it right? Thanks

Hi,
I have no direct experience with Crossfire sorry, I read the documentation and it looks like mavlink is only available as a way to feed the native CRSF protocol which is the only telemetry sent down the radio link, if this is the case then my script won’t work.

cheers,
Alex

Hi,
I would like to use this nice yaapu script on my QX7 with dragonlink V3 sytem running arduplane (chibios) or inav on Omnibus F4 pro V3.
Wondering how can i accomplish it?I am guessing using mavlink?I would really appreciate if some one can guide me .Thanks.