Adding MAVLINK support

ersky9x is a port of er9x for use on the sky9x board.
samys13
Posts: 52
Joined: Mon Feb 29, 2016 5:55 pm
Country: -

Re: Adding MAVLINK support

Post by samys13 » Mon Sep 05, 2016 7:30 am

Thanks mike i will try at lunch time

Envoyé de mon GT-I8190 en utilisant Tapatalk

samys13
Posts: 52
Joined: Mon Feb 29, 2016 5:55 pm
Country: -

Re: Adding MAVLINK support

Post by samys13 » Mon Sep 05, 2016 11:11 am

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

User avatar
MikeB
9x Developer
Posts: 13571
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset

Re: Adding MAVLINK support

Post by MikeB » Tue Sep 06, 2016 11:34 am

I've just posted a specific test version "ersky9xr_romMavRssi.zip" with a possible fix in it.

Mike.
ersky9x/er9x developer

samys13
Posts: 52
Joined: Mon Feb 29, 2016 5:55 pm
Country: -

Re: Adding MAVLINK support

Post by samys13 » Tue Sep 06, 2016 3:14 pm

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

Geofrancis
Posts: 25
Joined: Sat Jul 02, 2016 10:44 am
Country: -

Re: Adding MAVLINK support

Post by Geofrancis » Sun Sep 11, 2016 12:34 pm

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?


User avatar
MikeB
9x Developer
Posts: 13571
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset

Re: Adding MAVLINK support

Post by MikeB » Sun Sep 11, 2016 1:08 pm

He's running openLRS with the Mavlink serial data directly in to the handset.

Mike.
ersky9x/er9x developer

Geofrancis
Posts: 25
Joined: Sat Jul 02, 2016 10:44 am
Country: -

Re: Adding MAVLINK support

Post by Geofrancis » Tue Sep 13, 2016 9:14 am

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.

samys13
Posts: 52
Joined: Mon Feb 29, 2016 5:55 pm
Country: -

Re: Adding MAVLINK support

Post by samys13 » Sat Sep 17, 2016 10:56 am

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

User avatar
MikeB
9x Developer
Posts: 13571
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset

Re: Adding MAVLINK support

Post by MikeB » Sat Sep 17, 2016 11:58 am

I'll get the sources committed to Github later today.

Mike.
ersky9x/er9x developer

samys13
Posts: 52
Joined: Mon Feb 29, 2016 5:55 pm
Country: -

Re: Adding MAVLINK support

Post by samys13 » Sat Sep 17, 2016 6:34 pm

many thanks mike

User avatar
MikeB
9x Developer
Posts: 13571
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset

Re: Adding MAVLINK support

Post by MikeB » Sat Sep 17, 2016 6:47 pm

OK, I've just pushed the sources to Github. They are in the 'next' branch.

Mike.
ersky9x/er9x developer

samys13
Posts: 52
Joined: Mon Feb 29, 2016 5:55 pm
Country: -

Re: Adding MAVLINK support

Post by samys13 » Sat Sep 17, 2016 7:27 pm

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

User avatar
MikeB
9x Developer
Posts: 13571
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset

Re: Adding MAVLINK support

Post by MikeB » Sat Sep 17, 2016 7:38 pm

The MavLink message processing is in mavlink.cpp, found in the "radio\ersky9x\src\mavlink" sub-directory.

Mike.
ersky9x/er9x developer

User avatar
MikeB
9x Developer
Posts: 13571
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset

Re: Adding MAVLINK support

Post by MikeB » Mon Sep 19, 2016 10:48 pm

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.
ersky9x/er9x developer

samys13
Posts: 52
Joined: Mon Feb 29, 2016 5:55 pm
Country: -

Re: Adding MAVLINK support

Post by samys13 » Tue Sep 20, 2016 4:48 pm

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

samys13
Posts: 52
Joined: Mon Feb 29, 2016 5:55 pm
Country: -

Re: Adding MAVLINK support

Post by samys13 » Tue Sep 20, 2016 8:17 pm

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

User avatar
MikeB
9x Developer
Posts: 13571
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset

Re: Adding MAVLINK support

Post by MikeB » Tue Sep 20, 2016 9:39 pm

I'll look into this.

Mike.
ersky9x/er9x developer

User avatar
MikeB
9x Developer
Posts: 13571
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset

Re: Adding MAVLINK support

Post by MikeB » Tue Sep 20, 2016 10:30 pm

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.
ersky9x/er9x developer

samys13
Posts: 52
Joined: Mon Feb 29, 2016 5:55 pm
Country: -

Re: Adding MAVLINK support

Post by samys13 » Wed Sep 21, 2016 6:15 am

It works
ImageImage

Envoyé de mon GT-I8190 en utilisant Tapatalk

Geofrancis
Posts: 25
Joined: Sat Jul 02, 2016 10:44 am
Country: -

Re: Adding MAVLINK support

Post by Geofrancis » Mon Sep 26, 2016 5:04 am

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.
Attachments
20160926_043324.jpg
20160926_043319.jpg
20160926_043313.jpg
yhst-27389313707334_2252_119224678.jpg

User avatar
MikeB
9x Developer
Posts: 13571
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset

Re: Adding MAVLINK support

Post by MikeB » Mon Sep 26, 2016 8:14 am

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.
ersky9x/er9x developer

Geofrancis
Posts: 25
Joined: Sat Jul 02, 2016 10:44 am
Country: -

Re: Adding MAVLINK support

Post by Geofrancis » Mon Sep 26, 2016 1:56 pm

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.
Last edited by Geofrancis on Mon Sep 26, 2016 2:06 pm, edited 1 time in total.

User avatar
MikeB
9x Developer
Posts: 13571
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset

Re: Adding MAVLINK support

Post by MikeB » Mon Sep 26, 2016 2:02 pm

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.
ersky9x/er9x developer

Geofrancis
Posts: 25
Joined: Sat Jul 02, 2016 10:44 am
Country: -

Re: Adding MAVLINK support

Post by Geofrancis » Mon Sep 26, 2016 6:29 pm

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.

User avatar
MikeB
9x Developer
Posts: 13571
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset

Re: Adding MAVLINK support

Post by MikeB » Mon Sep 26, 2016 9:44 pm

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.
ersky9x/er9x developer

User avatar
MikeB
9x Developer
Posts: 13571
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset

Re: Adding MAVLINK support

Post by MikeB » Tue Sep 27, 2016 6:08 pm

I think this is now all working, I'll post or commit the changes either late tonight or tomorrow.

Mike.
ersky9x/er9x developer

User avatar
MikeB
9x Developer
Posts: 13571
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset

Re: Adding MAVLINK support

Post by MikeB » Tue Sep 27, 2016 11:03 pm

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.
ersky9x/er9x developer

Geofrancis
Posts: 25
Joined: Sat Jul 02, 2016 10:44 am
Country: -

Re: Adding MAVLINK support

Post by Geofrancis » Tue Sep 27, 2016 11:34 pm

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?

User avatar
MikeB
9x Developer
Posts: 13571
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset

Re: Adding MAVLINK support

Post by MikeB » Tue Sep 27, 2016 11:54 pm

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.
ersky9x/er9x developer

Geofrancis
Posts: 25
Joined: Sat Jul 02, 2016 10:44 am
Country: -

Re: Adding MAVLINK support

Post by Geofrancis » Wed Sep 28, 2016 12:23 am

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,

Post Reply

Return to “ersky9x”

Who is online

Users browsing this forum: jhsa, RightRudder and 2 guests