Commit 7d464910 authored by Thomas Gubler's avatar Thomas Gubler

flightgear debug output

parent 7e5acad9
...@@ -625,6 +625,8 @@ bool QGCFlightGearLink::connectSimulation() ...@@ -625,6 +625,8 @@ bool QGCFlightGearLink::connectSimulation()
// qDebug() << "STARTING: " << processTerraSync << terraSyncArguments; // qDebug() << "STARTING: " << processTerraSync << terraSyncArguments;
process->start(processFgfs, flightGearArguments); 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 * @brief Set the startup arguments used to start flightgear
* *
......
...@@ -131,6 +131,8 @@ public slots: ...@@ -131,6 +131,8 @@ public slots:
void printTerraSyncOutput(); void printTerraSyncOutput();
void printTerraSyncError(); void printTerraSyncError();
void printFgfsOutput();
void printFgfsError();
void setStartupArguments(QString startupArguments); void setStartupArguments(QString startupArguments);
protected: protected:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment