Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • dt/ds/e2sextupole
1 result
Show changes
Commits on Source (8)
check and fix ResonanceStrength handling
fix units fix units
\ No newline at end of file
...@@ -617,7 +617,7 @@ void E2Sextupole::write_ResonanceStrength(Tango::WAttribute &attr) ...@@ -617,7 +617,7 @@ void E2Sextupole::write_ResonanceStrength(Tango::WAttribute &attr)
Tango::DeviceAttribute watt("Current", curr_out[0]); Tango::DeviceAttribute watt("Current", curr_out[0]);
current_dev->write_attribute(watt); current_dev->write_attribute(watt);
wValResStrength = w_val; wValResStrength = w_val;
//*attr_ResonanceStrength_read = w_val; *attr_ResonanceStrength_read = w_val;
set_strength[0] = newStrength; set_strength[0] = newStrength;
strengthAtt->set_write_value(set_strength[0]); strengthAtt->set_write_value(set_strength[0]);
/*----- PROTECTED REGION END -----*/ // E2Sextupole::write_ResonanceStrength /*----- PROTECTED REGION END -----*/ // E2Sextupole::write_ResonanceStrength
...@@ -793,7 +793,7 @@ void E2Sextupole::reset() ...@@ -793,7 +793,7 @@ void E2Sextupole::reset()
//-------------------------------------------------------- //--------------------------------------------------------
/** /**
* Command ResetResonanceStrength related method * Command ResetResonanceStrength related method
* Description: Reset ResonanceStrength to 0 * Description: Transfer ResonanceStranght to CorrectionStrength and set ResonanceStrength to 0. Strngth is not modified
* *
*/ */
//-------------------------------------------------------- //--------------------------------------------------------
...@@ -806,24 +806,16 @@ void E2Sextupole::reset_resonance_strength() ...@@ -806,24 +806,16 @@ void E2Sextupole::reset_resonance_strength()
// Add your own code // Add your own code
/* clang-format off */ /* clang-format off */
//force to 0 resonance strength //transfer resonance strength to correction strength and than force to 0 resonance strength
omni_mutex_lock guardio(iomutex); omni_mutex_lock guardio(iomutex);
/*
Tango::DevDouble newStrength;
newStrength = wValCorrStrength;
std::vector<double> req_strength;
std::vector<double> curr_out;
req_strength.push_back(newStrength);
sextupole->compute_currents(magnet_rigidity, req_strength, curr_out);
Tango::DeviceAttribute watt("Current", curr_out[0]);
current_dev->write_attribute(watt);
*/
wValCorrStrength += wValResStrength; wValCorrStrength += wValResStrength;
wValResStrength = 0.0; wValResStrength = 0.0;
//set_strength[0] = newStrength;
//strengthAtt->set_write_value(set_strength[0]);
correctionAtt->set_write_value(wValCorrStrength); correctionAtt->set_write_value(wValCorrStrength);
*attr_CorrectionStrength_read = wValCorrStrength;
resonanceAtt->set_write_value(0.0); resonanceAtt->set_write_value(0.0);
*attr_ResonanceStrength_read = 0.0;
/*----- PROTECTED REGION END -----*/ // E2Sextupole::reset_resonance_strength /*----- PROTECTED REGION END -----*/ // E2Sextupole::reset_resonance_strength
} }
//-------------------------------------------------------- //--------------------------------------------------------
......
...@@ -286,7 +286,7 @@ public: ...@@ -286,7 +286,7 @@ public:
virtual bool is_Reset_allowed(const CORBA::Any &any); virtual bool is_Reset_allowed(const CORBA::Any &any);
/** /**
* Command ResetResonanceStrength related method * Command ResetResonanceStrength related method
* Description: Reset ResonanceStrength to 0 * Description: Transfer ResonanceStranght to CorrectionStrength and set ResonanceStrength to 0. Strngth is not modified
* *
*/ */
virtual void reset_resonance_strength(); virtual void reset_resonance_strength();
......
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
</argout> </argout>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/> <status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
</commands> </commands>
<commands name="ResetResonanceStrength" description="Reset ResonanceStrength to 0" execMethod="reset_resonance_strength" displayLevel="OPERATOR" polledPeriod="0" isDynamic="false"> <commands name="ResetResonanceStrength" description="Transfer ResonanceStranght to CorrectionStrength and set ResonanceStrength to 0. Strngth is not modified" execMethod="reset_resonance_strength" displayLevel="OPERATOR" polledPeriod="0" isDynamic="false">
<argin description=""> <argin description="">
<type xsi:type="pogoDsl:VoidType"/> <type xsi:type="pogoDsl:VoidType"/>
</argin> </argin>
......
...@@ -48,7 +48,7 @@ DECLARE_CRASH_HANDLER ...@@ -48,7 +48,7 @@ DECLARE_CRASH_HANDLER
int main(int argc,char *argv[]) int main(int argc,char *argv[])
{ {
INSTALL_CRASH_HANDLER INSTALL_CRASH_HANDLER
Tango::Util *tg; Tango::Util *tg = nullptr;
try try
{ {
// Initialise the device server // Initialise the device server
......