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;
}
if (!startBootloader()) {
// even when start seems to fail, stopping the boot loader does not harm
stopBootloader();
return false;
}
if (!downloadBinaryToDC(bFile)) {
stopBootloader();
qCritical() << "updating dc: " << bFile << "...FAILED";
return false;
}
qInfo() << "updating dc: " << bFile << "...OK";
stopBootloader();
//resetDeviceController();
QThread::sleep(3);
return true;
}