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

Update UDP client connection syntax to use udpin:// #2380

Merged
merged 2 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/autopilot_server/autopilot_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ int main(int argc, char** argv)
// to communicate with the autopilot server plugins.
mavsdk::Mavsdk mavsdk{Mavsdk::Configuration{Mavsdk::ComponentType::GroundStation}};

auto result = mavsdk.add_any_connection("udp://:14551");
auto result = mavsdk.add_any_connection("udpin://0.0.0.0:14551");
if (result == mavsdk::ConnectionResult::Success) {
std::cout << "Connected!" << std::endl;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/battery/battery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ void usage(const std::string& bin_name)
<< " For TCP : tcp://[server_host][:server_port]\n"
<< " For UDP : udp://[bind_host][:bind_port]\n"
<< " For Serial : serial:///path/to/serial/dev[:baudrate]\n"
<< "For example, to connect to the simulator use URL: udp://:14540\n";
<< "For example, to connect to the simulator use URL: udpin://0.0.0.0:14540\n";
}

int main(int argc, char** argv)
Expand Down
2 changes: 1 addition & 1 deletion examples/calibrate/calibrate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ void usage(const std::string& bin_name)
<< " For TCP : tcp://[server_host][:server_port]\n"
<< " For UDP : udp://[bind_host][:bind_port]\n"
<< " For Serial : serial:///path/to/serial/dev[:baudrate]\n"
<< "For example, to connect to the simulator use URL: udp://:14540\n";
<< "For example, to connect to the simulator use URL: udpin://0.0.0.0:14540\n";
}

int main(int argc, char** argv)
Expand Down
2 changes: 1 addition & 1 deletion examples/camera/camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ void usage(std::string bin_name)
<< " For TCP : tcp://[server_host][:server_port]\n"
<< " For UDP : udp://[bind_host][:bind_port]\n"
<< " For Serial : serial:///path/to/serial/dev[:baudrate]\n"
<< "For example, to connect to the simulator use URL: udp://:14540\n";
<< "For example, to connect to the simulator use URL: udpin://0.0.0.0:14540\n";
}

int main(int argc, char** argv)
Expand Down
2 changes: 1 addition & 1 deletion examples/camera_settings/camera_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ void usage(std::string bin_name)
<< " For TCP : tcp://[server_host][:server_port]\n"
<< " For UDP : udp://[bind_host][:bind_port]\n"
<< " For Serial : serial:///path/to/serial/dev[:baudrate]\n"
<< "For example, to connect to the simulator use URL: udp://:14540\n";
<< "For example, to connect to the simulator use URL: udpin://0.0.0.0:14540\n";
}

struct CurrentSettings {
Expand Down
2 changes: 1 addition & 1 deletion examples/camera_zoom/camera_zoom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ void usage(std::string bin_name)
<< " For TCP : tcp://[server_host][:server_port]\n"
<< " For UDP : udp://[bind_host][:bind_port]\n"
<< " For Serial : serial:///path/to/serial/dev[:baudrate]\n"
<< "For example, to connect to the simulator use URL: udp://:14540\n";
<< "For example, to connect to the simulator use URL: udpin://0.0.0.0:14540\n";
}

int main(int argc, char** argv)
Expand Down
2 changes: 1 addition & 1 deletion examples/component_metadata/component_metadata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ void usage(const std::string& bin_name)
<< " For TCP : tcp://[server_host][:server_port]\n"
<< " For UDP : udp://[bind_host][:bind_port]\n"
<< " For Serial : serial:///path/to/serial/dev[:baudrate]\n"
<< "For example, to connect to the simulator use URL: udp://:14540\n";
<< "For example, to connect to the simulator use URL: udpin://0.0.0.0:14540\n";
}

int main(int argc, char** argv)
Expand Down
2 changes: 1 addition & 1 deletion examples/disconnect/disconnect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ void usage(const std::string& bin_name)
<< " For TCP : tcp://[server_host][:server_port]\n"
<< " For UDP : udp://[bind_host][:bind_port]\n"
<< " For Serial : serial:///path/to/serial/dev[:baudrate]\n"
<< "For example, to connect to the simulator use URL: udp://:14540\n";
<< "For example, to connect to the simulator use URL: udpin://0.0.0.0:14540\n";
}

