-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wait for acquire status #55
Conversation
…StatusAcquire in the dataTask before finishing an acquisition
Thanks. Your PR has unrelated changes in line 904-922 and 1412-1413. Can you revert those changes so only the lines relevant to this PR are changed? |
Can you explain in what way my PR that directly called checkStatus(GetStatus(&value)) did not work? It seems like a simpler fix, since it does not require inter-thread synchronization and communication. |
We tried your suggestion and found that the busy record was still set low before the detector had finished acquiring. We didn't look too much into it and tried this other aproach which did work. |
The other changes were caused by me opening and saving the file while git was configured to fix mixed line endings. I have reverted those changes. |
Solves #54
We couldn't get
checkStatus(GetStatus(&value));
to work and so instead we reverted togetIntegerParam(ADStatus,&acquireStatus);
As was suggested on tech talk we had to unlock and then lock the thread so that the value of acquireStatus could be updated by another thread.
Additionally, because the thread was locked and unlocked it became important to set
setIntegerParam(ADAcquire, 0);
after the while(1) loop and not before it, otherwise (we guess) another thread is callingcallParamCallbacks();
somewhere and prematurely setting ADAcquire.We've tested this with our Andor camera for a few hundred acquisitions. Busy now always goes low after the camera leaves acquiring state. The problem seems to be fixed