This commit is contained in:
2021-06-04 12:30:59 +02:00
parent 215454d7cc
commit 0afe093afc
12 changed files with 186 additions and 93 deletions

View File

@ -998,7 +998,7 @@ int Feb_Control_StartAcquisition() {
int Feb_Control_StopAcquisition() { return Feb_Control_Reset(); }
int Feb_Control_SoftwareTrigger() {
int Feb_Control_SoftwareTrigger(int block) {
if (Feb_Control_activated) {
// read exp toggle value
unsigned int value = 0;
@ -1063,10 +1063,12 @@ int Feb_Control_SoftwareTrigger() {
}
// wait for toggle for exposure to be done
while (toggle == prev_toggle) {
usleep(5000);
toggle = ((value & FEB_REG_STATUS_EXP_TGL_MSK) >>
FEB_REG_STATUS_EXP_TGL_OFST);
if (block) {
while (toggle == prev_toggle) {
usleep(5000);
toggle = ((value & FEB_REG_STATUS_EXP_TGL_MSK) >>
FEB_REG_STATUS_EXP_TGL_OFST);
}
}
}
return 1;

View File

@ -55,7 +55,7 @@ int Feb_Control_PrepareForAcquisition();
void Feb_Control_PrintAcquisitionSetup();
int Feb_Control_StartAcquisition();
int Feb_Control_StopAcquisition();
int Feb_Control_SoftwareTrigger();
int Feb_Control_SoftwareTrigger(int block);
// parameters
int Feb_Control_SetDynamicRange(unsigned int four_eight_sixteen_or_thirtytwo);

View File

@ -2404,12 +2404,12 @@ int stopStateMachine() {
#endif
}
int softwareTrigger() {
int softwareTrigger(int block) {
#ifdef VIRTUAL
return OK;
#else
sharedMemory_lockLocalLink();
if (!Feb_Control_SoftwareTrigger()) {
if (!Feb_Control_SoftwareTrigger(block)) {
sharedMemory_unlockLocalLink();
return FAIL;
}