bool connect(Mavsdk* mavsdk, std::string connection_url)
Expand Down
2 changes: 1 addition & 1 deletion examples/distance_sensor/distance_sensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ void usage(const std::string& bin_name)
<< " For TCP : tcp://[server_host][:server_port]\n"
<< " For UDP : udp://[bind_host][:bind_port]\n"
<< " For Serial : serial:///path/to/serial/dev[:baudrate]\n"
<< "For example, to connect to the simulator use URL: udp://:14540\n";
<< "For example, to connect to the simulator use URL: udpin://0.0.0.0:14540\n";
}

int main(int argc, char** argv)
Expand Down
2 changes: 1 addition & 1 deletion examples/events/events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ void usage(const std::string& bin_name)
<< " For TCP : tcp://[server_host][:server_port]\n"
<< " For UDP : udp://[bind_host][:bind_port]\n"
<< " For Serial : serial:///path/to/serial/dev[:baudrate]\n"
<< "For example, to connect to the simulator use URL: udp://:14540\n\n"
<< "For example, to connect to the simulator use URL: udpin://0.0.0.0:14540\n\n"
<< " -v: enable verbose output\n"
<< " monitor: listen for events (instead of printing the arming report)\n";
}
Expand Down
2 changes: 1 addition & 1 deletion examples/fly_mission/fly_mission.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void usage(const std::string& bin_name)
<< " For TCP : tcp://[server_host][:server_port]\n"
<< " For UDP : udp://[bind_host][:bind_port]\n"
<< " For Serial : serial:///path/to/serial/dev[:baudrate]\n"
<< "For example, to connect to the simulator use URL: udp://:14540\n";
<< "For example, to connect to the simulator use URL: udpin://0.0.0.0:14540\n";
}

int main(int argc, char** argv)
Expand Down
8 changes: 4 additions & 4 deletions examples/fly_multiple_drones/fly_multiple_drones.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// separate plan file. Also saves the telemetry information to csv files
//
// Run with:
// ./fly_multiple_drones udp://:14540 udp://:14541 test1.plan test2.plan
// ./fly_multiple_drones udpin://0.0.0.0:14540 udpin://0.0.0.0:14541 test1.plan test2.plan
//
//
// How to Start Multiple Instances (for jMAVSim)
Expand Down Expand Up @@ -33,12 +33,12 @@
// 2. Build the executable
// 3. (a) Create a Mission in QGroundControl and save them to a file (.plan), or
// (b) Use a pre-created sample mission plan.
// 4. Run the executable by passing the connection urls (ex. udp://:14540) and
// 4. Run the executable by passing the connection urls (ex. udpin://0.0.0.0:14540) and
// path of QGC mission plan as arguments Example: If you have test1.plan and
// test2.plan in "../../../plugins/mission/" and you are running two drones
// in udp://:14540 and udp://:14541 then you run the example as:
// in udpin://0.0.0.0:14540 and udpin://0.0.0.0:14541 then you run the example as:
//
// ./fly_multiple_drones udp://:14540 udp://:14541 test1.plan test2.plan
// ./fly_multiple_drones udpin://0.0.0.0:14540 udpin://0.0.0.0:14541 test1.plan test2.plan
//
//
// Note: The mission needs to end with RTL or land, otherwise it will get stuck
Expand Down
2 changes: 1 addition & 1 deletion examples/fly_qgc_mission/fly_qgc_mission.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void usage(const std::string& bin_name)
<< " For TCP : tcp://[server_host][:server_port]\n"
<< " For UDP : udp://[bind_host][:bind_port]\n"
<< " For Serial : serial:///path/to/serial/dev[:baudrate]\n"
<< "For example, to connect to the simulator use URL: udp://:14540\n";
<< "For example, to connect to the simulator use URL: udpin://0.0.0.0:14540\n";
}

int main(int argc, char** argv)
Expand Down
2 changes: 1 addition & 1 deletion examples/follow_me/follow_me.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ void usage(const std::string& bin_name)
<< " For TCP : tcp://[server_host][:server_port]\n"
<< " For UDP : udp://[bind_host][:bind_port]\n"
<< " For Serial : serial:///path/to/serial/dev[:baudrate]\n"
<< "For example, to connect to the simulator use URL: udp://:14540\n";
<< "For example, to connect to the simulator use URL: udpin://0.0.0.0:14540\n";
}

int main(int argc, char** argv)
Expand Down
2 changes: 1 addition & 1 deletion examples/ftp_client/ftp_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ void usage(const std::string& bin_name)
<< " For TCP : tcp://[server_host][:server_port]\n"
<< " For UDP : udp://[bind_host][:bind_port]\n"
<< " For Serial : serial:///path/to/serial/dev[:baudrate]\n"
<< "For example, to connect to the simulator use URL: udp://:14540\n"
<< "For example, to connect to the simulator use URL: udpin://0.0.0.0:14540\n"
<< '\n'
<< "Server component id is for example 1 for autopilot or 195 for companion computer,\n"
<< "which is being used if you run the ftp_server example\n"
Expand Down
2 changes: 1 addition & 1 deletion examples/geofence/geofence.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void usage(const std::string& bin_name)
<< " For TCP : tcp://[server_host][:server_port]\n"
<< " For UDP : udp://[bind_host][:bind_port]\n"
<< " For Serial : serial:///path/to/serial/dev[:baudrate]\n"
<< "For example, to connect to the simulator use URL: udp://:14540\n";
<< "For example, to connect to the simulator use URL: udpin://0.0.0.0:14540\n";
}

int main(int argc, char** argv)
Expand Down
2 changes: 1 addition & 1 deletion examples/gimbal/gimbal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ void usage(const std::string& bin_name)
<< " For TCP : tcp://[server_host][:server_port]\n"
<< " For UDP : udp://[bind_host][:bind_port]\n"
<< " For Serial : serial:///path/to/serial/dev[:baudrate]\n"
<< "For example, to connect to the simulator use URL: udp://:14540\n";
<< "For example, to connect to the simulator use URL: udpin://0.0.0.0:14540\n";
}

int main(int argc, char** argv)
Expand Down
2 changes: 1 addition & 1 deletion examples/gimbal_full_control/gimbal_full_control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ void usage(const std::string& bin_name)
<< " For TCP : tcp://[server_host][:server_port]\n"
<< " For UDP : udp://[bind_host][:bind_port]\n"
<< " For Serial : serial:///path/to/serial/dev[:baudrate]\n"
<< "For example, to connect to the simulator use URL: udp://:14540\n";
<< "For example, to connect to the simulator use URL: udpin://0.0.0.0:14540\n";
}

int main(int argc, char** argv)
Expand Down
2 changes: 1 addition & 1 deletion examples/log_streaming/log_streaming.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ void usage(const std::string& bin_name)
<< " For TCP : tcp://[server_host][:server_port]\n"
<< " For UDP : udp://[bind_host][:bind_port]\n"
<< " For Serial : serial:///path/to/serial/dev[:baudrate]\n"
<< "For example, to connect to the simulator use URL: udp://:14540" << '\n'
<< "For example, to connect to the simulator use URL: udpin://0.0.0.0:14540" << '\n'
<< "--drop To drop some of the messages" << std::endl;
}

Expand Down
2 changes: 1 addition & 1 deletion examples/logfile_download/logfile_download.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ void usage(const std::string& bin_name)
<< " For TCP : tcp://[server_host][:server_port]\n"
<< " For UDP : udp://[bind_host][:bind_port]\n"
<< " For Serial : serial:///path/to/serial/dev[:baudrate]\n"
<< "For example, to connect to the simulator use URL: udp://:14540\n"
<< "For example, to connect to the simulator use URL: udpin://0.0.0.0:14540\n"
<< '\n'
<< "To remove log files after all downloads completed,\n"
<< "please add the --rm argument" << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion examples/manual_control/manual_control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ void usage(const std::string& bin_name)
<< " For TCP : tcp://[server_host][:server_port]\n"
<< " For UDP : udp://[bind_host][:bind_port]\n"
<< " For Serial : serial:///path/to/serial/dev[:baudrate]\n"
<< "For example, to connect to the simulator use URL: udp://:14540\n";
<< "For example, to connect to the simulator use URL: udpin://0.0.0.0:14540\n";
}

int main(int argc, char** argv)
Expand Down
2 changes: 1 addition & 1 deletion examples/mavshell/mavshell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ void usage(const std::string& bin_name)
<< " For TCP : tcp://[server_host][:server_port]\n"
<< " For UDP : udp://[bind_host][:bind_port]\n"
<< " For Serial : serial:///path/to/serial/dev[:baudrate]\n"
<< "For example, to connect to the simulator use URL: udp://:14540\n";
<< "For example, to connect to the simulator use URL: udpin://0.0.0.0:14540\n";
}

int main(int argc, char** argv)
Expand Down
4 changes: 2 additions & 2 deletions examples/multiple_drones/multiple_drones.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Example to connect multiple vehicles and make them take off and land in parallel.
//./multiple_drones udp://:14540 udp://:14541
//./multiple_drones udpin://0.0.0.0:14540 udpin://0.0.0.0:14541
//

#include <mavsdk/mavsdk.h>
Expand All @@ -25,7 +25,7 @@ void usage(const std::string& bin_name)
<< " For TCP : tcp://[server_host][:server_port]\n"
<< " For UDP : udp://[bind_host][:bind_port]\n"
<< " For Serial : serial:///path/to/serial/dev[:baudrate]\n"
<< "For example, to connect to the simulator use URL: udp://:14540\n";
<< "For example, to connect to the simulator use URL: udpin://0.0.0.0:14540\n";
}

int main(int argc, char* argv[])
Expand Down
2 changes: 1 addition & 1 deletion examples/offboard/offboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ void usage(const std::string& bin_name)
<< " For TCP : tcp://[server_host][:server_port]\n"
<< " For UDP : udp://[bind_host][:bind_port]\n"
<< " For Serial : serial:///path/to/serial/dev[:baudrate]\n"
<< "For example, to connect to the simulator use URL: udp://:14540\n";
<< "For example, to connect to the simulator use URL: udpin://0.0.0.0:14540\n";
}

//
Expand Down
2 changes: 1 addition & 1 deletion examples/parachute/parachute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ static void usage(const std::string& bin_name)
<< " For TCP : tcp://[server_host][:server_port]\n"
<< " For UDP : udp://[bind_host][:bind_port]\n"
<< " For Serial : serial:///path/to/serial/dev[:baudrate]\n"
<< "For example, to connect to the simulator use URL: udp://:14540\n";
<< "For example, to connect to the simulator use URL: udpin://0.0.0.0:14540\n";
}

static void process_command_long(const mavlink_message_t& message, uint8_t our_sysid)
Expand Down
2 changes: 1 addition & 1 deletion examples/set_actuator/set_actuator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ void usage(const std::string& bin_name)
<< " For TCP : tcp://[server_host][:server_port]\n"
<< " For UDP : udp://[bind_host][:bind_port]\n"
<< " For Serial : serial:///path/to/serial/dev[:baudrate]\n"
<< "For example, to connect to the simulator use URL: udp://:14540\n";
<< "For example, to connect to the simulator use URL: udpin://0.0.0.0:14540\n";
}

int main(int argc, char** argv)
Expand Down
2 changes: 1 addition & 1 deletion examples/sniffer/sniffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ void usage(const std::string& bin_name)
<< " For TCP : tcp://[server_host][:server_port]\n"
<< " For UDP : udp://[bind_host][:bind_port]\n"
<< " For Serial : serial:///path/to/serial/dev[:baudrate]\n"
<< "For example, to connect to the simulator use URL: udp://:14540\n";
<< "For example, to connect to the simulator use URL: udpin://0.0.0.0:14540\n";
}

