1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-30 08:24:11 +01:00

Moved input type to hw config tab.

Created error message for unsupported configs.
This commit is contained in:
zedamota 2011-07-25 23:18:41 +01:00
parent 4dc5e7ea65
commit 79404ab80e
11 changed files with 233 additions and 217 deletions

View File

@ -31,7 +31,7 @@
<string/>
</property>
<property name="pixmap">
<pixmap>:/configgadget/images/coptercontrol.svg</pixmap>
<pixmap resource="configgadget.qrc">:/configgadget/images/coptercontrol.svg</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
@ -87,7 +87,7 @@
<item row="0" column="1">
<widget class="QLabel" name="label_7">
<property name="text">
<string>dkwtc</string>
<string>Receiver type</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
@ -95,7 +95,7 @@
</widget>
</item>
<item row="0" column="2">
<widget class="QComboBox" name="comboBox_4"/>
<widget class="QComboBox" name="receiverType"/>
</item>
</layout>
</item>
@ -139,6 +139,19 @@
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="problems">
<property name="text">
<string/>
</property>
<property name="textFormat">
<enum>Qt::AutoText</enum>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
@ -196,6 +209,8 @@ Beware of not locking yourself out!</string>
</item>
</layout>
</widget>
<resources/>
<resources>
<include location="configgadget.qrc"/>
</resources>
<connections/>
</ui>

View File

@ -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<UAVObjectManager>();
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<UAVObjectManager>();
UAVDataObject* obj = dynamic_cast<UAVDataObject*>(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()<<field->getValue().toString();
obj = dynamic_cast<UAVDataObject*>(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()<<field->getValue().toString();
field = obj->getField(QString("CC_MainPort"));
m_telemetry->cbTele->setCurrentIndex(m_telemetry->cbTele->findText(field->getValue().toString()));
qDebug()<<field->getValue().toString();
}
/**
Send telemetry settings to the board and request saving to SD card
*/
void ConfigCCHWWidget::saveTelemetryUpdate()
void ConfigCCHWWidget::widgetsContentsChanged()
{
UAVDataObject* obj = dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(QString("TelemetrySettings")));
Q_ASSERT(obj);
UAVObjectField* field = obj->getField(QString("Speed"));
field->setValue(m_telemetry->telemetrySpeed->currentText());
obj = dynamic_cast<UAVDataObject*>(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);
}
}

View File

@ -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

View File

@ -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<UAVObjectManager>();
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<UAVObjectManager>();
UAVDataObject* obj = dynamic_cast<UAVDataObject*>(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<UAVDataObject*>(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<UAVDataObject*>(getObjectManager()->getObject(QString("TelemetrySettings")));
Q_ASSERT(obj);
saveObjectToSD(obj);
}

View File

@ -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();
};

View File

