Compare commits

...

5 Commits

4 changed files with 19 additions and 2 deletions

View File

@ -103,7 +103,8 @@ DEFINES += QT_DEPRECATED_WARNINGS
# Move final processing to subclass UpdateProcessRunning. # Move final processing to subclass UpdateProcessRunning.
# Disable EXIT-button for the whole update-process, except for the # Disable EXIT-button for the whole update-process, except for the
# checking of the ISMAS-trigger-button (aka WAIT-button). # checking of the ISMAS-trigger-button (aka WAIT-button).
VERSION="1.4.0" # 2.0.0 Download device-controller using reporting-/download-thread.
VERSION="2.0.0"
# PLANNED TODOS: # PLANNED TODOS:
# 1: Das Repository wird repariert bwz. neu geklont. Unabhaengig vom WAIT. # 1: Das Repository wird repariert bwz. neu geklont. Unabhaengig vom WAIT.
# 2: Wenn der WAIT-Button aktiv ist, dann wird ein Repository repariert (neu # 2: Wenn der WAIT-Button aktiv ist, dann wird ein Repository repariert (neu

View File

@ -664,6 +664,8 @@ bool Update::doUpdate(int &displayIndex, QStringList const &filesToWorkOn) {
qCritical() << QDateTime::currentDateTime().toString(Qt::ISODate) qCritical() << QDateTime::currentDateTime().toString(Qt::ISODate)
<< "(" << __func__ << ":" << __LINE__ << ") DOWNLOAD RUNNING"; << "(" << __func__ << ":" << __LINE__ << ") DOWNLOAD RUNNING";
QThread::sleep(2);
if (!m_hw->dcDownloadReportThreadStart()) { // may take some time if (!m_hw->dcDownloadReportThreadStart()) { // may take some time
qCritical() << QDateTime::currentDateTime().toString(Qt::ISODate) qCritical() << QDateTime::currentDateTime().toString(Qt::ISODate)
<< "(" << __func__ << ":" << __LINE__ << ") REPORT THREAD NOT STARTED"; << "(" << __func__ << ":" << __LINE__ << ") REPORT THREAD NOT STARTED";

View File

@ -1063,6 +1063,17 @@ QString Worker::getAPISMYoctoInstallationStatus() {
return "N/A"; return "N/A";
} }
QString Worker::getDCVersionPreparedForDownload(QString const &filename) {
if (QFile::exists(filename)) { // <customer-repo/etc/dc/dc2c.bin>
QString const cmd = QString("strings %1 | grep -e DC2[Cc]\\. | head -n1").arg(filename);
Command c("bash");
if (c.execute("/tmp", QStringList() << "-c" << cmd)) {
return c.getCommandResult(); // DC2c.04.42 14.09.2023
}
}
return "N/A";
}
QString Worker::getATBQTVersion() const { QString Worker::getATBQTVersion() const {
QString const cmd = QString("echo -n $(/opt/app/ATBAPP/ATBQT -v | head -n 2 | cut -d':' -f2)"); QString const cmd = QString("echo -n $(/opt/app/ATBAPP/ATBQT -v | head -n 2 | cut -d':' -f2)");
@ -1187,7 +1198,9 @@ PSAInstalled Worker::getPSAInstalled() {
if (m_versionInfo.size() == 3) { if (m_versionInfo.size() == 3) {
qCritical() << QString("***** %1:%2").arg(__func__).arg(__LINE__) qCritical() << QString("***** %1:%2").arg(__func__).arg(__LINE__)
<< "m_versionInfo" << m_versionInfo << "*****"; << "m_versionInfo" << m_versionInfo << "*****";
psaInstalled.versionInfo.lastCommit = m_versionInfo.at(0); psaInstalled.versionInfo.lastCommit = QString("%1-%2")
.arg(QCoreApplication::applicationPid())
.arg(m_versionInfo.at(0));
psaInstalled.versionInfo.reason = m_versionInfo.at(1); psaInstalled.versionInfo.reason = m_versionInfo.at(1);
psaInstalled.versionInfo.created = m_versionInfo.at(2); psaInstalled.versionInfo.created = m_versionInfo.at(2);
} }

View File

@ -369,6 +369,7 @@ public:
static QString getATBUpdateToolYoctoInstallationStatus(); static QString getATBUpdateToolYoctoInstallationStatus();
static QString getAPISMYoctoVersion(); static QString getAPISMYoctoVersion();
static QString getAPISMYoctoInstallationStatus(); static QString getAPISMYoctoInstallationStatus();
static QString getDCVersionPreparedForDownload(QString const &filename);
static const QString UPDATE_STEP_OK; static const QString UPDATE_STEP_OK;
static const QString UPDATE_STEP_DONE; static const QString UPDATE_STEP_DONE;