Compare commits
No commits in common. "0ee7df32b5271220d85f46c43ebc1bb79f00c282" and "26c1f0143e19e0038c8faa2f6f664cc9dcbcef09" have entirely different histories.
0ee7df32b5
...
26c1f0143e
@ -213,6 +213,8 @@ void ATBHMIconfig::initDefered() {
|
|||||||
this->HelpButtonUsed = settings->value("showHelpButton", "0").toBool();
|
this->HelpButtonUsed = settings->value("showHelpButton", "0").toBool();
|
||||||
this->InfoButtonUsed = settings->value("showInfoButton", "0").toBool();
|
this->InfoButtonUsed = settings->value("showInfoButton", "0").toBool();
|
||||||
|
|
||||||
|
this->ScreenChangeTimeoutTime = settings->value("screenChangeTimeoutTime", "10").toUInt();
|
||||||
|
|
||||||
settings->endGroup();
|
settings->endGroup();
|
||||||
|
|
||||||
// [PAYMENT]
|
// [PAYMENT]
|
||||||
@ -355,6 +357,8 @@ QString ATBHMIconfig::getSuspendTime() { return this->SuspendTime;
|
|||||||
*/
|
*/
|
||||||
QString ATBHMIconfig::getSellTimeoutTime() { return this->SellTimeoutTime; }
|
QString ATBHMIconfig::getSellTimeoutTime() { return this->SellTimeoutTime; }
|
||||||
|
|
||||||
|
quint32 ATBHMIconfig::getHMIScreenChangeTimeoutTime() { return this->ScreenChangeTimeoutTime; }
|
||||||
|
|
||||||
QString ATBHMIconfig::getQmPath() { return this->qmPath; }
|
QString ATBHMIconfig::getQmPath() { return this->qmPath; }
|
||||||
|
|
||||||
bool ATBHMIconfig::hasFeatureTF() { return ((this->features & this->featureMaskTF) != 0); }
|
bool ATBHMIconfig::hasFeatureTF() { return ((this->features & this->featureMaskTF) != 0); }
|
||||||
|
@ -107,6 +107,22 @@ class ATBHMIconfig : public QObject
|
|||||||
|
|
||||||
QString currencySymbol;
|
QString currencySymbol;
|
||||||
|
|
||||||
|
#ifdef USE_BARCODESCANNER
|
||||||
|
bool useBarcode;
|
||||||
|
QString barcodeScannerInputDeviceName;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_RFIDREADER
|
||||||
|
bool useRFID;
|
||||||
|
QString rfidReaderInputDeviceName;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_EXTERNAL_TICKETMANAGER
|
||||||
|
// for ticket management
|
||||||
|
QString endOfSellingTime;
|
||||||
|
int blockingTimeMin;
|
||||||
|
#endif
|
||||||
|
|
||||||
quint8 defaultLanguage;
|
quint8 defaultLanguage;
|
||||||
|
|
||||||
|
|
||||||
@ -125,6 +141,18 @@ class ATBHMIconfig : public QObject
|
|||||||
|
|
||||||
QByteArray characterSet;
|
QByteArray characterSet;
|
||||||
|
|
||||||
|
#ifdef USE_ISMAS
|
||||||
|
QString ismasHost;
|
||||||
|
quint16 ismasPort;
|
||||||
|
QString ismasID;
|
||||||
|
bool ismasDebug;
|
||||||
|
bool ismasCheckEntries;
|
||||||
|
quint16 ismasConnectionTimeout;
|
||||||
|
bool usePINgenerator;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
quint32 ScreenChangeTimeoutTime;
|
||||||
|
|
||||||
PAYMENT_VARIANTS::CASH_VARIANT cashVariant;
|
PAYMENT_VARIANTS::CASH_VARIANT cashVariant;
|
||||||
|
|
||||||
// ErrorCode-mapping
|
// ErrorCode-mapping
|
||||||
@ -191,6 +219,31 @@ public:
|
|||||||
|
|
||||||
const QString & getPaymentCurrencySymbol();
|
const QString & getPaymentCurrencySymbol();
|
||||||
|
|
||||||
|
#ifdef USE_BARCODESCANNER
|
||||||
|
bool getUseBarcodeScanner();
|
||||||
|
QString & getBarcodeScannerInputDevice();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_RFIDREADER
|
||||||
|
bool getUseRFIDReader();
|
||||||
|
QString & getRFIDReaderInputDevice();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_EXTERNAL_TICKETMANAGER
|
||||||
|
QString getEndOfSellingTime();
|
||||||
|
int getBlockingTime();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_ISMAS
|
||||||
|
QString getISMASHost();
|
||||||
|
quint16 getISMASPort();
|
||||||
|
QString getISMASId();
|
||||||
|
bool isIsmasDebug();
|
||||||
|
bool IsmasCheckEntries();
|
||||||
|
bool UsePINgenerator();
|
||||||
|
quint16 getIsmasConnectionTimeout();
|
||||||
|
#endif
|
||||||
|
|
||||||
void setFeatureTF();
|
void setFeatureTF();
|
||||||
void unsetFeatureTF();
|
void unsetFeatureTF();
|
||||||
|
|
||||||
|
@ -125,6 +125,77 @@ void ATB_system::BeepStop() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int ATB_system::init_touch_feedback() {
|
||||||
|
#if defined (ARCH_PTU2)
|
||||||
|
QString GPIODirName("/sys/class/gpio/");
|
||||||
|
QString directionFileName;
|
||||||
|
QString valueFileName;
|
||||||
|
|
||||||
|
// # echo 129 > /sys/class/gpio/export
|
||||||
|
QFile file("/sys/class/gpio/export");
|
||||||
|
file.open(QIODevice::WriteOnly | QIODevice::Text);
|
||||||
|
QTextStream out(&file);
|
||||||
|
out << config->getTouchFeedbackGPIO();
|
||||||
|
file.close();
|
||||||
|
|
||||||
|
// check, if gpio-dir was created
|
||||||
|
GPIODirName.append("gpio");
|
||||||
|
GPIODirName.append(config->getTouchFeedbackGPIO());
|
||||||
|
QFileInfo fileinfo1(GPIODirName);
|
||||||
|
if (! fileinfo1.isDir() ) {
|
||||||
|
qDebug() << "ATB_system::init_touch_feedback(): \"" << GPIODirName << "\" is not a directory";
|
||||||
|
config->unsetFeatureTF();
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
directionFileName = GPIODirName + "/direction";
|
||||||
|
QFileInfo fileinfo2(directionFileName);
|
||||||
|
if (! fileinfo2.isWritable() ) {
|
||||||
|
qDebug() << "ATB_system::init_touch_feedback(): \"" << directionFileName << "\" is not writable";
|
||||||
|
config->unsetFeatureTF();
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// # echo out > /sys/class/gpio/gpio129/direction
|
||||||
|
QFile directionfile(directionFileName);
|
||||||
|
directionfile.open(QIODevice::ReadWrite | QIODevice::Text);
|
||||||
|
QTextStream out2(&directionfile);
|
||||||
|
out2 << "out";
|
||||||
|
out2.flush();
|
||||||
|
|
||||||
|
// re-read 'direction' for confirmation
|
||||||
|
// -> the following is disabled because this sometimes failed
|
||||||
|
//QTextStream in(&directionfile);
|
||||||
|
//QString line = in.readLine();
|
||||||
|
//if (line != "out") {
|
||||||
|
// qDebug() << "ATB_system::init_touch_feedback(): re-read directionfile failed";
|
||||||
|
// config->unsetFeatureTF();
|
||||||
|
// return -1;
|
||||||
|
//}
|
||||||
|
directionfile.close();
|
||||||
|
|
||||||
|
// open gpio file
|
||||||
|
valueFileName = GPIODirName + "/value";
|
||||||
|
this->tf_gpio = new QFile(valueFileName);
|
||||||
|
|
||||||
|
this->tf_gpio->open(QIODevice::WriteOnly);
|
||||||
|
this->tf_gpio_outstream = new QTextStream(this->tf_gpio);
|
||||||
|
|
||||||
|
qDebug() << "ATB_system::init_touch_feedback(): GPIODirName = \"" << GPIODirName << "\"";
|
||||||
|
qDebug() << "ATB_system::init_touch_feedback(): valueFileName = \"" << valueFileName << "\"";
|
||||||
|
|
||||||
|
#elif defined (ARCH_PTU4)
|
||||||
|
QString sysfs_buzzer("/sys/class/leds/Buzzer/brightness");
|
||||||
|
|
||||||
|
this->tf_gpio = new QFile(sysfs_buzzer);
|
||||||
|
tf_gpio->open(QIODevice::WriteOnly);
|
||||||
|
|
||||||
|
this->tf_gpio_outstream = new QTextStream(this->tf_gpio);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************************
|
/********************************************************************************
|
||||||
* set date/time
|
* set date/time
|
||||||
*
|
*
|
||||||
|
@ -31,6 +31,9 @@ class ATB_system : public QObject {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
int init_touch_feedback();
|
||||||
|
int init_sc_dbus();
|
||||||
|
|
||||||
ATBHMIconfig *config;
|
ATBHMIconfig *config;
|
||||||
QFile *tf_gpio;
|
QFile *tf_gpio;
|
||||||
QTextStream *tf_gpio_outstream;
|
QTextStream *tf_gpio_outstream;
|
||||||
|
@ -13,15 +13,16 @@
|
|||||||
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
|
|
||||||
ATBVMCPlugin::ATBVMCPlugin(QObject *parent)
|
ATBVMCPlugin::ATBVMCPlugin(QObject *parent)
|
||||||
: VMCInterface(parent)
|
: m_errorCode("")
|
||||||
, m_errorCode("")
|
|
||||||
, m_errorDescription("")
|
, m_errorDescription("")
|
||||||
, m_pluginInfo("")
|
, m_pluginInfo("")
|
||||||
, m_serialPortName("")
|
, m_serialPortName("")
|
||||||
, m_useDebug(false)
|
, m_useDebug(false)
|
||||||
, m_pluginState(PLUGIN_STATE::NOT_INITIALIZED)
|
, m_pluginState(PLUGIN_STATE::NOT_INITIALIZED)
|
||||||
, m_eventReceiver(nullptr) {
|
, m_eventReceiver(nullptr) {
|
||||||
|
this->setParent(parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
ATBVMCPlugin::~ATBVMCPlugin() {
|
ATBVMCPlugin::~ATBVMCPlugin() {
|
||||||
@ -29,12 +30,8 @@ ATBVMCPlugin::~ATBVMCPlugin() {
|
|||||||
|
|
||||||
PLUGIN_STATE ATBVMCPlugin::initVMCPlugin(QObject *eventReceiver,
|
PLUGIN_STATE ATBVMCPlugin::initVMCPlugin(QObject *eventReceiver,
|
||||||
QSettings const &settings) {
|
QSettings const &settings) {
|
||||||
m_eventReceiver = eventReceiver;
|
Q_UNUSED(eventReceiver);
|
||||||
m_settings = &settings;
|
Q_UNUSED(settings);
|
||||||
|
|
||||||
// Beachte: QSettings hat .fileName().
|
|
||||||
// Damit kann man dann ATBSystem benutzen.
|
|
||||||
|
|
||||||
return PLUGIN_STATE::NOT_INITIALIZED;
|
return PLUGIN_STATE::NOT_INITIALIZED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
#define ATBVMCPLUGIN_H
|
#define ATBVMCPLUGIN_H
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QSettings>
|
|
||||||
|
|
||||||
#include "src/ATBAPP/VMCInterface.h"
|
#include "src/ATBAPP/VMCInterface.h"
|
||||||
#include "src/ATBAPP/ATBAPPplugin.h"
|
#include "src/ATBAPP/ATBAPPplugin.h"
|
||||||
@ -10,11 +9,7 @@
|
|||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
|
||||||
#include "include/interfaces.h"
|
#include "include/interfaces.h"
|
||||||
#include "vmc.h"
|
|
||||||
|
|
||||||
class ATBHMIconfig;
|
|
||||||
class AppControl;
|
|
||||||
class ATBSystem;
|
|
||||||
|
|
||||||
class ATBVMCPlugin : public VMCInterface {
|
class ATBVMCPlugin : public VMCInterface {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -61,7 +56,6 @@ private:
|
|||||||
bool m_useDebug;
|
bool m_useDebug;
|
||||||
PLUGIN_STATE m_pluginState;
|
PLUGIN_STATE m_pluginState;
|
||||||
QObject* m_eventReceiver;
|
QObject* m_eventReceiver;
|
||||||
QSettings const *m_settings;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ATBDEVICECONTROLLERPLUGIN_H
|
#endif // ATBDEVICECONTROLLERPLUGIN_H
|
||||||
|
@ -11,10 +11,6 @@
|
|||||||
|
|
||||||
#include "ATBAPPplugin.h"
|
#include "ATBAPPplugin.h"
|
||||||
|
|
||||||
class ATBHMIconfig;
|
|
||||||
class AppControl;
|
|
||||||
class ATBSystem;
|
|
||||||
|
|
||||||
class UnifiedDCVMCInterface : public QObject, public ATBAPPplugin {
|
class UnifiedDCVMCInterface : public QObject, public ATBAPPplugin {
|
||||||
|
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -47,7 +43,7 @@ public:
|
|||||||
STOP_RECEIPT, // e.g. Szeged Stop
|
STOP_RECEIPT, // e.g. Szeged Stop
|
||||||
};
|
};
|
||||||
|
|
||||||
explicit UnifiedDCVMCInterface(QObject *parent = nullptr) : QObject(parent) {}
|
explicit UnifiedDCVMCInterface() = default;
|
||||||
virtual ~UnifiedDCVMCInterface() {}
|
virtual ~UnifiedDCVMCInterface() {}
|
||||||
|
|
||||||
virtual PLUGIN_STATE initPlugin(QObject *eventReceiver, QSettings const &settings) = 0;
|
virtual PLUGIN_STATE initPlugin(QObject *eventReceiver, QSettings const &settings) = 0;
|
||||||
|
@ -16,9 +16,6 @@ namespace nsVMCInterface {
|
|||||||
using TICKET_VARIANT = UnifiedDCVMCInterface::TICKET_VARIANT;
|
using TICKET_VARIANT = UnifiedDCVMCInterface::TICKET_VARIANT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class ATBHMIconfig;
|
|
||||||
|
|
||||||
class VMCInterface : public UnifiedDCVMCInterface {
|
class VMCInterface : public UnifiedDCVMCInterface {
|
||||||
|
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -27,9 +24,6 @@ class VMCInterface : public UnifiedDCVMCInterface {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
explicit VMCInterface(QObject *parent = nullptr)
|
|
||||||
: UnifiedDCVMCInterface(parent) {}
|
|
||||||
|
|
||||||
virtual PLUGIN_STATE initPlugin(QObject *eventReceiver, QSettings const &settings) override {
|
virtual PLUGIN_STATE initPlugin(QObject *eventReceiver, QSettings const &settings) override {
|
||||||
return initVMCPlugin(eventReceiver, settings);
|
return initVMCPlugin(eventReceiver, settings);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user