From 2bb9629f14e8609261fb6d0d5550a5cdb794f1fd Mon Sep 17 00:00:00 2001 From: Dhanya Thattil <33750417+thattil@users.noreply.github.com> Date: Fri, 24 Jul 2020 10:50:32 +0200 Subject: [PATCH 01/13] Create config.yml --- .github/ISSUE_TEMPLATE/config.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/ISSUE_TEMPLATE/config.yml diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 000000000..3ba13e0ce --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: false From 98d061a0321f01b9342321edb5f7013e95d5c89e Mon Sep 17 00:00:00 2001 From: Dhanya Thattil <33750417+thattil@users.noreply.github.com> Date: Fri, 24 Jul 2020 10:51:43 +0200 Subject: [PATCH 02/13] Create bug_report.md --- .github/ISSUE_TEMPLATE/bug_report.md | 61 ++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 000000000..aa04d7273 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,61 @@ +--- +name: Bug Report +about: Create a report to help us improve +title: New Bug Report +labels: action - bug, priority - unclassified, status - pending +template: bug_report.md +projects: slsDetectorPackage +--- + + + + + + +##### *Priority: +- [ ] Super Low +- [ ] Low +- [ ] Medium +- [ ] High +- [ ] Super High + +##### *Distribution: +- [x] RHEL7 +- [ ] RHEL6 +- [ ] Fedora +- [ ] Other + +##### *Detector type: +- [ ] Eiger +- [ ] Jungfrau +- [ ] Mythen3 +- [ ] Gotthard2 +- [ ] Gotthard +- [ ] Moench +- [ ] ChipTestBoard + +##### *Version: + +- [ ] developer +- [ ] 4.2.0 +- [ ] 4.1.1 + +### *Describe the bug + + +### Expected behavior + + +### To Reproduce + + + + + + +### Screenshots + + + +### Additional context + From f792d59682e6f1298e78ffb15a47b5d46f5b7091 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil <33750417+thattil@users.noreply.github.com> Date: Fri, 24 Jul 2020 10:55:05 +0200 Subject: [PATCH 03/13] Update bug_report.md --- .github/ISSUE_TEMPLATE/bug_report.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index aa04d7273..983f7701e 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -2,7 +2,7 @@ name: Bug Report about: Create a report to help us improve title: New Bug Report -labels: action - bug, priority - unclassified, status - pending +labels: action - Bug, priority - Unclassified, status - Pending template: bug_report.md projects: slsDetectorPackage --- @@ -26,6 +26,7 @@ projects: slsDetectorPackage - [ ] Other ##### *Detector type: +- [x] Not applicable - [ ] Eiger - [ ] Jungfrau - [ ] Mythen3 @@ -39,6 +40,7 @@ projects: slsDetectorPackage - [ ] developer - [ ] 4.2.0 - [ ] 4.1.1 + From df0b52604fc09d5d4093bf41af47cc7cdd86f2d0 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil <33750417+thattil@users.noreply.github.com> Date: Fri, 24 Jul 2020 10:55:39 +0200 Subject: [PATCH 04/13] Update bug_report.md --- .github/ISSUE_TEMPLATE/bug_report.md | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 983f7701e..4b6b7fd77 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -4,7 +4,6 @@ about: Create a report to help us improve title: New Bug Report labels: action - Bug, priority - Unclassified, status - Pending template: bug_report.md -projects: slsDetectorPackage --- From f8da057735f4b5a2dc6a09f6f6a6689f343fc609 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil <33750417+thattil@users.noreply.github.com> Date: Fri, 24 Jul 2020 10:57:00 +0200 Subject: [PATCH 05/13] Update bug_report.md --- .github/ISSUE_TEMPLATE/bug_report.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 4b6b7fd77..aa1d4e60d 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -11,13 +11,6 @@ template: bug_report.md -##### *Priority: -- [ ] Super Low -- [ ] Low -- [ ] Medium -- [ ] High -- [ ] Super High - ##### *Distribution: - [x] RHEL7 - [ ] RHEL6 @@ -41,6 +34,13 @@ template: bug_report.md - [ ] 4.1.1 @@ -57,6 +57,5 @@ template: bug_report.md ### Screenshots - ### Additional context From b1d3cbb25e64bc6b865b8b0f42dd0e822e879a3f Mon Sep 17 00:00:00 2001 From: Dhanya Thattil <33750417+thattil@users.noreply.github.com> Date: Fri, 24 Jul 2020 11:23:50 +0200 Subject: [PATCH 06/13] Create feature_request.md --- .github/ISSUE_TEMPLATE/feature_request.md | 47 +++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 000000000..98d2a0107 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,47 @@ +--- +name: Feature Request +about: Suggest a feature +title: New Feature Request +labels: action - Enhancement, priority - Unclassified, status - Pending +template: feature_request.md +--- + + + + + + +##### *Detector type: +- [x] Not applicable +- [ ] Eiger +- [ ] Jungfrau +- [ ] Mythen3 +- [ ] Gotthard2 +- [ ] Gotthard +- [ ] Moench +- [ ] ChipTestBoard + +##### *Software Package Version: +- [ ] developer +- [ ] 4.2.0 +- [ ] 4.1.1 + + +##### Is your feature request related to a problem. Please describe: + +##### Describe the solution you'd like: + +##### Describe alternatives you've considered: + +##### Additional context: + From 9063a8d4ed115dbd1aed3c2f5707e431826e5484 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil <33750417+thattil@users.noreply.github.com> Date: Fri, 24 Jul 2020 11:25:02 +0200 Subject: [PATCH 07/13] Update feature_request.md --- .github/ISSUE_TEMPLATE/feature_request.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 98d2a0107..31ed78561 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -25,7 +25,7 @@ template: feature_request.md - [ ] developer - [ ] 4.2.0 - [ ] 4.1.1 - ##### Priority: - [ ] Super Low From 096e94562aae12887ca0bbde0795935f65b06063 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil <33750417+thattil@users.noreply.github.com> Date: Fri, 24 Jul 2020 11:25:54 +0200 Subject: [PATCH 08/13] Update bug_report.md --- .github/ISSUE_TEMPLATE/bug_report.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index aa1d4e60d..8fdd4622f 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -27,12 +27,11 @@ template: bug_report.md - [ ] Moench - [ ] ChipTestBoard -##### *Version: - +##### *Software Package Version: - [ ] developer - [ ] 4.2.0 - [ ] 4.1.1 - ##### Priority: - [ ] Super Low @@ -41,21 +40,21 @@ template: bug_report.md - [ ] High - [ ] Super High -### *Describe the bug +##### *Describe the bug -### Expected behavior +##### Expected behavior -### To Reproduce +##### To Reproduce -### Screenshots +##### Screenshots -### Additional context +##### Additional context From bb2f70beb5df61a0ef99d7d059a3a80774d19ac0 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil <33750417+thattil@users.noreply.github.com> Date: Fri, 24 Jul 2020 11:27:01 +0200 Subject: [PATCH 09/13] Update feature_request.md --- .github/ISSUE_TEMPLATE/feature_request.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 31ed78561..629ed831c 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -38,10 +38,13 @@ template: feature_request.md ##### Is your feature request related to a problem. Please describe: + ##### Describe the solution you'd like: + ##### Describe alternatives you've considered: + ##### Additional context: From a412b465c697a2fc9a40b568be053a7da1def61b Mon Sep 17 00:00:00 2001 From: Dhanya Thattil <33750417+thattil@users.noreply.github.com> Date: Fri, 24 Jul 2020 11:32:09 +0200 Subject: [PATCH 10/13] Create change_request.md --- .github/ISSUE_TEMPLATE/change_request.md | 44 ++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/change_request.md diff --git a/.github/ISSUE_TEMPLATE/change_request.md b/.github/ISSUE_TEMPLATE/change_request.md new file mode 100644 index 000000000..bc077a07e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/change_request.md @@ -0,0 +1,44 @@ +--- +name: Change Request +about: Suggest a change +title: New Change Request +labels: action - Change, priority - Unclassified, status - Pending +template: change_request.md +--- + + + + + + +##### *Detector type: +- [x] Not applicable +- [ ] Eiger +- [ ] Jungfrau +- [ ] Mythen3 +- [ ] Gotthard2 +- [ ] Gotthard +- [ ] Moench +- [ ] ChipTestBoard + +##### *Software Package Version: +- [ ] developer +- [ ] 4.2.0 +- [ ] 4.1.1 + + +##### Priority: +- [ ] Super Low +- [ ] Low +- [ ] Medium +- [ ] High +- [ ] Super High + +##### *State the change request: + + +##### Is your change request related to a problem. Please describe: + + +##### Additional context: + From 799f540d71ddd5c77c9f2af990901fbf630e8c3e Mon Sep 17 00:00:00 2001 From: Dhanya Thattil <33750417+thattil@users.noreply.github.com> Date: Fri, 24 Jul 2020 11:32:51 +0200 Subject: [PATCH 11/13] Update change_request.md --- .github/ISSUE_TEMPLATE/change_request.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/change_request.md b/.github/ISSUE_TEMPLATE/change_request.md index bc077a07e..885e7635c 100644 --- a/.github/ISSUE_TEMPLATE/change_request.md +++ b/.github/ISSUE_TEMPLATE/change_request.md @@ -1,6 +1,6 @@ --- name: Change Request -about: Suggest a change +about: Suggest a change to an existing feature title: New Change Request labels: action - Change, priority - Unclassified, status - Pending template: change_request.md From 21c8b77e2cdcc85c8e9adc56f5ac051afcd4a49c Mon Sep 17 00:00:00 2001 From: Erik Frojdh Date: Fri, 24 Jul 2020 15:45:21 +0200 Subject: [PATCH 12/13] fixed tests --- .../tests/test-CmdProxy-rx.cpp | 4 ++ slsDetectorSoftware/tests/test-CmdProxy.cpp | 37 ++++++++++--------- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/slsDetectorSoftware/tests/test-CmdProxy-rx.cpp b/slsDetectorSoftware/tests/test-CmdProxy-rx.cpp index 93cd63def..6bcb09a98 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy-rx.cpp +++ b/slsDetectorSoftware/tests/test-CmdProxy-rx.cpp @@ -36,6 +36,7 @@ TEST_CASE("rx_version", "[.cmd][.rx][.new]") { TEST_CASE("rx_start", "[.cmd][.rx][.new]") { Detector det; CmdProxy proxy(&det); + det.setFileWrite(false); //avoid writing or error on file creation // PUT only command REQUIRE_THROWS(proxy.Call("rx_start", {}, -1, GET)); { @@ -69,6 +70,7 @@ TEST_CASE("rx_stop", "[.cmd][.rx][.new]") { TEST_CASE("rx_status", "[.cmd][.rx][.new]") { Detector det; + det.setFileWrite(false); //avoid writing or error on file creation CmdProxy proxy(&det); det.startReceiver(); { @@ -89,6 +91,7 @@ TEST_CASE("rx_framescaught", "[.cmd][.rx][.new]") { CmdProxy proxy(&det); // This ensures 0 caught frames + det.setFileWrite(false); //avoid writing or error on file creation det.startReceiver(); det.stopReceiver(); { @@ -110,6 +113,7 @@ TEST_CASE("rx_framescaught", "[.cmd][.rx][.new]") { TEST_CASE("rx_missingpackets", "[.cmd][.rx][.new]") { Detector det; + det.setFileWrite(false); //avoid writing or error on file creation CmdProxy proxy(&det); { // some missing packets diff --git a/slsDetectorSoftware/tests/test-CmdProxy.cpp b/slsDetectorSoftware/tests/test-CmdProxy.cpp index 309bc30ab..66c8af0a2 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy.cpp +++ b/slsDetectorSoftware/tests/test-CmdProxy.cpp @@ -1267,53 +1267,53 @@ TEST_CASE("scan", "[.cmd][.new]") { std::ostringstream oss; proxy.Call("scan", {sls::ToString(ind), "500", "1500", "500"}, -1, PUT, oss); - REQUIRE(oss.str() == + CHECK(oss.str() == "scan [" + sls::ToString(ind) + ", 500, 1500, 500]\n"); } { std::ostringstream oss; proxy.Call("scan", {}, -1, GET, oss); - REQUIRE(oss.str() == "scan [[enabled\ndac " + sls::ToString(ind) + + CHECK(oss.str() == "scan [enabled\ndac " + sls::ToString(ind) + "\nstart 500\nstop 1500\nstep " - "500\nsettleTime 1ms\n]]\n"); + "500\nsettleTime 1ms\n]\n"); } { std::ostringstream oss; proxy.Call("scan", {sls::ToString(ind), "500", "1500", "500", "2s"}, -1, PUT, oss); - REQUIRE(oss.str() == + CHECK(oss.str() == "scan [" + sls::ToString(ind) + ", 500, 1500, 500, 2s]\n"); } { std::ostringstream oss; proxy.Call("scan", {}, -1, GET, oss); - REQUIRE(oss.str() == "scan [[enabled\ndac " + sls::ToString(ind) + + CHECK(oss.str() == "scan [enabled\ndac " + sls::ToString(ind) + "\nstart 500\nstop 1500\nstep " - "500\nsettleTime 2s\n]]\n"); + "500\nsettleTime 2s\n]\n"); } { std::ostringstream oss; proxy.Call("scan", {"0"}, -1, PUT, oss); - REQUIRE(oss.str() == "scan [0]\n"); + CHECK(oss.str() == "scan [0]\n"); } { std::ostringstream oss; proxy.Call("scan", {}, -1, GET, oss); - REQUIRE(oss.str() == "scan [[disabled]]\n"); + CHECK(oss.str() == "scan [disabled]\n"); } { std::ostringstream oss; proxy.Call("scan", {sls::ToString(ind), "1500", "500", "-500"}, -1, PUT, oss); - REQUIRE(oss.str() == + CHECK(oss.str() == "scan [" + sls::ToString(ind) + ", 1500, 500, -500]\n"); } - REQUIRE_THROWS(proxy.Call( + CHECK_THROWS(proxy.Call( "scan", {sls::ToString(notImplementedInd), "500", "1500", "500"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call( + CHECK_THROWS(proxy.Call( "scan", {sls::ToString(ind), "500", "1500", "-500"}, -1, PUT)); - REQUIRE_THROWS(proxy.Call( + CHECK_THROWS(proxy.Call( "scan", {sls::ToString(ind), "1500", "500", "500"}, -1, PUT)); if (det_type == defs::MYTHEN3 || defs::EIGER) { @@ -1321,16 +1321,19 @@ TEST_CASE("scan", "[.cmd][.new]") { std::ostringstream oss; proxy.Call("scan", {"trimbit_scan", "0", "63", "16", "2s"}, -1, PUT, oss); - REQUIRE(oss.str() == "scan [trimbit_scan, 0, 63, 16, 2s]\n"); + CHECK(oss.str() == "scan [trimbit_scan, 0, 63, 16, 2s]\n"); } { std::ostringstream oss; proxy.Call("scan", {}, -1, GET, oss); - REQUIRE(oss.str() == - "scan [[enabled\ndac trimbit_scan\nstart 0\nstop 48\nstep " - "16\nsettleTime 2s\n]]\n"); + CHECK(oss.str() == + "scan [enabled\ndac trimbit_scan\nstart 0\nstop 48\nstep " + "16\nsettleTime 2s\n]\n"); } } + + //Switch off scan for future tests + det.setScan(defs::scanParameters()); // acquire for each? // when taking acquisition @@ -1825,7 +1828,7 @@ TEST_CASE("adcreg", "[.cmd]") { if (det_type == defs::JUNGFRAU || det_type == defs::CHIPTESTBOARD || det_type == defs::MOENCH || det_type == defs::GOTTHARD) { std::ostringstream oss; - proxy.Call("adcreg", {"0x08", "0x3"}, -1, PUT, oss); + proxy.Call("adcreg", {"0x8", "0x3"}, -1, PUT, oss); REQUIRE(oss.str() == "adcreg [0x8, 0x3]\n"); // This is a put only command REQUIRE_THROWS(proxy.Call("adcreg", {}, -1, GET)); From 879b2c88644acad3c3903d89f56b153eea41c3db Mon Sep 17 00:00:00 2001 From: Erik Frojdh Date: Mon, 27 Jul 2020 08:58:33 +0200 Subject: [PATCH 13/13] clean getThresholdTemp --- slsDetectorSoftware/src/Module.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/slsDetectorSoftware/src/Module.cpp b/slsDetectorSoftware/src/Module.cpp index 61409375c..2c6ddae7a 100644 --- a/slsDetectorSoftware/src/Module.cpp +++ b/slsDetectorSoftware/src/Module.cpp @@ -1274,12 +1274,8 @@ void Module::setQuad(const bool enable) { // Jungfrau Specific int Module::getThresholdTemperature() { - int arg = GET_FLAG; - auto retval = sendToDetectorStop(F_THRESHOLD_TEMP, arg); - if (retval != 0) { - retval /= 1000; - } - return retval; + auto retval = sendToDetectorStop(F_THRESHOLD_TEMP, GET_FLAG); + return retval / 1000; } void Module::setThresholdTemperature(int val) {