diff --git a/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer b/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer index e0f737703..18f6c9b22 100755 Binary files a/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer and b/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer differ diff --git a/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c index a71cbde0b..519e40475 100644 --- a/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c @@ -2670,7 +2670,28 @@ enum vetoAlgorithm getVetoAlgorithm(enum ethernetInterface interface) { } void setVetoAlgorithm(enum ethernetInterface interface, - enum vetoAlgorithm alg) {} + enum vetoAlgorithm alg) { + uint32_t addr = CONFIG_REG; + uint32_t value = bus_r(addr); + switch (alg) { + // more to follow + case DEFAULT_ALGORITHM: + if (interface == I3GBE) { + LOG(logINFO, ("Setting default veto algorithm for 3Gbe\n")); + value &= (~CONFIG_VETO_CH_3GB_ALG_MSK); + value |= CONFIG_VETO_CH_3GB_ALG_DEFAULT_VAL; + } else { + LOG(logINFO, ("Setting default veto algorithm for 10Gbe\n")); + value &= (~CONFIG_VETO_CH_10GB_ALG_MSK); + value |= CONFIG_VETO_CH_10GB_ALG_DEFAULT_VAL; + } + break; + default: + LOG(logERROR, ("unknown algorithm %d for 3gbe\n", alg)); + return; + } + bus_w(addr, value); +} void setBadChannels(int nch, int *channels) { LOG(logINFO, ("Setting %d bad channels\n", nch)); diff --git a/slsSupportLib/include/sls/versionAPI.h b/slsSupportLib/include/sls/versionAPI.h index fbf82c419..4299573fd 100644 --- a/slsSupportLib/include/sls/versionAPI.h +++ b/slsSupportLib/include/sls/versionAPI.h @@ -5,8 +5,8 @@ #define APIGUI 0x210225 #define APICTB 0x210729 #define APIGOTTHARD 0x210729 -#define APIGOTTHARD2 0x210729 #define APIMYTHEN3 0x210729 #define APIMOENCH 0x210729 #define APIEIGER 0x210729 #define APIJUNGFRAU 0x210802 +#define APIGOTTHARD2 0x210806