mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-22 03:40:04 +02:00
Merge branch 'developer' into checkargs
This commit is contained in:
commit
3ec637601d
60
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
60
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@ -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
|
||||
---
|
||||
|
||||
<!-- Check an option by - [x], Uncheck an option by - [ ] -->
|
||||
<!-- Please preview to see your option has been selected -->
|
||||
|
||||
<!-- Please fill out everything with an *, as this report will be discarded otherwise -->
|
||||
|
||||
##### *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
|
||||
<!-- If others, please describe -->
|
||||
|
||||
##### Priority:
|
||||
- [ ] Super Low
|
||||
- [ ] Low
|
||||
- [ ] Medium
|
||||
- [ ] High
|
||||
- [ ] Super High
|
||||
|
||||
##### *Describe the bug
|
||||
<!-- A clear and concise description of what the bug is -->
|
||||
|
||||
##### Expected behavior
|
||||
<!-- A clear and concise description of what you expected to happen. -->
|
||||
|
||||
##### To Reproduce
|
||||
<!-- Steps to reproduce the behavior: -->
|
||||
<!-- 1. Go to '...' -->
|
||||
<!-- 2. Click on '....' -->
|
||||
<!-- 3. Scroll down to '....' -->
|
||||
<!-- 4. See error -->
|
||||
|
||||
##### Screenshots
|
||||
<!-- If applicable, add screenshots to help explain your problem. -->
|
||||
|
||||
##### Additional context
|
||||
<!-- Add any other context about the problem here. -->
|
44
.github/ISSUE_TEMPLATE/change_request.md
vendored
Normal file
44
.github/ISSUE_TEMPLATE/change_request.md
vendored
Normal file
@ -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
|
||||
---
|
||||
|
||||
<!-- Check an option by - [x], Uncheck an option by - [ ] -->
|
||||
<!-- Please preview to see your option has been selected -->
|
||||
|
||||
<!-- Please fill out everything with an *, as this report will be discarded otherwise -->
|
||||
|
||||
##### *Detector type:
|
||||
- [x] Not applicable
|
||||
- [ ] Eiger
|
||||
- [ ] Jungfrau
|
||||
- [ ] Mythen3
|
||||
- [ ] Gotthard2
|
||||
- [ ] Gotthard
|
||||
- [ ] Moench
|
||||
- [ ] ChipTestBoard
|
||||
|
||||
##### *Software Package Version:
|
||||
- [ ] developer
|
||||
- [ ] 4.2.0
|
||||
- [ ] 4.1.1
|
||||
<!-- If others, please describe -->
|
||||
|
||||
##### Priority:
|
||||
- [ ] Super Low
|
||||
- [ ] Low
|
||||
- [ ] Medium
|
||||
- [ ] High
|
||||
- [ ] Super High
|
||||
|
||||
##### *State the change request:
|
||||
<!-- A clear and concise description of what the change is to an existing feature -->
|
||||
|
||||
##### Is your change request related to a problem. Please describe:
|
||||
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
|
||||
|
||||
##### Additional context:
|
||||
<!-- Add any other context about the feature here -->
|
1
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
1
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@ -0,0 +1 @@
|
||||
blank_issues_enabled: false
|
50
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
50
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@ -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
|
||||
---
|
||||
|
||||
<!-- Check an option by - [x], Uncheck an option by - [ ] -->
|
||||
<!-- Please preview to see your option has been selected -->
|
||||
|
||||
<!-- Please fill out everything with an *, as this report will be discarded otherwise -->
|
||||
|
||||
##### *Detector type:
|
||||
- [x] Not applicable
|
||||
- [ ] Eiger
|
||||
- [ ] Jungfrau
|
||||
- [ ] Mythen3
|
||||
- [ ] Gotthard2
|
||||
- [ ] Gotthard
|
||||
- [ ] Moench
|
||||
- [ ] ChipTestBoard
|
||||
|
||||
##### *Software Package Version:
|
||||
- [ ] developer
|
||||
- [ ] 4.2.0
|
||||
- [ ] 4.1.1
|
||||
<!-- If others, please describe -->
|
||||
|
||||
##### Priority:
|
||||
- [ ] Super Low
|
||||
- [ ] Low
|
||||
- [ ] Medium
|
||||
- [ ] High
|
||||
- [ ] Super High
|
||||
|
||||
##### *State the feature:
|
||||
<!-- A clear and concise description of what the feature is -->
|
||||
|
||||
##### Is your feature request related to a problem. Please describe:
|
||||
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
|
||||
|
||||
##### Describe the solution you'd like:
|
||||
<!-- A clear and concise description of what you want to happen -->
|
||||
|
||||
##### Describe alternatives you've considered:
|
||||
<!-- A clear and concise description of any alternative solutions or features you've considered -->
|
||||
|
||||
##### Additional context:
|
||||
<!-- Add any other context about the feature here -->
|
@ -1274,12 +1274,8 @@ void Module::setQuad(const bool enable) {
|
||||
// Jungfrau Specific
|
||||
|
||||
int Module::getThresholdTemperature() const {
|
||||
int arg = GET_FLAG;
|
||||
auto retval = sendToDetectorStop<int>(F_THRESHOLD_TEMP, arg);
|
||||
if (retval != 0) {
|
||||
retval /= 1000;
|
||||
}
|
||||
return retval;
|
||||
auto retval = sendToDetectorStop<int>(F_THRESHOLD_TEMP, GET_FLAG);
|
||||
return retval / 1000;
|
||||
}
|
||||
|
||||
void Module::setThresholdTemperature(int val) {
|
||||
|
@ -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
|
||||
|
@ -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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user