Use new background task "DOOR_OPENED" while a door is open
This commit is contained in:
		@@ -362,6 +362,7 @@ void ATBDeviceControllerPlugin::onVaultDoorOpened()
 | 
			
		||||
    // this is started here because we want to keep ptu awake in order to get
 | 
			
		||||
    // coin box removed / inserted etc.
 | 
			
		||||
    // BackgroundTask("ACCOUNT") is finished, if account message is sent to ISMAS!
 | 
			
		||||
    this->dbus->startBackgroundTask("DOOR_OPEN");
 | 
			
		||||
 | 
			
		||||
    // do not: emit this->requestModeSERVICE();
 | 
			
		||||
}
 | 
			
		||||
@@ -381,19 +382,31 @@ void ATBDeviceControllerPlugin::onCoinBoxInserted()
 | 
			
		||||
    qCritical() << "ATBDeviceControllerPlugin::onCoinBoxInserted()";
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * This is called, when all CoinBox is inserted and all doors
 | 
			
		||||
 * are closed.
 | 
			
		||||
 */
 | 
			
		||||
void ATBDeviceControllerPlugin::onCBinAndAllDoorsClosed()
 | 
			
		||||
{
 | 
			
		||||
    qCritical() << "ATBDeviceControllerPlugin::onCBinAndAllDoorsClosed()";
 | 
			
		||||
 | 
			
		||||
    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()
 | 
			
		||||
{
 | 
			
		||||
    qCritical() << "ATBDeviceControllerPlugin::onAllDoorsClosed()";
 | 
			
		||||
 | 
			
		||||
    emit this->requestModeIDLE();
 | 
			
		||||
    this->dbus->finishedBackgroundTask("DOOR_OPEN");
 | 
			
		||||
 | 
			
		||||
    // TODO: check for errors and create a machine event
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void ATBDeviceControllerPlugin::onNewVoltage(uint32_t voltage)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user