Handle signal hwapi_payStopByPushbutton

This commit is contained in:
Siegfried Siegert 2023-11-23 17:59:49 +01:00
parent 48d65b679f
commit ed5001c3a3
Signed by: SiegfriedSiegert
GPG Key ID: 68371E015E8F0B03
2 changed files with 17 additions and 6 deletions

View File

@ -40,11 +40,12 @@ ATBDeviceControllerPlugin::ATBDeviceControllerPlugin(QObject *parent)
//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);
connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_gotNewCoin()), this, SLOT(onCashGotCoin()), Qt::QueuedConnection); connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_gotNewCoin()), this, SLOT(onCashGotCoin()), Qt::QueuedConnection);
connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_payStopByMax()), this, SLOT(onCashPayStopByMax()), Qt::QueuedConnection); connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_payStopByMax()), this, SLOT(onCashPayStopByMax()), Qt::QueuedConnection);
connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_payStopByEscrow()), this, SLOT(onCashPayStopByEscrow()), Qt::QueuedConnection); connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_payStopByPushbutton()), this, SLOT(onCashPayStopByPushbutton()), Qt::QueuedConnection);
connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_payStopByError()), this, SLOT(onCashPayStopByError()), Qt::QueuedConnection); connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_payStopByEscrow()), this, SLOT(onCashPayStopByEscrow()), Qt::QueuedConnection);
connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_payStopByTimeout()), this, SLOT(onCashPayStopByTimeout()), Qt::QueuedConnection); connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_payStopByError()), this, SLOT(onCashPayStopByError()), Qt::QueuedConnection);
connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_payStopByTimeout()), this, SLOT(onCashPayStopByTimeout()), Qt::QueuedConnection);
connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_doorServiceDoorOpened()), this, SLOT(onServiceDoorOpened()), Qt::QueuedConnection); // switch to ModeSERVICE connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_doorServiceDoorOpened()), this, SLOT(onServiceDoorOpened()), Qt::QueuedConnection); // switch to ModeSERVICE
connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_doorVaultDoorOpened()), this, SLOT(onVaultDoorOpened()), Qt::QueuedConnection); // Screen?? with message connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_doorVaultDoorOpened()), this, SLOT(onVaultDoorOpened()), Qt::QueuedConnection); // Screen?? with message
@ -858,6 +859,15 @@ void ATBDeviceControllerPlugin::onCashGotCoin()
""); "");
} }
void ATBDeviceControllerPlugin::onCashPayStopByPushbutton()
{
// DEBUG
qCritical() << "ATBDeviceControllerPlugin::onCashPayStopByPushbutton()";
// we need new cash value in application...
QTimer::singleShot(500, this, SLOT(onCashPayStopedSuccess()));
}
void ATBDeviceControllerPlugin::onCashPayStopByMax() void ATBDeviceControllerPlugin::onCashPayStopByMax()
{ {
@ -917,7 +927,7 @@ void ATBDeviceControllerPlugin::onCashPayStopByTimeout()
void ATBDeviceControllerPlugin::onCashPayStopedSuccess() void ATBDeviceControllerPlugin::onCashPayStopedSuccess()
{ {
// DEBUG // DEBUG
qCritical() << "ATBDeviceControllerPlugin::onCashPayStoped()"; qCritical() << "ATBDeviceControllerPlugin::onCashPayStopedSuccess()";
uint32_t amountInt = this->hw->getInsertedAmount(); uint32_t amountInt = this->hw->getInsertedAmount();

View File

@ -142,6 +142,7 @@ private slots:
void onCashGotCoin(); void onCashGotCoin();
void onCashPayStopedSuccess(); void onCashPayStopedSuccess();
void onCashPayStopByMax(); void onCashPayStopByMax();
void onCashPayStopByPushbutton();
void onCashPayStopByEscrow(); void onCashPayStopByEscrow();
void onCashPayStopByError(); void onCashPayStopByError();
void onCashPayStopByTimeout(); void onCashPayStopByTimeout();