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->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);
|
||||||
|
@ -127,6 +127,8 @@ private:
|
|||||||
|
|
||||||
quint8 currentSelectedTicketType;
|
quint8 currentSelectedTicketType;
|
||||||
|
|
||||||
|
nsDeviceControllerInterface::CASH_STATE currentCashState;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
// printer
|
// printer
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user