From 0a7809286b6dfc49cd5eb4e0b389b621cb142e00 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Thu, 10 Sep 2020 11:47:42 +0200 Subject: [PATCH] eiger temp fix: tempfpgafl and tempfpgafr cannot be used during blocking acquire as it goes through control server now --- slsDetectorSoftware/include/Detector.h | 9 +++++---- slsDetectorSoftware/src/CmdProxy.h | 6 ++++-- slsDetectorSoftware/src/Module.cpp | 4 ++++ 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/slsDetectorSoftware/include/Detector.h b/slsDetectorSoftware/include/Detector.h index 24a9b17e3..f4d015aeb 100644 --- a/slsDetectorSoftware/include/Detector.h +++ b/slsDetectorSoftware/include/Detector.h @@ -354,12 +354,13 @@ class Detector { /** * (Degrees) - * [Gotthard] Options: TEMPERATURE_ADC, TEMPERATURE_FPGA - * [Jungfrau] Options: TEMPERATURE_ADC, TEMPERATURE_FPGA + * [Gotthard] Options: TEMPERATURE_ADC, TEMPERATURE_FPGA \n + * [Jungfrau] Options: TEMPERATURE_ADC, TEMPERATURE_FPGA \n * [Eiger] Options: TEMPERATURE_FPGA, TEMPERATURE_FPGAEXT, TEMPERATURE_10GE, * TEMPERATURE_DCDC, TEMPERATURE_SODL, TEMPERATURE_SODR, TEMPERATURE_FPGA2, - * TEMPERATURE_FPGA3 - * [CTB] Options: SLOW_ADC_TEMP + * TEMPERATURE_FPGA3 \n + * Cannot call TEMPERATURE_FPGA2 and TEMPERATURE_FPGA3 when blocking acquire + * in progress \n [CTB] Options: SLOW_ADC_TEMP */ Result getTemperature(defs::dacIndex index, Positions pos = {}) const; diff --git a/slsDetectorSoftware/src/CmdProxy.h b/slsDetectorSoftware/src/CmdProxy.h index 0f69c8a31..fa6ecc711 100644 --- a/slsDetectorSoftware/src/CmdProxy.h +++ b/slsDetectorSoftware/src/CmdProxy.h @@ -1282,11 +1282,13 @@ class CmdProxy { GET_IND_COMMAND( temp_fpgafl, getTemperature, slsDetectorDefs::TEMPERATURE_FPGA2, " °C", - "[n_value]\n\t[Eiger]Temperature of the left front end board fpga"); + "[n_value]\n\t[Eiger]Temperature of the left front end board fpga. " + "Cannot call this while blocking acquire is going on."); GET_IND_COMMAND( temp_fpgafr, getTemperature, slsDetectorDefs::TEMPERATURE_FPGA3, " °C", - "[n_value]\n\t[Eiger]Temperature of the left front end board fpga"); + "[n_value]\n\t[Eiger]Temperature of the left front end board fpga. " + "Cannot call this while blocking acquire is going on."); GET_IND_COMMAND(temp_slowadc, getTemperature, slsDetectorDefs::SLOW_ADC_TEMP, " °C", diff --git a/slsDetectorSoftware/src/Module.cpp b/slsDetectorSoftware/src/Module.cpp index e24d39e53..c383a61a2 100644 --- a/slsDetectorSoftware/src/Module.cpp +++ b/slsDetectorSoftware/src/Module.cpp @@ -357,6 +357,10 @@ void Module::setImageTestMode(const int value) { } int Module::getADC(dacIndex index) const { + // cannot access fpga links simultaneously (eiger) temp fix + if (index == TEMPERATURE_FPGA2 || index == TEMPERATURE_FPGA3) { + return sendToDetector(F_GET_ADC, index); + } return sendToDetectorStop(F_GET_ADC, index); }