Send cashInputFinished(), when cash input is finished

This commit is contained in:
Siegfried Siegert 2023-06-05 18:04:34 +02:00
parent 2717c614e3
commit 98ef7b7b26
Signed by: SiegfriedSiegert
GPG Key ID: 68371E015E8F0B03
2 changed files with 19 additions and 0 deletions

View File

@ -75,6 +75,9 @@ void ATBDeviceControllerPlugin::requestStartCashInput(const QString & amount)
void ATBDeviceControllerPlugin::requestStopCashInput()
{
hw->cash_stopPayment();
// we need new cash value in application...
QTimer::singleShot(500, this, SLOT(onCashPayStoped()));
}
void ATBDeviceControllerPlugin::cashCollect()
@ -322,6 +325,21 @@ void ATBDeviceControllerPlugin::onCashPayStopByTimeout()
"");
}
void ATBDeviceControllerPlugin::onCashPayStoped()
{
// DEBUG
qCritical() << "ATBDeviceControllerPlugin::onCashPayStoped()";
uint32_t amountInt = this->hw->getInsertedAmount();
QString amountString = QString::number(amountInt);
emit this->cashInputFinished(nsDeviceControllerInterface::RESULT_STATE::SUCCESS,
amountString,
"",
"");
}
bool ATBDeviceControllerPlugin::private_loadCashAgentLib(QString pluginName)
{

View File

@ -127,6 +127,7 @@ private slots:
// cash payment
void onCashGotCoin();
void onCashPayStoped();
void onCashPayStopByMax();
void onCashPayStopByEscrow();
void onCashPayStopByError();