Page 8 of 20

Re: Adding MAVLINK support

Posted: Sun Feb 21, 2016 12:42 am
by MikeB
There is a problem with anything measuring current. The actual current is not smooth, but is pulsed. Differerent meters may 'average' this in different ways leading to slightly different readings.

Thanks for the testing.

Mike.

Re: Adding MAVLINK support

Posted: Sun Feb 21, 2016 1:05 am
by kaos
Mike:
Thank YOU for making this function possible!

Actually, while setting up this test in the past couple days I solved a few issues I was trying to figure out to run MP, Minim and FPV backup and recording on the laptop all at the same time for my Joystick panel. ;)

Re: Adding MAVLINK support

Posted: Sun Feb 21, 2016 2:19 pm
by RCHH
And the same here. Found several things with APM that I never even knew existed - like the 'Drift' mode for starters! Of course that means I will now get lazy when flying, as rudder will be taken care of! lol!

Re: Adding MAVLINK support

Posted: Sun Feb 21, 2016 3:49 pm
by LTMNO
See we've been needing Mavlink for a long time now.


Sent from my iPhone using Tapatalk

Re: Adding MAVLINK support

Posted: Sun Feb 21, 2016 8:16 pm
by kaos
LTMNO wrote:See we've been needing Mavlink for a long time now.
Yes!
RCHH wrote:And the same here. Found several things with APM that I never even knew existed - like the 'Drift' mode for starters! Of course that means I will now get lazy when flying, as rudder will be taken care of! lol!
read the last paragraph of this post: viewtopic.php?f=48&t=3240#p46862 :lol: :lol:

Re: Adding MAVLINK support

Posted: Mon Feb 22, 2016 1:16 am
by LTMNO
I confirm that all modes are working.. Thanks Mike...

Now to build out the Quad and start to add the other sensors to it once I get it flying...
I will be adding my UHF system ULRS and passing the FrSky SPort thru it to the Supported Firmware now... Sweet!
We might need to create another screen for some cooler sensors, like...
Photo-Optic Sensor (Show distance, activity, etc)
Lidar (Show activity, distance)
Pan/Tilt Camera (show camera angles, etc)
to name a few...

Re: Adding MAVLINK support

Posted: Mon Feb 22, 2016 3:43 pm
by tomismrkolj1
Hi,

came home from skiing holiday.
My brother any I have tested mini pro 16k with newest firmware and it works OK!

It however shows unknown APM mode for manual, flyby wire A and flyby wire B modes, that are standard in arduplane (not arducopter), while in arducopter modes are recognised OK.

Is it possible to calibrate powermodule current with handheld voltage/amp/ohm meter, that has short term amp limit at 10A?

tomi

Re: Adding MAVLINK support

Posted: Mon Feb 22, 2016 4:25 pm
by RCHH
Good point! Have not tried the system at all with Arduplane!

There is no reason you cannot use a multimeter to calibrate the relevant voltages/current for APM. I do just that. I calibrated my setup at 6.0Amps according to the meter I use.

Arduplane flight modes:

MANUAL
STABILIZE
FLY BY WIRE_A (FBWA)
FLY BY WIRE_B (FBWB)
AUTOTUNE
TRAINING
ACRO
CRUISE
AUTO
Return To Launch (RTL)
LOITER
CIRCLE
GUIDED

In addition, there are the following modes:

TAKEOFF
LAND


Might upload Arduplane and see how it goes in an AXN floaterjet. Looks like I won't even have to leave the house to fly anymore - the same as in the post you linked to kaos! lol!!!

Re: Adding MAVLINK support

Posted: Mon Feb 22, 2016 4:52 pm
by MikeB
For these Arduplane modes, could you tell me what number these names correspond to please?
The mode is sent as TEMP1, so you need to either put T1= on a custom telemetry screen or look on the built in one that shows T1 to see what the value is.

Mike.

Re: Adding MAVLINK support

Posted: Mon Feb 22, 2016 5:00 pm
by RCHH
Will do Mike. The only issue I can see is that if numbers for one mode in say Arduplane is the same number for a different mode in Arducopter it would not know which text to select?

Re: Adding MAVLINK support

Posted: Mon Feb 22, 2016 5:22 pm
by MikeB
I know, I'll have to look into that if it happens!.

Mike.

