From 130613f73006493da8e453416f079aef94baaf12 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Tue, 15 Jun 2021 11:48:38 +0200 Subject: [PATCH] fix for stopacq --- slsDetectorServers/eigerDetectorServer/FebControl.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/slsDetectorServers/eigerDetectorServer/FebControl.c b/slsDetectorServers/eigerDetectorServer/FebControl.c index bf2bcc93f..fa38438b7 100644 --- a/slsDetectorServers/eigerDetectorServer/FebControl.c +++ b/slsDetectorServers/eigerDetectorServer/FebControl.c @@ -998,17 +998,14 @@ int Feb_Control_StartAcquisition() { int Feb_Control_StopAcquisition() { if (Feb_Control_activated) { + // stop acquisition and also sends last frame if (!Feb_Interface_WriteRegister(Feb_Control_AddressToAll(), - 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")); + DAQ_REG_CTRL, DAQ_CTRL_STOP, 0, 0)) { + LOG(logERROR, ("Could not send last frames.\n")); return 0; } } - return Feb_Control_WaitForFinishedFlag(5000, 0); + return Feb_Control_Reset(); } int Feb_Control_SoftwareTrigger() {