From 594553434d70350a154047b90ad7a10a6312efd1 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Fri, 1 Oct 2021 14:05:38 +0200 Subject: [PATCH] bugfix moduleid --- .../gotthard2DetectorServer/slsDetectorFunctionList.c | 4 ++-- .../mythen3DetectorServer/slsDetectorFunctionList.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c index 0920aa394..e593b5bae 100644 --- a/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c @@ -288,11 +288,11 @@ u_int32_t getDetectorNumber() { } int getModuleId(int *ret, char *mess) { - return ((bus_r(MOD_ID_REG) & ~MOD_ID_MSK) >> MOD_ID_OFST); + return ((bus_r(MOD_ID_REG) & MOD_ID_MSK) >> MOD_ID_OFST); } void setModuleId(int modid) { - LOG(logINFOBLUE, ("Setting module id in fpga: %d\n", modid)) + LOG(logINFOBLUE, ("Setting module id in fpga: 0x%x\n", modid)) bus_w(MOD_ID_REG, bus_r(MOD_ID_REG) & ~MOD_ID_MSK); bus_w(MOD_ID_REG, bus_r(MOD_ID_REG) | ((modid << MOD_ID_OFST) & MOD_ID_MSK)); } diff --git a/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c index 71b62a216..71e4a9315 100644 --- a/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c @@ -283,11 +283,11 @@ u_int32_t getDetectorNumber() { int getModuleId(int *ret, char *mess) { - return ((bus_r(MOD_ID_REG) & ~MOD_ID_MSK) >> MOD_ID_OFST); + return ((bus_r(MOD_ID_REG) & MOD_ID_MSK) >> MOD_ID_OFST); } void setModuleId(int modid) { - LOG(logINFOBLUE, ("Setting module id in fpga: %d\n", modid)) + LOG(logINFOBLUE, ("Setting module id in fpga: 0x%x\n", modid)) bus_w(MOD_ID_REG, bus_r(MOD_ID_REG) & ~MOD_ID_MSK); bus_w(MOD_ID_REG, bus_r(MOD_ID_REG) | ((modid << MOD_ID_OFST) & MOD_ID_MSK));