Skip to content
Snippets Groups Projects
Commit 352a1dfb authored by Jade PHAM's avatar Jade PHAM
Browse files

correction of cash in case that no probe connected to mcce

parent 29575e79
No related branches found
No related tags found
1 merge request!2correction of cash in case that no probe connected to mcce
...@@ -159,18 +159,6 @@ void MCCE2Electrometers::delete_device() ...@@ -159,18 +159,6 @@ void MCCE2Electrometers::delete_device()
// Delete device allocated objects // Delete device allocated objects
// Delete device's allocated object // Delete device's allocated object
if(this->_electrometerCH1)
{
delete this->_electrometerCH1;
this->_electrometerCH1 = 0;
}
if(this->_electrometerCH2)
{
delete this->_electrometerCH2;
this->_electrometerCH2 = 0;
}
DELETE_DEVSTRING_ATTRIBUTE(attr_range1_read); DELETE_DEVSTRING_ATTRIBUTE(attr_range1_read);
DELETE_DEVSTRING_ATTRIBUTE(attr_range2_read); DELETE_DEVSTRING_ATTRIBUTE(attr_range2_read);
DELETE_SCALAR_ATTRIBUTE(attr_electrometerChannel_read); DELETE_SCALAR_ATTRIBUTE(attr_electrometerChannel_read);
...@@ -520,7 +508,7 @@ void MCCE2Electrometers::write_electrometerChannel(Tango::WAttribute &attr) ...@@ -520,7 +508,7 @@ void MCCE2Electrometers::write_electrometerChannel(Tango::WAttribute &attr)
{ {
WARN_STREAM << "Cannot control electrometer on this channel : seems that nothing is connected on!" << std::endl; WARN_STREAM << "Cannot control electrometer on this channel : seems that nothing is connected on!" << std::endl;
// nothing is connected on this channel // nothing is connected on this channel
*attr_range1_read = &_notConnectedStr[0]; strcpy(*attr_range1_read,_notConnectedStr.c_str());
} }
} }
else if ( w_val == ELETRO_CHANNEL_TWO ) else if ( w_val == ELETRO_CHANNEL_TWO )
...@@ -538,7 +526,7 @@ void MCCE2Electrometers::write_electrometerChannel(Tango::WAttribute &attr) ...@@ -538,7 +526,7 @@ void MCCE2Electrometers::write_electrometerChannel(Tango::WAttribute &attr)
{ {
WARN_STREAM << "Cannot control electrometer on this channel : seems that nothing is connected on!" << std::endl; WARN_STREAM << "Cannot control electrometer on this channel : seems that nothing is connected on!" << std::endl;
//- warn nothing is connected on this channel //- warn nothing is connected on this channel
*attr_range2_read = &_notConnectedStr[0]; strcpy(*attr_range2_read,_notConnectedStr.c_str());
} }
} }
attr_electrometerChannel_write = w_val; attr_electrometerChannel_write = w_val;
...@@ -559,7 +547,7 @@ void MCCE2Electrometers::read_range1(Tango::Attribute &attr) ...@@ -559,7 +547,7 @@ void MCCE2Electrometers::read_range1(Tango::Attribute &attr)
/*----- PROTECTED REGION ID(MCCE2Electrometers::read_range1) ENABLED START -----*/ /*----- PROTECTED REGION ID(MCCE2Electrometers::read_range1) ENABLED START -----*/
if ( !this->_electrometerCH1 ) if ( !this->_electrometerCH1 )
{ {
*attr_range1_read = &_notConnectedStr[0]; strcpy(*attr_range1_read,_notConnectedStr.c_str());
} }
else else
{ {
...@@ -589,7 +577,7 @@ void MCCE2Electrometers::read_range2(Tango::Attribute &attr) ...@@ -589,7 +577,7 @@ void MCCE2Electrometers::read_range2(Tango::Attribute &attr)
/*----- PROTECTED REGION ID(MCCE2Electrometers::read_range2) ENABLED START -----*/ /*----- PROTECTED REGION ID(MCCE2Electrometers::read_range2) ENABLED START -----*/
if ( !this->_electrometerCH2 ) if ( !this->_electrometerCH2 )
{ {
*attr_range2_read = &_notConnectedStr[0]; strcpy(*attr_range2_read,_notConnectedStr.c_str());
} }
else else
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment