diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 000000000..8fdd4622f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,60 @@ +--- +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 +--- + + + + + + +##### *Distribution: +- [x] RHEL7 +- [ ] RHEL6 +- [ ] Fedora +- [ ] Other + +##### *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 + +##### *Describe the bug + + +##### Expected behavior + + +##### To Reproduce + + + + + + +##### Screenshots + + +##### Additional context + diff --git a/.github/ISSUE_TEMPLATE/change_request.md b/.github/ISSUE_TEMPLATE/change_request.md new file mode 100644 index 000000000..885e7635c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/change_request.md @@ -0,0 +1,44 @@ +--- +name: Change Request +about: Suggest a change to an existing feature +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: + 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 diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 000000000..629ed831c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,50 @@ +--- +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 + + +##### Priority: +- [ ] Super Low +- [ ] Low +- [ ] Medium +- [ ] High +- [ ] Super High + +##### *State the feature: + + +##### Is your feature request related to a problem. Please describe: + + +##### Describe the solution you'd like: + + +##### Describe alternatives you've considered: + + +##### Additional context: + diff --git a/slsDetectorSoftware/src/Module.cpp b/slsDetectorSoftware/src/Module.cpp index 9de682878..9106dd941 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() const { - 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) { 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));