mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-07 02:20:42 +02:00
show fpga temp in developer tab in gui, virtual servers just show warning if no temperature file in /tmp to read (dont throw exception) (#573)
This commit is contained in:
parent
38cd10d4e6
commit
bf3333b97b
@ -200,6 +200,9 @@ void qTabDeveloper::SetupWidgetWindow() {
|
|||||||
dacWidgets.push_back(
|
dacWidgets.push_back(
|
||||||
new qDacWidget(this, det, true,
|
new qDacWidget(this, det, true,
|
||||||
"vthreshold: ", getSLSIndex(detType, tempid++)));
|
"vthreshold: ", getSLSIndex(detType, tempid++)));
|
||||||
|
adcWidgets.push_back(new qDacWidget(
|
||||||
|
this, det, false,
|
||||||
|
"Temperature FPGA: ", getSLSIndex(detType, tempid++)));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case slsDetectorDefs::GOTTHARD2:
|
case slsDetectorDefs::GOTTHARD2:
|
||||||
@ -242,6 +245,9 @@ void qTabDeveloper::SetupWidgetWindow() {
|
|||||||
dacWidgets.push_back(
|
dacWidgets.push_back(
|
||||||
new qDacWidget(this, det, true,
|
new qDacWidget(this, det, true,
|
||||||
"vcom_adc2: ", getSLSIndex(detType, tempid++)));
|
"vcom_adc2: ", getSLSIndex(detType, tempid++)));
|
||||||
|
adcWidgets.push_back(new qDacWidget(
|
||||||
|
this, det, false,
|
||||||
|
"Temperature FPGA: ", getSLSIndex(detType, tempid++)));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@ -465,6 +471,8 @@ qTabDeveloper::getSLSIndex(slsDetectorDefs::detectorType detType, int index) {
|
|||||||
return slsDetectorDefs::VDCSH;
|
return slsDetectorDefs::VDCSH;
|
||||||
case 16:
|
case 16:
|
||||||
return slsDetectorDefs::VTHRESHOLD;
|
return slsDetectorDefs::VTHRESHOLD;
|
||||||
|
case 17:
|
||||||
|
return slsDetectorDefs::TEMPERATURE_FPGA;
|
||||||
default:
|
default:
|
||||||
throw RuntimeError(std::string("Unknown dac/adc index") +
|
throw RuntimeError(std::string("Unknown dac/adc index") +
|
||||||
std::to_string(index));
|
std::to_string(index));
|
||||||
@ -501,6 +509,8 @@ qTabDeveloper::getSLSIndex(slsDetectorDefs::detectorType detType, int index) {
|
|||||||
return slsDetectorDefs::VB_OPA_FD;
|
return slsDetectorDefs::VB_OPA_FD;
|
||||||
case 13:
|
case 13:
|
||||||
return slsDetectorDefs::VCOM_ADC2;
|
return slsDetectorDefs::VCOM_ADC2;
|
||||||
|
case 14:
|
||||||
|
return slsDetectorDefs::TEMPERATURE_FPGA;
|
||||||
default:
|
default:
|
||||||
throw RuntimeError(std::string("Unknown dac/adc index") +
|
throw RuntimeError(std::string("Unknown dac/adc index") +
|
||||||
std::to_string(index));
|
std::to_string(index));
|
||||||
|
@ -707,6 +707,10 @@ int readADCFromFile(char *fname, int *value) {
|
|||||||
// open file
|
// open file
|
||||||
FILE *fd = fopen(fname, "r");
|
FILE *fd = fopen(fname, "r");
|
||||||
if (fd == NULL) {
|
if (fd == NULL) {
|
||||||
|
#ifdef VIRTUAL
|
||||||
|
LOG(logWARNING, ("Could not open file for reading [%s]\n", fname));
|
||||||
|
return OK;
|
||||||
|
#endif
|
||||||
LOG(logERROR, ("Could not open file for reading [%s]\n", fname));
|
LOG(logERROR, ("Could not open file for reading [%s]\n", fname));
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user