From 4de8234478120b13294a21508caff87f9734b33f Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Wed, 9 Jun 2021 15:04:48 +0200 Subject: [PATCH] eiger stop sends last frame, software or firmwarebug --- .../eigerDetectorServer/FebControl.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/slsDetectorServers/eigerDetectorServer/FebControl.c b/slsDetectorServers/eigerDetectorServer/FebControl.c index 71f8816a6..bf2bcc93f 100644 --- a/slsDetectorServers/eigerDetectorServer/FebControl.c +++ b/slsDetectorServers/eigerDetectorServer/FebControl.c @@ -997,19 +997,18 @@ int Feb_Control_StartAcquisition() { } int Feb_Control_StopAcquisition() { - if (!Feb_Control_Reset()) { - return 0; - } if (Feb_Control_activated) { if (!Feb_Interface_WriteRegister(Feb_Control_AddressToAll(), - DAQ_REG_CTRL, DAQ_CTRL_STOP, 0, 0)) { - LOG(logERROR, - ("Trouble stopping acquisition to send complete frames\n")); + DAQ_REG_CTRL, 0, 0, 0) || + !Feb_Interface_WriteRegister(Feb_Control_AddressToAll(), + DAQ_REG_CTRL, DAQ_CTRL_STOP, 0, 0) || + !Feb_Interface_WriteRegister(Feb_Control_AddressToAll(), + DAQ_REG_CTRL, 0, 0, 0)) { + LOG(logERROR, ("Could not reset daq, no response.\n")); return 0; } } - LOG(logINFO, ("Acquisition stop command sent!\n")); - return 1; + return Feb_Control_WaitForFinishedFlag(5000, 0); } int Feb_Control_SoftwareTrigger() {