Commit ffe57cb7 authored by Thomas Gubler's avatar Thomas Gubler

(re)enabled xplane hil (flightgear hil and xplane hil should both work)

parent 9eb77d2e
...@@ -97,7 +97,7 @@ UAS::UAS(MAVLinkProtocol* protocol, int id) : UASInterface(), ...@@ -97,7 +97,7 @@ UAS::UAS(MAVLinkProtocol* protocol, int id) : UASInterface(),
paramManager(NULL), paramManager(NULL),
attitudeStamped(false), attitudeStamped(false),
lastAttitude(0), lastAttitude(0),
simulation(new QGCFlightGearLink(this)), simulation(new QGCXPlaneLink(this)),
isLocalPositionKnown(false), isLocalPositionKnown(false),
isGlobalPositionKnown(false), isGlobalPositionKnown(false),
systemIsArmed(false), systemIsArmed(false),
...@@ -2592,7 +2592,24 @@ bool UAS::emergencyKILL() ...@@ -2592,7 +2592,24 @@ bool UAS::emergencyKILL()
/** /**
* If enabled, connect the fligth gear link. * If enabled, connect the fligth gear link.
*/ */
void UAS::enableHil(bool enable) void UAS::enableHilFlightGear(bool enable)
{
// Connect Flight Gear Link
if (enable)
{
simulation = new QGCFlightGearLink(this);
startHil();
}
else
{
stopHil();
}
}
/**
* If enabled, connect the fligth gear link.
*/
void UAS::enableHilXPlane(bool enable)
{ {
// Connect Flight Gear Link // Connect Flight Gear Link
if (enable) if (enable)
......
...@@ -528,7 +528,9 @@ public slots: ...@@ -528,7 +528,9 @@ public slots:
void go(); void go();
/** @brief Enable / disable HIL */ /** @brief Enable / disable HIL */
void enableHil(bool enable); void enableHilFlightGear(bool enable);
void enableHilXPlane(bool enable);
/** @brief Send the full HIL state to the MAV */ /** @brief Send the full HIL state to the MAV */
......
...@@ -122,8 +122,8 @@ UASView::UASView(UASInterface* uas, QWidget *parent) : ...@@ -122,8 +122,8 @@ UASView::UASView(UASInterface* uas, QWidget *parent) :
connect(removeAction, SIGNAL(triggered()), this, SLOT(deleteLater())); connect(removeAction, SIGNAL(triggered()), this, SLOT(deleteLater()));
connect(renameAction, SIGNAL(triggered()), this, SLOT(rename())); connect(renameAction, SIGNAL(triggered()), this, SLOT(rename()));
connect(selectAction, SIGNAL(triggered()), uas, SLOT(setSelected())); connect(selectAction, SIGNAL(triggered()), uas, SLOT(setSelected()));
connect(hilAction, SIGNAL(triggered(bool)), uas, SLOT(enableHil(bool))); connect(hilAction, SIGNAL(triggered(bool)), uas, SLOT(enableHilFlightGear(bool)));
connect(hilXAction, SIGNAL(triggered(bool)), uas, SLOT(enableHil(bool))); connect(hilXAction, SIGNAL(triggered(bool)), uas, SLOT(enableHilXPlane(bool)));
connect(selectAirframeAction, SIGNAL(triggered()), this, SLOT(selectAirframe())); connect(selectAirframeAction, SIGNAL(triggered()), this, SLOT(selectAirframe()));
connect(setBatterySpecsAction, SIGNAL(triggered()), this, SLOT(setBatterySpecs())); connect(setBatterySpecsAction, SIGNAL(triggered()), this, SLOT(setBatterySpecs()));
connect(uas, SIGNAL(systemRemoved()), this, SLOT(deleteLater())); connect(uas, SIGNAL(systemRemoved()), this, SLOT(deleteLater()));
......
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