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
Unfortunately you only get one condition per switch. You can do it that way to do a few modes. But it consumes 3 custom switches for each mode (one for a<x one for a>x and one to AND them). There are 13 modes, so you eat more than the 32 available switches to handle all of the modes. You can do it in 25 switches by just doing all a>x for x = 1 to 12 and then do 13 more ANDs in the form of CSX AND !CSY to do x>2 and !x>3. I only have about 18 free custom switches at the moment. Now that I have gone through the numbers, I could implement most of them that way. I will try it out.
Thanks
For a moment I thought you could have two switches per CS, but now I remember you can only AND a state.
How about multiplying the fuel (mode) by ~10 to get it in the same range as the stick inputs, using Gvars on custom functions or a mix to a dummy output channel and then using this value as a CS a~x (fuel~x)? I don't have any documentation or my TX to test. But will have a play tonight when home.
That is not needed anymore, since the release of OpenTX 2.01 for the Taranis.
I still have "mechanical" problems with the connections of the Teensy to the PixHawk (damn DF13), but now we can have a Custom switch with the = operand :)
@ Amokka
Hi, were you able to get gps glitch message relayed to taranis, if yes what is the mavlink message i.e. mavlink_msg_heartbeat_get_XXXXXX. as well as through which parameter would you suggest to send it through?
I'm no programmer, But it seems that I managed to hack it to get it working.
In FrSkyPort.ino, I changed:
1)
From: FrSkySPort_SendPackage(FR_ID_T2,ap_base_mode);
to: FrSkySPort_SendPackage(FR_ID_T2,(ap_custom_mode +1) * 20);
2)
From: FrSkySPort_SendPackage(FR_ID_FUEL,ap_custom_mode);
to: FrSkySPort_SendPackage(FR_ID_FUEL,(ap_base_mode + 1) * 20);
I changed the two around to get a bigger number range for the AP_custom_mode to play with.
While T2 seems to go above 225, FUEL only goes to 100(%)
Also, I'm adding +1 to make sure I actually see real data and not just an empty, default value of zero i.e. during stabilize.
*************************************
In Taranis, I have configured 6 custom switches using the values from Rolfs post above. I then use these CS to trigger custom functions playing the files.
One for each filghtmode:
T2~20 = Stabilize
T2~60 = AltH
T2~120 = Loiter
T2~80 = Auto
T2~200 = LAND
T2~140 = RTL
(It seems that the a~x value requires a spread of least +/-16 to avoid crossover)
(Having = as operator would be very nice)
Another two custom switches are used for ARM/DISARM, now provided in the FUEL parameter:
FUEL~20 = DISARMED
FUEL~40 = ARMED
Also, i'm using the build-in feature of playing a wav when entering a flightmode to save some custom functions. I have created the 6 modes as flightmodes (1-6) Adding the similar-named wav-files to the SD card, the files will be played automatically. I.E. sounds/en/[name-of-model]/stabilize-ON.vwav
In each flightmode, I set a GVAR with the value i want APM to recieve. Then send the corresponding output value to APM using the Mixer.
With this setup, I can hear and see the flightmode I have selected. and I am notified of the active flightmode whenever it is changing for any reason.
(GPS glitch during a sudden change to LAND - due to "low battery" - can be a nasty surprise...)
For this, I have made some additional wav-files. I.e. "Request Stabilize mode" and "Stabilize mode is active".
...Now I just need to figure out how to get GPS HDOP and Glitch warnings...
That's an interesting idea. I could not see a way to multiply the fuel level in the Taranis radio, but I can multiply it in the Teensy before it comes down. I think fuel is a % so I am guessing it can only range from 0 to 100. I will try that and see what the a~x spread is.
Thanks
Hi Rolf,
do you know how to get the 8 RC_in channels from the Mavlink data?
regards Peter
mavlink_msg_request_data_stream_pack(0xFF,0xBE,&msg,1,1,MAV_DATA_STREAM_EXTENDED_STATUS, MSG_RATE, START);
Those commands in MavLink_FrSkySPort.ino request the different types of data. The contents of the requested messages are defined in libraries\GCS_MAVLink\include\mavlink\v1.0\common\common.h
You probably want this message:
MAV_DATA_STREAM_RC_CHANNELS=3, /* Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW | */
Hi all,
quick FYI/watch out... if you wire all of your telemetry together on one RX bus (teensy, MinimOSD + wireless telemetry) be careful when plugging in the minimosd... I hit the wrong pins and fried my teensy.. another is on order now!
While this was working (pre plugging mistake) I did find however that Minim OSD wasnt picking up an RSSI signal, I presume this should be X8R>Pixhawk (over S-bus). Any ideas how this should work?
Thx
Wm
Hi Rolf,
is it possible to get the RSSI info into the pixhawk? I can't get this out of my minimosd, and im wonding if I need to have the teensy TX going into the minimosd?
thx