diff --git a/worker.cpp b/worker.cpp index a3890de..058fe18 100644 --- a/worker.cpp +++ b/worker.cpp @@ -57,8 +57,6 @@ Worker::Worker(hwinf *hw, , m_osVersion(getOsVersion()) , m_atbqtVersion(getATBQTVersion()) , m_cpuSerial(getCPUSerial()) - , m_raucVersion(getRaucVersion()) - , m_opkgVersion(getOpkgVersion()) , m_pluginVersionATBDeciceController(getPluginVersion("/opt/app/ATBAPP/plugins/libATBDeviceControllerPlugin.so")) , m_pluginVersionIngenicoISelf(getPluginVersion("/opt/app/ATBAPP/plugins/libIngenicoISelf_CCPlugin.so")) , m_pluginVersionMobilisisCalc(getPluginVersion("/opt/app/ATBAPP/plugins/libMOBILISIS_CalculatePricePlugin.so")) @@ -76,6 +74,16 @@ Worker::Worker(hwinf *hw, QDir::setCurrent(m_workingDirectory); + // restart apism to make sure it is running ? + // Command c("systemctl restart apism"); + // if (c.execute("/tmp")) { + // QThread::sleep(10); // give APISM some time to reconnect + // } + + if (std::optional v = getApismVersion()) { + m_apismVersion = v.value(); + } + qInfo() << "CURRENT TIME ..............." << QDateTime::currentDateTime().toString(Qt::ISODate); qInfo() << "OS VERSION ................." << m_osVersion; qInfo() << "ATBQT VERSION .............." << m_atbqtVersion; @@ -88,6 +96,7 @@ Worker::Worker(hwinf *hw, qInfo() << "ZONE_NR ...................." << m_zoneNr; qInfo() << "BRANCH_NAME ................" << m_branchName; qInfo() << "WORKING_DIRECTORY .........." << m_workingDirectory; + qInfo() << "APISM VERSION .............." << m_apismVersion; this->moveToThread(&m_workerThread); m_workerThread.start(); @@ -141,20 +150,8 @@ void Worker::update() { void Worker::privateUpdate() { m_updateProcessRunning = true; - bool sentIsmasLastVersionNotification = false; - //emit appendText("\nRestart APISM ..."); - //startProgressLoop(); - //Command c("systemctl restart apism"); - //if (c.execute("/tmp")) { - // QThread::sleep(10); // give APISM some time to reconnect - // stopProgressLoop(); - // emit replaceLast("Restart APISM ...", UPDATE_STEP_DONE); - //} else { - // stopProgressLoop(); - // emit replaceLast("Restart APISM ...", UPDATE_STEP_FAIL); - //} emit disableExit(); @@ -1212,8 +1209,7 @@ PSAInstalled Worker::getPSAInstalled() { psaInstalled.dc.gitLastCommit = "N/A"; psaInstalled.dc.size = -1; - psaInstalled.sw.raucVersion = m_raucVersion; - psaInstalled.sw.opkgVersion = m_opkgVersion; + psaInstalled.sw.apismVersion = m_apismVersion; psaInstalled.sw.atbQTVersion = m_atbqtVersion; psaInstalled.pluginVersion.deviceController = m_pluginVersionATBDeciceController;