diff --git a/HISTORY.txt b/HISTORY.txt index 7eba13a9a..0be2551ff 100644 --- a/HISTORY.txt +++ b/HISTORY.txt @@ -63,3 +63,4 @@ selected from ManualControlSettings.InputMode and the aircraft must be rebooted after changing this. Also for CopterControl the HwSettings object must indicate which modules are connected to which ports. PPM currently not working. + diff --git a/ground/openpilotgcs/src/plugins/config/configtaskwidget.cpp b/ground/openpilotgcs/src/plugins/config/configtaskwidget.cpp index 1bf45bd60..c7a082507 100644 --- a/ground/openpilotgcs/src/plugins/config/configtaskwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configtaskwidget.cpp @@ -197,6 +197,10 @@ void ConfigTaskWidget::populateWidgets() { cb->setValue(ow->field->getValue(ow->index).toInt()/ow->scale); } + else if(QCheckBox * cb=qobject_cast(ow->widget)) + { + cb->setChecked(ow->field->getValue(ow->index).toBool()); + } } setDirty(dirtyBack); } @@ -226,6 +230,10 @@ void ConfigTaskWidget::refreshWidgetsValues() { cb->setValue(ow->field->getValue(ow->index).toInt()/ow->scale); } + else if(QCheckBox * cb=qobject_cast(ow->widget)) + { + cb->setChecked(ow->field->getValue(ow->index).toBool()); + } } setDirty(dirtyBack); } @@ -254,6 +262,10 @@ void ConfigTaskWidget::updateObjectsFromWidgets() { ow->field->setValue(cb->value()* ow->scale,ow->index); } + else if(QCheckBox * cb=qobject_cast(ow->widget)) + { + ow->field->setValue((cb->isChecked()?"TRUE":"FALSE"),ow->index); + } } } diff --git a/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp b/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp index 883955a5b..0f3affaa2 100755 --- a/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp +++ b/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp @@ -48,7 +48,8 @@ UploaderGadgetWidget::UploaderGadgetWidget(QWidget *parent) : QWidget(parent) connect(m_config->resetButton, SIGNAL(clicked()), this, SLOT(systemReset())); connect(m_config->bootButton, SIGNAL(clicked()), this, SLOT(systemBoot())); connect(m_config->rescueButton, SIGNAL(clicked()), this, SLOT(systemRescue())); - + Core::ConnectionManager *cm = Core::ICore::instance()->connectionManager(); + connect(cm,SIGNAL(deviceConnected(QIODevice*)),this,SLOT(onPhisicalHWConnect())); getSerialPorts(); QIcon rbi; @@ -105,7 +106,12 @@ QString UploaderGadgetWidget::getPortDevice(const QString &friendName) } return ""; } - +void UploaderGadgetWidget::onPhisicalHWConnect() +{ + m_config->bootButton->setEnabled(false); + m_config->rescueButton->setEnabled(false); + m_config->telemetryLink->setEnabled(false); +} /** Enables widget buttons if autopilot connected diff --git a/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.h b/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.h index 075dc18a0..74a48425b 100755 --- a/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.h +++ b/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.h @@ -85,6 +85,7 @@ private: QLineEdit* openFileNameLE; QEventLoop m_eventloop; private slots: + void onPhisicalHWConnect(); void error(QString errorString,int errorNumber); void info(QString infoString,int infoNumber); void goToBootloader(UAVObject* = NULL, bool = false);