Compare commits
6 Commits
pu/CoinsNo
...
1.2.1
Author | SHA1 | Date | |
---|---|---|---|
bdb0f9911b
|
|||
c679b489ba
|
|||
1c643c6caf
|
|||
246e23bffd
|
|||
07bb1bde50
|
|||
81a70bf387
|
@@ -439,9 +439,6 @@ void ATBDeviceControllerPlugin::onServiceDoorOpened()
|
||||
|
||||
void ATBDeviceControllerPlugin::onVaultDoorOpened()
|
||||
{
|
||||
// TODO:
|
||||
// - show special screen / message on screen
|
||||
// - create an HealthEvent (-> ISMAS-Event)
|
||||
qCritical() << "ATBDeviceControllerPlugin::onVaultDoorOpened()";
|
||||
|
||||
// ... to detect alarm etc.
|
||||
@@ -452,7 +449,13 @@ void ATBDeviceControllerPlugin::onVaultDoorOpened()
|
||||
// BackgroundTask("ACCOUNT") is finished, if account message is sent to ISMAS!
|
||||
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()
|
||||
@@ -462,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);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -651,6 +659,7 @@ void ATBDeviceControllerPlugin::requestPrintReceipt(const QString & printingStri
|
||||
{
|
||||
QByteArray ba = printingString.toUtf8();
|
||||
hw->prn_switchPower(true);
|
||||
hw->prn_setFonts(8,12,0,0);
|
||||
hw->prn_sendText(&ba);
|
||||
QTimer::singleShot(4000, this, SLOT(onPrinterWaitForPrintingReceipt()));
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -146,6 +149,11 @@ signals:
|
||||
*/
|
||||
void requestModeSERVICE();
|
||||
|
||||
/**
|
||||
* emitted e.g. if vault door is opened
|
||||
*/
|
||||
void requestModeACCOUNT();
|
||||
|
||||
/**
|
||||
* emitted e.g. if doors are closed
|
||||
*/
|
||||
@@ -162,7 +170,10 @@ signals:
|
||||
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,
|
||||
"eu.atb.ptu.plugin.DeviceControllerInterface/1.0.3")
|
||||
"eu.atb.ptu.plugin.DeviceControllerInterface/1.1.1")
|
||||
|
||||
|
||||
namespace nsDeviceControllerInterface {
|
||||
@@ -226,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
|
||||
|
Reference in New Issue
Block a user