updateDC(): stop boot loader even when not ven able to start it.

This commit is contained in:
Gerhard Hoffmann 2023-07-06 14:28:46 +02:00
parent fa04e32266
commit ba8dd7d083

View File

@ -466,15 +466,21 @@ bool Update::updateDC(QString bFile) const {
return false; return false;
} }
if (!startBootloader()) { if (!startBootloader()) {
// even when start seems to fail, stopping the boot loader does not harm
stopBootloader();
return false; return false;
} }
if (!downloadBinaryToDC(bFile)) { if (!downloadBinaryToDC(bFile)) {
stopBootloader(); stopBootloader();
qCritical() << "updating dc: " << bFile << "...FAILED"; qCritical() << "updating dc: " << bFile << "...FAILED";
return false; return false;
} }
qInfo() << "updating dc: " << bFile << "...OK"; qInfo() << "updating dc: " << bFile << "...OK";
stopBootloader(); stopBootloader();
//resetDeviceController();
QThread::sleep(3); QThread::sleep(3);
return true; return true;
} }