@ -112,10 +112,7 @@ ConfigInputWidget::ConfigInputWidget(QWidget *parent) : ConfigTaskWidget(parent)
obj = dynamic_cast<UAVDataObject*>(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<UAVObjectField*> 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

View File

@ -28,13 +28,34 @@
#include <QtGui/QWidget>
ConfigTaskWidget::ConfigTaskWidget(QWidget *parent) : QWidget(parent)
ConfigTaskWidget::ConfigTaskWidget(QWidget *parent) : QWidget(parent),smartsave(NULL)
{
pm = ExtensionSystem::PluginManager::instance();
objManager = pm->getObject<UAVObjectManager>();
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<QComboBox *>(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<QComboBox *>(ow->widget))
{
cb->addItems(ow->field->getOptions());
cb->setCurrentIndex(cb->findText(ow->field->getValue().toString()));
}
else if(QLabel * cb=qobject_cast<QLabel *>(ow->widget))
{
cb->setText(ow->field->getValue().toString());
}
}
}
void ConfigTaskWidget::refreshWidgetsValues()
{
foreach(objectToWidget * ow,objOfInterest)
{
if(QComboBox * cb=qobject_cast<QComboBox *>(ow->widget))
{
cb->setCurrentIndex(cb->findText(ow->field->getValue().toString()));
}
else if(QLabel * cb=qobject_cast<QLabel *>(ow->widget))
{
cb->setText(ow->field->getValue().toString());
}
}
}
void ConfigTaskWidget::updateObjectsFromWidgets()
{
foreach(objectToWidget * ow,objOfInterest)
{
if(QComboBox * cb=qobject_cast<QComboBox *>(ow->widget))
{
ow->field->setValue(cb->currentText());
}
else if(QLabel * cb=qobject_cast<QLabel *>(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()
{
}
/**

View File

@ -35,28 +35,45 @@
#include <QQueue>
#include <QtGui/QWidget>
#include <QList>
#include <QLabel>
#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<double> 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 <objectToWidget*> 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);
};

View File

@ -40,17 +40,7 @@
</property>
</widget>
</item>
<item row="0" column="1" colspan="2">
<widget class="QComboBox" name="receiverType">
<property name="toolTip">
<string>Select the receiver type here:
- PWM is the most usual type
- PPM is connected to input XXX
- Spektrum is used with Spektrum 'satellite' receivers</string>
</property>
</widget>
</item>
<item row="0" column="4">
<item row="0" column="5">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLabel" name="RCInputConnected">
@ -80,7 +70,7 @@
</item>
</layout>
</item>
<item row="0" column="8">
<item row="0" column="9">
<widget class="QLabel" name="label">
<property name="text">
<string>Rev.</string>
@ -100,7 +90,7 @@
</property>
</widget>
</item>
<item row="1" column="1">
<item row="1" column="2">
<widget class="QLabel" name="ch0Cur">
<property name="toolTip">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
@ -114,7 +104,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="1" column="2">
<item row="1" column="3">
<widget class="QLabel" name="ch0Min">
<property name="toolTip">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
@ -132,7 +122,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="1" column="4" colspan="3">
<item row="1" column="5" colspan="3">
<widget class="QSlider" name="inSlider0">
<property name="mouseTracking">
<bool>true</bool>
@ -151,7 +141,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="1" column="7">
<item row="1" column="8">
<widget class="QLabel" name="ch0Max">
<property name="toolTip">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
@ -166,7 +156,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="1" column="8">
<item row="1" column="9">
<widget class="QCheckBox" name="ch0Rev">
<property name="toolTip">
<string>Check this to reverse the channel.
@ -181,7 +171,7 @@ reversal capabilities).</string>
<item row="2" column="0">
<widget class="QComboBox" name="ch1Assign"/>
</item>
<item row="2" column="1">
<item row="2" column="2">
<widget class="QLabel" name="ch1Cur">
<property name="toolTip">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
@ -195,7 +185,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="2" column="2">
<item row="2" column="3">
<widget class="QLabel" name="ch1Min">
<property name="toolTip">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
@ -213,7 +203,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="2" column="4" colspan="3">
<item row="2" column="5" colspan="3">
<widget class="QSlider" name="inSlider1">
<property name="mouseTracking">
<bool>true</bool>
@ -232,7 +222,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="2" column="7">
<item row="2" column="8">
<widget class="QLabel" name="ch1Max">
<property name="toolTip">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
@ -247,7 +237,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="2" column="8">
<item row="2" column="9">
<widget class="QCheckBox" name="ch1Rev">
<property name="toolTip">
<string>Check this to reverse the channel.
@ -262,7 +252,7 @@ reversal capabilities).</string>
<item row="3" column="0">
<widget class="QComboBox" name="ch2Assign"/>
</item>
<item row="3" column="1">
<item row="3" column="2">
<widget class="QLabel" name="ch2Cur">
<property name="toolTip">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
@ -276,7 +266,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="3" column="2">
<item row="3" column="3">
<widget class="QLabel" name="ch2Min">
<property name="toolTip">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
@ -294,7 +284,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="3" column="4" colspan="3">
<item row="3" column="5" colspan="3">
<widget class="QSlider" name="inSlider2">
<property name="mouseTracking">
<bool>true</bool>
@ -313,7 +303,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="3" column="7">
<item row="3" column="8">
<widget class="QLabel" name="ch2Max">
<property name="toolTip">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
@ -328,7 +318,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="3" column="8">
<item row="3" column="9">
<widget class="QCheckBox" name="ch2Rev">
<property name="toolTip">
<string>Check this to reverse the channel.
@ -343,7 +333,7 @@ reversal capabilities).</string>
<item row="4" column="0">
<widget class="QComboBox" name="ch3Assign"/>
</item>
<item row="4" column="1">
<item row="4" column="2">
<widget class="QLabel" name="ch3Cur">
<property name="toolTip">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
@ -357,7 +347,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="4" column="2">
<item row="4" column="3">
<widget class="QLabel" name="ch3Min">
<property name="toolTip">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
@ -375,7 +365,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="4" column="4" colspan="3">
<item row="4" column="5" colspan="3">
<widget class="QSlider" name="inSlider3">
<property name="mouseTracking">
<bool>true</bool>
@ -394,7 +384,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="4" column="7">
<item row="4" column="8">
<widget class="QLabel" name="ch3Max">
<property name="toolTip">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
@ -409,7 +399,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="4" column="8">
<item row="4" column="9">
<widget class="QCheckBox" name="ch3Rev">
<property name="toolTip">
<string>Check this to reverse the channel.
@ -424,7 +414,7 @@ reversal capabilities).</string>
<item row="5" column="0">
<widget class="QComboBox" name="ch4Assign"/>
</item>
<item row="5" column="1">
<item row="5" column="2">
<widget class="QLabel" name="ch4Cur">
<property name="toolTip">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
@ -438,7 +428,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="5" column="2">
<item row="5" column="3">
<widget class="QLabel" name="ch4Min">
<property name="toolTip">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
@ -456,7 +446,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="5" column="4" colspan="3">
<item row="5" column="5" colspan="3">
<widget class="QSlider" name="inSlider4">
<property name="mouseTracking">
<bool>true</bool>
@ -475,7 +465,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="5" column="7">
<item row="5" column="8">
<widget class="QLabel" name="ch4Max">
<property name="toolTip">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
@ -490,7 +480,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="5" column="8">
<item row="5" column="9">
<widget class="QCheckBox" name="ch4Rev">
<property name="toolTip">
<string>Check this to reverse the channel.
@ -505,7 +495,7 @@ reversal capabilities).</string>
<item row="6" column="0">
<widget class="QComboBox" name="ch5Assign"/>
</item>
<item row="6" column="1">
<item row="6" column="2">
<widget class="QLabel" name="ch5Cur">
<property name="toolTip">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
@ -519,7 +509,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="6" column="2">
<item row="6" column="3">
<widget class="QLabel" name="ch5Min">
<property name="toolTip">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
@ -537,7 +527,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="6" column="4" colspan="3">
<item row="6" column="5" colspan="3">
<widget class="QSlider" name="inSlider5">
<property name="mouseTracking">
<bool>true</bool>
@ -556,7 +546,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="6" column="7">
<item row="6" column="8">
<widget class="QLabel" name="ch5Max">
<property name="toolTip">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
@ -571,7 +561,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="6" column="8">
<item row="6" column="9">
<widget class="QCheckBox" name="ch5Rev">
<property name="toolTip">
<string>Check this to reverse the channel.
@ -586,7 +576,7 @@ reversal capabilities).</string>
<item row="7" column="0">
<widget class="QComboBox" name="ch6Assign"/>
</item>
<item row="7" column="1">
<item row="7" column="2">
<widget class="QLabel" name="ch6Cur">
<property name="toolTip">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
@ -600,7 +590,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="7" column="2">
<item row="7" column="3">
<widget class="QLabel" name="ch6Min">
<property name="toolTip">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
@ -618,7 +608,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="7" column="4" colspan="3">
<item row="7" column="5" colspan="3">
<widget class="QSlider" name="inSlider6">
<property name="mouseTracking">
<bool>true</bool>
@ -637,7 +627,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="7" column="7">
<item row="7" column="8">
<widget class="QLabel" name="ch6Max">
<property name="toolTip">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
@ -652,7 +642,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="7" column="8">
<item row="7" column="9">
<widget class="QCheckBox" name="ch6Rev">
<property name="toolTip">
<string>Check this to reverse the channel.
@ -667,7 +657,7 @@ reversal capabilities).</string>
<item row="8" column="0">
<widget class="QComboBox" name="ch7Assign"/>
</item>
<item row="8" column="1">
<item row="8" column="2">
<widget class="QLabel" name="ch7Cur">
<property name="toolTip">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
@ -681,7 +671,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="8" column="2">
<item row="8" column="3">
<widget class="QLabel" name="ch7Min">
<property name="toolTip">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
@ -699,7 +689,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="8" column="4" colspan="3">
<item row="8" column="5" colspan="3">
<widget class="QSlider" name="inSlider7">
<property name="mouseTracking">
<bool>true</bool>
@ -718,7 +708,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="8" column="7">
<item row="8" column="8">
<widget class="QLabel" name="ch7Max">
<property name="toolTip">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
@ -733,7 +723,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="8" column="8">
<item row="8" column="9">
<widget class="QCheckBox" name="ch7Rev">
<property name="toolTip">
<string>Check this to reverse the channel.
@ -745,7 +735,7 @@ reversal capabilities).</string>
</property>
</widget>
</item>
<item row="14" column="0" colspan="9">
<item row="14" column="0" colspan="10">
<widget class="QLabel" name="label_20">
<property name="font">
<font>
@ -759,7 +749,7 @@ reversal capabilities).</string>
</property>
</widget>
</item>
<item row="11" column="0" colspan="9">
<item row="11" column="0" colspan="10">
<widget class="QLabel" name="lblMissingInputs">
<property name="font">
<font>
@ -792,6 +782,13 @@ Neutral should be put at the bottom of the slider for the throttle.</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="receiverType">
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_3">
@ -1252,7 +1249,6 @@ Applies and Saves all settings to SD</string>
<tabstop>ch5Assign</tabstop>
<tabstop>ch6Assign</tabstop>
<tabstop>ch7Assign</tabstop>
<tabstop>receiverType</tabstop>
<tabstop>fmsSlider</tabstop>
<tabstop>fmsModePos3</tabstop>
<tabstop>fmsSsPos3Roll</tabstop>

View File

@ -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);
}

View File

@ -36,7 +36,8 @@ private:
QEventLoop loop;
QList<UAVObject *> objects;
protected:
public slots:
void enableControls(bool value);
};