mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-23 15:00:02 +02:00
wip
This commit is contained in:
parent
04a0a475ad
commit
60d726b379
@ -1024,7 +1024,8 @@ int Feb_Control_StartAcquisition() {
|
|||||||
|
|
||||||
int Feb_Control_StopAcquisition() {
|
int Feb_Control_StopAcquisition() {
|
||||||
if (Feb_Control_activated) {
|
if (Feb_Control_activated) {
|
||||||
// sends last
|
|
||||||
|
// sends last frames from fifo
|
||||||
unsigned int orig_value = 0;
|
unsigned int orig_value = 0;
|
||||||
if (!Feb_Interface_ReadRegister(Feb_Control_AddressToAll(),
|
if (!Feb_Interface_ReadRegister(Feb_Control_AddressToAll(),
|
||||||
DAQ_REG_CTRL, &orig_value)) {
|
DAQ_REG_CTRL, &orig_value)) {
|
||||||
@ -1058,10 +1059,7 @@ int Feb_Control_StopAcquisition() {
|
|||||||
else
|
else
|
||||||
check_error = 0;
|
check_error = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// stop acquisition
|
|
||||||
return 0;
|
return 0;
|
||||||
// return Feb_Control_Reset();
|
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -2388,13 +2388,15 @@ int stopStateMachine() {
|
|||||||
return OK;
|
return OK;
|
||||||
#else
|
#else
|
||||||
sharedMemory_lockLocalLink();
|
sharedMemory_lockLocalLink();
|
||||||
|
// sends last frames from fifo and wait for feb processing done
|
||||||
if ((Feb_Control_StopAcquisition() != STATUS_IDLE)) {
|
if ((Feb_Control_StopAcquisition() != STATUS_IDLE)) {
|
||||||
LOG(logERROR, ("failed to stop acquisition\n"));
|
LOG(logERROR, ("failed to stop acquisition\n"));
|
||||||
sharedMemory_unlockLocalLink();
|
sharedMemory_unlockLocalLink();
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
|
sharedMemory_unlockLocalLink();
|
||||||
|
|
||||||
// wait for detector to send
|
// wait for beb to finish sending packets
|
||||||
int isTransmitting = 1;
|
int isTransmitting = 1;
|
||||||
while (isTransmitting) {
|
while (isTransmitting) {
|
||||||
// wait for beb to send out all packets
|
// wait for beb to send out all packets
|
||||||
@ -2407,16 +2409,16 @@ int stopStateMachine() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOG(logINFO, ("Detector has sent all data\n"));
|
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()) {
|
if (!Beb_StopAcquisition()) {
|
||||||
LOG(logERROR, ("failed to stop acquisition\n"));
|
LOG(logERROR, ("failed to stop acquisition\n"));
|
||||||
sharedMemory_unlockLocalLink();
|
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
sharedMemory_unlockLocalLink();
|
|
||||||
|
|
||||||
// ensure all have same starting frame numbers
|
// ensure all have same starting frame numbers
|
||||||
uint64_t retval = 0;
|
uint64_t retval = 0;
|
||||||
if (Beb_GetNextFrameNumber(&retval, send_to_ten_gig) == -2) {
|
if (Beb_GetNextFrameNumber(&retval, send_to_ten_gig) == -2) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user