Minor: add some exteneded debug output.
This commit is contained in:
parent
b05325e5f4
commit
a63e7018a4
@ -354,9 +354,7 @@ DownloadThread::sendNextDataBlock(QByteArray const &binary, int bNum) const {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// qInfo() << "data for block" << bNum << "OK";
|
// qInfo() << "data for block" << bNum << "OK";
|
||||||
|
|
||||||
// TODO: hier ins shared mem schreiben
|
// TODO: hier ins shared mem schreiben
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -368,64 +366,65 @@ DownloadThread::sendNextDataBlock(QByteArray const &binary, int bNum) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool DownloadThread::startBootloader() const {
|
bool DownloadThread::startBootloader() const {
|
||||||
qDebug() << QDateTime::currentDateTime().time().toString(Qt::ISODate)
|
qDebug() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs)
|
||||||
<< "starting bootloader...";
|
<< "starting bootloader...";
|
||||||
int nTry = 5;
|
int nTry = 5;
|
||||||
while (--nTry >= 0) {
|
while (--nTry >= 0) {
|
||||||
m_hw->bl_startBL();
|
m_hw->bl_startBL();
|
||||||
qDebug() << QDateTime::currentDateTime().time().toString(Qt::ISODate) << "bl_startBL() ..." << nTry;
|
qDebug() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs) << "bl_startBL() ..." << nTry;
|
||||||
QThread::msleep(1000);
|
QThread::msleep(500);
|
||||||
m_hw->bl_checkBL();
|
m_hw->bl_checkBL();
|
||||||
qDebug() << QDateTime::currentDateTime().time().toString(Qt::ISODate) << "bl_checkBL() ..." << nTry;
|
qDebug() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs) << "bl_checkBL() ..." << nTry;
|
||||||
QThread::msleep(1000);
|
QThread::msleep(500);
|
||||||
if (m_hw->bl_isUp()) {
|
if (m_hw->bl_isUp()) {
|
||||||
qInfo() << QDateTime::currentDateTime().time().toString(Qt::ISODate) << "bootloader... isUP" << nTry;
|
qInfo() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs) << "bootloader... isUP" << nTry;
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODate)
|
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs)
|
||||||
<< "bootloader not up (" << nTry << ")";
|
<< "bootloader not up (" << nTry << ")";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODate)
|
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs)
|
||||||
<< "starting bootloader FAILED";
|
<< "starting bootloader FAILED";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DownloadThread::stopBootloader() const {
|
bool DownloadThread::stopBootloader() const {
|
||||||
qDebug() << QDateTime::currentDateTime().time().toString(Qt::ISODate)
|
qDebug() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs)
|
||||||
<< "stopping bootloader...";
|
<< "stopping bootloader...";
|
||||||
int nTry = 5;
|
int nTry = 5;
|
||||||
while (--nTry >= 0) {
|
while (--nTry >= 0) {
|
||||||
m_hw->bl_stopBL();
|
m_hw->bl_stopBL();
|
||||||
qDebug() << QDateTime::currentDateTime().time().toString(Qt::ISODate)
|
qDebug() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs)
|
||||||
<< "bl_stopBL() ...";
|
<< "bl_stopBL() ...";
|
||||||
QThread::msleep(500);
|
QThread::msleep(500);
|
||||||
m_hw->bl_checkBL();
|
m_hw->bl_checkBL();
|
||||||
qDebug() << QDateTime::currentDateTime().time().toString(Qt::ISODate) << "bl_checkBL() ..." << nTry;
|
qDebug() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs) << "bl_checkBL() ..." << nTry;
|
||||||
if (!m_hw->bl_isUp()) {
|
if (!m_hw->bl_isUp()) {
|
||||||
qInfo() << QDateTime::currentDateTime().time().toString(Qt::ISODate)
|
qInfo() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs)
|
||||||
<< "stopping bootloader OK";
|
<< "stopping bootloader OK";
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODate)
|
qCritical() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs)
|
||||||
<< "stopping bootloader FAILED";
|
<< "stopping bootloader FAILED";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DownloadThread::resetDeviceController() const {
|
bool DownloadThread::resetDeviceController() const {
|
||||||
qDebug() << QDateTime::currentDateTime().time().toString(Qt::ISODate)
|
qDebug() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs)
|
||||||
<< "resetting device controller...";
|
<< "resetting device controller...";
|
||||||
m_hw->bl_rebootDC();
|
m_hw->bl_rebootDC();
|
||||||
// wait maximally 3 seconds, before starting bootloader
|
// wait maximally 3 seconds, before starting bootloader
|
||||||
QThread::sleep(1);
|
QThread::sleep(1);
|
||||||
qInfo() << QDateTime::currentDateTime().time().toString(Qt::ISODate)
|
qInfo() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs)
|
||||||
<< "resetting device controller...OK";
|
<< "resetting device controller...OK";
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
QByteArray DownloadThread::loadBinaryDCFile(QString filename) const {
|
QByteArray DownloadThread::loadBinaryDCFile(QString filename) const {
|
||||||
qDebug() << "loading dc binary" << filename << "...";
|
qInfo() << QDateTime::currentDateTime().time().toString(Qt::ISODateWithMs)
|
||||||
|
<< "loading dc binary" << filename << "...";
|
||||||
|
|
||||||
QFile file(filename); // closed in destructor call
|
QFile file(filename); // closed in destructor call
|
||||||
if (!file.exists()) {
|
if (!file.exists()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user