Compare commits
2 Commits
26c1f0143e
...
0ee7df32b5
Author | SHA1 | Date | |
---|---|---|---|
0ee7df32b5 | |||
ad4bae4bfb |
@ -213,8 +213,6 @@ 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]
|
||||||
@ -357,8 +355,6 @@ 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,22 +107,6 @@ 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;
|
||||||
|
|
||||||
|
|
||||||
@ -141,18 +125,6 @@ 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
|
||||||
@ -219,31 +191,6 @@ 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,77 +125,6 @@ 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,9 +31,6 @@ 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,16 +13,15 @@
|
|||||||
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
|
|
||||||
ATBVMCPlugin::ATBVMCPlugin(QObject *parent)
|
ATBVMCPlugin::ATBVMCPlugin(QObject *parent)
|
||||||
: m_errorCode("")
|
: VMCInterface(parent)
|
||||||
|
, 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() {
|
||||||
@ -30,8 +29,12 @@ ATBVMCPlugin::~ATBVMCPlugin() {
|
|||||||
|
|
||||||
PLUGIN_STATE ATBVMCPlugin::initVMCPlugin(QObject *eventReceiver,
|
PLUGIN_STATE ATBVMCPlugin::initVMCPlugin(QObject *eventReceiver,
|
||||||
QSettings const &settings) {
|
QSettings const &settings) {
|
||||||
Q_UNUSED(eventReceiver);
|
m_eventReceiver = eventReceiver;
|
||||||
Q_UNUSED(settings);
|
m_settings = &settings;
|
||||||
|
|
||||||
|
// Beachte: QSettings hat .fileName().
|
||||||
|
// Damit kann man dann ATBSystem benutzen.
|
||||||
|
|
||||||
return PLUGIN_STATE::NOT_INITIALIZED;
|
return PLUGIN_STATE::NOT_INITIALIZED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
#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"
|
||||||
@ -9,7 +10,11 @@
|
|||||||
#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
|
||||||
@ -56,6 +61,7 @@ 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,6 +11,10 @@
|
|||||||
|
|
||||||
#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
|
||||||
@ -43,7 +47,7 @@ public:
|
|||||||
STOP_RECEIPT, // e.g. Szeged Stop
|
STOP_RECEIPT, // e.g. Szeged Stop
|
||||||
};
|
};
|
||||||
|
|
||||||
explicit UnifiedDCVMCInterface() = default;
|
explicit UnifiedDCVMCInterface(QObject *parent = nullptr) : QObject(parent) {}
|
||||||
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,6 +16,9 @@ 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
|
||||||
@ -24,6 +27,9 @@ 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