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

@ -42,6 +42,7 @@ ATBDeviceControllerPlugin::ATBDeviceControllerPlugin(QObject *parent)
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_payStopByPushbutton()), this, SLOT(onCashPayStopByPushbutton()), Qt::QueuedConnection);
connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_payStopByEscrow()), this, SLOT(onCashPayStopByEscrow()), 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);
@ -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()
{
@ -917,7 +927,7 @@ void ATBDeviceControllerPlugin::onCashPayStopByTimeout()
void ATBDeviceControllerPlugin::onCashPayStopedSuccess()
{
// DEBUG
qCritical() << "ATBDeviceControllerPlugin::onCashPayStoped()";
qCritical() << "ATBDeviceControllerPlugin::onCashPayStopedSuccess()";
uint32_t amountInt = this->hw->getInsertedAmount();

View File

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