diff --git a/src/ATBAPP/ATBDeviceControllerPlugin.cpp b/src/ATBAPP/ATBDeviceControllerPlugin.cpp index 0c90c6c..46eeba9 100644 --- a/src/ATBAPP/ATBDeviceControllerPlugin.cpp +++ b/src/ATBAPP/ATBDeviceControllerPlugin.cpp @@ -40,6 +40,7 @@ ATBDeviceControllerPlugin::ATBDeviceControllerPlugin(QObject *parent) : QObject( this->currentSelectedTicketType = 0; + this->currentCashState = CASH_STATE::CACHE_EMPTY; } ATBDeviceControllerPlugin::~ATBDeviceControllerPlugin() {} @@ -120,11 +121,13 @@ void ATBDeviceControllerPlugin::requestStopCashInput() void ATBDeviceControllerPlugin::cashCollect() { hw->vend_success(); + this->currentCashState = CASH_STATE::CACHE_EMPTY; } void ATBDeviceControllerPlugin::cashAbort() { hw->vend_failed(); + this->currentCashState = CASH_STATE::CACHE_EMPTY; } // TASKS: Account ------------------------------------------------------------- @@ -382,6 +385,8 @@ void ATBDeviceControllerPlugin::onCashGotCoin() // DEBUG qCritical() << "ATBDeviceControllerPlugin::onGotCoin()"; + this->currentCashState = CASH_STATE::CACHE_INPUT; + uint32_t amountInt = this->hw->getInsertedAmount(); QString amountString = QString::number(amountInt); diff --git a/src/ATBAPP/ATBDeviceControllerPlugin.h b/src/ATBAPP/ATBDeviceControllerPlugin.h index e9be1e8..c48b6cb 100644 --- a/src/ATBAPP/ATBDeviceControllerPlugin.h +++ b/src/ATBAPP/ATBDeviceControllerPlugin.h @@ -127,6 +127,8 @@ private: quint8 currentSelectedTicketType; + nsDeviceControllerInterface::CASH_STATE currentCashState; + private slots: // printer