Update DeviceControllerInterface to 1.1.1

This commit is contained in:
Siegfried Siegert 2023-12-22 09:26:13 +01:00
parent 246e23bffd
commit 1c643c6caf
Signed by: SiegfriedSiegert
GPG Key ID: 68371E015E8F0B03
2 changed files with 24 additions and 3 deletions

View File

@ -450,6 +450,12 @@ void ATBDeviceControllerPlugin::onVaultDoorOpened()
this->dbus->startBackgroundTask("DOOR_OPEN"); this->dbus->startBackgroundTask("DOOR_OPEN");
emit this->requestModeACCOUNT(); 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() void ATBDeviceControllerPlugin::onCoinBoxRemoved()
@ -459,12 +465,17 @@ void ATBDeviceControllerPlugin::onCoinBoxRemoved()
// BackgroundTask("ACCOUNT") is finished, if account message is sent to ISMAS! // BackgroundTask("ACCOUNT") is finished, if account message is sent to ISMAS!
this->dbus->startBackgroundTask("ACCOUNT"); this->dbus->startBackgroundTask("ACCOUNT");
emit this->showServiceText(nsDeviceControllerInterface::SERVICE_TEXT::COIN_BOX_REMOVED, "Please insert coinbox");
QTimer::singleShot(4000, this, SLOT(private_startAccount())); QTimer::singleShot(4000, this, SLOT(private_startAccount()));
} }
void ATBDeviceControllerPlugin::onCoinBoxInserted() void ATBDeviceControllerPlugin::onCoinBoxInserted()
{ {
qCritical() << "ATBDeviceControllerPlugin::onCoinBoxInserted()"; qCritical() << "ATBDeviceControllerPlugin::onCoinBoxInserted()";
emit this->showServiceText(nsDeviceControllerInterface::SERVICE_TEXT::COIN_BOX_INSERTED, "Please close vault door");
// emit this->showServiceText(0x1234);
} }
/** /**

View File

@ -15,6 +15,9 @@ namespace nsDeviceControllerInterface {
enum class TICKET_VARIANT : quint8; enum class TICKET_VARIANT : quint8;
enum class COIN_PROCESSOR : quint8; enum class COIN_PROCESSOR : quint8;
enum class BILL_ACCEPTOR : quint8; enum class BILL_ACCEPTOR : quint8;
enum class SERVICE_TEXT : quint16;
} }
@ -170,8 +173,7 @@ signals:
/** /**
* show text messages in service mode * show text messages in service mode
*/ */
void showServiceText(const QString & text); void showServiceText(nsDeviceControllerInterface::SERVICE_TEXT serviceText, const QString & text);
void showServiceText(quint16 textNumber);
/** /**
@ -191,7 +193,7 @@ signals:
Q_DECLARE_INTERFACE(DeviceControllerInterface, Q_DECLARE_INTERFACE(DeviceControllerInterface,
"eu.atb.ptu.plugin.DeviceControllerInterface/1.1.0") "eu.atb.ptu.plugin.DeviceControllerInterface/1.1.1")
namespace nsDeviceControllerInterface { namespace nsDeviceControllerInterface {
@ -235,6 +237,14 @@ namespace nsDeviceControllerInterface {
YES, YES,
NO NO
}; };
enum class SERVICE_TEXT : quint16 {
SERVICE_DOOR_OPENED,
VAULT_DOOR_OPENED,
COIN_BOX_REMOVED,
COIN_BOX_INSERTED
/* t.b.d. */
};
} }
#endif // DEVICECONTROLLERINTERFACE_H #endif // DEVICECONTROLLERINTERFACE_H