bugfix to gui and updating gui about

This commit is contained in:
maliakal_d 2021-10-08 18:57:04 +02:00
parent 1c3357c8f1
commit 9b9bc3ffb9
3 changed files with 32 additions and 20 deletions

View File

@ -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.

View File

@ -439,33 +439,45 @@ void qDetectorMain::ExecuteHelp(QAction *action) {
LOG(logINFO) << "About Common GUI for Jungfrau, Eiger, Mythen3, "
"Gotthard, Gotthard2 and Moench detectors";
std::string guiVersion = std::to_string(APIGUI);
std::string guiVersion = sls::ToStringHex(APIGUI);
std::string clientVersion = "unknown";
try {
clientVersion = std::to_string(det->getClientVersion());
clientVersion = sls::ToStringHex(det->getClientVersion());
}
CATCH_DISPLAY("Could not get client version.",
"qDetectorMain::ExecuteHelp")
qDefs::Message(qDefs::INFORMATION,
"<p style=\"font-family:verdana;\">"
"SLS Detector GUI version:&nbsp;&nbsp;&nbsp;" +
"<b>SLS Detector GUI version:&nbsp;&nbsp;&nbsp;" +
guiVersion +
"<br>"
"SLS Detector Client version: " +
"<br>SLS Detector Client version: " +
clientVersion +
"<br><br>"
"</b><br><br>"
"Common GUI to control the SLS Detectors: "
"Jungfrau, Eiger, Mythen3, Gotthard, Gotthard2 and "
"Moench.<br><br>"
"It can be operated in parallel with the command "
"line interface:<br>"
"sls_detector_put,<br>sls_detector_get,<br>sls_"
"detector_acquire and<br>sls_detector_help.<br><br>"
"Please report bugs to: <br>"
"Dhanya.Thattil@psi.ch, <br>"
"Erik.Froejdh@psi.ch or <br>"
"Anna.Bergamaschi@psi.ch.<\\p>",
"line interface: sls_detector_put, sls_detector_get, "
"sls_detector_acquire and sls_detector_help.<br><br>"
"Support:<br>"
"Dhanya.Thattil@psi.ch <br>"
"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");
}
}

View File

@ -369,26 +369,26 @@ void qTabDataOutput::SetRateCorrection() {
}
void qTabDataOutput::GetSpeed() {
LOG(logDEBUG) << "Getting Speed";
LOG(logDEBUG) << "Getting Readout Speed";
disconnect(comboClkDivider, SIGNAL(currentIndexChanged(int)), this,
SLOT(SetSpeed(int)));
try {
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));
}
CATCH_DISPLAY("Could not get speed.", "qTabDataOutput::GetSpeed")
CATCH_DISPLAY("Could not get readout speed.", "qTabDataOutput::GetSpeed")
connect(comboClkDivider, SIGNAL(currentIndexChanged(int)), this,
SLOT(SetSpeed(int)));
}
void qTabDataOutput::SetSpeed(int speed) {
LOG(logINFO) << "Setting Speed to "
LOG(logINFO) << "Setting Readout Speed to "
<< comboClkDivider->currentText().toAscii().data();
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)
}