Hi all,
I just bought an FrSky Taranis for my quad copter and needed to get the Mavlink data up on the Taranis LCD telemetry display. So here is my solution using a Teensy3.1 as a converter between MavLink and the S.Port on FrSky X8R.
See attached file below...
Replies
Also... does anybody have the actual hex file that works with Peter Kinds [ droneshop biz] lua script? Is this what sets the SR settings / params? I can seem to find it in his google docs.
Richard,
The hex file you are referring to is simply a compiled version of Wolke's Teensy Arduino code - I saw mention that Peter King amended an earlier version of Wolke's code fixing a few bugs himself and sharing his version out through the downloads link on the droneshop website (it will take you to Peter King's Google docs area where you can download the file you are after). This is for the 2.0.x versions of OpenTX and works with APM v 3.2.x. I am not sure that it fixes the SR settings you refer to. I manually set these myself through Mission Planner and it works fine (I'll post my settings below). As the original code has been further developed by Wolke/Fnoop/Clooney82, I would recommend just getting the latest code from here: https://github.com/Clooney82/MavLink_FrSkySPort
There are several different versions. I'm presently trying out the latest Master version for OpenTX 2.1 (I have a couple of issues which I am about to ask for help in this forum!). There is also a branch in that github which works with OpenTX 2.0.x (This is the original version which I know works with 2.0.17 and APM 3.2.1 - https://github.com/Clooney82/MavLink_FrSkySPort/tree/s-c-l-v-rc). You could look at that.
As for the SR settings, I personally have my teensy connected to Serial 2 so all my settings are made to SR2_ these are they:
SR2_EXT_STAT = 10
SR2_EXTRA1 = 5
SR2_EXTRA2 = 10
SR2_EXTRA3 = 3
SR2_PARAMS =0
SR2_POSITION = 2
SR2_RAW_CTRL = 2
SR2_RAW_SENS = 10
SR2_RC_CHAN = 0
I have since connected a MinimOSD in parallel with the teensy on SR2 (with the Tx of the MinimOSD disconnected), so have changed that last value to 5 - this is how the MinimOSD picks up changes on Channel 8 to switch screens. The 3 values set to 10 (in bold) are those used by the Teensy.
Cheers, Paul
I am also now reading this entire thread and see that this is an ongoing thing and it's great people are working on this!!! Thanks!
Hey Paul thanks for the detailed reply I REALLY appreciate it! Now if I only had time to play around with it!! But that explains a lot thanks!
I am having a problem with my lua script trying to figure it out. Is this correct [ see pic ] should I have what looks like two of the same Lua script in the Taranis scripts folder?
Richard, I'm guessing you're using a Mac? Those ._ files are created by the mac - a tad anoying I know, as I have the same. If you have Windows available, then you can delete all these ._ files (including the other annoying folders the mac creates on the SD card like Trashes etc). To see the files in windows though you need to change the view options so it shows system/hidden files (In Win 8 it comes under 'View', 'Options', 'Change Folder and search Options', then click the 'View' tab, and enable 'show hidden files, folders and drives', plus uncheck 'Hide Protected Operating System files'. You should then see all the Mac litter on your SD card! if you traverse through all the folders, any you looked at in Finder on the mac will contain these files, so you can delete them all.
I think I accidentally copied it there twice was the issue but I could be wrong. Thanks
@Clooney:
Thank you for looking at the GPS fix problem!
In mavlink.ino, line 290 should be changed too.
you may find this Resistors network divider calculations useful .
teensy-taranis.xlsx
Thank you all for the great work here!
I'm using a modified version of Clooneys implementation and now it runs very smooth.
But before I had to fight with a little bug:
The Teensy sends GPS Data only if the APM signals a 3D fix to avoid the use of bad coordinates.
The newer APM Firmware (I'm using the latest AC 3.3 Beta) expands the GPS Status to 4=DGPS, 5= RTK.
All discussed implementations here include at least 2 conditional statements in their Arduino sketches for
GPS Status testing:
if(ap_fixtype==3)
So, if you're using a modern GPS chip and get a DGPS fix, ap_fixtype will become 4 and the GPS data on your Taranis freezes...
The solution is simple, please change all occurences of "if(ap_fixtype==3)" to "if(ap_fixtype>=3)" and your Taranis
will be happy.