1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

Make the outputs test function disable when the connection is lost.

This commit is contained in:
zedamota 2011-11-25 23:47:39 +00:00
parent 856f8a9b6c
commit 2b94a1538b
2 changed files with 11 additions and 0 deletions

View File

@ -170,6 +170,13 @@ ConfigOutputWidget::ConfigOutputWidget(QWidget *parent) : ConfigTaskWidget(paren
this->setEnabled(false);
connect(obj,SIGNAL(objectUpdated(UAVObject*)),this,SLOT(disableIfNotMe(UAVObject*)));
}
void ConfigOutputWidget::enableControls(bool enable)
{
ConfigTaskWidget::enableControls(enable);
if(!enable)
m_config->channelOutTest->setChecked(false);
m_config->channelOutTest->setEnabled(enable);
}
ConfigOutputWidget::~ConfigOutputWidget()
{
@ -216,6 +223,7 @@ void ConfigOutputWidget::linkToggled(bool state)
*/
void ConfigOutputWidget::runChannelTests(bool state)
{
qDebug()<<"configoutputwidget runChannelTests"<<state;
SystemAlarms * systemAlarmsObj = SystemAlarms::GetInstance(getObjectManager());
SystemAlarms::DataFields systemAlarms = systemAlarmsObj->getData();

View File

@ -46,6 +46,7 @@ public:
ConfigOutputWidget(QWidget *parent = 0);
~ConfigOutputWidget();
private:
Ui_OutputWidget *m_config;
@ -82,6 +83,8 @@ private slots:
void linkToggled(bool state);
void setSpinningArmed(bool val);
void openHelp();
protected:
void enableControls(bool enable);
};
#endif