diff --git a/python/scripts/test_virtual.py b/python/scripts/test_virtual.py index eec0da90b..2024194ac 100644 --- a/python/scripts/test_virtual.py +++ b/python/scripts/test_virtual.py @@ -161,7 +161,7 @@ def test_gainmode(virtual_jf_detectors): assert d.gainMode == gainMode.NORMAL_GAIN_MODE gain_list = [ - gainMode.DYNAMIC_GAIN_MODE, + gainMode.DYNAMIC, gainMode.FORCE_SWITCH_G1, gainMode.FORCE_SWITCH_G2, gainMode.FIX_G1, @@ -176,7 +176,7 @@ def test_gainmode(virtual_jf_detectors): d.setGainMode(gainMode.FORCE_SWITCH_G1, [1]) assert d.gainMode == [ - gainMode.DYNAMIC_GAIN_MODE, + gainMode.DYNAMIC, gainMode.FORCE_SWITCH_G1, gainMode.FORCE_SWITCH_G2, gainMode.FIX_G1, diff --git a/python/slsdet/detector.py b/python/slsdet/detector.py index 21cea81f6..a2a7ff92e 100755 --- a/python/slsdet/detector.py +++ b/python/slsdet/detector.py @@ -2201,7 +2201,7 @@ class Detector(CppDetectorApi): [Jungfrau] Detector gain mode. Enum: gainMode Note ----- - [Jungfrau] DYNAMIC_GAIN_MODE, FORCE_SWITCH_G1, FORCE_SWITCH_G2, FIX_G1, FIX_G2, FIX_G0 \n + [Jungfrau] DYNAMIC, FORCE_SWITCH_G1, FORCE_SWITCH_G2, FIX_G1, FIX_G2, FIX_G0 \n CAUTION: Do not use FIX_G0 without caution, you can damage the detector!!! """ return element_if_equal(self.getGainMode()) diff --git a/python/src/enums.cpp b/python/src/enums.cpp index 7519382fc..2aada8f5c 100644 --- a/python/src/enums.cpp +++ b/python/src/enums.cpp @@ -308,7 +308,7 @@ void init_enums(py::module &m) { .export_values(); py::enum_(Defs, "gainMode") - .value("DYNAMIC_GAIN_MODE", slsDetectorDefs::gainMode::DYNAMIC_GAIN_MODE) + .value("DYNAMIC", slsDetectorDefs::gainMode::DYNAMIC) .value("FORCE_SWITCH_G1", slsDetectorDefs::gainMode::FORCE_SWITCH_G1) .value("FORCE_SWITCH_G2", slsDetectorDefs::gainMode::FORCE_SWITCH_G2) .value("FIX_G1", slsDetectorDefs::gainMode::FIX_G1) diff --git a/slsDetectorGui/include/qTabSettings.h b/slsDetectorGui/include/qTabSettings.h index 927cd8436..d4ec2f73a 100644 --- a/slsDetectorGui/include/qTabSettings.h +++ b/slsDetectorGui/include/qTabSettings.h @@ -65,7 +65,7 @@ class qTabSettings : public QWidget, private Ui::TabSettingsObject { }; enum { - DYNAMIC_GAIN_MODE, + DYNAMIC, FORCE_SWITCH_G1, FORCE_SWITCH_G2, FIX_G1, diff --git a/slsDetectorGui/src/qTabSettings.cpp b/slsDetectorGui/src/qTabSettings.cpp index 0181667b7..677b1864b 100644 --- a/slsDetectorGui/src/qTabSettings.cpp +++ b/slsDetectorGui/src/qTabSettings.cpp @@ -132,7 +132,7 @@ void qTabSettings::SetupDetectorSettings() { } void qTabSettings::SetupGainMode() { - comboGainMode->setCurrentIndex(DYNAMIC_GAIN_MODE); + comboGainMode->setCurrentIndex(DYNAMIC); ShowFixG0(false); } diff --git a/slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServer_developer b/slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServer_developer index cf37c6c0b..5364ec97a 100755 Binary files a/slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServer_developer and b/slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServer_developer differ diff --git a/slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServer_developer b/slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServer_developer index 278325de2..a74969c73 100755 Binary files a/slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServer_developer and b/slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServer_developer differ diff --git a/slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServer_developer b/slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServer_developer index 01a1df9f1..e35777fe0 100755 Binary files a/slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServer_developer and b/slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServer_developer differ diff --git a/slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServer_developer b/slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServer_developer index 4d3b92cd9..882e39371 100755 Binary files a/slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServer_developer and b/slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServer_developer differ diff --git a/slsDetectorServers/jungfrauDetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/jungfrauDetectorServer/slsDetectorFunctionList.c index 999b04036..48f52bf79 100644 --- a/slsDetectorServers/jungfrauDetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/jungfrauDetectorServer/slsDetectorFunctionList.c @@ -1105,7 +1105,7 @@ enum gainMode getGainMode() { // dynamic gain, when nothing is set if (retval_force == 0 && retval_fix == 0 && retval_cmp_rst == 0) { - return DYNAMIC_GAIN_MODE; + return DYNAMIC; } switch (retval_force) { @@ -1139,7 +1139,7 @@ void setGainMode(enum gainMode mode) { uint32_t value = bus_r(addr); switch (mode) { - case DYNAMIC_GAIN_MODE: + case DYNAMIC: value &= ~(DAQ_GAIN_MODE_MASK); bus_w(addr, value); LOG(logINFO, diff --git a/slsDetectorServers/jungfrauDetectorServer/slsDetectorServer_defs.h b/slsDetectorServers/jungfrauDetectorServer/slsDetectorServer_defs.h index 4742c19fe..ab259a837 100644 --- a/slsDetectorServers/jungfrauDetectorServer/slsDetectorServer_defs.h +++ b/slsDetectorServers/jungfrauDetectorServer/slsDetectorServer_defs.h @@ -98,7 +98,7 @@ enum CLKINDEX { RUN_CLK, ADC_CLK, DBIT_CLK, NUM_CLOCKS }; #define DEFAULT_HIGH_VOLTAGE (0) #define DEFAULT_TIMING_MODE (AUTO_TIMING) #define DEFAULT_SETTINGS (GAIN0) -#define DEFAULT_GAINMODE (DYNAMIC_GAIN_MODE) +#define DEFAULT_GAINMODE (DYNAMIC) #define DEFAULT_TX_UDP_PORT (0x7e9a) #define DEFAULT_TMP_THRSHLD (65 * 1000) // milli degree Celsius #define DEFAULT_NUM_STRG_CLLS (0) diff --git a/slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServer_developer b/slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServer_developer index 3544925a7..33208adf1 100755 Binary files a/slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServer_developer and b/slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServer_developer differ diff --git a/slsDetectorServers/slsDetectorServer/src/slsDetectorServer_funcs.c b/slsDetectorServers/slsDetectorServer/src/slsDetectorServer_funcs.c index 04e49c691..8a8740b1e 100644 --- a/slsDetectorServers/slsDetectorServer/src/slsDetectorServer_funcs.c +++ b/slsDetectorServers/slsDetectorServer/src/slsDetectorServer_funcs.c @@ -8589,7 +8589,7 @@ int set_default_dac(int file_des) { int get_gain_mode(int file_des) { ret = OK; memset(mess, 0, sizeof(mess)); - enum gainMode retval = DYNAMIC_GAIN_MODE; + enum gainMode retval = DYNAMIC; LOG(logDEBUG1, ("Getting gain mode\n")); #ifndef JUNGFRAUD @@ -8622,7 +8622,7 @@ int set_gain_mode(int file_des) { // only set if (Server_VerifyLock() == OK) { switch (gainmode) { - case DYNAMIC_GAIN_MODE: + case DYNAMIC: case FORCE_SWITCH_G1: case FORCE_SWITCH_G2: case FIX_G1: diff --git a/slsDetectorSoftware/include/sls/Detector.h b/slsDetectorSoftware/include/sls/Detector.h index 4b619b777..65a83ad7b 100644 --- a/slsDetectorSoftware/include/sls/Detector.h +++ b/slsDetectorSoftware/include/sls/Detector.h @@ -1193,7 +1193,7 @@ class Detector { /** [Jungfrau]*/ Result getGainMode(Positions pos = {}) const; - /** [Jungfrau] Options: DYNAMIC_GAIN_MODE, FORCE_SWITCH_G1, FORCE_SWITCH_G2, + /** [Jungfrau] Options: DYNAMIC, FORCE_SWITCH_G1, FORCE_SWITCH_G2, * FIX_G1, FIX_G2, FIX_G0 \n\CAUTION: Do not use FIX_G0 without caution, you * can damage the detector!!!\n */ diff --git a/slsDetectorSoftware/src/Detector.cpp b/slsDetectorSoftware/src/Detector.cpp index 73c820789..e5e36735c 100644 --- a/slsDetectorSoftware/src/Detector.cpp +++ b/slsDetectorSoftware/src/Detector.cpp @@ -1501,7 +1501,7 @@ void Detector::setStorageCellDelay(ns value, Positions pos) { std::vector Detector::getGainModeList() const { switch (getDetectorType().squash()) { case defs::JUNGFRAU: - return std::vector{defs::DYNAMIC_GAIN_MODE, + return std::vector{defs::DYNAMIC, defs::FORCE_SWITCH_G1, defs::FORCE_SWITCH_G2, defs::FIX_G1, diff --git a/slsDetectorSoftware/tests/test-CmdProxy-jungfrau.cpp b/slsDetectorSoftware/tests/test-CmdProxy-jungfrau.cpp index 3fddd6f26..ed517a899 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy-jungfrau.cpp +++ b/slsDetectorSoftware/tests/test-CmdProxy-jungfrau.cpp @@ -458,8 +458,8 @@ TEST_CASE("gainmode", "[.cmd]") { } { std::ostringstream oss; - proxy.Call("gainmode", {"dynamicgain"}, -1, PUT, oss); - REQUIRE(oss.str() == "gainmode dynamicgain\n"); + proxy.Call("gainmode", {"dynamic"}, -1, PUT, oss); + REQUIRE(oss.str() == "gainmode dynamic\n"); } { std::ostringstream oss; diff --git a/slsSupportLib/include/sls/ToString.h b/slsSupportLib/include/sls/ToString.h index a515b51be..aede99dd6 100644 --- a/slsSupportLib/include/sls/ToString.h +++ b/slsSupportLib/include/sls/ToString.h @@ -36,13 +36,9 @@ std::string ToString(const defs::dacIndex s); std::string ToString(const std::vector &vec); std::string ToString(const defs::burstMode s); std::string ToString(const defs::timingSourceType s); -<<<<<<< HEAD std::string ToString(const defs::M3_GainCaps s); std::string ToString(const defs::portPosition s); -std::string ToString(const defs::ethernetInterface s); -======= std::string ToString(const defs::streamingInterface s); ->>>>>>> 5.2.0-rc std::string ToString(const defs::vetoAlgorithm s); std::string ToString(const defs::gainMode s); diff --git a/slsSupportLib/include/sls/sls_detector_defs.h b/slsSupportLib/include/sls/sls_detector_defs.h index f8dbe0e8d..e51de7cc2 100644 --- a/slsSupportLib/include/sls/sls_detector_defs.h +++ b/slsSupportLib/include/sls/sls_detector_defs.h @@ -416,7 +416,7 @@ typedef struct { enum vetoAlgorithm { DEFAULT_ALGORITHM }; enum gainMode { - DYNAMIC_GAIN_MODE, + DYNAMIC, FORCE_SWITCH_G1, FORCE_SWITCH_G2, FIX_G1, diff --git a/slsSupportLib/include/sls/versionAPI.h b/slsSupportLib/include/sls/versionAPI.h index fd73c4535..bd94fed72 100644 --- a/slsSupportLib/include/sls/versionAPI.h +++ b/slsSupportLib/include/sls/versionAPI.h @@ -3,7 +3,6 @@ #define APILIB 0x210225 #define APIRECEIVER 0x210225 #define APIGUI 0x210225 - #define APIEIGER 0x210806 #define APICTB 0x210806 #define APIGOTTHARD 0x210806 diff --git a/slsSupportLib/src/ToString.cpp b/slsSupportLib/src/ToString.cpp index 049a4db5f..0a39098be 100644 --- a/slsSupportLib/src/ToString.cpp +++ b/slsSupportLib/src/ToString.cpp @@ -583,8 +583,8 @@ std::string ToString(const defs::vetoAlgorithm s) { std::string ToString(const defs::gainMode s) { switch (s) { - case defs::DYNAMIC_GAIN_MODE: - return std::string("dynamicgain"); + case defs::DYNAMIC: + return std::string("dynamic"); case defs::FORCE_SWITCH_G1: return std::string("forceswitchg1"); case defs::FORCE_SWITCH_G2: @@ -986,8 +986,8 @@ template <> defs::vetoAlgorithm StringTo(const std::string &s) { } template <> defs::gainMode StringTo(const std::string &s) { - if (s == "dynamicgain") - return defs::DYNAMIC_GAIN_MODE; + if (s == "dynamic") + return defs::DYNAMIC; if (s == "forceswitchg1") return defs::FORCE_SWITCH_G1; if (s == "forceswitchg2")