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

mavsdk_server: default to the first autopilot #2159

Merged
merged 2 commits into from
Oct 20, 2023

Conversation

JonasVautherin
Copy link
Collaborator

Currently, mavsdk_server defaults to being a ground station (i.e. it does not expose the Configuration). When started, mavsdk_server connects to the first MAVLink System it detects.

The problem I have seen is that in some setups, there are sometimes MAVLink systems that are not an autopilot but that are advertising on the link that mavsdk_server is listening to. I had the issue with a Herelink radio, that advertises radio messages with sysid 42. For an app running on Herelink, if mavsdk_server picks up the system "42" first, then there is nothing to do other than restarting it and hoping that it picks up the right system.

Now I argue that the "right" system for mavsdk_server, given the current situation where it defaults to being a ground station, is a system that has an autopilot (i.e. a drone).

This PR makes mavsdk_server connect not to the first system it encounters, but to the first drone (a.k.a. "system with an autopilot") it encounters.

Copy link
Collaborator

@julianoes julianoes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@JonasVautherin JonasVautherin force-pushed the v1.4-mavsdk-server-default-to-autopilot branch from a6852d4 to 494caa8 Compare October 19, 2023 22:49
@JonasVautherin JonasVautherin marked this pull request as ready for review October 20, 2023 23:04
@JonasVautherin
Copy link
Collaborator Author

Tested with SiteScan and the Astro 👍

@JonasVautherin JonasVautherin merged commit f337233 into v1.4 Oct 20, 2023
29 checks passed
@JonasVautherin JonasVautherin deleted the v1.4-mavsdk-server-default-to-autopilot branch October 20, 2023 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants