mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 12:57:13 +02:00
eiger: block trigger till next wait for trigger and give error if it wasnt ready when trigger sent
This commit is contained in:
@ -1064,16 +1064,18 @@ int Feb_Control_SoftwareTrigger(int block) {
|
||||
if (block) {
|
||||
int readyForTrigger = 0;
|
||||
if (!Feb_Control_IsReadyForTrigger(&readyForTrigger)) {
|
||||
LOG(logERROR, ("Could not read FEB_REG_STATUS reg after
|
||||
givign " "trigger!\n")); return 0;
|
||||
LOG(logERROR, ("Could not read FEB_REG_STATUS reg after giving "
|
||||
"trigger!\n"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
while (!readyForTrigger) {
|
||||
LOG(logWARNING, ("Not yet ready\n"));
|
||||
usleep(100);
|
||||
if (!Feb_Control_IsReadyForTrigger(&readyForTrigger)) {
|
||||
LOG(logERROR, ("Could not read FEB_REG_STATUS reg
|
||||
after " "givign trigger!\n")); return 0;
|
||||
LOG(logERROR, ("Could not read FEB_REG_STATUS reg after "
|
||||
"giving trigger!\n"));
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
LOG(logINFO, ("Ready for trigger!\n"));
|
||||
|
Reference in New Issue
Block a user