Re: Adding MAVLINK support

Posted: Mon Feb 22, 2016 6:36 pm
by RCHH
ArduPlane flight mode numbers:

0 Manual
1 CIRCLE
2 STABILIZE
3 TRAINING
4 ACRO
5 FBWA
6 FBWB
7 CRUISE
8 AUTOTUNE
10 Auto
11 RTL
12 Loiter
15 Guided

Found here: http://plane.ardupilot.com/wiki/ardupla ... 2_protocol

Arducopter flight mode numbers:

0 Stabilize
1 Acro
2 AltHold
3 Auto
4 Guided
5 Loiter
6 RTL
7 Circle
9 Land
11 Drift
13 Sport
14 Flip
15 AutoTune
16 PosHold
17 Brake

Found here: http://copter.ardupilot.com/wiki/arduco ... erfltmode1

Re: Adding MAVLINK support

Posted: Mon Feb 22, 2016 7:10 pm
by MikeB
I think there might be a value in the heartbeat message to tell the type. I'll add something to investigate this.

Mike.

Re: Adding MAVLINK support

Posted: Mon Feb 22, 2016 7:18 pm
by RCHH
I think these do correspond to the heartbeat message - LTMNO has listed the same values for the drift mode etc. he posted a couple of days ago or so.

Re: Adding MAVLINK support

Posted: Tue Feb 23, 2016 6:57 am
by kaos
this may be worth tinkering around when the main functions are finished.
At this time we have mavlink data via FrSky telemetry already. Which means we know exactly the home coordinates and the model's real time coordinates. the current mavlink screen has a center graph showing the heading.
How difficult is it (or possible with current Tx MCU processing) to make that graph becomes a pointer of the model heading and in relationship to home? like this:
pointer.jpg
this would be much useful than a heading line as of now. The idea is if for any reason you loose the mavlink radio or FPV transmission, with stabilization mode engaged, you can fly the model back by looking at the heading (with Galt) and home (center dot) and bring the model back to visual range and land it safely. I know some OSD have this type of display. I know RTH will work the same way automatically, but being able to fly it back manually by just looking at the tx screen would be really cool!! 8-)
Hmmm, sounds like flying by instrument. :)
RCHH wrote: Looks like I won't even have to leave the house to fly anymore - the same as in the post you linked to kaos! lol!!!
that's the idea! :) I have been planning on making a Tx relay to put on top of the house/car, so I can fly a VTOL or Mulirotor from inside the house/car, sitting in my comfy sofa/seat with big cigar and beer/champagne on the side without being scorched by the summer sun or frozen by the winter blizzard. :lol: :lol:

Re: Adding MAVLINK support

Posted: Tue Feb 23, 2016 9:49 am
by MikeB
This might be possible, as we have values for Home direction and Home distance I think.

Mike.

Re: Adding MAVLINK support

Posted: Tue Feb 23, 2016 6:55 pm
by LTMNO
That would be very cool indeed... native functionality without having to do LUA scripts... this is getting better and better...

Image

https://www.youtube.com/watch?v=PDXLjQBp0D0

Re: Adding MAVLINK support

Posted: Tue Feb 23, 2016 11:32 pm
by kaos
:lol: :lol: That is great video! :lol: :lol:

Yes, we can either set/store home GPS location of the model at the time of taking off in the Tx. Then we can use this even without MP when flying. Or may be getting this info from APM (which will require MP in the beginning)?
The DtH, Alt and Galt is already on the screen. A matter of calculation of the real time GPS location and heading in relation to home GPS local at the time of taking off to make this graph.
I believe if this works, we don't even need the MP at all for free hand flying (without way points or FPV, of course i prefer FPV). You can fly far out to you can't see the orientation or beyond your FPV link of the model and still able to bring it back without engaging RTH as long as we have the radio link. All needed is a Mavlink capable board and GPS.

Re: Adding MAVLINK support

Posted: Thu Feb 25, 2016 6:18 pm
by stewwy
quick question, if you had an OSD on the telemetry port you are using would that not trigger the heartbeat on that port and obviate the need for the arduino if you can do the conversion in the 9x/taranis?

Re: Adding MAVLINK support

