Commit 8dbb16d3 authored by Graziano Scalamera's avatar Graziano Scalamera
Browse files

Force Current write value to 0 when switched OFF or STANDBY

parent 692ac95a
...@@ -375,7 +375,15 @@ int deltathread::off(void) ...@@ -375,7 +375,15 @@ int deltathread::off(void)
INFO_STREAM << __FUNCTION__<< ": sendCmd failed, err="<<e.errors[0].desc; INFO_STREAM << __FUNCTION__<< ": sendCmd failed, err="<<e.errors[0].desc;
} }
DEBUG_STREAM<<"deltathread::off "<<s.c_str()<<" command"<<endl; DEBUG_STREAM<<"deltathread::off "<<s.c_str()<<" command"<<endl;
try {
t_delta->currentsetpoint = 0.0;
Tango::MultiAttribute *attr_list = t_delta->get_device_attr();
Tango::WAttribute *attr_set_current;
attr_set_current = &(attr_list->get_w_attr_by_name("Current"));
attr_set_current->set_write_value(t_delta->currentsetpoint);
} catch(Tango::DevFailed &e) {
INFO_STREAM << __FUNCTION__<< ": set_write_value failed, err="<<e.errors[0].desc;
}
return 0; return 0;
} }
...@@ -458,6 +466,15 @@ int deltathread::standby(void) ...@@ -458,6 +466,15 @@ int deltathread::standby(void)
DEBUG_STREAM<<"deltathread::standby "<<s.c_str()<<" command"<<endl; DEBUG_STREAM<<"deltathread::standby "<<s.c_str()<<" command"<<endl;
} }
try {
t_delta->currentsetpoint = 0.0;
Tango::MultiAttribute *attr_list = t_delta->get_device_attr();
Tango::WAttribute *attr_set_current;
attr_set_current = &(attr_list->get_w_attr_by_name("Current"));
attr_set_current->set_write_value(t_delta->currentsetpoint);
} catch(Tango::DevFailed &e) {
INFO_STREAM << __FUNCTION__<< ": set_write_value failed, err="<<e.errors[0].desc;
}
return 0; return 0;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment