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

Make mavsdk_server API consistent #2479

Open
julianoes opened this issue Dec 19, 2024 · 0 comments
Open

Make mavsdk_server API consistent #2479

julianoes opened this issue Dec 19, 2024 · 0 comments

Comments

@julianoes
Copy link
Collaborator

The mavsdk_server API mixes bool and int. I think we can improve it.

int mavsdk_server_run(
MavsdkServer* mavsdk_server, const char* system_address, const int mavsdk_server_port)
{
if (!mavsdk_server->connect(std::string(system_address))) {
// Connection was cancelled
return false;
}
auto grpc_port = mavsdk_server->startGrpcServer(mavsdk_server_port);
if (grpc_port == 0) {
// Server failed to start
return false;
}
return true;
}

And we should also docstring document it while at it.

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

No branches or pull requests

1 participant