Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force Mavlink Version to 2.0 #935

Open
custeve opened this issue May 6, 2019 · 4 comments
Open

Force Mavlink Version to 2.0 #935

custeve opened this issue May 6, 2019 · 4 comments

Comments

@custeve
Copy link

custeve commented May 6, 2019

In pymavlink, I do the following and it helps force the version to MAVLINK 2.0:

os.environ['MAVLINK20'] = '1'
os.environ['MAVLINK_DIALECT'] = 'ardupilotmega'

However, the same trick does not seem to have an effect in DroneKit. Is there a simple way to force MAVLINK 2.0 instead of 1.0 on default? I am running a custom modfiied version of DroneKit already, so changes to the dronekit package are acceptable in my case. We have a unique comms setup, that boots up before the aircraft. It seems that in some cases, if DroneKit boots first, it will default and stay on MAVLINK 1.0.

@custeve custeve changed the title Force Mavlink Version Force Mavlink Version to 2.0 May 6, 2019
@custeve
Copy link
Author

custeve commented May 7, 2019

I think I may have hacked this into working by adding the following line after the mav connection is verified:

self.vehicle._master.first_byte = True

This essentially forces the pymavlink object to re-evaluate the mavlink mode.

@wynn4
Copy link

wynn4 commented Feb 24, 2021

@custeve

Can you verify that this hack is still your standby for forcing dronekit to use Mavlink 2.0? For this to work, do you need to make changes to pymavlink?

It seems like there should be a way to select Mavlink 2.0 in dronekit and I'm surprised there isn't an issue about this.

@Amith4504
Copy link

Any updates on how to set mavlink protocol version to 2.0 using dronekit ?

@GRS26
Copy link

GRS26 commented Apr 6, 2023

did anybody solve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants