Commit 42de6b7c authored by Lorenz Meier's avatar Lorenz Meier

HIL config improvements, fixed confusion about which dock widget is part of...

HIL config improvements, fixed confusion about which dock widget is part of which view, main window behaving now
parent 8432278f
......@@ -114,6 +114,9 @@ signals:
/** @brief Selected sim version changed */
void versionChanged(const QString& version);
/** @brief Selected sim version changed */
void versionChanged(const int version);
/** @brief Sensor leve HIL state changed */
void sensorHilChanged(bool enabled);
};
......
......@@ -54,7 +54,7 @@ QGCXPlaneLink::QGCXPlaneLink(UASInterface* mav, QString remoteHost, QHostAddress
simUpdateLast(QGC::groundTimeMilliseconds()),
simUpdateLastText(QGC::groundTimeMilliseconds()),
simUpdateHz(0),
_sensorHilEnabled(true)
_sensorHilEnabled(false)
{
this->localHost = localHost;
this->localPort = localPort/*+mav->getUASID()*/;
......
......@@ -11,7 +11,7 @@
#define WITH_TEXT_TO_SPEECH 1
#define QGC_APPLICATION_NAME "QGroundControl"
#define QGC_APPLICATION_VERSION "v. 1.0.9 (beta)"
#define QGC_APPLICATION_VERSION "v. 1.0.7 (beta)"
namespace QGC
......
......@@ -854,6 +854,9 @@ void HSIDisplay::setMetricWidth(double width)
*/
void HSIDisplay::setActiveUAS(UASInterface* uas)
{
if (!uas)
return;
if (this->uas != NULL) {
disconnect(this->uas, SIGNAL(gpsSatelliteStatusChanged(int,int,float,float,float,bool)), this, SLOT(updateSatellite(int,int,float,float,float,bool)));
disconnect(this->uas, SIGNAL(localPositionChanged(UASInterface*,double,double,double,quint64)), this, SLOT(updateLocalPosition(UASInterface*,double,double,double,quint64)));
......
This diff is collapsed.
......@@ -226,7 +226,7 @@ public slots:
void closeEvent(QCloseEvent* event);
/** @brief Load data view, allowing to plot flight data */
void loadDataView(QString fileName);
// void loadDataView(QString fileName);
/**
* @brief Shows a Docked Widget based on the action sender
......@@ -347,7 +347,7 @@ protected:
QPointer<SubMainWindow> plannerView;
QPointer<SubMainWindow> pilotView;
QPointer<SubMainWindow> configView;
QPointer<SubMainWindow> dataView;
QPointer<SubMainWindow> mavlinkView;
QPointer<SubMainWindow> engineeringView;
QPointer<SubMainWindow> simView;
......
......@@ -22,9 +22,9 @@ QGCHilConfiguration::QGCHilConfiguration(UAS *mav, QWidget *parent) :
int i = settings.value("SIMULATOR_INDEX", -1).toInt();
if (i > 0) {
ui->simComboBox->blockSignals(true);
// ui->simComboBox->blockSignals(true);
ui->simComboBox->setCurrentIndex(i);
ui->simComboBox->blockSignals(false);
// ui->simComboBox->blockSignals(false);
on_simComboBox_currentIndexChanged(i);
}
......@@ -46,6 +46,11 @@ QGCHilConfiguration::~QGCHilConfiguration()
delete ui;
}
void QGCHilConfiguration::setVersion(QString version)
{
}
void QGCHilConfiguration::on_simComboBox_currentIndexChanged(int index)
{
//clean up
......
......@@ -21,6 +21,7 @@ public:
public slots:
/** @brief Receive status message */
void receiveStatusMessage(const QString& message);
void setVersion(QString version);
protected:
UAS* mav;
......
......@@ -32,12 +32,19 @@ QGCHilXPlaneConfiguration::QGCHilXPlaneConfiguration(QGCHilLink* link, QWidget *
ui->sensorHilCheckBox->setChecked(link->sensorHilEnabled());
connect(link, SIGNAL(sensorHilChanged(bool)), ui->sensorHilCheckBox, SLOT(setChecked(bool)));
connect(ui->sensorHilCheckBox, SIGNAL(clicked(bool)), link, SLOT(enableSensorHIL(bool)));
connect(link, SIGNAL(versionChanged(int)), this, SLOT(setVersion(int)));
}
ui->hostComboBox->clear();
ui->hostComboBox->addItem(link->getRemoteHost());
}
void QGCHilXPlaneConfiguration::setVersion(int version)
{
}
void QGCHilXPlaneConfiguration::toggleSimulation(bool connect)
......
......@@ -20,6 +20,8 @@ public:
public slots:
/** @brief Start / stop simulation */
void toggleSimulation(bool connect);
/** @brief Set X-Plane version */
void setVersion(int version);
protected:
QGCHilLink* link;
......
......@@ -6,14 +6,14 @@
<rect>
<x>0</x>
<y>0</y>
<width>295</width>
<height>148</height>
<width>570</width>
<height>238</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout" rowstretch="0,0,0,0,0,100" columnstretch="40,10,10,40">
<layout class="QGridLayout" name="gridLayout" rowstretch="0,0,0,0,0,100" columnstretch="20,40,40,20">
<property name="margin">
<number>0</number>
</property>
......
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