Add some more debug output to updateBinary().

This commit is contained in:
Gerhard Hoffmann 2023-09-09 14:57:04 +02:00
parent 67c8b2f472
commit cd59a39569

View File

@ -469,20 +469,19 @@ bool Update::downloadBinaryToDC(QString const &bFile) const {
// bootloader is really not running anymore. // bootloader is really not running anymore.
*/ */
bool Update::updateBinary(char const *fileToSendToDC) { bool Update::updateBinary(char const *fileToSendToDC) {
qInfo() << "UPDATING DEVICE CONTROLLER BINARY" << fileToSendToDC; qInfo() << "UPDATING DEVICE CONTROLLER FIRMWARE BINARY" << fileToSendToDC;
QFile fn(fileToSendToDC); QFile fn(fileToSendToDC);
bool r; bool r;
if ((r = fn.exists()) == true) { if ((r = fn.exists()) == true) {
QFileInfo fi(fn); QFileInfo fi(fn);
qInfo() << " UPDATING BINARY" << fi.fileName() << "(size=" << fi.size() << ")";
if ((r = updateDC(fileToSendToDC)) == true) { if ((r = updateDC(fileToSendToDC)) == true) {
qCritical() << QString(80, '*'); Utils::printInfoMsg(
qInfo() << " UPDATING BINARY" << fi.fileName() << "(size=" << fi.size() << ") DONE"; QString(" UPDATING BINARY ") + fi.fileName()
qCritical() << QString(80, '*'); + QString(" (size=%1").arg(fi.size()) + ") DONE");
} else { } else {
qCritical() << QString(80, '*'); Utils::printCriticalErrorMsg(
qCritical() << " UPDATING BINARY" << fi.fileName() << "(size=" << fi.size() << ") FAILED"; QString(" UPDATING BINARY ") + fi.fileName()
qCritical() << QString(80, '*'); + QString(" (size=%1").arg(fi.size()) + ") FAILED");
} }
} else { } else {
qCritical() << QString(80, '*'); qCritical() << QString(80, '*');