Commit 4f745fab authored by Léo-Paul Géneau's avatar Léo-Paul Géneau 👾

Force udp connection

parent 7c993b10
......@@ -92,14 +92,12 @@ static double toDeg(double angle) {
}
int start(const char * ip, int port, const char * log_file, int timeout) {
char url[32];
sprintf(url, "udp://%s:%d", ip , port);
std::string connection_url(url);
std::string remote_ip(ip);
ConnectionResult connection_result;
float abs_altitude;
log_file_fd.open(log_file);
connection_result = _mavsdk.add_any_connection(connection_url);
connection_result = _mavsdk.add_udp_connection(remote_ip, port);
if (connection_result != ConnectionResult::Success) {
log_error_from_result("Connection failed", connection_result);
return -1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment