1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-29 14:52:12 +01:00

Further fixes to Uploader gadget

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2375 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
edouard 2011-01-10 21:26:26 +00:00 committed by edouard
parent 1fbd7155f9
commit f7b5ebdcc5

View File

@ -229,6 +229,7 @@ void UploaderGadgetWidget::goToBootloader(UAVObject* callerObj, bool success)
log("Could not enter DFU mode."); log("Could not enter DFU mode.");
delete dfu; delete dfu;
dfu = NULL; dfu = NULL;
cnx->resumePolling();
return; return;
} }
dfu->AbortOperation(); dfu->AbortOperation();
@ -237,6 +238,7 @@ void UploaderGadgetWidget::goToBootloader(UAVObject* callerObj, bool success)
log("Could not enter DFU mode."); log("Could not enter DFU mode.");
delete dfu; delete dfu;
dfu = NULL; dfu = NULL;
cnx->resumePolling();
return; return;
} }
//dfu.StatusRequest(); //dfu.StatusRequest();
@ -244,6 +246,9 @@ void UploaderGadgetWidget::goToBootloader(UAVObject* callerObj, bool success)
log(QString("Found ") + QString::number(dfu->numberOfDevices) + QString(" device(s).")); log(QString("Found ") + QString::number(dfu->numberOfDevices) + QString(" device(s)."));
if (dfu->numberOfDevices < 0 || dfu->numberOfDevices > 3) { if (dfu->numberOfDevices < 0 || dfu->numberOfDevices > 3) {
log("Inconsistent number of devices! Aborting"); log("Inconsistent number of devices! Aborting");
delete dfu;
dfu = NULL;
cnx->resumePolling();
return; return;
} }
// Delete all previous tabs: // Delete all previous tabs:
@ -259,11 +264,9 @@ void UploaderGadgetWidget::goToBootloader(UAVObject* callerObj, bool success)
dw->populate(); dw->populate();
m_config->systemElements->addTab(dw, QString("Device") + QString::number(i)); m_config->systemElements->addTab(dw, QString("Device") + QString::number(i));
} }
/* (done already by autopilot disconnect signal)
m_config->haltButton->setEnabled(false); m_config->haltButton->setEnabled(false);
m_config->resetButton->setEnabled(false); m_config->resetButton->setEnabled(false);
m_config->bootButton->setEnabled(true); m_config->bootButton->setEnabled(true);
*/
m_config->telemetryLink->setEnabled(false); m_config->telemetryLink->setEnabled(false);
m_config->rescueButton->setEnabled(false); m_config->rescueButton->setEnabled(false);
if (resetOnly) { if (resetOnly) {