diff --git a/src/ATBAPP/ATBDeviceControllerPlugin.cpp b/src/ATBAPP/ATBDeviceControllerPlugin.cpp index 4819a51..c2f90fb 100644 --- a/src/ATBAPP/ATBDeviceControllerPlugin.cpp +++ b/src/ATBAPP/ATBDeviceControllerPlugin.cpp @@ -450,6 +450,12 @@ void ATBDeviceControllerPlugin::onVaultDoorOpened() this->dbus->startBackgroundTask("DOOR_OPEN"); emit this->requestModeACCOUNT(); + + // send service message, delayed: + QTimer::singleShot(1000, this, [this](){ + emit this->showServiceText(nsDeviceControllerInterface::SERVICE_TEXT::VAULT_DOOR_OPENED, "Please remove coinbox"); + hw->prn_cut(3); + } ); } void ATBDeviceControllerPlugin::onCoinBoxRemoved() @@ -459,12 +465,17 @@ void ATBDeviceControllerPlugin::onCoinBoxRemoved() // BackgroundTask("ACCOUNT") is finished, if account message is sent to ISMAS! this->dbus->startBackgroundTask("ACCOUNT"); + emit this->showServiceText(nsDeviceControllerInterface::SERVICE_TEXT::COIN_BOX_REMOVED, "Please insert coinbox"); + QTimer::singleShot(4000, this, SLOT(private_startAccount())); } void ATBDeviceControllerPlugin::onCoinBoxInserted() { qCritical() << "ATBDeviceControllerPlugin::onCoinBoxInserted()"; + + emit this->showServiceText(nsDeviceControllerInterface::SERVICE_TEXT::COIN_BOX_INSERTED, "Please close vault door"); + // emit this->showServiceText(0x1234); } /** diff --git a/src/ATBAPP/DeviceControllerInterface.h b/src/ATBAPP/DeviceControllerInterface.h index 249e1b3..4026051 100644 --- a/src/ATBAPP/DeviceControllerInterface.h +++ b/src/ATBAPP/DeviceControllerInterface.h @@ -15,6 +15,9 @@ namespace nsDeviceControllerInterface { enum class TICKET_VARIANT : quint8; enum class COIN_PROCESSOR : quint8; enum class BILL_ACCEPTOR : quint8; + + + enum class SERVICE_TEXT : quint16; } @@ -170,8 +173,7 @@ signals: /** * show text messages in service mode */ - void showServiceText(const QString & text); - void showServiceText(quint16 textNumber); + void showServiceText(nsDeviceControllerInterface::SERVICE_TEXT serviceText, const QString & text); /** @@ -191,7 +193,7 @@ signals: Q_DECLARE_INTERFACE(DeviceControllerInterface, - "eu.atb.ptu.plugin.DeviceControllerInterface/1.1.0") + "eu.atb.ptu.plugin.DeviceControllerInterface/1.1.1") namespace nsDeviceControllerInterface { @@ -235,6 +237,14 @@ namespace nsDeviceControllerInterface { YES, NO }; + + enum class SERVICE_TEXT : quint16 { + SERVICE_DOOR_OPENED, + VAULT_DOOR_OPENED, + COIN_BOX_REMOVED, + COIN_BOX_INSERTED + /* t.b.d. */ + }; } #endif // DEVICECONTROLLERINTERFACE_H