From 79404ab80edc4cb5c4c5c72e0ba4a4ca189293c1 Mon Sep 17 00:00:00 2001 From: zedamota Date: Mon, 25 Jul 2011 23:18:41 +0100 Subject: [PATCH] Moved input type to hw config tab. Created error message for unsupported configs. --- .../src/plugins/config/cc_hw_settings.ui | 23 +++- .../plugins/config/config_cc_hw_widget.cpp | 110 ++++++------------ .../src/plugins/config/config_cc_hw_widget.h | 10 +- .../plugins/config/config_pro_hw_widget.cpp | 59 +--------- .../src/plugins/config/config_pro_hw_widget.h | 3 - .../src/plugins/config/configinputwidget.cpp | 11 +- .../src/plugins/config/configtaskwidget.cpp | 90 +++++++++++++- .../src/plugins/config/configtaskwidget.h | 29 ++++- .../openpilotgcs/src/plugins/config/input.ui | 106 ++++++++--------- .../src/plugins/config/smartsavebutton.cpp | 6 + .../src/plugins/config/smartsavebutton.h | 3 +- 11 files changed, 233 insertions(+), 217 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/cc_hw_settings.ui b/ground/openpilotgcs/src/plugins/config/cc_hw_settings.ui index 188706190..ecabe8de1 100644 --- a/ground/openpilotgcs/src/plugins/config/cc_hw_settings.ui +++ b/ground/openpilotgcs/src/plugins/config/cc_hw_settings.ui @@ -31,7 +31,7 @@ - :/configgadget/images/coptercontrol.svg + :/configgadget/images/coptercontrol.svg true @@ -87,7 +87,7 @@ - dkwtc + Receiver type Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -95,7 +95,7 @@ - + @@ -139,6 +139,19 @@ + + + + + + + Qt::AutoText + + + true + + + @@ -196,6 +209,8 @@ Beware of not locking yourself out! - + + + diff --git a/ground/openpilotgcs/src/plugins/config/config_cc_hw_widget.cpp b/ground/openpilotgcs/src/plugins/config/config_cc_hw_widget.cpp index 6caf32d09..eb11b872f 100644 --- a/ground/openpilotgcs/src/plugins/config/config_cc_hw_widget.cpp +++ b/ground/openpilotgcs/src/plugins/config/config_cc_hw_widget.cpp @@ -38,90 +38,52 @@ ConfigCCHWWidget::ConfigCCHWWidget(QWidget *parent) : ConfigTaskWidget(parent) { m_telemetry = new Ui_CC_HW_Widget(); m_telemetry->setupUi(this); - smartsave=new smartSaveButton(m_telemetry->saveTelemetryToRAM,m_telemetry->saveTelemetryToSD); - // Now connect the widget to the ManualControlCommand / Channel UAVObject - ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance(); - UAVObjectManager *objManager = pm->getObject(); - - UAVObject *obj = objManager->getObject(QString("TelemetrySettings")); - connect(obj, SIGNAL(objectUpdated(UAVObject*)), this, SLOT(refreshValues())); - smartsave->addObject(obj); - UAVObjectField *field = obj->getField(QString("Speed")); - m_telemetry->telemetrySpeed->addItems(field->getOptions()); - - obj = objManager->getObject(QString("HwSettings")); - connect(obj, SIGNAL(objectUpdated(UAVObject*)), this, SLOT(refreshValues())); - smartsave->addObject(obj); - field = obj->getField(QString("CC_FlexiPort")); - m_telemetry->cbFlexi->addItems(field->getOptions()); - - field = obj->getField(QString("CC_MainPort")); - m_telemetry->cbTele->addItems(field->getOptions()); - - connect(smartsave, SIGNAL(preProcessOperations()), this, SLOT(saveTelemetryUpdate())); - + setupButtons(m_telemetry->saveTelemetryToRAM,m_telemetry->saveTelemetryToSD); + addObjectToWidget("TelemetrySettings","Speed",m_telemetry->telemetrySpeed); + addObjectToWidget("HwSettings","CC_FlexiPort",m_telemetry->cbFlexi); + addObjectToWidget("HwSettings","CC_MainPort",m_telemetry->cbTele); + addObjectToWidget("ManualControlSettings","InputMode",m_telemetry->receiverType); enableControls(false); - refreshValues(); - connect(parent, SIGNAL(autopilotConnected()),this, SLOT(onAutopilotConnect())); - connect(parent, SIGNAL(autopilotDisconnected()),this, SLOT(onAutopilotDisconnect())); + populateWidgets(); + refreshWidgetsValues(); } ConfigCCHWWidget::~ConfigCCHWWidget() { - // Do nothing - delete smartsave; + // Do nothing } - -/******************************* - * Telemetry Settings - *****************************/ - -void ConfigCCHWWidget::enableControls(bool enable) -{ - m_telemetry->saveTelemetryToSD->setEnabled(enable); - //m_telemetry->saveTelemetryToRAM->setEnabled(enable); -} - -/** - Request telemetry settings from the board - */ void ConfigCCHWWidget::refreshValues() { - qDebug()<<"refreshvalues"; - ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance(); - UAVObjectManager *objManager = pm->getObject(); - UAVDataObject* obj = dynamic_cast(objManager->getObject(QString("TelemetrySettings"))); - Q_ASSERT(obj); - UAVObjectField *field = obj->getField(QString("Speed")); - m_telemetry->telemetrySpeed->setCurrentIndex(m_telemetry->telemetrySpeed->findText(field->getValue().toString())); - qDebug()<getValue().toString(); - obj = dynamic_cast(objManager->getObject(QString("HwSettings"))); - Q_ASSERT(obj); - field = obj->getField(QString("CC_FlexiPort")); - m_telemetry->cbFlexi->setCurrentIndex(m_telemetry->cbFlexi->findText(field->getValue().toString())); - qDebug()<getValue().toString(); - field = obj->getField(QString("CC_MainPort")); - m_telemetry->cbTele->setCurrentIndex(m_telemetry->cbTele->findText(field->getValue().toString())); - qDebug()<getValue().toString(); } - -/** - Send telemetry settings to the board and request saving to SD card - */ -void ConfigCCHWWidget::saveTelemetryUpdate() +void ConfigCCHWWidget::widgetsContentsChanged() { - UAVDataObject* obj = dynamic_cast(getObjectManager()->getObject(QString("TelemetrySettings"))); - Q_ASSERT(obj); - UAVObjectField* field = obj->getField(QString("Speed")); - field->setValue(m_telemetry->telemetrySpeed->currentText()); - obj = dynamic_cast(getObjectManager()->getObject(QString("HwSettings"))); - Q_ASSERT(obj); - field = obj->getField(QString("CC_FlexiPort")); - field->setValue(m_telemetry->cbFlexi->currentText()); - field = obj->getField(QString("CC_MainPort")); - field->setValue(m_telemetry->cbTele->currentText()); - - + enableControls(false); + if((m_telemetry->cbFlexi->currentText()==m_telemetry->cbTele->currentText()) && m_telemetry->cbTele->currentText()!="Disabled") + { + m_telemetry->problems->setText("Warning-You have configured the main port and the flexi port for the same function, this is currently not suported"); + } + else if((m_telemetry->cbTele->currentText()=="Spektrum" ||m_telemetry->cbFlexi->currentText()=="Spektrum") && m_telemetry->receiverType->currentText()!="Spektrum") + { + m_telemetry->problems->setText("Warning-You have at least one port configured as 'Spektrum' however thats not your selected input type"); + } + else if(m_telemetry->cbTele->currentText()=="S.Bus" && m_telemetry->receiverType->currentText()!="S.Bus") + { + m_telemetry->problems->setText("Warning-You have at least one port configured as 'S.Bus' however thats not your selected input type"); + } + else if(m_telemetry->cbTele->currentText()!="S.Bus" && m_telemetry->receiverType->currentText()=="S.Bus") + { + m_telemetry->problems->setText("Warning-You have at selected 'S.Bus' as your input type however you have no port configured for that protocol"); + } + else if((m_telemetry->cbTele->currentText()!="Spektrum" && m_telemetry->cbFlexi->currentText()!="Spektrum") && m_telemetry->receiverType->currentText()=="Spektrum") + { + m_telemetry->problems->setText("Warning-You have at selected 'Spektrum' as your input type however you have no port configured for that protocol"); + } + else + { + m_telemetry->problems->setText(""); + enableControls(true); + } } + diff --git a/ground/openpilotgcs/src/plugins/config/config_cc_hw_widget.h b/ground/openpilotgcs/src/plugins/config/config_cc_hw_widget.h index 9ad52d9bc..32c8a6988 100644 --- a/ground/openpilotgcs/src/plugins/config/config_cc_hw_widget.h +++ b/ground/openpilotgcs/src/plugins/config/config_cc_hw_widget.h @@ -43,16 +43,12 @@ class ConfigCCHWWidget: public ConfigTaskWidget public: ConfigCCHWWidget(QWidget *parent = 0); ~ConfigCCHWWidget(); +private slots: + void refreshValues(); + void widgetsContentsChanged(); private: Ui_CC_HW_Widget *m_telemetry; - void enableControls(bool enable); - smartSaveButton *smartsave; - -private slots: - virtual void refreshValues(); - void saveTelemetryUpdate(); - }; #endif // CONFIGCCHWWIDGET_H diff --git a/ground/openpilotgcs/src/plugins/config/config_pro_hw_widget.cpp b/ground/openpilotgcs/src/plugins/config/config_pro_hw_widget.cpp index 149f92b73..cfe0741e4 100644 --- a/ground/openpilotgcs/src/plugins/config/config_pro_hw_widget.cpp +++ b/ground/openpilotgcs/src/plugins/config/config_pro_hw_widget.cpp @@ -39,22 +39,11 @@ ConfigProHWWidget::ConfigProHWWidget(QWidget *parent) : ConfigTaskWidget(parent) m_telemetry = new Ui_PRO_HW_Widget(); m_telemetry->setupUi(this); - // Now connect the widget to the ManualControlCommand / Channel UAVObject - ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance(); - UAVObjectManager *objManager = pm->getObject(); - - UAVObject *obj = objManager->getObject(QString("TelemetrySettings")); - UAVObjectField *field = obj->getField(QString("Speed")); - m_telemetry->telemetrySpeed->addItems(field->getOptions()); - - connect(m_telemetry->saveTelemetryToSD, SIGNAL(clicked()), this, SLOT(saveTelemetryUpdate())); - connect(m_telemetry->saveTelemetryToRAM, SIGNAL(clicked()), this, SLOT(sendTelemetryUpdate())); - connect(obj, SIGNAL(objectUpdated(UAVObject*)), this, SLOT(refreshValues())); - + setupButtons(m_telemetry->saveTelemetryToRAM,m_telemetry->saveTelemetryToSD); + addObjectToWidget("TelemetrySettings","Speed",m_telemetry->telemetrySpeed); enableControls(false); - refreshValues(); - connect(parent, SIGNAL(autopilotConnected()),this, SLOT(onAutopilotConnect())); - connect(parent, SIGNAL(autopilotDisconnected()),this, SLOT(onAutopilotDisconnect())); + populateWidgets(); + refreshWidgetsValues(); } ConfigProHWWidget::~ConfigProHWWidget() @@ -63,49 +52,9 @@ ConfigProHWWidget::~ConfigProHWWidget() } -/******************************* - * Telemetry Settings - *****************************/ - -void ConfigProHWWidget::enableControls(bool enable) -{ - m_telemetry->saveTelemetryToSD->setEnabled(enable); - //m_telemetry->saveTelemetryToRAM->setEnabled(enable); -} - /** Request telemetry settings from the board */ void ConfigProHWWidget::refreshValues() { - ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance(); - UAVObjectManager *objManager = pm->getObject(); - UAVDataObject* obj = dynamic_cast(objManager->getObject(QString("TelemetrySettings"))); - Q_ASSERT(obj); - UAVObjectField *field = obj->getField(QString("Speed")); - m_telemetry->telemetrySpeed->setCurrentIndex(m_telemetry->telemetrySpeed->findText(field->getValue().toString())); -} - -/** - Send telemetry settings to the board - */ -void ConfigProHWWidget::sendTelemetryUpdate() -{ - UAVDataObject* obj = dynamic_cast(getObjectManager()->getObject(QString("TelemetrySettings"))); - Q_ASSERT(obj); - UAVObjectField* field = obj->getField(QString("Speed")); - field->setValue(m_telemetry->telemetrySpeed->currentText()); - obj->updated(); -} - -/** - Send telemetry settings to the board and request saving to SD card - */ -void ConfigProHWWidget::saveTelemetryUpdate() -{ - // Send update so that the latest value is saved - sendTelemetryUpdate(); - UAVDataObject* obj = dynamic_cast(getObjectManager()->getObject(QString("TelemetrySettings"))); - Q_ASSERT(obj); - saveObjectToSD(obj); } diff --git a/ground/openpilotgcs/src/plugins/config/config_pro_hw_widget.h b/ground/openpilotgcs/src/plugins/config/config_pro_hw_widget.h index 254cf7af0..fbf35b9bd 100644 --- a/ground/openpilotgcs/src/plugins/config/config_pro_hw_widget.h +++ b/ground/openpilotgcs/src/plugins/config/config_pro_hw_widget.h @@ -46,12 +46,9 @@ public: private: Ui_PRO_HW_Widget *m_telemetry; - void enableControls(bool enable); private slots: virtual void refreshValues(); - void sendTelemetryUpdate(); - void saveTelemetryUpdate(); }; diff --git a/ground/openpilotgcs/src/plugins/config/configinputwidget.cpp b/ground/openpilotgcs/src/plugins/config/configinputwidget.cpp index 88579c78c..e0c0e7e45 100644 --- a/ground/openpilotgcs/src/plugins/config/configinputwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configinputwidget.cpp @@ -112,10 +112,7 @@ ConfigInputWidget::ConfigInputWidget(QWidget *parent) : ConfigTaskWidget(parent) obj = dynamic_cast(objManager->getObject(QString("ManualControlSettings"))); QString fieldName = QString("InputMode"); UAVObjectField *field = obj->getField(fieldName); - m_config->receiverType->addItems(field->getOptions()); - m_config->receiverType->setDisabled(true); // This option does not work for now, it is a compile-time option. - - // Fill in the dropdown menus for the channel RC Input assignement. + // Fill in the dropdown menus for the channel RC Input assignement. QStringList channelsList; channelsList << "None"; QList fieldList = obj->getFields(); @@ -264,7 +261,7 @@ void ConfigInputWidget::refreshValues() // Update receiver type field = obj->getField(QString("InputMode")); - m_config->receiverType->setCurrentIndex(m_config->receiverType->findText(field->getValue().toString())); + m_config->receiverType->setText(field->getValue().toString()); // Reset all channel assignement dropdowns: foreach (QComboBox *combo, inChannelAssign) { @@ -332,10 +329,6 @@ void ConfigInputWidget::sendRCInputUpdate() for (int i = 0; i < 8; i++) field->setValue(inSliders[i]->value(), i); - // Set RC Receiver type: - fieldName = QString("InputMode"); - field = obj->getField(fieldName); - field->setValue(m_config->receiverType->currentText()); // Set Roll/Pitch/Yaw/Etc assignement: // Rule: if two channels have the same setting (which is wrong!) the higher channel diff --git a/ground/openpilotgcs/src/plugins/config/configtaskwidget.cpp b/ground/openpilotgcs/src/plugins/config/configtaskwidget.cpp index bb598cba0..15c79aa74 100644 --- a/ground/openpilotgcs/src/plugins/config/configtaskwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configtaskwidget.cpp @@ -28,13 +28,34 @@ #include -ConfigTaskWidget::ConfigTaskWidget(QWidget *parent) : QWidget(parent) +ConfigTaskWidget::ConfigTaskWidget(QWidget *parent) : QWidget(parent),smartsave(NULL) { + pm = ExtensionSystem::PluginManager::instance(); + objManager = pm->getObject(); + connect(parent, SIGNAL(autopilotConnected()),this, SLOT(onAutopilotConnect())); + connect(parent, SIGNAL(autopilotDisconnected()),this, SLOT(onAutopilotDisconnect())); +} +void ConfigTaskWidget::addObjectToWidget(QString object, QString field, QWidget * widget) +{ + UAVObject *obj = objManager->getObject(QString(object)); + connect(obj, SIGNAL(objectUpdated(UAVObject*)), this, SLOT(refreshWidgetsValues())); + //smartsave->addObject(obj); + UAVObjectField *_field = obj->getField(QString(field)); + objectToWidget * ow=new objectToWidget(); + ow->field=_field; + ow->object=obj; + ow->widget=widget; + objOfInterest.append(ow); + smartsave->addObject(obj); + if(QComboBox * cb=qobject_cast(widget)) + { + connect(cb,SIGNAL(currentIndexChanged(int)),this,SLOT(widgetsContentsChanged())); + } } ConfigTaskWidget::~ConfigTaskWidget() { - // Do nothing + delete smartsave; } void ConfigTaskWidget::saveObjectToSD(UAVObject *obj) @@ -73,9 +94,72 @@ void ConfigTaskWidget::onAutopilotDisconnect() void ConfigTaskWidget::onAutopilotConnect() { enableControls(true); - refreshValues(); + refreshWidgetsValues(); } +void ConfigTaskWidget::populateWidgets() +{ + foreach(objectToWidget * ow,objOfInterest) + { + if(QComboBox * cb=qobject_cast(ow->widget)) + { + cb->addItems(ow->field->getOptions()); + cb->setCurrentIndex(cb->findText(ow->field->getValue().toString())); + } + else if(QLabel * cb=qobject_cast(ow->widget)) + { + cb->setText(ow->field->getValue().toString()); + } + } +} + +void ConfigTaskWidget::refreshWidgetsValues() +{ + foreach(objectToWidget * ow,objOfInterest) + { + if(QComboBox * cb=qobject_cast(ow->widget)) + { + cb->setCurrentIndex(cb->findText(ow->field->getValue().toString())); + } + else if(QLabel * cb=qobject_cast(ow->widget)) + { + cb->setText(ow->field->getValue().toString()); + } + } +} + +void ConfigTaskWidget::updateObjectsFromWidgets() +{ + foreach(objectToWidget * ow,objOfInterest) + { + if(QComboBox * cb=qobject_cast(ow->widget)) + { + ow->field->setValue(cb->currentText()); + } + else if(QLabel * cb=qobject_cast(ow->widget)) + { + ow->field->setValue(cb->text()); + } + } +} + +void ConfigTaskWidget::setupButtons(QPushButton *update, QPushButton *save) +{ + smartsave=new smartSaveButton(update,save); + connect(smartsave, SIGNAL(preProcessOperations()), this, SLOT(updateObjectsFromWidgets())); +} + +void ConfigTaskWidget::enableControls(bool enable) +{ + if(smartsave) + smartsave->enableControls(enable); +} + +void ConfigTaskWidget::widgetsContentsChanged() +{ +} + + /** diff --git a/ground/openpilotgcs/src/plugins/config/configtaskwidget.h b/ground/openpilotgcs/src/plugins/config/configtaskwidget.h index 6ffe15b70..0f439f3d1 100644 --- a/ground/openpilotgcs/src/plugins/config/configtaskwidget.h +++ b/ground/openpilotgcs/src/plugins/config/configtaskwidget.h @@ -35,28 +35,45 @@ #include #include #include - - +#include +#include "smartsavebutton.h" class ConfigTaskWidget: public QWidget { Q_OBJECT public: + struct objectToWidget + { + UAVObject * object; + UAVObjectField * field; + QWidget * widget; + }; + ConfigTaskWidget(QWidget *parent = 0); ~ConfigTaskWidget(); void saveObjectToSD(UAVObject *obj); UAVObjectManager* getObjectManager(); static double listMean(QList list); - + void addObjectToWidget(QString object,QString field,QWidget * widget); + void setupButtons(QPushButton * update,QPushButton * save); public slots: void onAutopilotDisconnect(); void onAutopilotConnect(); private slots: - virtual void refreshValues() = 0; - + virtual void refreshValues()=0; + virtual void updateObjectsFromWidgets(); private: - virtual void enableControls(bool enable) = 0; + QList objOfInterest; + ExtensionSystem::PluginManager *pm; + UAVObjectManager *objManager; + smartSaveButton *smartsave; +protected slots: + virtual void widgetsContentsChanged(); + virtual void populateWidgets(); + virtual void refreshWidgetsValues(); +protected: + virtual void enableControls(bool enable); }; diff --git a/ground/openpilotgcs/src/plugins/config/input.ui b/ground/openpilotgcs/src/plugins/config/input.ui index cef9c9abe..8d22b281b 100644 --- a/ground/openpilotgcs/src/plugins/config/input.ui +++ b/ground/openpilotgcs/src/plugins/config/input.ui @@ -40,17 +40,7 @@ - - - - Select the receiver type here: -- PWM is the most usual type -- PPM is connected to input XXX -- Spektrum is used with Spektrum 'satellite' receivers - - - - + @@ -80,7 +70,7 @@ - + Rev. @@ -100,7 +90,7 @@ - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -114,7 +104,7 @@ p, li { white-space: pre-wrap; } - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -132,7 +122,7 @@ p, li { white-space: pre-wrap; } - + true @@ -151,7 +141,7 @@ p, li { white-space: pre-wrap; } - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -166,7 +156,7 @@ p, li { white-space: pre-wrap; } - + Check this to reverse the channel. @@ -181,7 +171,7 @@ reversal capabilities). - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -195,7 +185,7 @@ p, li { white-space: pre-wrap; } - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -213,7 +203,7 @@ p, li { white-space: pre-wrap; } - + true @@ -232,7 +222,7 @@ p, li { white-space: pre-wrap; } - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -247,7 +237,7 @@ p, li { white-space: pre-wrap; } - + Check this to reverse the channel. @@ -262,7 +252,7 @@ reversal capabilities). - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -276,7 +266,7 @@ p, li { white-space: pre-wrap; } - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -294,7 +284,7 @@ p, li { white-space: pre-wrap; } - + true @@ -313,7 +303,7 @@ p, li { white-space: pre-wrap; } - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -328,7 +318,7 @@ p, li { white-space: pre-wrap; } - + Check this to reverse the channel. @@ -343,7 +333,7 @@ reversal capabilities). - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -357,7 +347,7 @@ p, li { white-space: pre-wrap; } - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -375,7 +365,7 @@ p, li { white-space: pre-wrap; } - + true @@ -394,7 +384,7 @@ p, li { white-space: pre-wrap; } - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -409,7 +399,7 @@ p, li { white-space: pre-wrap; } - + Check this to reverse the channel. @@ -424,7 +414,7 @@ reversal capabilities). - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -438,7 +428,7 @@ p, li { white-space: pre-wrap; } - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -456,7 +446,7 @@ p, li { white-space: pre-wrap; } - + true @@ -475,7 +465,7 @@ p, li { white-space: pre-wrap; } - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -490,7 +480,7 @@ p, li { white-space: pre-wrap; } - + Check this to reverse the channel. @@ -505,7 +495,7 @@ reversal capabilities). - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -519,7 +509,7 @@ p, li { white-space: pre-wrap; } - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -537,7 +527,7 @@ p, li { white-space: pre-wrap; } - + true @@ -556,7 +546,7 @@ p, li { white-space: pre-wrap; } - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -571,7 +561,7 @@ p, li { white-space: pre-wrap; } - + Check this to reverse the channel. @@ -586,7 +576,7 @@ reversal capabilities). - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -600,7 +590,7 @@ p, li { white-space: pre-wrap; } - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -618,7 +608,7 @@ p, li { white-space: pre-wrap; } - + true @@ -637,7 +627,7 @@ p, li { white-space: pre-wrap; } - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -652,7 +642,7 @@ p, li { white-space: pre-wrap; } - + Check this to reverse the channel. @@ -667,7 +657,7 @@ reversal capabilities). - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -681,7 +671,7 @@ p, li { white-space: pre-wrap; } - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -699,7 +689,7 @@ p, li { white-space: pre-wrap; } - + true @@ -718,7 +708,7 @@ p, li { white-space: pre-wrap; } - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -733,7 +723,7 @@ p, li { white-space: pre-wrap; } - + Check this to reverse the channel. @@ -745,7 +735,7 @@ reversal capabilities). - + @@ -759,7 +749,7 @@ reversal capabilities). - + @@ -792,6 +782,13 @@ Neutral should be put at the bottom of the slider for the throttle. + + + + + + + @@ -1252,7 +1249,6 @@ Applies and Saves all settings to SD ch5Assign ch6Assign ch7Assign - receiverType fmsSlider fmsModePos3 fmsSsPos3Roll diff --git a/ground/openpilotgcs/src/plugins/config/smartsavebutton.cpp b/ground/openpilotgcs/src/plugins/config/smartsavebutton.cpp index f9771f1a1..f86c01b7e 100644 --- a/ground/openpilotgcs/src/plugins/config/smartsavebutton.cpp +++ b/ground/openpilotgcs/src/plugins/config/smartsavebutton.cpp @@ -111,3 +111,9 @@ void smartSaveButton::saving_finished(int id, bool result) loop.quit(); } } + +void smartSaveButton::enableControls(bool value) +{ + bupdate->setEnabled(value); + bsave->setEnabled(value); +} diff --git a/ground/openpilotgcs/src/plugins/config/smartsavebutton.h b/ground/openpilotgcs/src/plugins/config/smartsavebutton.h index b086a04f1..dd77967dd 100644 --- a/ground/openpilotgcs/src/plugins/config/smartsavebutton.h +++ b/ground/openpilotgcs/src/plugins/config/smartsavebutton.h @@ -36,7 +36,8 @@ private: QEventLoop loop; QList objects; protected: - +public slots: + void enableControls(bool value); };