Browse Source

Merge pull request #6340 from DonLakeFlyer/LogTerrain

More logging in terrain, more work on log output to file
QGC4.4
Don Gagne 7 years ago committed by GitHub
parent
commit
7ecfdf1670
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      src/QGCApplication.cc
  2. 4
      src/QmlControls/AppMessages.cc
  3. 1
      src/Terrain/TerrainQuery.cc

1
src/QGCApplication.cc

@ -335,6 +335,7 @@ void QGCApplication::_shutdown(void) @@ -335,6 +335,7 @@ void QGCApplication::_shutdown(void)
QGCApplication::~QGCApplication()
{
// Place shutdown code in _shutdown
_app = NULL;
}
void QGCApplication::_initCommon(void)

4
src/QmlControls/AppMessages.cc

@ -92,7 +92,8 @@ void AppLogModel::threadsafeLog(const QString message) @@ -92,7 +92,8 @@ void AppLogModel::threadsafeLog(const QString message)
insertRows(line, 1);
setData(index(line), message, Qt::DisplayRole);
if (_logFile.fileName().isEmpty() && qgcApp()->logOutput()) {
if (qgcApp() && qgcApp()->logOutput() && _logFile.fileName().isEmpty()) {
qDebug() << _logFile.fileName().isEmpty() << qgcApp()->logOutput();
QGCToolbox* toolbox = qgcApp()->toolbox();
// Be careful of toolbox not being open yet
if (toolbox) {
@ -110,5 +111,6 @@ void AppLogModel::threadsafeLog(const QString message) @@ -110,5 +111,6 @@ void AppLogModel::threadsafeLog(const QString message)
if (_logFile.isOpen()) {
QTextStream out(&_logFile);
out << message << "\n";
_logFile.flush();
}
}

1
src/Terrain/TerrainQuery.cc

@ -595,6 +595,7 @@ void TerrainAtCoordinateBatchManager::_coordinateHeights(bool success, QList<dou @@ -595,6 +595,7 @@ void TerrainAtCoordinateBatchManager::_coordinateHeights(bool success, QList<dou
int currentIndex = 0;
foreach (const SentRequestInfo_t& sentRequestInfo, _sentRequests) {
if (!sentRequestInfo.queryObjectDestroyed) {
qCDebug(TerrainQueryLog) << "TerrainAtCoordinateBatchManager::_coordinateHeights returned TerrainCoordinateQuery:count" << sentRequestInfo.terrainAtCoordinateQuery << sentRequestInfo.cCoord;
disconnect(sentRequestInfo.terrainAtCoordinateQuery, &TerrainAtCoordinateQuery::destroyed, this, &TerrainAtCoordinateBatchManager::_queryObjectDestroyed);
QList<double> requestAltitudes = heights.mid(currentIndex, sentRequestInfo.cCoord);
sentRequestInfo.terrainAtCoordinateQuery->_signalTerrainData(true, requestAltitudes);

Loading…
Cancel
Save