2024-02-28 16:00:01 +01:00
|
|
|
|
2024-02-28 16:02:26 +01:00
|
|
|
#include <QtGlobal>
|
2024-02-28 16:25:45 +01:00
|
|
|
#include <QCoreApplication>
|
|
|
|
#include <QByteArray>
|
|
|
|
|
|
|
|
#include "message_handler.h"
|
|
|
|
|
|
|
|
#if defined (__unix__) || defined (__linux__)
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <errno.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef PTU5
|
|
|
|
#define SERIAL_PORT "ttymxc2"
|
|
|
|
#else
|
|
|
|
#define SERIAL_PORT "ttyUSB0"
|
|
|
|
#endif
|
2024-02-28 16:00:01 +01:00
|
|
|
|
|
|
|
int main(int argc, char **argv) {
|
2024-02-28 16:25:45 +01:00
|
|
|
QByteArray const value = qgetenv("LC_ALL");
|
|
|
|
if (value != "C") {
|
|
|
|
qputenv("LC_ALL", "C");
|
|
|
|
}
|
|
|
|
// qputenv("XDG_RUNTIME_DIR", "/var/run/user/0");
|
|
|
|
|
|
|
|
openlog("ATB-DL-JSON", LOG_PERROR | LOG_PID | LOG_CONS, LOG_USER);
|
|
|
|
|
|
|
|
QCoreApplication a(argc, argv);
|
|
|
|
QCoreApplication::setApplicationName("ATBDownloadDCJsonFiles");
|
|
|
|
QCoreApplication::setApplicationVersion(APP_VERSION);
|
|
|
|
|
|
|
|
if (!messageHandlerInstalled()) { // change internal qt-QDebug-handling
|
|
|
|
atbInstallMessageHandler(atbDebugOutput);
|
|
|
|
setDebugLevel(LOG_NOTICE);
|
|
|
|
}
|
|
|
|
|
|
|
|
return a.exec();
|
2024-02-28 16:00:01 +01:00
|
|
|
}
|