Compare commits

...

2 Commits

View File

@@ -362,7 +362,7 @@ void ATBDeviceControllerPlugin::onVaultDoorOpened()
// this is started here because we want to keep ptu awake in order to get // this is started here because we want to keep ptu awake in order to get
// coin box removed / inserted etc. // coin box removed / inserted etc.
// 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("DOOR_OPEN");
// do not: emit this->requestModeSERVICE(); // do not: emit this->requestModeSERVICE();
} }
@@ -371,6 +371,9 @@ void ATBDeviceControllerPlugin::onCoinBoxRemoved()
{ {
qCritical() << "ATBDeviceControllerPlugin::onCoinBoxRemoved()"; qCritical() << "ATBDeviceControllerPlugin::onCoinBoxRemoved()";
// BackgroundTask("ACCOUNT") is finished, if account message is sent to ISMAS!
this->dbus->startBackgroundTask("ACCOUNT");
QTimer::singleShot(4000, this, SLOT(private_startAccount())); QTimer::singleShot(4000, this, SLOT(private_startAccount()));
} }
@@ -379,19 +382,31 @@ void ATBDeviceControllerPlugin::onCoinBoxInserted()
qCritical() << "ATBDeviceControllerPlugin::onCoinBoxInserted()"; qCritical() << "ATBDeviceControllerPlugin::onCoinBoxInserted()";
} }
/**
* This is called, when all CoinBox is inserted and all doors
* are closed.
*/
void ATBDeviceControllerPlugin::onCBinAndAllDoorsClosed() void ATBDeviceControllerPlugin::onCBinAndAllDoorsClosed()
{ {
qCritical() << "ATBDeviceControllerPlugin::onCBinAndAllDoorsClosed()"; qCritical() << "ATBDeviceControllerPlugin::onCBinAndAllDoorsClosed()";
QTimer::singleShot(2000, this, SIGNAL(requestModeIDLE())); QTimer::singleShot(2000, this, SIGNAL(requestModeIDLE()));
this->dbus->finishedBackgroundTask("DOOR_OPEN");
} }
/**
* This is called, when all no coinbox is inserted and all doors are
* closed.
*/
void ATBDeviceControllerPlugin::onAllDoorsClosed() void ATBDeviceControllerPlugin::onAllDoorsClosed()
{ {
qCritical() << "ATBDeviceControllerPlugin::onAllDoorsClosed()"; qCritical() << "ATBDeviceControllerPlugin::onAllDoorsClosed()";
emit this->requestModeIDLE(); emit this->requestModeIDLE();
this->dbus->finishedBackgroundTask("DOOR_OPEN");
// TODO: check for errors and create a machine event
} }
void ATBDeviceControllerPlugin::onNewVoltage(uint32_t voltage) void ATBDeviceControllerPlugin::onNewVoltage(uint32_t voltage)