Commit c8c3290e authored by Don Gagne's avatar Don Gagne

commit

parent 1378b1b0
This diff is collapsed.
...@@ -47,7 +47,6 @@ This file is part of the QGROUNDCONTROL project ...@@ -47,7 +47,6 @@ This file is part of the QGROUNDCONTROL project
class QGCFlightGearLink : public QGCHilLink class QGCFlightGearLink : public QGCHilLink
{ {
Q_OBJECT Q_OBJECT
//Q_INTERFACES(QGCFlightGearLinkInterface:LinkInterface)
public: public:
QGCFlightGearLink(UASInterface* mav, QString startupArguments, QString remoteHost=QString("127.0.0.1:49000"), QHostAddress host = QHostAddress::Any, quint16 port = 49005); QGCFlightGearLink(UASInterface* mav, QString startupArguments, QString remoteHost=QString("127.0.0.1:49000"), QHostAddress host = QHostAddress::Any, quint16 port = 49005);
...@@ -103,10 +102,6 @@ public slots: ...@@ -103,10 +102,6 @@ public slots:
/** @brief Send new control states to the simulation */ /** @brief Send new control states to the simulation */
void updateControls(quint64 time, float rollAilerons, float pitchElevator, float yawRudder, float throttle, quint8 systemMode, quint8 navMode); void updateControls(quint64 time, float rollAilerons, float pitchElevator, float yawRudder, float throttle, quint8 systemMode, quint8 navMode);
void updateActuators(quint64 time, float act1, float act2, float act3, float act4, float act5, float act6, float act7, float act8); void updateActuators(quint64 time, float act1, float act2, float act3, float act4, float act5, float act6, float act7, float act8);
// /** @brief Remove a host from broadcasting messages to */
// void removeHost(const QString& host);
// void readPendingDatagrams();
void processError(QProcess::ProcessError err);
/** @brief Set the simulator version as text string */ /** @brief Set the simulator version as text string */
void setVersion(const QString& version) void setVersion(const QString& version)
{ {
...@@ -135,10 +130,9 @@ public slots: ...@@ -135,10 +130,9 @@ public slots:
bool connectSimulation(); bool connectSimulation();
bool disconnectSimulation(); bool disconnectSimulation();
void printFgfsOutput();
void printFgfsError();
void setStartupArguments(QString startupArguments); void setStartupArguments(QString startupArguments);
void setBarometerOffset(float barometerOffsetkPa); void setBarometerOffset(float barometerOffsetkPa);
void processError(QProcess::ProcessError err);
protected: protected:
QString name; QString name;
...@@ -147,11 +141,9 @@ protected: ...@@ -147,11 +141,9 @@ protected:
quint16 currentPort; quint16 currentPort;
quint16 port; quint16 port;
int id; int id;
QUdpSocket* socket;
bool connectState; bool connectState;
UASInterface* mav; UASInterface* mav;
QProcess* process;
unsigned int flightGearVersion; unsigned int flightGearVersion;
QString startupArguments; QString startupArguments;
bool _sensorHilEnabled; bool _sensorHilEnabled;
...@@ -159,10 +151,19 @@ protected: ...@@ -159,10 +151,19 @@ protected:
void setName(QString name); void setName(QString name);
private slots:
void _printFgfsOutput(void);
void _printFgfsError(void);
private: private:
static bool _findUIArgument(const QStringList& uiArgList, const QString& argLabel, QString& argValue);
QString _fgProcessName; ///< FlightGear process to start QString _fgProcessName; ///< FlightGear process to start
QString _fgProcessWorkingDirPath; ///< Working directory to start FG process in, empty for none QString _fgProcessWorkingDirPath; ///< Working directory to start FG process in, empty for none
QStringList _fgArgList; ///< Arguments passed to FlightGear process QStringList _fgArgList; ///< Arguments passed to FlightGear process
QUdpSocket* _udpCommSocket; ///< UDP communication sockect between FG and QGC
QProcess* _fgProcess; ///< FlightGear process
}; };
#endif // QGCFLIGHTGEARLINK_H #endif // QGCFLIGHTGEARLINK_H
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