From d130808b3b053bf407b227650373ef9accf548cd Mon Sep 17 00:00:00 2001 From: Marco Buttu Date: Fri, 4 Sep 2020 19:17:31 +0200 Subject: [PATCH] This commit should fix issue 518 (#549) * Fix issue 518 * Fix issue 518 and normalize tabs --- .../src/MedicinaKBandDualFCore.cpp | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/Medicina/Servers/MedicinaKBandDualFReceiver/src/MedicinaKBandDualFCore.cpp b/Medicina/Servers/MedicinaKBandDualFReceiver/src/MedicinaKBandDualFCore.cpp index 422f829d9..13f15ccb8 100644 --- a/Medicina/Servers/MedicinaKBandDualFReceiver/src/MedicinaKBandDualFCore.cpp +++ b/Medicina/Servers/MedicinaKBandDualFReceiver/src/MedicinaKBandDualFCore.cpp @@ -141,14 +141,17 @@ void MedicinaKBandDualFCore::updateVertexTemperature() throw (ReceiversErrors::R { // Not under the mutex protection because the m_control object is thread safe (at the micro controller board stage) try { - m_envTemperature=m_control->vertexTemperature(voltage2Celsius, - MCB_CMD_DATA_TYPE_F32, + m_envTemperature.temperature=m_control->vertexTemperature( + voltage2Celsius, + MCB_CMD_DATA_TYPE_F32, MCB_PORT_TYPE_AD24, MCB_PORT_NUMBER_00_07, 5 ); + m_envTemperature.timestamp = getTimeStamp(); } catch (IRA::ReceiverControlEx& ex) { + m_envTemperature.temperature = CEDUMMY; _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"MedicinaKBandDualFCore::updateVertexTemperature()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR); @@ -157,15 +160,18 @@ void MedicinaKBandDualFCore::updateVertexTemperature() throw (ReceiversErrors::R clearStatusBit(CONNECTIONERROR); // The communication was ok so clear the CONNECTIONERROR bit } + void MedicinaKBandDualFCore::updateCryoCoolHead() throw (ReceiversErrors::ReceiverControlBoardErrorExImpl) { - m_cryoCoolHead=0.0; + m_cryoCoolHead.temperature=0.0; + m_cryoCoolHead.timestamp = getTimeStamp(); } void MedicinaKBandDualFCore::updateCryoCoolHeadWin() throw (ReceiversErrors::ReceiverControlBoardErrorExImpl) { - m_cryoCoolHeadWin=0.0; + m_cryoCoolHeadWin.temperature=0.0; + m_cryoCoolHeadWin.timestamp = getTimeStamp(); } @@ -173,9 +179,11 @@ void MedicinaKBandDualFCore::updateCryoLNA() throw (ReceiversErrors::ReceiverCon { // Not under the mutex protection because the m_control object is thread safe (at the micro controller board stage) try { - m_cryoLNA=m_control->cryoTemperature(1,voltage2Kelvin); + m_cryoLNA.temperature=m_control->cryoTemperature(1,voltage2Kelvin); + m_cryoLNA.timestamp = getTimeStamp(); } catch (IRA::ReceiverControlEx& ex) { + m_cryoLNA.temperature = CEDUMMY; _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"MedicinaKBandDualFCore::updateCryoLNA()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR); @@ -189,9 +197,11 @@ void MedicinaKBandDualFCore::updateCryoLNAWin() throw (ReceiversErrors::Receiver { // Not under the mutex protection because the m_control object is thread safe (at the micro controller board stage) try { - m_cryoLNAWin=m_control->cryoTemperature(0,voltage2Kelvin); + m_cryoLNAWin.temperature=m_control->cryoTemperature(0,voltage2Kelvin); + m_cryoLNAWin.timestamp = getTimeStamp(); } catch (IRA::ReceiverControlEx& ex) { + m_cryoLNAWin.temperature = CEDUMMY; _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"MedicinaKBandDualFCore::updateCryoLNAWin()"); impl.setDetails(ex.what().c_str()); setStatusBit(CONNECTIONERROR); -- GitLab