Improve use of MAVSDK::add_any_connection()

Added error printing and possibility to use UART as connection
to the flight controller.

Issue: https://denyspopov.atlassian.net/browse/AZ-16
Type: New Feature
This commit is contained in:
Tuomas Järvinen
2024-05-20 21:02:32 +02:00
parent dda897a573
commit ab791eb254
6 changed files with 28 additions and 16 deletions
+3 -2
View File
@@ -9,8 +9,9 @@ int main(int argc, char *argv[])
// This is needed to have main event loop and signal-slot events in the AzDroneController.
QCoreApplication a(argc, argv);
if (argc != 2) {
qCritical() << "Please give mission JSON file as an argument.\n";
if (argc < 2) {
qCritical() << "\nPass the mission JSON file as the first argument.";
qCritical() << "A serial port connection can be enabled with \"serial\" as the second argument.\n";
return 1;
}