diff --git a/src/ATBAPP/ATBDeviceControllerPlugin.cpp b/src/ATBAPP/ATBDeviceControllerPlugin.cpp index 76ecb26..156a4f3 100644 --- a/src/ATBAPP/ATBDeviceControllerPlugin.cpp +++ b/src/ATBAPP/ATBDeviceControllerPlugin.cpp @@ -67,6 +67,8 @@ ATBDeviceControllerPlugin::ATBDeviceControllerPlugin(QObject *parent) this->currentSelectedTicketType = 0; this->currentCashState = CASH_STATE::CACHE_EMPTY; + + this->cashStartAmountInt = 0; } ATBDeviceControllerPlugin::~ATBDeviceControllerPlugin() {} @@ -201,11 +203,11 @@ void ATBDeviceControllerPlugin::requestStartCashInput(const QString & amount) { qCritical() << "Start Cash vending with amount = " << amount; - uint32_t amountInt = static_cast(amount.toUInt()); + this->cashStartAmountInt = static_cast(amount.toUInt()); - if (amountInt == 0) amountInt = UINT_MAX; + if (this->cashStartAmountInt == 0) this->cashStartAmountInt = UINT_MAX; - hw->cash_startPayment(amountInt); + hw->cash_startPayment(this->cashStartAmountInt); } void ATBDeviceControllerPlugin::requestStopCashInput() diff --git a/src/ATBAPP/ATBDeviceControllerPlugin.h b/src/ATBAPP/ATBDeviceControllerPlugin.h index b07e209..9c1a0cc 100644 --- a/src/ATBAPP/ATBDeviceControllerPlugin.h +++ b/src/ATBAPP/ATBDeviceControllerPlugin.h @@ -111,6 +111,8 @@ private: DeviceControllerDiag* diag; + uint32_t cashStartAmountInt; + QTextCodec *codec;