Improve use of MAVSDK::Telemetry

Print health information if Telemetry::health_all_ok() fails.

Type: Improvement
Issue: https://denyspopov.atlassian.net/browse/AZ-15
This commit is contained in:
Tuomas Järvinen
2024-05-19 22:06:03 +02:00
parent b0b17d7fcc
commit 09f974c1c9
2 changed files with 38 additions and 7 deletions
+7
View File
@@ -67,12 +67,19 @@ private slots:
// Disarms the drone and exits the application. TODO!! Discuss quitting the application.
void disarmDroneSlot(void);
// Gets Telemetry::Health information in prearming.
void newHealthInfoSlot(Telemetry::Health health);
signals:
// Signal is emitted when Ardupilot sends a new position from the
// MAVSDK thread. Signal goes through the main event loop and is
// captured in the main thread to avoid threading issues.
void newPosition(Telemetry::Position);
// If Telemetry::health_all_ok() fails, then autopilot subscripes for the healt updates to
// see exactly what is wrong. This signal is emitted to catch updates in the main thread.
void newHealthInfo(Telemetry::Health);
private:
Mavsdk mMavsdk;
AzDroneState mDroneState;