Page 15 of 20

Re: Adding MAVLINK support

Posted: Mon Sep 05, 2016 7:30 am
by samys13
Thanks mike i will try at lunch time

Envoyé de mon GT-I8190 en utilisant Tapatalk

Re: Adding MAVLINK support

Posted: Mon Sep 05, 2016 11:11 am
by samys13
Hi mike after some test i still have the rssi on my osd but not on my handset. I Image

Envoyé de mon GT-I8190 en utilisant Tapatalk

Re: Adding MAVLINK support

Posted: Tue Sep 06, 2016 11:34 am
by MikeB
I've just posted a specific test version "ersky9xr_romMavRssi.zip" with a possible fix in it.

Mike.

Re: Adding MAVLINK support

Posted: Tue Sep 06, 2016 3:14 pm
by samys13
hi mike, still no rssi with the "MavLink RSSI processing test only" firmware. i can see rssi on MP connected by bluetooth but not on handset.
thanks
sam
mavlink rssi.png

Re: Adding MAVLINK support

Posted: Sun Sep 11, 2016 12:34 pm
by Geofrancis
samys13 wrote:hi mike, still no rssi with the "MavLink RSSI processing test only" firmware. i can see rssi on MP connected by bluetooth but not on handset.
thanks
sam
mavlink rssi.png

are you running
mavlink>converter>rx>tx>handset?

or mavlink>rx>tx>converter>handset?

Re: Adding MAVLINK support

Posted: Sun Sep 11, 2016 1:08 pm
by MikeB
He's running openLRS with the Mavlink serial data directly in to the handset.

Mike.

Re: Adding MAVLINK support

Posted: Tue Sep 13, 2016 9:14 am
by Geofrancis
ah ok, it would be far more flexable if you put the polling functionally into the mavlink>frsky converter.

I currently use your adapters with frsky on opentx 2.1.8 and just name the values manually but i would really like to use it with openlrs or 3dr radios just having the adapter on the ground side between openlrs and taranis.

Re: Adding MAVLINK support

Posted: Sat Sep 17, 2016 10:56 am
by samys13
hi mike i would like to know if it's possible to take a look at the code source of the last ersky9xProvR219v. I would like to learn how the code is made and watch the difference between openlrsng mavlink code and ersky9x mavlink code.
thanks
sam

Re: Adding MAVLINK support

Posted: Sat Sep 17, 2016 11:58 am
by MikeB
I'll get the sources committed to Github later today.

Mike.

Re: Adding MAVLINK support

Posted: Sat Sep 17, 2016 6:34 pm
by samys13
many thanks mike

Re: Adding MAVLINK support

Posted: Sat Sep 17, 2016 6:47 pm
by MikeB
OK, I've just pushed the sources to Github. They are in the 'next' branch.

Mike.

Re: Adding MAVLINK support

Posted: Sat Sep 17, 2016 7:27 pm
by samys13
MikeB wrote:OK, I've just pushed the sources to Github. They are in the 'next' branch.

Mike.
Thanks mike. First of all ...WHAT a hard and long work :shock: when i saw the source code, i fall on my ass. I imagine that you had a lot of hours of coding.
I believe that is too complicated for me :D . I was searching for mavlink message to see if i can do some add, but after 2 hours i saw that i'm not able to understand the code exactly lol. i fact i was searching for the rssi mavlink message in openlrsng and find that it is #166 but can't find where in the code source of ersky9x is it. Maybe can this help you for me mike? sorry for boring you with this :roll:

sam

Re: Adding MAVLINK support

Posted: Sat Sep 17, 2016 7:38 pm
by MikeB
The MavLink message processing is in mavlink.cpp, found in the "radio\ersky9x\src\mavlink" sub-directory.

Mike.

Re: Adding MAVLINK support

Posted: Mon Sep 19, 2016 10:48 pm
by MikeB
I've just posted a specific test version of ersky9x for the 9XR-PRO for MavLink. All this does is monitor messages for those with numbers of 109, 165 and 166, reporting how many of these messages are received, and if they have a CRC error. The results are displayed on the Trainer Diag display (UP LONG, then RIGHT several times). The first number on each line is the message index, the next number is a count of messages received with that index and the last number is the count of CRC errors.
Ideally we would like to see the middlenumber counting up with the last number staying zero.

Mike.

Re: Adding MAVLINK support

Posted: Tue Sep 20, 2016 4:48 pm
by samys13
This is what i've found mike. i'm surprised that there is no message received from 109 and 166. :roll:
mavlink rssi. 2png.jpg
Envoyé de mon GT-I8190 en utilisant Tapatalk

