Compare commits
5 Commits
pu/CoinsNo
...
1.2.0
Author | SHA1 | Date | |
---|---|---|---|
c679b489ba
|
|||
1c643c6caf
|
|||
246e23bffd
|
|||
07bb1bde50
|
|||
81a70bf387
|
@@ -439,9 +439,6 @@ void ATBDeviceControllerPlugin::onServiceDoorOpened()
|
|||||||
|
|
||||||
void ATBDeviceControllerPlugin::onVaultDoorOpened()
|
void ATBDeviceControllerPlugin::onVaultDoorOpened()
|
||||||
{
|
{
|
||||||
// TODO:
|
|
||||||
// - show special screen / message on screen
|
|
||||||
// - create an HealthEvent (-> ISMAS-Event)
|
|
||||||
qCritical() << "ATBDeviceControllerPlugin::onVaultDoorOpened()";
|
qCritical() << "ATBDeviceControllerPlugin::onVaultDoorOpened()";
|
||||||
|
|
||||||
// ... to detect alarm etc.
|
// ... to detect alarm etc.
|
||||||
@@ -452,7 +449,13 @@ void ATBDeviceControllerPlugin::onVaultDoorOpened()
|
|||||||
// 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("DOOR_OPEN");
|
this->dbus->startBackgroundTask("DOOR_OPEN");
|
||||||
|
|
||||||
// do not: emit this->requestModeSERVICE();
|
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()
|
||||||
@@ -462,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -146,6 +149,11 @@ signals:
|
|||||||
*/
|
*/
|
||||||
void requestModeSERVICE();
|
void requestModeSERVICE();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* emitted e.g. if vault door is opened
|
||||||
|
*/
|
||||||
|
void requestModeACCOUNT();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* emitted e.g. if doors are closed
|
* emitted e.g. if doors are closed
|
||||||
*/
|
*/
|
||||||
@@ -162,7 +170,10 @@ signals:
|
|||||||
void requestAccountResponse(const QHash<QString, QVariant> & accountData);
|
void requestAccountResponse(const QHash<QString, QVariant> & accountData);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* show text messages in service mode
|
||||||
|
*/
|
||||||
|
void showServiceText(nsDeviceControllerInterface::SERVICE_TEXT serviceText, const QString & text);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -182,7 +193,7 @@ signals:
|
|||||||
|
|
||||||
|
|
||||||
Q_DECLARE_INTERFACE(DeviceControllerInterface,
|
Q_DECLARE_INTERFACE(DeviceControllerInterface,
|
||||||
"eu.atb.ptu.plugin.DeviceControllerInterface/1.0.3")
|
"eu.atb.ptu.plugin.DeviceControllerInterface/1.1.1")
|
||||||
|
|
||||||
|
|
||||||
namespace nsDeviceControllerInterface {
|
namespace nsDeviceControllerInterface {
|
||||||
@@ -226,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
|
||||||
|
Reference in New Issue
Block a user