startBootloader():
set wait time to 1000ms. set try counter to 10. a message to ask for general bl installation (in hardware)
This commit is contained in:
parent
f5611cf826
commit
b9e9688269
@ -209,10 +209,10 @@ bool Update::startBootloader() const {
|
|||||||
return true;
|
return true;
|
||||||
#else
|
#else
|
||||||
|
|
||||||
int nTry = 5;
|
int nTry = 10;
|
||||||
while (--nTry >= 0) {
|
while (--nTry >= 0) {
|
||||||
m_hw->bl_startBL();
|
m_hw->bl_startBL();
|
||||||
QThread::msleep(5000);
|
QThread::msleep(1000);
|
||||||
m_hw->bl_checkBL();
|
m_hw->bl_checkBL();
|
||||||
if (m_hw->bl_isUp()) {
|
if (m_hw->bl_isUp()) {
|
||||||
qInfo() << "starting bootloader...OK";
|
qInfo() << "starting bootloader...OK";
|
||||||
@ -220,6 +220,7 @@ bool Update::startBootloader() const {
|
|||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
qCritical() << "bootloader not up (" << nTry << ")";
|
qCritical() << "bootloader not up (" << nTry << ")";
|
||||||
|
qCritical() << "IS BOOTLOADER INSTALLED ???";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
qCritical() << "starting bootloader...FAILED";
|
qCritical() << "starting bootloader...FAILED";
|
||||||
@ -241,7 +242,7 @@ bool Update::stopBootloader() const {
|
|||||||
int nTry = 5;
|
int nTry = 5;
|
||||||
while (--nTry >= 0) {
|
while (--nTry >= 0) {
|
||||||
m_hw->bl_stopBL();
|
m_hw->bl_stopBL();
|
||||||
QThread::msleep(500);
|
QThread::msleep(1000);
|
||||||
if (!m_hw->bl_isUp()) {
|
if (!m_hw->bl_isUp()) {
|
||||||
qInfo() << "stopping bootloader...OK";
|
qInfo() << "stopping bootloader...OK";
|
||||||
return true;
|
return true;
|
||||||
@ -399,6 +400,7 @@ int Update::run() {
|
|||||||
// TODO
|
// TODO
|
||||||
resetDeviceController();
|
resetDeviceController();
|
||||||
if (startBootloader()) {
|
if (startBootloader()) {
|
||||||
|
#if 0
|
||||||
int currentBlock = 0;
|
int currentBlock = 0;
|
||||||
DownloadResult res = DownloadResult::OK;
|
DownloadResult res = DownloadResult::OK;
|
||||||
qInfo() << nextTimePoint().toUtf8().constData() << "64-byte block" << currentBlock;
|
qInfo() << nextTimePoint().toUtf8().constData() << "64-byte block" << currentBlock;
|
||||||
@ -410,7 +412,7 @@ int Update::run() {
|
|||||||
} else break;
|
} else break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#if 0
|
#if 0
|
||||||
qCritical() << "DownloadThread::run(): last 64-byte block %04d" << currentBlock;
|
qCritical() << "DownloadThread::run(): last 64-byte block %04d" << currentBlock;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user