patch 2.66 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
diff --git a/libs/mavlink/include/mavlink/v2.0 b/libs/mavlink/include/mavlink/v2.0
--- a/libs/mavlink/include/mavlink/v2.0
+++ b/libs/mavlink/include/mavlink/v2.0
@@ -1 +1 @@
-Subproject commit 68869da6575d4ca61b92e9081b7c81587f157ed6
+Subproject commit 68869da6575d4ca61b92e9081b7c81587f157ed6-dirty
diff --git a/src/Terrain/TerrainQueryManager.cc b/src/Terrain/TerrainQueryManager.cc
index 59ec2d4..c38a870 100644
--- a/src/Terrain/TerrainQueryManager.cc
+++ b/src/Terrain/TerrainQueryManager.cc
@@ -3,17 +3,20 @@
 TerrainQueryManager::TerrainQueryManager(QObject* parent)
     : TerrainQueryInterface(parent)
 {
-    _providerAirMap = new TerrainOfflineAirMapQuery(parent);
+    connect(&_providerAirMap, &TerrainQueryInterface::coordinateHeightsReceived, this, &TerrainQueryInterface::coordinateHeightsReceived);
+    connect(&_providerAirMap, &TerrainQueryInterface::pathHeightsReceived, this, &TerrainQueryInterface::pathHeightsReceived);
+    connect(&_providerAirMap, &TerrainQueryInterface::carpetHeightsReceived, this, &TerrainQueryInterface::carpetHeightsReceived);
 }
 
 void TerrainQueryManager::requestCoordinateHeights(const QList<QGeoCoordinate>& coordinates){
-    _providerAirMap->requestCoordinateHeights(coordinates);
+    _providerAirMap.requestCoordinateHeights(coordinates);
 }
 
 void TerrainQueryManager::requestPathHeights(const QGeoCoordinate& fromCoord, const QGeoCoordinate& toCoord){
-    _providerAirMap->requestPathHeights(fromCoord,toCoord);
+    _providerAirMap.requestPathHeights(fromCoord,toCoord);
 }
 
 void TerrainQueryManager::requestCarpetHeights(const QGeoCoordinate& swCoord, const QGeoCoordinate& neCoord, bool statsOnly){
-    _providerAirMap->requestCarpetHeights(swCoord,neCoord,statsOnly);
+    _providerAirMap.requestCarpetHeights(swCoord,neCoord,statsOnly);
 }
+
diff --git a/src/Terrain/TerrainQueryManager.h b/src/Terrain/TerrainQueryManager.h
index 2921679..9b4494c 100644
--- a/src/Terrain/TerrainQueryManager.h
+++ b/src/Terrain/TerrainQueryManager.h
@@ -27,12 +27,12 @@ public:
     ///     @param neCoord North-East bound of rectangular area to query
     ///     @param statsOnly true: Return only stats, no carpet data
     void requestCarpetHeights(const QGeoCoordinate& swCoord, const QGeoCoordinate& neCoord, bool statsOnly);
-
+    
 signals:
     void coordinateHeightsReceived(bool success, QList<double> heights);
     void pathHeightsReceived(bool success, double latStep, double lonStep, const QList<double>& heights);
     void carpetHeightsReceived(bool success, double minHeight, double maxHeight, const QList<QList<double>>& carpet);
 
 private:
-    TerrainOfflineAirMapQuery * _providerAirMap;
+    TerrainOfflineAirMapQuery _providerAirMap;
 };