eiger: block trigger till next wait for trigger and give error if it wasnt ready when trigger sent

This commit is contained in:
2021-06-25 16:56:48 +02:00
parent bdfd151a01
commit 1360fbac87

View File

@ -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"));