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

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

This commit is contained in:
dankers 2011-05-17 04:17:00 +10:00
commit c6b6afa679
2 changed files with 6 additions and 2 deletions

View File

@ -100,7 +100,7 @@ DFUObject::DFUObject(bool _debug,bool _use_serial,QString portname):
if (devices.length()==1) {
hidHandle.open(1,devices.first().vendorID,devices.first().productID,0,0);
} else {
qDebug() << "More than one device, don't know what to do!";
qDebug() << devices.length() << " device(s) detected, don't know what to do!";
mready = false;
}

View File

@ -161,6 +161,7 @@ void UploaderGadgetWidget::goToBootloader(UAVObject* callerObj, bool success)
switch (currentStep) {
case IAP_STATE_READY:
m_config->haltButton->setEnabled(false);
getSerialPorts(); // Useful in case a new serial port appeared since the initial list,
// otherwise we won't find it when we stop the board.
// The board is running, send the 1st IAP Reset order:
@ -179,6 +180,7 @@ void UploaderGadgetWidget::goToBootloader(UAVObject* callerObj, bool success)
log("Reset did NOT happen");
currentStep = IAP_STATE_READY;
disconnect(fwIAP, SIGNAL(transactionCompleted(UAVObject*,bool)),this,SLOT(goToBootloader(UAVObject*, bool)));
m_config->haltButton->setEnabled(true);
break;
}
delay::msleep(600);
@ -193,6 +195,7 @@ void UploaderGadgetWidget::goToBootloader(UAVObject* callerObj, bool success)
log("Reset did NOT happen");
currentStep = IAP_STATE_READY;
disconnect(fwIAP, SIGNAL(transactionCompleted(UAVObject*,bool)),this,SLOT(goToBootloader(UAVObject*, bool)));
m_config->haltButton->setEnabled(true);
break;
}
delay::msleep(600);
@ -208,6 +211,7 @@ void UploaderGadgetWidget::goToBootloader(UAVObject* callerObj, bool success)
log("Oops, failure step 3");
log("Reset did NOT happen");
disconnect(fwIAP, SIGNAL(transactionCompleted(UAVObject*,bool)),this,SLOT(goToBootloader(UAVObject*, bool)));
m_config->haltButton->setEnabled(true);
break;
}
@ -247,6 +251,7 @@ void UploaderGadgetWidget::goToBootloader(UAVObject* callerObj, bool success)
cm->resumePolling();
currentStep = IAP_STATE_READY;
m_config->boardStatus->setText("Bootloader?");
m_config->haltButton->setEnabled(true);
return;
}
dfu->AbortOperation();
@ -360,7 +365,6 @@ void UploaderGadgetWidget::systemBoot()
dfu->JumpToApp();
// Restart the polling thread
cm->resumePolling();
m_config->bootButton->setEnabled(true);
m_config->rescueButton->setEnabled(true);
m_config->telemetryLink->setEnabled(true);
m_config->boardStatus->setText("Running");