mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-13 13:27:14 +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) {
|
if (block) {
|
||||||
int readyForTrigger = 0;
|
int readyForTrigger = 0;
|
||||||
if (!Feb_Control_IsReadyForTrigger(&readyForTrigger)) {
|
if (!Feb_Control_IsReadyForTrigger(&readyForTrigger)) {
|
||||||
LOG(logERROR, ("Could not read FEB_REG_STATUS reg after
|
LOG(logERROR, ("Could not read FEB_REG_STATUS reg after giving "
|
||||||
givign " "trigger!\n")); return 0;
|
"trigger!\n"));
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (!readyForTrigger) {
|
while (!readyForTrigger) {
|
||||||
LOG(logWARNING, ("Not yet ready\n"));
|
LOG(logWARNING, ("Not yet ready\n"));
|
||||||
usleep(100);
|
usleep(100);
|
||||||
if (!Feb_Control_IsReadyForTrigger(&readyForTrigger)) {
|
if (!Feb_Control_IsReadyForTrigger(&readyForTrigger)) {
|
||||||
LOG(logERROR, ("Could not read FEB_REG_STATUS reg
|
LOG(logERROR, ("Could not read FEB_REG_STATUS reg after "
|
||||||
after " "givign trigger!\n")); return 0;
|
"giving trigger!\n"));
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOG(logINFO, ("Ready for trigger!\n"));
|
LOG(logINFO, ("Ready for trigger!\n"));
|
||||||
|
Reference in New Issue
Block a user