Add object variable cashStartAmountInt
Used to track proposed change amount.
This commit is contained in:
parent
247abb7520
commit
96db7be126
@ -67,6 +67,8 @@ ATBDeviceControllerPlugin::ATBDeviceControllerPlugin(QObject *parent)
|
|||||||
|
|
||||||
this->currentSelectedTicketType = 0;
|
this->currentSelectedTicketType = 0;
|
||||||
this->currentCashState = CASH_STATE::CACHE_EMPTY;
|
this->currentCashState = CASH_STATE::CACHE_EMPTY;
|
||||||
|
|
||||||
|
this->cashStartAmountInt = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ATBDeviceControllerPlugin::~ATBDeviceControllerPlugin() {}
|
ATBDeviceControllerPlugin::~ATBDeviceControllerPlugin() {}
|
||||||
@ -201,11 +203,11 @@ void ATBDeviceControllerPlugin::requestStartCashInput(const QString & amount)
|
|||||||
{
|
{
|
||||||
qCritical() << "Start Cash vending with amount = " << 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()
|
void ATBDeviceControllerPlugin::requestStopCashInput()
|
||||||
|
@ -111,6 +111,8 @@ private:
|
|||||||
|
|
||||||
DeviceControllerDiag* diag;
|
DeviceControllerDiag* diag;
|
||||||
|
|
||||||
|
uint32_t cashStartAmountInt;
|
||||||
|
|
||||||
|
|
||||||
QTextCodec *codec;
|
QTextCodec *codec;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user