From f7b5ebdcc5f7a0cef042b5c05fdcb4131bd92184 Mon Sep 17 00:00:00 2001 From: edouard Date: Mon, 10 Jan 2011 21:26:26 +0000 Subject: [PATCH] Further fixes to Uploader gadget git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2375 ebee16cc-31ac-478f-84a7-5cbb03baadba --- ground/src/plugins/uploader/uploadergadgetwidget.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ground/src/plugins/uploader/uploadergadgetwidget.cpp b/ground/src/plugins/uploader/uploadergadgetwidget.cpp index e236cf843..dccfe1c98 100755 --- a/ground/src/plugins/uploader/uploadergadgetwidget.cpp +++ b/ground/src/plugins/uploader/uploadergadgetwidget.cpp @@ -229,6 +229,7 @@ void UploaderGadgetWidget::goToBootloader(UAVObject* callerObj, bool success) log("Could not enter DFU mode."); delete dfu; dfu = NULL; + cnx->resumePolling(); return; } dfu->AbortOperation(); @@ -237,6 +238,7 @@ void UploaderGadgetWidget::goToBootloader(UAVObject* callerObj, bool success) log("Could not enter DFU mode."); delete dfu; dfu = NULL; + cnx->resumePolling(); return; } //dfu.StatusRequest(); @@ -244,6 +246,9 @@ void UploaderGadgetWidget::goToBootloader(UAVObject* callerObj, bool success) log(QString("Found ") + QString::number(dfu->numberOfDevices) + QString(" device(s).")); if (dfu->numberOfDevices < 0 || dfu->numberOfDevices > 3) { log("Inconsistent number of devices! Aborting"); + delete dfu; + dfu = NULL; + cnx->resumePolling(); return; } // Delete all previous tabs: @@ -259,11 +264,9 @@ void UploaderGadgetWidget::goToBootloader(UAVObject* callerObj, bool success) dw->populate(); m_config->systemElements->addTab(dw, QString("Device") + QString::number(i)); } - /* (done already by autopilot disconnect signal) m_config->haltButton->setEnabled(false); m_config->resetButton->setEnabled(false); m_config->bootButton->setEnabled(true); - */ m_config->telemetryLink->setEnabled(false); m_config->rescueButton->setEnabled(false); if (resetOnly) {