This commit is contained in:
maliakal_d 2021-06-28 17:36:38 +02:00
parent 04a0a475ad
commit 60d726b379
2 changed files with 9 additions and 9 deletions

View File

@ -1024,7 +1024,8 @@ int Feb_Control_StartAcquisition() {
int Feb_Control_StopAcquisition() {
if (Feb_Control_activated) {
// sends last
// sends last frames from fifo
unsigned int orig_value = 0;
if (!Feb_Interface_ReadRegister(Feb_Control_AddressToAll(),
DAQ_REG_CTRL, &orig_value)) {
@ -1058,10 +1059,7 @@ int Feb_Control_StopAcquisition() {
else
check_error = 0;
}
// stop acquisition
return 0;
// return Feb_Control_Reset();
}
return 1;
}

View File

@ -2388,13 +2388,15 @@ int stopStateMachine() {
return OK;
#else
sharedMemory_lockLocalLink();
// sends last frames from fifo and wait for feb processing done
if ((Feb_Control_StopAcquisition() != STATUS_IDLE)) {
LOG(logERROR, ("failed to stop acquisition\n"));
sharedMemory_unlockLocalLink();
return FAIL;
}
sharedMemory_unlockLocalLink();
// wait for detector to send
// wait for beb to finish sending packets
int isTransmitting = 1;
while (isTransmitting) {
// wait for beb to send out all packets
@ -2407,16 +2409,16 @@ int stopStateMachine() {
}
}
LOG(logINFO, ("Detector has sent all data\n"));
Feb_Control_Reset();
// reset feb and beb
sharedMemory_lockLocalLink();
Feb_Control_Reset();
sharedMemory_unlockLocalLink();
if (!Beb_StopAcquisition()) {
LOG(logERROR, ("failed to stop acquisition\n"));
sharedMemory_unlockLocalLink();
return FAIL;
}
sharedMemory_unlockLocalLink();
// ensure all have same starting frame numbers
uint64_t retval = 0;
if (Beb_GetNextFrameNumber(&retval, send_to_ten_gig) == -2) {