From 37a7ed33183558581efd23e01cdfd5438cbf6be5 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Fri, 13 Feb 2026 12:33:30 +0100 Subject: [PATCH] m3 fix vthresh --- .../slsDetectorFunctionList.c | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c index 42649e86c..fb13ff0f8 100644 --- a/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c @@ -1772,19 +1772,19 @@ int getThresholdDACs(bool mV, int *retval, char *mess) { if (counterMask & (1 << i)) { if (getDAC(indices[i], mV, &retvals[i], mess) == FAIL) return FAIL; - } - // set retval to first value - if (*retval == -1) { - *retval = retvals[i]; - } - // other values should match the first value - else if (retvals[i] != retvals[0]) { - char *dacNames[] = {DAC_NAMES}; - LOG(logWARNING, - ("Vthreshold mismatch.%s:%d %s:%d\n", dacNames[indices[i]], - retvals[i], dacNames[indices[0]], retvals[0])); - *retval = -1; - return OK; + // set retval to first value + if (*retval == -1) { + *retval = retvals[i]; + } + // other values should match the first value + else if (retvals[i] != retvals[0]) { + char *dacNames[] = {DAC_NAMES}; + LOG(logWARNING, + ("Vthreshold mismatch.%s:%d %s:%d\n", dacNames[indices[i]], + retvals[i], dacNames[indices[0]], retvals[0])); + *retval = -1; + return OK; + } } } if (*retval == -1) {