TEST: try to track currentCashState
... but this is currently useless because we can not detect overpayment here.
This commit is contained in:
parent
0baad4689a
commit
c4cbf89182
@ -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);
|
||||
|
@ -127,6 +127,8 @@ private:
|
||||
|
||||
quint8 currentSelectedTicketType;
|
||||
|
||||
nsDeviceControllerInterface::CASH_STATE currentCashState;
|
||||
|
||||
private slots:
|
||||
// printer
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user