Browse Source

flightgear debug output

QGC4.4
Thomas Gubler 11 years ago
parent
commit
7d46491074
  1. 25
      src/comm/QGCFlightGearLink.cc
  2. 2
      src/comm/QGCFlightGearLink.h

25
src/comm/QGCFlightGearLink.cc

@ -625,6 +625,8 @@ bool QGCFlightGearLink::connectSimulation() @@ -625,6 +625,8 @@ bool QGCFlightGearLink::connectSimulation()
// qDebug() << "STARTING: " << processTerraSync << terraSyncArguments;
process->start(processFgfs, flightGearArguments);
// connect (process, SIGNAL(readyReadStandardOutput()), this, SLOT(printFgfsOutput()));
// connect (process, SIGNAL(readyReadStandardError()), this, SLOT(printFgfsError()));
@ -665,6 +667,29 @@ void QGCFlightGearLink::printTerraSyncError() @@ -665,6 +667,29 @@ void QGCFlightGearLink::printTerraSyncError()
}
}
void QGCFlightGearLink::printFgfsOutput()
{
qDebug() << "fgfs stdout:";
QByteArray byteArray = process->readAllStandardOutput();
QStringList strLines = QString(byteArray).split("\n");
foreach (QString line, strLines){
qDebug() << line;
}
}
void QGCFlightGearLink::printFgfsError()
{
qDebug() << "fgfs stderr:";
QByteArray byteArray = process->readAllStandardError();
QStringList strLines = QString(byteArray).split("\n");
foreach (QString line, strLines){
qDebug() << line;
}
}
/**
* @brief Set the startup arguments used to start flightgear
*

2
src/comm/QGCFlightGearLink.h

@ -131,6 +131,8 @@ public slots: @@ -131,6 +131,8 @@ public slots:
void printTerraSyncOutput();
void printTerraSyncError();
void printFgfsOutput();
void printFgfsError();
void setStartupArguments(QString startupArguments);
protected:

Loading…
Cancel
Save