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:
commit
08e077e8cb
@ -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.
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user