mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-17 02:52:12 +01:00
Merge remote-tracking branch 'origin/pt/haltfixes' into next
This commit is contained in:
commit
3e44389fa8
@ -90,6 +90,8 @@ DFUObject::DFUObject(bool _debug,bool _use_serial,QString portname):
|
||||
if (devices.length()==1 && hidHandle.open(1,devices.first().vendorID,devices.first().productID,0,0)==1) {
|
||||
qDebug()<<"OP_DFU detected first time";
|
||||
mready=true;
|
||||
QTimer::singleShot(200,&m_eventloop, SLOT(quit()));
|
||||
m_eventloop.exec();
|
||||
} else {
|
||||
// Wait for the board to appear on the USB bus:
|
||||
USBSignalFilter filter(0x20a0,-1,-1,USBMonitor::Bootloader);
|
||||
@ -107,6 +109,8 @@ DFUObject::DFUObject(bool _debug,bool _use_serial,QString portname):
|
||||
if (devices.length()==1) {
|
||||
if(hidHandle.open(1,devices.first().vendorID,devices.first().productID,0,0)==1)
|
||||
{
|
||||
QTimer::singleShot(200,&m_eventloop, SLOT(quit()));
|
||||
m_eventloop.exec();
|
||||
qDebug()<<"OP_DFU detected after delay";
|
||||
mready=true;
|
||||
break;
|
||||
|
@ -213,7 +213,8 @@ void UploaderGadgetWidget::goToBootloader(UAVObject* callerObj, bool success)
|
||||
m_config->haltButton->setEnabled(true);
|
||||
break;
|
||||
}
|
||||
delay::msleep(600);
|
||||
QTimer::singleShot(600, &m_eventloop, SLOT(quit()));
|
||||
m_eventloop.exec();
|
||||
fwIAP->getField("Command")->setValue("2233");
|
||||
currentStep = IAP_STATE_STEP_2;
|
||||
log(QString("IAP Step 2"));
|
||||
@ -228,7 +229,8 @@ void UploaderGadgetWidget::goToBootloader(UAVObject* callerObj, bool success)
|
||||
m_config->haltButton->setEnabled(true);
|
||||
break;
|
||||
}
|
||||
delay::msleep(600);
|
||||
QTimer::singleShot(600, &m_eventloop, SLOT(quit()));
|
||||
m_eventloop.exec();
|
||||
fwIAP->getField("Command")->setValue("3344");
|
||||
currentStep = IAP_STEP_RESET;
|
||||
log(QString("IAP Step 3"));
|
||||
@ -250,8 +252,12 @@ void UploaderGadgetWidget::goToBootloader(UAVObject* callerObj, bool success)
|
||||
QString dli = cm->getCurrentDevice().Name;
|
||||
QString dlj = cm->getCurrentDevice().devName;
|
||||
cm->disconnectDevice();
|
||||
QTimer::singleShot(200, &m_eventloop, SLOT(quit()));
|
||||
m_eventloop.exec();
|
||||
// Tell connections to stop their polling threads: otherwise it will mess up DFU
|
||||
cm->suspendPolling();
|
||||
QTimer::singleShot(200, &m_eventloop, SLOT(quit()));
|
||||
m_eventloop.exec();
|
||||
log("Board Halt");
|
||||
m_config->boardStatus->setText("Bootloader");
|
||||
if (dlj.startsWith("USB"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user