opentx / opentx

OpenTX custom firmware for Transmitters
GNU General Public License v2.0
2.07k stars 805 forks source link

BUG Mavlink Serial Speed - Max speed actually supported is 57600 - General param 115200 Not Functionnal #1935

Closed macfly1202 closed 9 years ago

macfly1202 commented 9 years ago

Hi, On 9XR with EXT=MAVLINK, serial speed max supported is 57600. If we choose to use 115200 in General Param / Baudrate. .it's not fonctionnel on radio screen "Inv mav type"

After take a look on master branch / radio/src/serial.h and cpp, it seem max serial speed is 76800.

I've tested it with mission planner and Ctrl+F output. Max Serial supported speed is 57200. I know this output on computer work because my Ardustaion Mega (Antenne Tracker ) use it at 115200 to output Xplane Mavlink data for dev.

It could be great to have this working for connexion with ULTIMATE LRS for example (from flipflap on RC Group - More info there http://www.itluxembourg.lu/site/ ) Serial Output is 115200 in this project (and mav'baud is 19200) and unfortunatly, it's not working

projectkk2glider commented 9 years ago

Mavlink for 9XR is currently broken, by commit 7a7371d651f4e40121888378d1b3151e9eab6dfc. When fixing this the 115200 baud rate should be added if possible by hardware, otherwise removed from the menu.

projectkk2glider commented 9 years ago

@bsongis master is broken if you try:

make PCB=9XR EXT=MAVLINK

But the next is ok, since commit https://github.com/opentx/opentx/commit/7a7371d651f4e40121888378d1b3151e9eab6dfc was never ported to next. This needs fixing:

bsongis commented 9 years ago

Thanks for telling me, I will check when back at home

bsongis commented 9 years ago

@adriano65 This one is for you I guess!

adriano65 commented 9 years ago

@bsongis You guess right :-) I added 115200 serial speed to 9xr PCB but i get

warning "baud rate achieved is higher than allowed"

I am investigating about F_CPU and friends to check if that speed is out of Atmega64-128 capabilities (mmmmh...) or simply out of tolerance.. Please have patience

bsongis commented 9 years ago

Thanks for having a look!

We will have to release 2.0.14 soon. Winter is here and my mates in the club need it for the LCD corrections from @projectkk2glider

Would you only remove the 115200bauds choice on 9X/9XR for 2.0.14? 115200bauds support will come in 2.1 as it seems more difficult (unless you succeed of course)

adriano65 commented 9 years ago

Hi Bertrand, i submit a pull request with corrections.

I test them and seems to work: i hope macfly1202 will help us too.

Anyway, if you prefer i can remove 115200 speed, that wasn't managed at all in previous version.

Nice day and thank you again

macfly1202 commented 9 years ago

Hi, Thanks all for this. It's not a problem for me to wait. It was just a bug submission. I bought a Taranis for Christmas, and for sure, I will not use as often as in past week this 9XR now. I've just tested this and it's WORKS ! I have make PCB=9XR128 EXT=MAVLINK from Adriano fork and it's ok. Connecton seems to be not 'perfectly' stable and sometimes mavbeat reinit (PK--REC restart from zero).I've test this with X-plane throught mavlink output serial, it's perhaps the reason ? My Ardustation-Mega don't cry with that usually. But definitivly it's a good work ! thanks again Adriano ! You win ! Pull Request in master firmware approved !

adriano65 commented 9 years ago

Thank you macfly :-) Connection is not 'perfectly' stable because serial and internal structures are reinitializated every n seconds... I haven't touched this part of code on 9XR, because it seemed working and i am not the original coder (it was Pienk) Actually I am developing the serial TX side for mavlink to have less trasmission band, but it is a huge mod. My final goal is to log GPS on microSD to recall plan position in case of model-loss. Thank you and happy flying

macfly1202 commented 9 years ago

Again Thanks Adriano. It's ok like this..enough. I'm trying to have version of functional FrSky Hub protocol with mavlink in combinaison with my Ardustation Mega (AT2560) with 3 UART for multiple output.
On my Taranis, LUA script are nearly ok with radar mod (inspired from DIYdone) and I would like to merge my project with Ghettostation, a multi protocol project antenna tracker (nmea,ubx, mavlink, audio modem FSK...) : the goal is to finally have THE antenna tracker that could do tracker/radar and a little more for all stuff we are keen on...