Compare commits

..

10 Commits

13 changed files with 31 additions and 5001 deletions

1
.gitignore vendored
View File

@@ -1,2 +1,3 @@
tags
*.tags
*.user

View File

@@ -6,7 +6,7 @@ plugin-directory="/usr/lib/"
working-directory="/opt/app/tools/atbupdate/"
[PLUGINS]
plugin-name="libCAmaster.so"
plugin-name="libCAslave.so"
[FLAGS]
no-psa-hardware-update=false

View File

@@ -34,7 +34,7 @@ int main(int argc, char **argv) {
setDebugLevel(LOG_NOTICE);
}
int r = std::system("ls -l /proc/[0-9]*/fd/* 2>/dev/null | grep /dev/ttymxc2 > /tmp/slave-or-master.txt");
// int r = std::system("ls -l /proc/[0-9]*/fd/* 2>/dev/null | grep /dev/ttymxc2 > /tmp/slave-or-master.txt");
// lrwx------ 1 root root 64 Oct 31 14:55 /proc/884/fd/18 -> /dev/ttymxc2
//std::ifstream ifs("/tmp/slave-or-master.txt");

View File

@@ -105,7 +105,11 @@ DEFINES += QT_DEPRECATED_WARNINGS
# checking of the ISMAS-trigger-button (aka WAIT-button).
# 1.4.1 : Sync files in the customer repository (under ./etc) as the very
# first step
VERSION="1.4.1"
# 1.4.2 : Do not check if <repo_dir>/etc/psa_tariff and /etc/psa_tariff are
# the same after an rsync. They might be noy after a change of the
# customer-number.
# 1.4.3 : Use global directory for device-controller interfaces.h-file.
VERSION="1.4.3"
# PLANNED TODOS:
# 1: Das Repository wird repariert bwz. neu geklont. Unabhaengig vom WAIT.
# 2: Wenn der WAIT-Button aktiv ist, dann wird ein Repository repariert (neu
@@ -194,6 +198,12 @@ contains( CONFIG, PTU5 ) {
CONFIG += link_pkgconfig
lessThan(QT_MAJOR_VERSION, 5): PKGCONFIG += qextserialport
QMAKE_CXXFLAGS += -O2 -std=c++17 # for GCC >= 4.7
PTU5BASEPATH = /opt/devel/ptu5
INCLUDEPATH += $$PTU5BASEPATH/qt/libs/devicecontroller/include
LIBS += -L$$PTU5BASEPATH/qt/libs/devicecontroller/library
# QMAKE_CXXFLAGS += -Wno-deprecated-copy
ARCH = PTU5
DEFINES+=PTU5
@@ -206,8 +216,8 @@ contains( CONFIG, PTU5_YOCTO ) {
ARCH = PTU5
DEFINES+=PTU5
# add qmqtt lib
#LIBS += -lQt5Qmqtt
LIBS += -lCAslave
LIBS += -lCAmaster
}
contains( CONFIG, DesktopLinux ) {
greaterThan(QT_MAJOR_VERSION, 4): QT += serialport
@@ -247,9 +257,7 @@ HEADERS += \
process/command.h \
message_handler.h \
worker.h \
interfaces.h \
commandline_parser.h \
plugins/interfaces.h
commandline_parser.h
OTHER_FILES += \
ATBUpdateTool.ini

File diff suppressed because it is too large Load Diff

View File

@@ -9,7 +9,7 @@
#endif
#include "message_handler.h"
#include "plugins/interfaces.h"
#include <DeviceController/interfaces.h>
#include "commandline_parser.h"
#include <unistd.h>

View File

@@ -4,7 +4,7 @@
#include "utils.h"
#include "progress_event.h"
#include "update_dc_event.h"
#include "plugins/interfaces.h"
#include <DeviceController/interfaces.h>
#include <QDateTime>
#include <QMessageBox>

File diff suppressed because it is too large Load Diff

View File

@@ -18,7 +18,7 @@
#include "unistd.h"
#endif
#include "plugins/interfaces.h"
#include <DeviceController/interfaces.h>
#include <QSharedMemory>
#include <QScopedPointer>
@@ -140,6 +140,7 @@ Update::Update(Worker *worker,
qCritical() << "(" << __func__ << ":" << __LINE__ << ") m_sys_areDCDataValid ..."
<< m_sys_areDCdataValid;
#if 0
QObject const *obj = m_hw->getAPI();
Q_ASSERT(obj != nullptr);
@@ -167,6 +168,7 @@ Update::Update(Worker *worker,
SLOT(onReportDCDownloadFailure(QString const &)))) {
critical << "FAILED";
} else critical << "DONE";
#endif
}
}
@@ -644,6 +646,7 @@ bool Update::doUpdate(int &displayIndex, QStringList const &filesToWorkOn) {
m_worker->startProgressLoop();
QString const &fToWorkOn = QDir::cleanPath(m_customerRepository + QDir::separator() + it->trimmed());
if (fToWorkOn.endsWith("/dc2c.bin") && dcDownloadPossible) {
#if 0
// download for dc possible only once
// download of device-controller should always be the last step
dcDownloadPossible = false;
@@ -709,7 +712,7 @@ bool Update::doUpdate(int &displayIndex, QStringList const &filesToWorkOn) {
break;
}
}
#endif
bool updateBinaryRes = true;
// CONSOLE()

View File

@@ -9,7 +9,7 @@
#include <QProcess>
#include <QPluginLoader>
#include "plugins/interfaces.h"
#include <DeviceController/interfaces.h>
#ifdef PTU5
#define SERIAL_PORT "ttymxc2"

View File

@@ -19,7 +19,7 @@
#include <QScopedPointer>
#include "message_handler.h"
#include "plugins/interfaces.h"
#include <DeviceController/interfaces.h>
#include "ismas/ismas_client.h"
#include "progress_event.h"
#include "mainwindow.h"
@@ -991,10 +991,12 @@ bool Worker::syncCustomerRepositoryAndFS() {
QDir dir1(QDir::cleanPath(m_customerRepository + QDir::separator() + "etc/psa_tariff"));
QDir dir2("/etc/psa_tariff");
if (Utils::sameFilesInDirs(dir1, dir2)) {
CONSOLE() << UPDATE_STEP::SYNC_CUSTOMER_REPOSITORY_SUCCESS;
setProgress(_SYNC_CUSTOMER_REPOSITORY_SUCCESS);
return true;
CONSOLE() << QDir::cleanPath(m_customerRepository + QDir::separator() + "etc/psa_tariff")
<< "AND /etc/psa_tariff ARE DIFFERENT: CHANGED CUSTOMER-NUMBER?";
}
CONSOLE() << UPDATE_STEP::SYNC_CUSTOMER_REPOSITORY_SUCCESS;
setProgress(_SYNC_CUSTOMER_REPOSITORY_SUCCESS);
return true;
}
}
}