int main(int argc, char** argv)
Expand Down
2 changes: 1 addition & 1 deletion examples/system_info/system_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ void usage(const std::string& bin_name)
<< " For TCP : tcp://[server_host][:server_port]\n"
<< " For UDP : udp://[bind_host][:bind_port]\n"
<< " For Serial : serial:///path/to/serial/dev[:baudrate]\n"
<< "For example, to connect to the simulator use URL: udp://:14540\n";
<< "For example, to connect to the simulator use URL: udpin://0.0.0.0:14540\n";
}

int main(int argc, char** argv)
Expand Down
2 changes: 1 addition & 1 deletion examples/takeoff_and_land/takeoff_and_land.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ void usage(const std::string& bin_name)
<< " For TCP : tcp://[server_host][:server_port]\n"
<< " For UDP : udp://[bind_host][:bind_port]\n"
<< " For Serial : serial:///path/to/serial/dev[:baudrate]\n"
<< "For example, to connect to the simulator use URL: udp://:14540\n";
<< "For example, to connect to the simulator use URL: udpin://0.0.0.0:14540\n";
}

int main(int argc, char** argv)
Expand Down
2 changes: 1 addition & 1 deletion examples/terminate/terminate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ static void usage(const std::string& bin_name)
<< " For TCP : tcp://[server_host][:server_port]\n"
<< " For UDP : udp://[bind_host][:bind_port]\n"
<< " For Serial : serial:///path/to/serial/dev[:baudrate]\n"
<< "For example, to connect to the simulator use URL: udp://:14540\n";
<< "For example, to connect to the simulator use URL: udpin://0.0.0.0:14540\n";
}

int main(int argc, char* argv[])
Expand Down
2 changes: 1 addition & 1 deletion examples/transponder/transponder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ void usage(const std::string& bin_name)
<< " For TCP : tcp://[server_host][:server_port]\n"
<< " For UDP : udp://[bind_host][:bind_port]\n"
<< " For Serial : serial:///path/to/serial/dev[:baudrate]\n"
<< "For example, to connect to the simulator use URL: udp://:14540\n";
<< "For example, to connect to the simulator use URL: udpin://0.0.0.0:14540\n";
}

int main(int argc, char** argv)
Expand Down
2 changes: 1 addition & 1 deletion examples/tune/tune.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ void usage(const std::string& bin_name)
<< " For TCP : tcp://[server_host][:server_port]\n"
<< " For UDP : udp://[bind_host][:bind_port]\n"
<< " For Serial : serial:///path/to/serial/dev[:baudrate]\n"
<< "For example, to connect to the simulator use URL: udp://:14540\n";
<< "For example, to connect to the simulator use URL: udpin://0.0.0.0:14540\n";
}

int main(int argc, char** argv)
Expand Down
2 changes: 1 addition & 1 deletion examples/vtol_transition/vtol_transition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ void usage(const std::string& bin_name)
<< " For TCP : tcp://[server_host][:server_port]\n"
<< " For UDP : udp://[bind_host][:bind_port]\n"
<< " For Serial : serial:///path/to/serial/dev[:baudrate]\n"
<< "For example, to connect to the simulator use URL: udp://:14540\n";
<< "For example, to connect to the simulator use URL: udpin://0.0.0.0:14540\n";
}

int main(int argc, char** argv)
Expand Down
2 changes: 1 addition & 1 deletion examples/winch/winch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ void usage(const std::string& bin_name)
<< " For TCP : tcp://[server_host][:server_port]\n"
<< " For UDP : udp://[bind_host][:bind_port]\n"
<< " For Serial : serial:///path/to/serial/dev[:baudrate]\n"
<< "For example, to connect to the simulator use URL: udp://:14540\n";
<< "For example, to connect to the simulator use URL: udpin://0.0.0.0:14540\n";
}

int main(int argc, char** argv)
Expand Down
Loading