From 4a4fbddb79352014aa27ceff9a96c6a8b8d80908 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Mon, 28 Jun 2021 17:07:09 +0200 Subject: [PATCH] wip --- slsDetectorServers/eigerDetectorServer/Beb.c | 15 ++++++++++ .../eigerDetectorServer/FebControl.c | 28 ------------------- 2 files changed, 15 insertions(+), 28 deletions(-) diff --git a/slsDetectorServers/eigerDetectorServer/Beb.c b/slsDetectorServers/eigerDetectorServer/Beb.c index cecadb5cd..6ba9e3d80 100644 --- a/slsDetectorServers/eigerDetectorServer/Beb.c +++ b/slsDetectorServers/eigerDetectorServer/Beb.c @@ -1104,6 +1104,21 @@ int Beb_StopAcquisition() { if (!Beb_activated) return 1; + // wait for detector to send + int isTransmitting = 1; + while (isTransmitting) { + // wait for beb to send out all packets + if (Beb_IsTransmitting(&isTransmitting, send_to_ten_gig, 1) == FAIL) { + strcpy(mess, "Could not read delay counters\n"); + *ret = (int)FAIL; + return; + } + if (isTransmitting) { + printf("Transmitting...\n"); + } + } + LOG(logINFO, ("Detector has sent all data\n")); + u_int32_t *csp0base = 0; volatile u_int32_t valuel, valuer; // open file pointer diff --git a/slsDetectorServers/eigerDetectorServer/FebControl.c b/slsDetectorServers/eigerDetectorServer/FebControl.c index b0a911d9c..f12bffa07 100644 --- a/slsDetectorServers/eigerDetectorServer/FebControl.c +++ b/slsDetectorServers/eigerDetectorServer/FebControl.c @@ -1059,34 +1059,6 @@ int Feb_Control_StopAcquisition() { check_error = 0; } - // wait for detector to send - int isTransmitting = 1; - while (isTransmitting) { - // wait for feb processing to be done - int i = Feb_Control_ProcessingInProgress(); - if (i == STATUS_ERROR) { - strcpy(mess, "Could not read feb processing done register\n"); - *ret = (int)FAIL; - return; - } - if (i == RUNNING) { - LOG(logINFOBLUE, ("Status: TRANSMITTING (feb processing)\n")); - isTransmitting = 1; - } - - // wait for beb to send out all packets - if (Beb_IsTransmitting(&isTransmitting, send_to_ten_gig, 1) == - FAIL) { - strcpy(mess, "Could not read delay counters\n"); - *ret = (int)FAIL; - return; - } - if (isTransmitting) { - printf("Transmitting...\n"); - } - } - LOG(logINFO, ("Detector has sent all data\n")); - // stop acquisition return Feb_Control_Reset(); }