Re: Adding MAVLINK support

Posted: Tue Sep 20, 2016 8:17 pm
by samys13
After some search i found that the rssi on OSD come from RC_CHANNELS_RAW (#35). I found this in the minimosd code.

Envoyé de mon GT-I8190 en utilisant Tapatalk

Re: Adding MAVLINK support

Posted: Tue Sep 20, 2016 9:39 pm
by MikeB
I'll look into this.

Mike.

Re: Adding MAVLINK support

Posted: Tue Sep 20, 2016 10:30 pm
by MikeB
I've just posted a new test version for the 'PRO. This looks for message #35 and picks the RSSI from that. The debug I put in also looks at Msg 35 instead of Msg 109.

Mike.

Re: Adding MAVLINK support

Posted: Wed Sep 21, 2016 6:15 am
by samys13
It works [emoji2]
ImageImage

Envoyé de mon GT-I8190 en utilisant Tapatalk

Re: Adding MAVLINK support

Posted: Mon Sep 26, 2016 5:04 am
by Geofrancis
i have managed to get your converter between the openlrs and taranis working by connecting another arduino up and getting it to do the polling.

i used this running in parallel on the s.port wire http://www.rcgroups.com/forums/showthread.php?t=2245978

im sure you could do the polling on your converter doing away with the extra board.

Re: Adding MAVLINK support

Posted: Mon Sep 26, 2016 8:14 am
by MikeB
I'm sure something can be done.
I have been adding native Mavlink support to ersky9x as well, so avoiding the need for the Arduino in some setups.
I thought there was native Mavlink support available in openTx.

Mike.

Re: Adding MAVLINK support

Posted: Mon Sep 26, 2016 1:56 pm
by Geofrancis
the problem with mavlink support on opentx is the code has not changed since the 9x so you cant use any of the mavlink data for alarms or alerts like you can with frsky.


the poller inject a fake rssi and swr so the taranis will accept the telemetry. i think your adapter is also putting out rssi so its just swr and polling it needs to do.
having the adapter ground side gets all the frsky alarms and alerts while still keeping the mavlink telemetry.

Re: Adding MAVLINK support

Posted: Mon Sep 26, 2016 2:02 pm
by MikeB
Like I said, you do have native Mavlink in ersky9x, where it is mapped to "FrSky" sensors.
The Arduino can also output the telemetry converted to the FrSky hub protocol. Again, ersky9x supports this raw hub data as well as the hub data as received from a DJT.

I'm looking at the code for the Arduino.

Mike.

Re: Adding MAVLINK support

Posted: Mon Sep 26, 2016 6:29 pm
by Geofrancis
i have built a 3dr radio module into a jr module along with the telemetry adapters and bluetooth so it gets frsky telemetry via the 433 3dr radios.

Re: Adding MAVLINK support

Posted: Mon Sep 26, 2016 9:44 pm
by MikeB
I've done some changes so a link option enables the Arduino to send the SPort telemetry without needing to be polled. I'll dig out my test hardware tomorrow and try it out. I don't use Mavlink myself live, just for testing!

Mike.

Re: Adding MAVLINK support

Posted: Tue Sep 27, 2016 6:08 pm
by MikeB
I think this is now all working, I'll post or commit the changes either late tonight or tomorrow.

Mike.

Re: Adding MAVLINK support

Posted: Tue Sep 27, 2016 11:03 pm
by MikeB
I've just committed the updated sources to Github.
There is a new mode, enabled by connecting IO6 to ground, when in SPort mode. With this, then the SPort output will send the 'polling' bytes as well as the data bytes, and not require polling.

Mike.

Re: Adding MAVLINK support

Posted: Tue Sep 27, 2016 11:34 pm
by Geofrancis
MikeB wrote:I've just committed the updated sources to Github.
There is a new mode, enabled by connecting IO6 to ground, when in SPort mode. With this, then the SPort output will send the 'polling' bytes as well as the data bytes, and not require polling.

Mike.

excellent news! I will try it as soon as I can.

how does it handle RSSI?

Re: Adding MAVLINK support

Posted: Tue Sep 27, 2016 11:54 pm
by MikeB
At the moment it doesn't. I could probably pick up a RSSI value from a Mavlink message (I recently did that for native Mavlink) and send it out.

Mike.

Re: Adding MAVLINK support

Posted: Wed Sep 28, 2016 12:23 am
by Geofrancis
MikeB wrote:At the moment it doesn't. I could probably pick up a RSSI value from a Mavlink message (I recently did that for native Mavlink) and send it out.

Mike.
that would be ideal,