mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-22 03:40:04 +02:00
bugfix to gui and updating gui about
This commit is contained in:
parent
1c3357c8f1
commit
9b9bc3ffb9
@ -1,4 +1,4 @@
|
|||||||
Copyright 2021 Contributors to the SLS Detector Package
|
Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
|
|
||||||
This file is part of the SLS Detecotor Package.
|
This file is part of the SLS Detecotor Package.
|
||||||
|
|
||||||
|
@ -439,33 +439,45 @@ void qDetectorMain::ExecuteHelp(QAction *action) {
|
|||||||
LOG(logINFO) << "About Common GUI for Jungfrau, Eiger, Mythen3, "
|
LOG(logINFO) << "About Common GUI for Jungfrau, Eiger, Mythen3, "
|
||||||
"Gotthard, Gotthard2 and Moench detectors";
|
"Gotthard, Gotthard2 and Moench detectors";
|
||||||
|
|
||||||
std::string guiVersion = std::to_string(APIGUI);
|
std::string guiVersion = sls::ToStringHex(APIGUI);
|
||||||
std::string clientVersion = "unknown";
|
std::string clientVersion = "unknown";
|
||||||
try {
|
try {
|
||||||
clientVersion = std::to_string(det->getClientVersion());
|
clientVersion = sls::ToStringHex(det->getClientVersion());
|
||||||
}
|
}
|
||||||
CATCH_DISPLAY("Could not get client version.",
|
CATCH_DISPLAY("Could not get client version.",
|
||||||
"qDetectorMain::ExecuteHelp")
|
"qDetectorMain::ExecuteHelp")
|
||||||
|
|
||||||
qDefs::Message(qDefs::INFORMATION,
|
qDefs::Message(qDefs::INFORMATION,
|
||||||
"<p style=\"font-family:verdana;\">"
|
"<p style=\"font-family:verdana;\">"
|
||||||
"SLS Detector GUI version: " +
|
|
||||||
|
"<b>SLS Detector GUI version: " +
|
||||||
guiVersion +
|
guiVersion +
|
||||||
"<br>"
|
"<br>SLS Detector Client version: " +
|
||||||
"SLS Detector Client version: " +
|
|
||||||
clientVersion +
|
clientVersion +
|
||||||
"<br><br>"
|
"</b><br><br>"
|
||||||
|
|
||||||
"Common GUI to control the SLS Detectors: "
|
"Common GUI to control the SLS Detectors: "
|
||||||
"Jungfrau, Eiger, Mythen3, Gotthard, Gotthard2 and "
|
"Jungfrau, Eiger, Mythen3, Gotthard, Gotthard2 and "
|
||||||
"Moench.<br><br>"
|
"Moench.<br><br>"
|
||||||
|
|
||||||
"It can be operated in parallel with the command "
|
"It can be operated in parallel with the command "
|
||||||
"line interface:<br>"
|
"line interface: sls_detector_put, sls_detector_get, "
|
||||||
"sls_detector_put,<br>sls_detector_get,<br>sls_"
|
"sls_detector_acquire and sls_detector_help.<br><br>"
|
||||||
"detector_acquire and<br>sls_detector_help.<br><br>"
|
|
||||||
"Please report bugs to: <br>"
|
|
||||||
"Dhanya.Thattil@psi.ch, <br>"
|
"Support:<br>"
|
||||||
"Erik.Froejdh@psi.ch or <br>"
|
"Dhanya.Thattil@psi.ch <br>"
|
||||||
"Anna.Bergamaschi@psi.ch.<\\p>",
|
"Erik.Froejdh@psi.ch.<br><br><br>"
|
||||||
|
|
||||||
|
"<br>slsDetectorGui Copyright (C) 2021 <br><br>"
|
||||||
|
|
||||||
|
"This program comes with ABSOLUTELY NO WARRANTY. "
|
||||||
|
"This is free software, and you are welcome to redistribute it "
|
||||||
|
"under certain conditions. Refer LICENSE and LICESNSE.lesser "
|
||||||
|
"in root folder for more details."
|
||||||
|
|
||||||
|
|
||||||
|
"<\\p>",
|
||||||
"qDetectorMain::ExecuteHelp");
|
"qDetectorMain::ExecuteHelp");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -369,26 +369,26 @@ void qTabDataOutput::SetRateCorrection() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void qTabDataOutput::GetSpeed() {
|
void qTabDataOutput::GetSpeed() {
|
||||||
LOG(logDEBUG) << "Getting Speed";
|
LOG(logDEBUG) << "Getting Readout Speed";
|
||||||
disconnect(comboClkDivider, SIGNAL(currentIndexChanged(int)), this,
|
disconnect(comboClkDivider, SIGNAL(currentIndexChanged(int)), this,
|
||||||
SLOT(SetSpeed(int)));
|
SLOT(SetSpeed(int)));
|
||||||
try {
|
try {
|
||||||
auto retval =
|
auto retval =
|
||||||
det->getSpeed().tsquash("Speed is inconsistent for all detectors.");
|
det->getReadoutSpeed().tsquash("Readout Speed is inconsistent for all detectors.");
|
||||||
comboClkDivider->setCurrentIndex(static_cast<int>(retval));
|
comboClkDivider->setCurrentIndex(static_cast<int>(retval));
|
||||||
}
|
}
|
||||||
CATCH_DISPLAY("Could not get speed.", "qTabDataOutput::GetSpeed")
|
CATCH_DISPLAY("Could not get readout speed.", "qTabDataOutput::GetSpeed")
|
||||||
connect(comboClkDivider, SIGNAL(currentIndexChanged(int)), this,
|
connect(comboClkDivider, SIGNAL(currentIndexChanged(int)), this,
|
||||||
SLOT(SetSpeed(int)));
|
SLOT(SetSpeed(int)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void qTabDataOutput::SetSpeed(int speed) {
|
void qTabDataOutput::SetSpeed(int speed) {
|
||||||
LOG(logINFO) << "Setting Speed to "
|
LOG(logINFO) << "Setting Readout Speed to "
|
||||||
<< comboClkDivider->currentText().toAscii().data();
|
<< comboClkDivider->currentText().toAscii().data();
|
||||||
try {
|
try {
|
||||||
det->setSpeed(static_cast<slsDetectorDefs::speedLevel>(speed));
|
det->setReadoutSpeed(static_cast<slsDetectorDefs::speedLevel>(speed));
|
||||||
}
|
}
|
||||||
CATCH_HANDLE("Could not set speed.", "qTabDataOutput::SetSpeed", this,
|
CATCH_HANDLE("Could not set readout speed.", "qTabDataOutput::SetSpeed", this,
|
||||||
&qTabDataOutput::GetSpeed)
|
&qTabDataOutput::GetSpeed)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user