1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-18 03:52:11 +01:00

Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into next

This commit is contained in:
James Cotton 2011-10-13 23:16:56 -05:00
commit 08e077e8cb
4 changed files with 22 additions and 2 deletions

View File

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

View File

@ -197,6 +197,10 @@ void ConfigTaskWidget::populateWidgets()
{
cb->setValue(ow->field->getValue(ow->index).toInt()/ow->scale);
}
else if(QCheckBox * cb=qobject_cast<QCheckBox *>(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<QCheckBox *>(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<QCheckBox *>(ow->widget))
{
ow->field->setValue((cb->isChecked()?"TRUE":"FALSE"),ow->index);
}
}
}

View File

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

View File

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