From a6a2a91fea3b7309f7755a712d60dd3f46f5d289 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Thu, 20 May 2021 16:46:10 +0200 Subject: [PATCH] m3 server: refactor --- .../mythen3DetectorServer/slsDetectorFunctionList.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c index c3efc3261..36d820ebb 100644 --- a/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c @@ -937,8 +937,8 @@ void setCounterMask(uint32_t arg) { // if change in enable if ((arg & (1 << i)) ^ (oldmask & (1 << i))) { // will disable if counter disabled, else set corresponding vth dac - enum DACINDEX vth = (i == 0 ? M_VTH1 : (i == 1 ? M_VTH2 : M_VTH3)); - setDAC(vth, vthEnabledVals[i], 0); + enum DACINDEX ind[] = {M_VTH1, M_VTH2, M_VTH3}; + setDAC(ind[i], vthEnabledVals[i], 0); } } }