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...
i am using APM 2.6 firmware is the latest uploaded in mission planer
mision planer reports pitch/ roll ok.
I am sure that the problem is in the teensy sketch because if i substitute fixed values in the sketch for pitch /roll then the display is correct on taranis but static
as I said the condition for switch case MAVLINK_MSG_ID_ATTITUDE: //30
is never true so values are not updated
You'll have to check the complete Mavlink stream to see what comes on
i move the cell-min info functionality into a model script. now user can configure several parameter.
also it is possible to configure a alarm horn if critical voltage is reached.
hopefully that this is also usefully for other "battery is empty paranoid people" like me:)
I understand all that you have said and thanks for the advise.
I did not get this attitude debug section to work (all the other ones do work)
I think this is because msg.msgid is never 30 so case switch is not satisfied
msg.msgid numbers received are 17,29,150,1,152,42,24,62,162,74,
does this mean that my APM 2.6 is not sending attitude (msg.msgid=30) data ??
mission planer reports attitude correctly
any way ,the sun is out now going flying!!
I don't have a APM, but Christian has and he hasn't had issues with Attitude values.
Are you running ArduCopter 3.1.x or 3.2.x ??
I am running ArduCopter 3.1.5
An other feature request:
RPM (revolution speed) sensor RPMS-01
re flashed APM2.6 with an earlier firm 3.1.2. and pitch/roll is working!!?
your lua scrip is excellent
and teensy code is also working well
Thanks to All
This is getting weird!
pitch roll is only transmitted to teensy after connecting and disconnecting
to mission planer ??
so this is the situation now
usb unplugged flight battery boot up = no pitch/roll message (other messages ok)
plug in usb connect to mision planer= no frsky telemtry data(same port?)
disconect from pc all work fine ??
My programing skills are very limited perhaps someone has the answer?
seems like another code has to be sent to APM to get it to output pitch and roll??
maybe i have a bug with opentx 2.0.12 by using the telem1.lua script. see https://github.com/opentx/opentx/issues/1834
my trani change logical switches after a long uptime by it self.
so i decide to remove all bmp files from telemetry screen by replacing against asci chars.
also i lower the use of garbage collector by removing string concat operations.
at least i move all variable initialisation from functions to script head. this is nothing i like, but i got this tip to reduce script problems.
if interested on this, my changed file is located here https://github.com/wolkstein/MavLink_FrSkySPort/blob/e2b1f67b0e350d...
info, in this script i also remove the engaged messages because i do not need them. but they are not the problem.
Thanks for the warning.
I really believe that something strange is happening on OpenTX 2.012 and even on later builds. I began having audio stuttering problems when an SD card had many files, and later I saw some reboots from the radio. Not sure how related the audio problems were (I could work around these by carefully copying the files to the SDCard) with the reboots.
I've opened also an issue on OpenTX
I don't think that it is related with the concatenation issues or too many bmp's being used or even the variable initializations. No way to prove this but just a feeling.
Unfortunately these problems are not easy to reproduce, and I don't have a good way of debugging on the radio, because on the simulator things are not the same....