diff --git a/patternGenerator/example_pattern/example_pattern.png b/patternGenerator/example_pattern/example_pattern.png index d43e49dd0..12c5b5b9d 100644 Binary files a/patternGenerator/example_pattern/example_pattern.png and b/patternGenerator/example_pattern/example_pattern.png differ diff --git a/patternGenerator/plotPattern.py b/patternGenerator/plotPattern.py index 7040ad652..e069e8e10 100755 --- a/patternGenerator/plotPattern.py +++ b/patternGenerator/plotPattern.py @@ -31,7 +31,7 @@ alpha_wait = [0.5, 0.5, 0.5, 0.5, 0.5, 0.5] alpha_wait_rect = [0.2, 0.2, 0.2, 0.2, 0.2, 0.2] # Loop colors and line styles (6 needed from 0 to 5) -colors_loop = ['tab:green', 'tab:red', 'tab:purple', 'tab:brown', 'tab:ping', 'tab:grey'] +colors_loop = ['tab:green', 'tab:red', 'tab:purple', 'tab:brown', 'tab:pink', 'tab:grey'] linestyles_loop = ['-.', '-.', '-.', '-.', '-.', '-.'] alpha_loop = [0.5, 0.5, 0.5, 0.5, 0.5, 0.5] alpha_loop_rect = [0.2, 0.2, 0.2, 0.2, 0.2, 0.2] diff --git a/python/src/duration.cpp b/python/src/duration.cpp index e77daad2f..db6da3d06 100644 --- a/python/src/duration.cpp +++ b/python/src/duration.cpp @@ -12,6 +12,7 @@ void init_duration(py::module &m) { .def("total_seconds", &DurationWrapper::total_seconds) .def("count", &DurationWrapper::count) .def("set_count", &DurationWrapper::set_count) + .def("__eq__", &DurationWrapper::operator==) .def("__repr__", [](const DurationWrapper &self) { std::stringstream ss; ss << "sls::DurationWrapper(total_seconds: " << self.total_seconds() diff --git a/python/tests/test_utils.py b/python/tests/test_utils.py index 92a32106f..309ffa9a2 100755 --- a/python/tests/test_utils.py +++ b/python/tests/test_utils.py @@ -8,7 +8,7 @@ Testing functions from utils.py import pytest from slsdet.utils import * -from slsdet import IpAddr, MacAddr +from slsdet import IpAddr, MacAddr, DurationWrapper import datetime as dt import pathlib from pathlib import Path @@ -22,7 +22,11 @@ def test_iterable(): def test_reduce_time_to_single_value_from_list(): - t = 3 * [dt.timedelta(seconds=1)] + t = [dt.timedelta(seconds=1) for i in range(3)] + assert reduce_time(t) == 1 + +def test_reduce_time_to_single_value_from_list_DurationWrapper(): + t = [DurationWrapper(1) for i in range(3)] assert reduce_time(t) == 1 @@ -83,6 +87,12 @@ def test_all_equal_str_fails(): assert all_equal('aaab') == False +def test_all_equal_DurationWrapper(): + assert all_equal([DurationWrapper(1), DurationWrapper(1)]) + +def test_all_equal_DurationWrapper_fail(): + assert not all_equal([DurationWrapper(1), DurationWrapper(2)]) + def test_element_if_equal_int(): assert element_if_equal([5, 5]) == 5 diff --git a/slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServer_developer b/slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServer_developer index 4043e6c05..4c383a6cf 100755 Binary files a/slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServer_developer and b/slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServer_developer differ diff --git a/slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv7.0.0.rc1 b/slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv7.0.0.rc1 deleted file mode 100755 index 9dbacaa9d..000000000 Binary files a/slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv7.0.0.rc1 and /dev/null differ diff --git a/slsDetectorServers/gotthardDetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/gotthardDetectorServer/slsDetectorFunctionList.c index ae6308439..c56930140 100644 --- a/slsDetectorServers/gotthardDetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/gotthardDetectorServer/slsDetectorFunctionList.c @@ -1007,7 +1007,9 @@ int setDelayAfterTrigger(int64_t val) { // validate for tolerance int64_t retval = getDelayAfterTrigger(); val /= (1E-9 * CLK_FREQ); - val -= masterdefaultdelay; + if (master) { + val -= masterdefaultdelay; + } if (val != retval) { return FAIL; } diff --git a/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer b/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer index 7e1066f33..9570f432d 100755 Binary files a/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer and b/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer differ diff --git a/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv7.0.0.rc1 b/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv7.0.0.rc1 deleted file mode 100755 index ec957aa31..000000000 Binary files a/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv7.0.0.rc1 and /dev/null differ diff --git a/slsDetectorServers/mythen3DetectorServer/mythen3.c b/slsDetectorServers/mythen3DetectorServer/mythen3.c index acb39b487..96bf73902 100644 --- a/slsDetectorServers/mythen3DetectorServer/mythen3.c +++ b/slsDetectorServers/mythen3DetectorServer/mythen3.c @@ -313,7 +313,7 @@ patternParameters *setChannelRegisterChip(int ichip, char *mask, chanReg, ichip * NCHAN + ich * NCOUNTERS, ichip * NCHAN_1_COUNTER + ich, ichip, ich)); } - for (int i = 0; i < 24; i++) { + for (int i = 0; i < 23; i++) { patword = clearBit(SIGNAL_clk, patword); pat->word[iaddr++] = patword; diff --git a/slsSupportLib/include/sls/versionAPI.h b/slsSupportLib/include/sls/versionAPI.h index 41b24f868..72a85a802 100644 --- a/slsSupportLib/include/sls/versionAPI.h +++ b/slsSupportLib/include/sls/versionAPI.h @@ -4,11 +4,11 @@ #define RELEASE "developer" #define APILIB "developer 0x221213" #define APIRECEIVER "developer 0x221213" - #define APICTB "developer 0x221213" -#define APIGOTTHARD "developer 0x221213" #define APIGOTTHARD2 "developer 0x221213" #define APIJUNGFRAU "developer 0x221213" -#define APIMYTHEN3 "developer 0x221213" #define APIMOENCH "developer 0x221213" #define APIEIGER "developer 0x221213" + +#define APIGOTTHARD "developer 0x230117" +#define APIMYTHEN3 "developer 0x230117"