doUpdate(): re-check again if there are valid data form the device-controller.

This commit is contained in:
Gerhard Hoffmann 2024-04-11 16:23:08 +02:00
parent 20681b0d6c
commit 698cf74516

View File

@ -670,9 +670,17 @@ bool Update::checkDownloadedJsonVersions(QStringList const& jsonFileNames) {
return false;
}
bool Update::doUpdate(int &displayIndex, QStringList const &filesToWorkOn) {
if (m_sys_areDCdataValid == false) {
qCritical() << "ERROR!!! DC DATA NOT VALID -> CA-MASTER-PLUGIN NOT CONNECTED";
return false;
int tries = 20;
while ((m_sys_areDCdataValid = m_hw->sys_areDCdataValid()) == false) {
// must deliver 'true', only then are all data from hwapi valid
if (--tries < 0) {
Utils::printCriticalErrorMsg("ERROR!!! DC DATA NOT VALID -> CA-SLAVE-PLUGIN NOT CONNECTED");
return false;
}
Utils::printCriticalErrorMsg("DC DATA NOT VALID -> CA-SLAVE-PLUGIN NOT CONNECTED");
m_hw->dc_autoRequest(true);
QThread::msleep(500);
}
bool res = false;