Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
6f474c99
Commit
6f474c99
authored
Mar 15, 2018
by
Andreas Bircher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compile fix
parent
ec93ab96
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
Terrain.cc
src/Terrain.cc
+11
-2
Terrain.h
src/Terrain.h
+0
-1
No files found.
src/Terrain.cc
View file @
6f474c99
...
...
@@ -41,7 +41,7 @@ void TerrainBatchManager::addQuery(ElevationProvider* elevationProvider, const Q
}
qCDebug
(
ElevationProviderLog
)
<<
"All altitudes taken from cached data"
;
elevationProvider
->
_signalTerrainData
(
true
,
altitudes
);
elevationProvider
->
_signalTerrainData
(
coordinates
.
count
()
==
altitudes
.
count
()
,
altitudes
);
}
}
...
...
@@ -71,6 +71,7 @@ bool TerrainBatchManager::_getAltitudesForCoordinates(const QList<QGeoCoordinate
_tileDownloadQueue
.
append
(
tileHash
);
}
_tilesMutex
.
unlock
();
return
false
;
}
else
{
...
...
@@ -123,11 +124,13 @@ void TerrainBatchManager::_fetchedTile()
}
else
{
qCDebug
(
ElevationProviderLog
)
<<
"Elevation tile fetching returned error. "
<<
reply
->
errorString
();
}
_tileFailed
();
reply
->
deleteLater
();
return
;
}
if
(
!
reply
->
isFinished
())
{
qCDebug
(
ElevationProviderLog
)
<<
"Error in fetching elevation tile. Not finished. "
<<
reply
->
errorString
();
_tileFailed
();
reply
->
deleteLater
();
return
;
}
...
...
@@ -140,6 +143,7 @@ void TerrainBatchManager::_fetchedTile()
if
(
parseError
.
error
!=
QJsonParseError
::
NoError
)
{
qCDebug
(
ElevationProviderLog
)
<<
"Could not parse terrain tile "
<<
parseError
.
errorString
();
qCDebug
(
ElevationProviderLog
)
<<
responseBytes
;
_tileFailed
();
reply
->
deleteLater
();
return
;
}
...
...
@@ -162,7 +166,7 @@ void TerrainBatchManager::_fetchedTile()
for
(
int
i
=
_requestQueue
.
count
()
-
1
;
i
>=
0
;
i
--
)
{
QList
<
float
>
altitudes
;
if
(
_getAltitudesForCoordinates
(
_requestQueue
[
i
].
coordinates
,
altitudes
))
{
_requestQueue
[
i
].
elevationProvider
->
_signalTerrainData
(
true
,
altitudes
);
_requestQueue
[
i
].
elevationProvider
->
_signalTerrainData
(
_requestQueue
[
i
].
coordinates
.
count
()
==
altitudes
.
count
()
,
altitudes
);
_requestQueue
.
removeAt
(
i
);
}
}
...
...
@@ -192,3 +196,8 @@ bool ElevationProvider::queryTerrainData(const QList<QGeoCoordinate>& coordinate
return
false
;
}
void
ElevationProvider
::
_signalTerrainData
(
bool
success
,
QList
<
float
>&
altitudes
)
{
emit
terrainData
(
success
,
altitudes
);
}
src/Terrain.h
View file @
6f474c99
...
...
@@ -34,7 +34,6 @@ public:
void
addQuery
(
ElevationProvider
*
elevationProvider
,
const
QList
<
QGeoCoordinate
>&
coordinates
);
private
slots
:
void
_requestFinished
(
void
);
void
_fetchedTile
(
void
);
/// slot to handle fetched elevation tiles
private:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment