TEST: try to track currentCashState

... but this is currently useless because we can not detect overpayment
here.
This commit is contained in:
Siegfried Siegert 2023-06-16 15:50:25 +02:00
parent 0baad4689a
commit c4cbf89182
Signed by: SiegfriedSiegert
GPG Key ID: 68371E015E8F0B03
2 changed files with 7 additions and 0 deletions

View File

@ -40,6 +40,7 @@ ATBDeviceControllerPlugin::ATBDeviceControllerPlugin(QObject *parent) : QObject(
this->currentSelectedTicketType = 0; this->currentSelectedTicketType = 0;
this->currentCashState = CASH_STATE::CACHE_EMPTY;
} }
ATBDeviceControllerPlugin::~ATBDeviceControllerPlugin() {} ATBDeviceControllerPlugin::~ATBDeviceControllerPlugin() {}
@ -120,11 +121,13 @@ void ATBDeviceControllerPlugin::requestStopCashInput()
void ATBDeviceControllerPlugin::cashCollect() void ATBDeviceControllerPlugin::cashCollect()
{ {
hw->vend_success(); hw->vend_success();
this->currentCashState = CASH_STATE::CACHE_EMPTY;
} }
void ATBDeviceControllerPlugin::cashAbort() void ATBDeviceControllerPlugin::cashAbort()
{ {
hw->vend_failed(); hw->vend_failed();
this->currentCashState = CASH_STATE::CACHE_EMPTY;
} }
// TASKS: Account ------------------------------------------------------------- // TASKS: Account -------------------------------------------------------------
@ -382,6 +385,8 @@ void ATBDeviceControllerPlugin::onCashGotCoin()
// DEBUG // DEBUG
qCritical() << "ATBDeviceControllerPlugin::onGotCoin()"; qCritical() << "ATBDeviceControllerPlugin::onGotCoin()";
this->currentCashState = CASH_STATE::CACHE_INPUT;
uint32_t amountInt = this->hw->getInsertedAmount(); uint32_t amountInt = this->hw->getInsertedAmount();
QString amountString = QString::number(amountInt); QString amountString = QString::number(amountInt);

View File

@ -127,6 +127,8 @@ private:
quint8 currentSelectedTicketType; quint8 currentSelectedTicketType;
nsDeviceControllerInterface::CASH_STATE currentCashState;
private slots: private slots:
// printer // printer