Use diag on closing doors
This commit is contained in:
parent
31f178b241
commit
4a7022fd00
@ -10,13 +10,16 @@
|
|||||||
#include <QPluginLoader>
|
#include <QPluginLoader>
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
|
#include <QCoreApplication>
|
||||||
|
#include <QUuid>
|
||||||
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ATBDeviceControllerPlugin::ATBDeviceControllerPlugin(QObject *parent) :
|
ATBDeviceControllerPlugin::ATBDeviceControllerPlugin(QObject *parent)
|
||||||
pluginState(PLUGIN_STATE::NOT_INITIALIZED)
|
: pluginState(PLUGIN_STATE::NOT_INITIALIZED)
|
||||||
|
, eventReceiver(nullptr)
|
||||||
{
|
{
|
||||||
this->setParent(parent);
|
this->setParent(parent);
|
||||||
|
|
||||||
@ -26,9 +29,6 @@ ATBDeviceControllerPlugin::ATBDeviceControllerPlugin(QObject *parent) :
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_templatePrintFinished_OK()), this, SLOT(onPrintFinishedOK()), Qt::QueuedConnection);
|
//connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_templatePrintFinished_OK()), this, SLOT(onPrintFinishedOK()), Qt::QueuedConnection);
|
||||||
//connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_templatePrintFinished_Err()), this, SLOT(onPrintFinishedERR()), Qt::QueuedConnection);
|
//connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_templatePrintFinished_Err()), this, SLOT(onPrintFinishedERR()), Qt::QueuedConnection);
|
||||||
|
|
||||||
@ -46,6 +46,9 @@ ATBDeviceControllerPlugin::ATBDeviceControllerPlugin(QObject *parent) :
|
|||||||
connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_doorAllDoorsClosed()), this, SLOT(onAllDoorsClosed()), Qt::QueuedConnection); // check for errors, switch to mode IDLE
|
connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_doorAllDoorsClosed()), this, SLOT(onAllDoorsClosed()), Qt::QueuedConnection); // check for errors, switch to mode IDLE
|
||||||
|
|
||||||
|
|
||||||
|
this->diag = new DeviceControllerDiag(this);
|
||||||
|
|
||||||
|
|
||||||
this->currentSelectedTicketType = 0;
|
this->currentSelectedTicketType = 0;
|
||||||
this->currentCashState = CASH_STATE::CACHE_EMPTY;
|
this->currentCashState = CASH_STATE::CACHE_EMPTY;
|
||||||
}
|
}
|
||||||
@ -74,7 +77,7 @@ PLUGIN_STATE ATBDeviceControllerPlugin::initDCPlugin(QObject *eventReceiver, con
|
|||||||
// text encoding for printer
|
// text encoding for printer
|
||||||
this->codec = QTextCodec::codecForName(printerEncoding);
|
this->codec = QTextCodec::codecForName(printerEncoding);
|
||||||
|
|
||||||
|
this->diag->init(this->hw, this->eventReceiver);
|
||||||
|
|
||||||
this->pluginState = PLUGIN_STATE::INITIALIZED;
|
this->pluginState = PLUGIN_STATE::INITIALIZED;
|
||||||
|
|
||||||
@ -271,6 +274,8 @@ void ATBDeviceControllerPlugin::onCBinAndAllDoorsClosed()
|
|||||||
{
|
{
|
||||||
qCritical() << "ATBDeviceControllerPlugin::onCBinAndAllDoorsClosed()";
|
qCritical() << "ATBDeviceControllerPlugin::onCBinAndAllDoorsClosed()";
|
||||||
|
|
||||||
|
this->diag->diagRequest();
|
||||||
|
|
||||||
// TODO: Stop background task "ACCOUNT"
|
// TODO: Stop background task "ACCOUNT"
|
||||||
|
|
||||||
QTimer::singleShot(2000, this, SIGNAL(requestModeIDLE()));
|
QTimer::singleShot(2000, this, SIGNAL(requestModeIDLE()));
|
||||||
@ -695,6 +700,8 @@ const QString ATBDeviceControllerPlugin::getString(nsDeviceControllerInterface::
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/************************************************************************************************
|
/************************************************************************************************
|
||||||
* ... end
|
* ... end
|
||||||
*/
|
*/
|
||||||
|
@ -39,7 +39,7 @@ public:
|
|||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// interface:
|
// interface:
|
||||||
PLUGIN_STATE initDCPlugin(QObject *healthEventReceiver, const QSettings & settings);
|
PLUGIN_STATE initDCPlugin(QObject *eventReceiver, const QSettings & settings);
|
||||||
|
|
||||||
// TASKS: Cash handling -------------------------------------------------------
|
// TASKS: Cash handling -------------------------------------------------------
|
||||||
void requestStartCashInput(const QString & amount);
|
void requestStartCashInput(const QString & amount);
|
||||||
|
Loading…
Reference in New Issue
Block a user