diff --git a/slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv7.0.3 b/slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv7.0.3 index 8440ce013..02d3c8fca 100755 Binary files a/slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv7.0.3 and b/slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv7.0.3 differ diff --git a/slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServerv7.0.3 b/slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServerv7.0.3 index a7e8b1e53..e45a81daa 100755 Binary files a/slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServerv7.0.3 and b/slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServerv7.0.3 differ diff --git a/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv7.0.3 b/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv7.0.3 index 1563d37d2..632d602c0 100755 Binary files a/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv7.0.3 and b/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv7.0.3 differ diff --git a/slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv7.0.3 b/slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv7.0.3 index d8cfd5432..fcc6d8588 100755 Binary files a/slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv7.0.3 and b/slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv7.0.3 differ diff --git a/slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv7.0.3 b/slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv7.0.3 index e914643ea..8aaec9e8d 100755 Binary files a/slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv7.0.3 and b/slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv7.0.3 differ diff --git a/slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv7.0.3 b/slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv7.0.3 index d1c4f2df1..c3983e3c5 100755 Binary files a/slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv7.0.3 and b/slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv7.0.3 differ diff --git a/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv7.0.3 b/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv7.0.3 index 9eb00ee49..c1abfa71c 100755 Binary files a/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv7.0.3 and b/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv7.0.3 differ diff --git a/slsDetectorServers/slsDetectorServer/src/slsDetectorServer_funcs.c b/slsDetectorServers/slsDetectorServer/src/slsDetectorServer_funcs.c index 255ed9e13..b360a9472 100644 --- a/slsDetectorServers/slsDetectorServer/src/slsDetectorServer_funcs.c +++ b/slsDetectorServers/slsDetectorServer/src/slsDetectorServer_funcs.c @@ -4667,7 +4667,8 @@ int set_read_n_rows(int file_des) { functionNotImplemented(); #else // only set - if (Server_VerifyLock() == OK) { + if ((Server_VerifyLock() == OK) && + (check_detector_idle("set number of rows") == OK)) { if (arg <= 0 || arg > MAX_ROWS_PER_READOUT) { ret = FAIL; sprintf(mess, @@ -4699,8 +4700,7 @@ int set_read_n_rows(int file_des) { LOG(logERROR, (mess)); } else #elif JUNGFRAUD - if ((check_detector_idle("set number of rows") == OK) && - (arg % READ_N_ROWS_MULTIPLE != 0)) { + if (arg % READ_N_ROWS_MULTIPLE != 0) { ret = FAIL; sprintf(mess, "Could not set number of rows. %d must be a multiple " @@ -8283,9 +8283,9 @@ int set_master(int file_des) { functionNotImplemented(); #else // only set - if (Server_VerifyLock() == OK) { - if ((check_detector_idle("set master") == OK) && - (arg != 0 && arg != 1)) { + if ((Server_VerifyLock() == OK) && + (check_detector_idle("set master") == OK)) { + if (arg != 0 && arg != 1) { ret = FAIL; sprintf(mess, "Could not set master. Invalid argument %d.\n", arg); LOG(logERROR, (mess)); @@ -8839,9 +8839,9 @@ int set_flip_rows(int file_des) { functionNotImplemented(); #else // only set - if (Server_VerifyLock() == OK) { - if ((check_detector_idle("set flip rows") == OK) && - (arg != 0 && arg != 1)) { + if ((Server_VerifyLock() == OK) && + (check_detector_idle("set flip rows") == OK)) { + if (arg != 0 && arg != 1) { ret = FAIL; sprintf(mess, "Could not set flip rows. Invalid argument %d.\n", arg); @@ -10163,9 +10163,9 @@ int set_synchronization(int file_des) { functionNotImplemented(); #else // only set - if (Server_VerifyLock() == OK) { - if ((check_detector_idle("set synchronization") == OK) && - (arg != 0 && arg != 1)) { + if ((Server_VerifyLock() == OK) && + (check_detector_idle("set synchronization") == OK)) { + if (arg != 0 && arg != 1) { ret = FAIL; sprintf(mess, "Could not set synchronization. Invalid argument %d.\n", diff --git a/slsDetectorSoftware/tests/test-CmdProxy-jungfrau.cpp b/slsDetectorSoftware/tests/test-CmdProxy-jungfrau.cpp index 2652365c4..a8029912d 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy-jungfrau.cpp +++ b/slsDetectorSoftware/tests/test-CmdProxy-jungfrau.cpp @@ -550,6 +550,34 @@ TEST_CASE("sync", "[.cmd]") { proxy.Call("sync", {}, -1, GET, oss); REQUIRE(oss.str() == "sync 1\n"); } + // setting sync when running + { + auto prev_timing = + det.getTimingMode().tsquash("inconsistent timing mode in test"); + auto prev_frames = + det.getNumberOfFrames().tsquash("inconsistent #frames in test"); + auto prev_exptime = + det.getExptime().tsquash("inconsistent exptime in test"); + auto prev_period = + det.getPeriod().tsquash("inconsistent period in test"); + det.setTimingMode(defs::AUTO_TIMING); + det.setNumberOfFrames(10000); + det.setExptime(std::chrono::microseconds(200)); + det.setPeriod(std::chrono::milliseconds(1000)); + det.setSynchronization(1); + det.startDetector(); + REQUIRE_THROWS(proxy.Call("sync", {"0"}, -1, PUT)); + { + std::ostringstream oss; + proxy.Call("sync", {}, -1, GET, oss); + REQUIRE(oss.str() == "sync 1\n"); + } + det.stopDetector(); + det.setTimingMode(prev_timing); + det.setNumberOfFrames(prev_frames); + det.setExptime(prev_exptime); + det.setPeriod(prev_period); + } det.setSynchronization(prev_val); } else { REQUIRE_THROWS(proxy.Call("sync", {}, -1, GET)); diff --git a/slsSupportLib/include/sls/versionAPI.h b/slsSupportLib/include/sls/versionAPI.h index a12eaadab..3a01b2813 100644 --- a/slsSupportLib/include/sls/versionAPI.h +++ b/slsSupportLib/include/sls/versionAPI.h @@ -2,12 +2,12 @@ // Copyright (C) 2021 Contributors to the SLS Detector Package /** API versions */ #define RELEASE "7.0.3" -#define APICTB "7.0.3 0x231107" -#define APIGOTTHARD "7.0.3 0x231107" -#define APIGOTTHARD2 "7.0.3 0x231107" -#define APIJUNGFRAU "7.0.3 0x231107" -#define APIMYTHEN3 "7.0.3 0x231107" -#define APIMOENCH "7.0.3 0x231107" -#define APIEIGER "7.0.3 0x231107" #define APILIB "7.0.3 0x231108" #define APIRECEIVER "7.0.3 0x231108" +#define APICTB "7.0.3 0x231109" +#define APIGOTTHARD "7.0.3 0x231109" +#define APIGOTTHARD2 "7.0.3 0x231109" +#define APIJUNGFRAU "7.0.3 0x231109" +#define APIMYTHEN3 "7.0.3 0x231109" +#define APIMOENCH "7.0.3 0x231109" +#define APIEIGER "7.0.3 0x231109"