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

Delay the running device info fetching by 1 second.

This commit is contained in:
zedamota 2011-11-25 23:59:42 +00:00
parent 2b94a1538b
commit 9eaf09860c
2 changed files with 6 additions and 2 deletions

View File

@ -125,6 +125,11 @@ void UploaderGadgetWidget::onPhisicalHWConnect()
Enables widget buttons if autopilot connected
*/
void UploaderGadgetWidget::onAutopilotConnect(){
QTimer::singleShot(1000,this,SLOT(populate()));
}
void UploaderGadgetWidget::populate()
{
m_config->haltButton->setEnabled(true);
m_config->resetButton->setEnabled(true);
m_config->bootButton->setEnabled(false);
@ -141,7 +146,6 @@ void UploaderGadgetWidget::onAutopilotConnect(){
runningDeviceWidget* dw = new runningDeviceWidget(this);
dw->populate();
m_config->systemElements->addTab(dw, QString("Connected Device"));
}
/**

View File

@ -73,7 +73,7 @@ public:
public slots:
void onAutopilotConnect();
void onAutopilotDisconnect();
void populate();
private:
Ui_UploaderWidget *m_config;
DFUObject *dfu;