Posted: Thu Feb 25, 2016 6:54 pm
by MikeB
The Arduino is also converting the MavLink messages into FrSky telemetry messages so they may be carried to the Tx by the FrSky receiver and Tx module. They are not sent as raw MavLink messages.
MavLink messages are too long for the FrSky telemetry link to be able to send all the data, it only handles about 150 bytes per second.

Mike.

Re: Adding MAVLINK support

Posted: Fri Feb 26, 2016 8:55 am
by tomismrkolj1
Hello,

Mike, have you had any progress on correct arduplane apm modes naming on ersky9x(r) display?

tomi

Re: Adding MAVLINK support

Posted: Fri Feb 26, 2016 10:52 am
by MikeB
Not yet, I haven't had time!

Mike.

Re: Adding MAVLINK support

Posted: Sat Feb 27, 2016 4:03 pm
by MikeB
I've just posted new test versions of the Arduino code and ersky9x. The Mavlink display is now supported on the Taranis.
When you select "ArduP" for the telemetry protocol, you will now find another option "ArduC". Actually ArduC replaces the original and ArduP is the new one.
ArduC is for ArduCopter, ArduP is for ArduPlane. The mode names should adjust for the one selected.
In addition, I'm sending from the Arduino extra data that should tell the radio what it should be using. If that works, I'll remove the C/P option and use what I'm sent.
This however needs testing. I'm sending the type code in the high byte of the TEMP1 field. This is ignored by the normal processing to display the Mavlink data, but does appear on the debug display, it is the only entry on the bottom line of data.
I'm seeing 02xx, where xx is the mode code. I think the 02 means ArduCopter. Could someone testing with ArduPlane let me know what value they are seeing please?
The debug screen is UP LONG from the main screen, then RIGHT 5 times from there, it is titled "DEBUG".

Mike.

Re: Adding MAVLINK support

Posted: Sat Feb 27, 2016 4:25 pm
by tomismrkolj1
Hi,

Mike, I have tested new firmware on 9xr pro and arduino mini pro 16k, frsky xjt/x8r combo, amp 2.6 clone.
I confirm six modes that I have programed in arduplane are recognised and displayed correctly:auto, manual, fbwa, fbwb, loiter and rtl.

On debug screen (6/10) in the last row there is only one number and its value is 0106. So I guess you are correct about that.

tomi

Re: Adding MAVLINK support

Posted: Sat Feb 27, 2016 5:23 pm
by MikeB
Thanks, looks like I can switch the names as 01 for ArduPlane and 02 for ArduCopter without needing two different protocol entries.

Mike.

Re: Adding MAVLINK support

Posted: Sat Feb 27, 2016 10:25 pm
by RCHH
Confirmed. Works as above. Tested with DHT/DJT D series and X8R on S.Port. :D :D :D :D :D :D :D :D :D :D :D :D :D :D :mrgreen: :mrgreen: :mrgreen: :mrgreen: :mrgreen:

Re: Adding MAVLINK support

Posted: Sun Feb 28, 2016 1:47 am
by Brodziek
HI Mike,
I test the version er9x with its own converter telemetry protocol FrSky Hub.
Confirm. Everything works.
Unfortunately, now I have no way to check the protocol S-port.
Mike, Good job.
How do you find free time, please add new features to er9x.
Maybe it's time to release the official version?

Re: Adding MAVLINK support

Posted: Sun Feb 28, 2016 11:45 am
by LTMNO
Great work Mike. Thx.


Sent from my iPhone using Tapatalk

Re: Adding MAVLINK support

Posted: Sun Feb 28, 2016 4:39 pm
by kaos
Indeed.
This type of function is what makes er9x so great.

Re: Adding MAVLINK support

Posted: Mon Feb 29, 2016 7:15 pm
by conicio
I'm trying this with an Arduino Nano that I have.
It's not working for me.
I connect the +5V to Vin, Gnd to Gnd Tx to Rx and Rx to Tx (APM to Nano) also connect D5 to Signal and Gnd to Gnd on the SPort of the X8R
On my 9XRPro I select ArduC-Met under UsrProto. It's loaded with the pr219 firmware.
Does this need more config? Do I have to connect the SPort from the XJT to the Futaba trainer Jack?
Another question: Does this code run on teensy 3.1?
Thanks a lot
Andrés

edit: I can upload the sketch on the Nano without errors, but I can't see the tx or rx leds blink when connected to the APM. Do I need to enable the telemetry on the APM?