Add object variable cashStartAmountInt

Used to track proposed change amount.
This commit is contained in:
Siegfried Siegert 2023-11-30 18:16:45 +01:00
parent 247abb7520
commit 96db7be126
Signed by: SiegfriedSiegert
GPG Key ID: 68371E015E8F0B03
2 changed files with 7 additions and 3 deletions

View File

@ -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<uint32_t>(amount.toUInt());
this->cashStartAmountInt = static_cast<uint32_t>(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()

View File

@ -111,6 +111,8 @@ private:
DeviceControllerDiag* diag;
uint32_t cashStartAmountInt;
QTextCodec *codec;