Improve use of MAVSDK::first_autopilot()

Check return value of MAVSDK::first_autopilot(). Before application
crashed if ArduPilot was not running.

Type: Improvement
Issue: https://denyspopov.atlassian.net/browse/AZ-17
This commit is contained in:
Tuomas Järvinen
2024-05-21 15:50:26 +02:00
parent ab791eb254
commit 2275a0a5ee
2 changed files with 14 additions and 5 deletions
+4 -3
View File
@@ -1,5 +1,6 @@
#pragma once
const char *AZ_CONNECTION_SERIAL = "serial:///dev/ttyS0:115200";
const char *AZ_CONNECTION_UDP = "udp://:14550";
const int AZ_RELATIVE_FLY_ALTITUDE = 50;
const char *AZ_CONNECTION_SERIAL = "serial:///dev/ttyS0:115200";
const char *AZ_CONNECTION_UDP = "udp://:14550";
const int AZ_RELATIVE_FLY_ALTITUDE = 50;
const float AZ_GET_AUTOPILOT_TIMEOUT = 3.0;