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,10 +670,18 @@ bool Update::checkDownloadedJsonVersions(QStringList const& jsonFileNames) {
return false; return false;
} }
bool Update::doUpdate(int &displayIndex, QStringList const &filesToWorkOn) { bool Update::doUpdate(int &displayIndex, QStringList const &filesToWorkOn) {
if (m_sys_areDCdataValid == false) {
qCritical() << "ERROR!!! DC DATA NOT VALID -> CA-MASTER-PLUGIN NOT CONNECTED"; 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; return false;
} }
Utils::printCriticalErrorMsg("DC DATA NOT VALID -> CA-SLAVE-PLUGIN NOT CONNECTED");
m_hw->dc_autoRequest(true);
QThread::msleep(500);
}
bool res = false; bool res = false;
bool dcDownloadPossible = true; bool dcDownloadPossible = true;