Skip to content
Snippets Groups Projects
Commit 31c70294 authored by Martin Christoph Hierholzer's avatar Martin Christoph Hierholzer
Browse files

wip #47: do not block until device gets openend if application is not yet in running state

parent f0cefd10
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,11 @@ namespace ChimeraTK {
while(true) {
try {
if(!deviceModule.device.isOpened()) {
if(Application::getInstance().getLifeCycleState() != LifeCycleState::run) {
// If the application has not yet fully started, we cannot wait for the device to open. Instead just do
// nothing, since the transfer will later be repeated by the DeviceModule.
return false;
}
setOwnerValidityFunction(DataValidity::faulty);
Application::getInstance().testableModeUnlock("waitForDeviceOpen");
boost::this_thread::sleep(boost::posix_time::millisec(DeviceOpenTimeout));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment