Adding MAVLINK support

erskyTx runs on many radios and upgrade boards
ersky9x was a port of er9x for use on the sky9x board.
samys13
Posts: 58
Joined: Mon Feb 29, 2016 5:55 pm
Country: -

Re: Adding MAVLINK support

Post by samys13 »

Thanks mike i will try at lunch time

Envoyé de mon GT-I8190 en utilisant Tapatalk

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

Re: Adding MAVLINK support

Post 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
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding MAVLINK support

Post by MikeB »

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

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
samys13
Posts: 58
Joined: Mon Feb 29, 2016 5:55 pm
Country: -

Re: Adding MAVLINK support

Post 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
Geofrancis
Posts: 27
Joined: Sat Jul 02, 2016 10:44 am
Country: -

Re: Adding MAVLINK support

Post 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?

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

Re: Adding MAVLINK support

Post by MikeB »

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

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
Geofrancis
Posts: 27
Joined: Sat Jul 02, 2016 10:44 am
Country: -

Re: Adding MAVLINK support

Post 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.
samys13
Posts: 58
Joined: Mon Feb 29, 2016 5:55 pm
Country: -

Re: Adding MAVLINK support

Post 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
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding MAVLINK support

Post by MikeB »

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

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
samys13
Posts: 58
Joined: Mon Feb 29, 2016 5:55 pm
Country: -

Re: Adding MAVLINK support

Post by samys13 »

many thanks mike
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding MAVLINK support

Post by MikeB »

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

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
samys13
Posts: 58
Joined: Mon Feb 29, 2016 5:55 pm
Country: -

Re: Adding MAVLINK support

Post 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
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding MAVLINK support

Post by MikeB »

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

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding MAVLINK support

Post 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.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
samys13
Posts: 58
Joined: Mon Feb 29, 2016 5:55 pm
Country: -

Re: Adding MAVLINK support

Post 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
samys13
Posts: 58
Joined: Mon Feb 29, 2016 5:55 pm
Country: -

Re: Adding MAVLINK support

Post 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
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding MAVLINK support

Post by MikeB »

I'll look into this.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding MAVLINK support

Post 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.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
samys13
Posts: 58
Joined: Mon Feb 29, 2016 5:55 pm
Country: -

Re: Adding MAVLINK support

Post by samys13 »

It works [emoji2]
ImageImage

Envoyé de mon GT-I8190 en utilisant Tapatalk
Geofrancis
Posts: 27
Joined: Sat Jul 02, 2016 10:44 am
Country: -

Re: Adding MAVLINK support

Post 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.
Attachments
20160926_043324.jpg
20160926_043319.jpg
20160926_043313.jpg
yhst-27389313707334_2252_119224678.jpg
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding MAVLINK support

Post 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.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
Geofrancis
Posts: 27
Joined: Sat Jul 02, 2016 10:44 am
Country: -

Re: Adding MAVLINK support

Post 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.
Last edited by Geofrancis on Mon Sep 26, 2016 2:06 pm, edited 1 time in total.
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding MAVLINK support

Post 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.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
Geofrancis
Posts: 27
Joined: Sat Jul 02, 2016 10:44 am
Country: -

Re: Adding MAVLINK support

Post 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.
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding MAVLINK support

Post 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.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding MAVLINK support

Post by MikeB »

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

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding MAVLINK support

Post 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.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
Geofrancis
Posts: 27
Joined: Sat Jul 02, 2016 10:44 am
Country: -

Re: Adding MAVLINK support

Post 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?
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding MAVLINK support

Post 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.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
Geofrancis
Posts: 27
Joined: Sat Jul 02, 2016 10:44 am
Country: -

Re: Adding MAVLINK support

Post 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,

Post Reply

Return to “erskyTx (was ersky9x)”