Compare commits
7 Commits
v1.3.24
...
szeged-wit
Author | SHA1 | Date | |
---|---|---|---|
854c8b9706 | |||
d521fd977a | |||
ebbdc2f864 | |||
62496c5d95 | |||
edd606fe78 | |||
1748c35c45 | |||
4c46932a3c |
@@ -6,7 +6,7 @@ plugin-directory="/usr/lib/"
|
||||
working-directory="/opt/app/tools/atbupdate/"
|
||||
|
||||
[PLUGINS]
|
||||
plugin-name="libCAslave.so"
|
||||
plugin-name="libCAmaster.so"
|
||||
|
||||
[FLAGS]
|
||||
no-psa-hardware-update=false
|
||||
|
@@ -81,9 +81,18 @@ DEFINES += QT_DEPRECATED_WARNINGS
|
||||
# Fix the path-names of the json-files and the device-controller.
|
||||
# Set automatic download of json-file in ATBUpdateTool.ini file for
|
||||
# a fresh clone of the repository.
|
||||
# 1.3.23 Added a 'break' to prevent a possible endless loop when checking if
|
||||
# 1.3.23: Added a 'break' to prevent a possible endless loop when checking if
|
||||
# the device is alive.
|
||||
VERSION="1.3.24"
|
||||
#
|
||||
# NOTE: The versioning info has to be shifted up by one version, i.e. what
|
||||
# happened for 1.3.23 was actually done in 1.3.24.
|
||||
# 1.3.24
|
||||
#
|
||||
# 1.3._24_: Special version for szeged using a old dc-controller (4.42):
|
||||
# Changes:
|
||||
# (1) the ini-File now uses the libCAmaster.so.
|
||||
# 1.3._25_: Again special version for szeged, using interface.h, version 4.4.
|
||||
VERSION="1.3._25_"
|
||||
|
||||
# PLANNED TODOS:
|
||||
# 1: Das Repository wird repariert bwz. neu geklont. Unabhaengig vom WAIT.
|
||||
|
@@ -128,12 +128,20 @@ void CommandLineParser::readSettings() {
|
||||
QString const iniFileDir = m_parser.value(m_iniFileDirectoryOption);
|
||||
QString const iniFileName = m_parser.value(m_iniFileNameOption);
|
||||
m_iniFileName = QDir::cleanPath(iniFileDir + QDir::separator() + iniFileName);
|
||||
|
||||
qCritical() << __PRETTY_FUNCTION__ << " iniFileDir" << iniFileDir;
|
||||
qCritical() << __PRETTY_FUNCTION__ << "iniFileName" << m_iniFileName;
|
||||
|
||||
if (!m_iniFileName.isEmpty()) {
|
||||
if (QFile(m_iniFileName).exists()) {
|
||||
QSettings settings(m_iniFileName, QSettings::IniFormat);
|
||||
QStringList keys = settings.allKeys();
|
||||
for (QString const &key: keys) {
|
||||
QVariant v = settings.value(key);
|
||||
|
||||
qCritical() << __PRETTY_FUNCTION__
|
||||
<< key << " -> " << v.toString();
|
||||
|
||||
if (key.contains("repository-url")) {
|
||||
m_repositoryUrl = v.toString();
|
||||
} else
|
||||
@@ -166,8 +174,14 @@ void CommandLineParser::readSettings() {
|
||||
} else
|
||||
if (key.contains("plugin-name")) {
|
||||
m_plugInName = v.toString();
|
||||
} else {
|
||||
qCritical() << __PRETTY_FUNCTION__
|
||||
<< key << " -> (UNKNOWN) " << v.toString();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
qCritical() << __PRETTY_FUNCTION__ << "iniFileName" << m_iniFileName
|
||||
<< "DOES NOT EXIST";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -238,7 +252,9 @@ bool CommandLineParser::extendedVersion() {
|
||||
bool CommandLineParser::alwaysDownloadConfig() {
|
||||
if (m_parser.isSet(m_alwaysDownloadConfigOption)) {
|
||||
m_alwaysDownloadConfig = m_parser.value(m_alwaysDownloadConfigOption);
|
||||
qCritical() << "m_alwaysDownloadConfigOption IS SET" << m_alwaysDownloadConfig;
|
||||
}
|
||||
qCritical() << "m_alwaysDownloadConfig" << m_alwaysDownloadConfig;
|
||||
return m_alwaysDownloadConfig == "false" ? false : true;
|
||||
}
|
||||
|
||||
|
1572
interfaces.h
Executable file → Normal file
1572
interfaces.h
Executable file → Normal file
File diff suppressed because it is too large
Load Diff
1585
plugins/interfaces.h
1585
plugins/interfaces.h
File diff suppressed because it is too large
Load Diff
38
update.cpp
38
update.cpp
@@ -54,6 +54,10 @@ hwinf *Update::loadDCPlugin(QDir const &plugInDir, QString const &fname) {
|
||||
qCritical() << pluginLoader.errorString();
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
qCritical() << "loadDCPlugin() plugin directory:" << plugInDir.absolutePath();
|
||||
qCritical() << "loadDCPlugin() plugin file name:" << pluginLoader.fileName();
|
||||
|
||||
if (!pluginLoader.isLoaded()) {
|
||||
qCritical() << pluginLoader.errorString();
|
||||
exit(-2);
|
||||
@@ -118,18 +122,18 @@ Update::Update(Worker *worker,
|
||||
, m_dryRun(dryRun)
|
||||
, m_sys_areDCdataValid(false) {
|
||||
|
||||
int tries = 20;
|
||||
while ((m_sys_areDCdataValid = m_hw->sys_areDCdataValid()) == 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) {
|
||||
qCritical() << "ERROR!!! DC DATA NOT VALID -> CA-MASTER-PLUGIN NOT CONNECTED";
|
||||
break;
|
||||
}
|
||||
m_hw->dc_autoRequest(true);
|
||||
QThread::msleep(500);
|
||||
}
|
||||
// if (--tries < 0) {
|
||||
// qCritical() << "ERROR!!! DC DATA NOT VALID -> CA-MASTER-PLUGIN NOT CONNECTED";
|
||||
// break;
|
||||
// }
|
||||
// m_hw->dc_autoRequest(true);
|
||||
// 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_baudrate ..." << m_baudrate;
|
||||
@@ -262,6 +266,7 @@ bool Update::updateBinary(QString const &fileToSendToDC) {
|
||||
|
||||
return false;
|
||||
|
||||
#if 0
|
||||
QFile fn(fileToSendToDC);
|
||||
if (!fn.exists()) {
|
||||
// output via CONSOLE() etc
|
||||
@@ -330,6 +335,7 @@ bool Update::updateBinary(QString const &fileToSendToDC) {
|
||||
}
|
||||
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
QString Update::jsonType(enum FileTypeJson type) {
|
||||
@@ -557,7 +563,7 @@ bool Update::checkDownloadedJsonVersions(QStringList const& jsonFileNames) {
|
||||
}
|
||||
|
||||
if (jsonNr != 0) {
|
||||
|
||||
#if 0
|
||||
m_hw->sys_requestJsonVersions(jsonNr);
|
||||
QThread::msleep(500);
|
||||
|
||||
@@ -575,6 +581,8 @@ bool Update::checkDownloadedJsonVersions(QStringList const& jsonFileNames) {
|
||||
if (installedVersion == fileVersion) {
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
} else {
|
||||
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) {
|
||||
if (m_sys_areDCdataValid == false) {
|
||||
qCritical() << "ERROR!!! DC DATA NOT VALID -> CA-MASTER-PLUGIN NOT CONNECTED";
|
||||
return false;
|
||||
}
|
||||
//if (m_sys_areDCdataValid == false) {
|
||||
// qCritical() << "ERROR!!! DC DATA NOT VALID -> CA-MASTER-PLUGIN NOT CONNECTED";
|
||||
// return false;
|
||||
//}
|
||||
|
||||
bool res = false;
|
||||
QList<QString>::const_iterator it;
|
||||
|
Reference in New Issue
Block a user