Change for szeged (dc-version: 4.42): do not check if dc is alive.
Comment out some functions which are not available in old interface.h
This commit is contained in:
		
							
								
								
									
										38
									
								
								update.cpp
									
									
									
									
									
								
							
							
						
						
									
										38
									
								
								update.cpp
									
									
									
									
									
								
							@@ -54,6 +54,10 @@ hwinf *Update::loadDCPlugin(QDir const &plugInDir, QString const &fname) {
 | 
				
			|||||||
                qCritical() << pluginLoader.errorString();
 | 
					                qCritical() << pluginLoader.errorString();
 | 
				
			||||||
                exit(-1);
 | 
					                exit(-1);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            qCritical() << "loadDCPlugin() plugin directory:" << plugInDir.absolutePath();
 | 
				
			||||||
 | 
					            qCritical() << "loadDCPlugin() plugin file name:" << pluginLoader.fileName();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (!pluginLoader.isLoaded()) {
 | 
					            if (!pluginLoader.isLoaded()) {
 | 
				
			||||||
                qCritical() << pluginLoader.errorString();
 | 
					                qCritical() << pluginLoader.errorString();
 | 
				
			||||||
                exit(-2);
 | 
					                exit(-2);
 | 
				
			||||||
@@ -118,18 +122,18 @@ Update::Update(Worker *worker,
 | 
				
			|||||||
    , m_dryRun(dryRun)
 | 
					    , m_dryRun(dryRun)
 | 
				
			||||||
    , m_sys_areDCdataValid(false) {
 | 
					    , m_sys_areDCdataValid(false) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    int tries = 20;
 | 
					    //int tries = 20;
 | 
				
			||||||
    while ((m_sys_areDCdataValid = m_hw->sys_areDCdataValid()) == false) {
 | 
					    //while ((m_sys_areDCdataValid = m_hw->sys_areDCdataValid()) == false) {
 | 
				
			||||||
        // must deliver 'true', only then are all data from hwapi valid
 | 
					        // must deliver 'true', only then are all data from hwapi valid
 | 
				
			||||||
        if (--tries < 0) {
 | 
					    //    if (--tries < 0) {
 | 
				
			||||||
            qCritical() << "ERROR!!! DC DATA NOT VALID -> CA-MASTER-PLUGIN NOT CONNECTED";
 | 
					    //        qCritical() << "ERROR!!! DC DATA NOT VALID -> CA-MASTER-PLUGIN NOT CONNECTED";
 | 
				
			||||||
            break;
 | 
					    //        break;
 | 
				
			||||||
        }
 | 
					    //    }
 | 
				
			||||||
        m_hw->dc_autoRequest(true);
 | 
					    //    m_hw->dc_autoRequest(true);
 | 
				
			||||||
        QThread::msleep(500);
 | 
					    //    QThread::msleep(500);
 | 
				
			||||||
    }
 | 
					    //}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    qCritical() << "UPDATE: m_sys_areDCDataValid ..." << m_sys_areDCdataValid;
 | 
					    //qCritical() << "UPDATE: m_sys_areDCDataValid ..." << m_sys_areDCdataValid;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    //qInfo() << "UPDATE: m_serialInterface    ..." << m_serialInterface;
 | 
					    //qInfo() << "UPDATE: m_serialInterface    ..." << m_serialInterface;
 | 
				
			||||||
    //qInfo() << "UPDATE: m_baudrate           ..." << m_baudrate;
 | 
					    //qInfo() << "UPDATE: m_baudrate           ..." << m_baudrate;
 | 
				
			||||||
@@ -262,6 +266,7 @@ bool Update::updateBinary(QString const &fileToSendToDC) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    return false;
 | 
					    return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if 0
 | 
				
			||||||
    QFile fn(fileToSendToDC);
 | 
					    QFile fn(fileToSendToDC);
 | 
				
			||||||
    if (!fn.exists()) {
 | 
					    if (!fn.exists()) {
 | 
				
			||||||
        // output via CONSOLE() etc
 | 
					        // output via CONSOLE() etc
 | 
				
			||||||
@@ -330,6 +335,7 @@ bool Update::updateBinary(QString const &fileToSendToDC) {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return true;
 | 
					    return true;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
QString Update::jsonType(enum FileTypeJson type) {
 | 
					QString Update::jsonType(enum FileTypeJson type) {
 | 
				
			||||||
@@ -557,7 +563,7 @@ bool Update::checkDownloadedJsonVersions(QStringList const& jsonFileNames) {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (jsonNr != 0) {
 | 
					        if (jsonNr != 0) {
 | 
				
			||||||
 | 
					#if 0
 | 
				
			||||||
            m_hw->sys_requestJsonVersions(jsonNr);
 | 
					            m_hw->sys_requestJsonVersions(jsonNr);
 | 
				
			||||||
            QThread::msleep(500);
 | 
					            QThread::msleep(500);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -575,6 +581,8 @@ bool Update::checkDownloadedJsonVersions(QStringList const& jsonFileNames) {
 | 
				
			|||||||
            if (installedVersion == fileVersion) {
 | 
					            if (installedVersion == fileVersion) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            qCritical() << "CANNOT FIND JSON-NR FOR" << jsonFileNames[i];
 | 
					            qCritical() << "CANNOT FIND JSON-NR FOR" << jsonFileNames[i];
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
@@ -584,10 +592,10 @@ bool Update::checkDownloadedJsonVersions(QStringList const& jsonFileNames) {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool Update::doUpdate(int &displayIndex, QStringList const &filesToWorkOn) {
 | 
					bool Update::doUpdate(int &displayIndex, QStringList const &filesToWorkOn) {
 | 
				
			||||||
    if (m_sys_areDCdataValid == false) {
 | 
					    //if (m_sys_areDCdataValid == false) {
 | 
				
			||||||
        qCritical() << "ERROR!!! DC DATA NOT VALID -> CA-MASTER-PLUGIN NOT CONNECTED";
 | 
					    //    qCritical() << "ERROR!!! DC DATA NOT VALID -> CA-MASTER-PLUGIN NOT CONNECTED";
 | 
				
			||||||
        return false;
 | 
					    //    return false;
 | 
				
			||||||
    }
 | 
					    //}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    bool res = false;
 | 
					    bool res = false;
 | 
				
			||||||
    QList<QString>::const_iterator it;
 | 
					    QList<QString>::const_iterator it;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user