Commit 8046bf9a authored by Jean-Luc Pons's avatar Jean-Luc Pons
Browse files

Fix for stopped devices that may prevent to start

parent 35044f0f
...@@ -457,13 +457,22 @@ void AttributeCombiner::add_dynamic_attributes() ...@@ -457,13 +457,22 @@ void AttributeCombiner::add_dynamic_attributes()
// Retrieve the enum list from the first attribute // Retrieve the enum list from the first attribute
// All grouped attributes must have the same list // All grouped attributes must have the same list
// get_device starts at one !!!!! // Use the first enabled device
Tango::AttributeInfoEx ae = deviceGroup->get_device(1)->get_attribute_config(attNames[0]); int i = 0;
Tango::Attribute &eAtt = get_device_attr()->get_attr_by_name(name.c_str()); bool found = false;
Tango::MultiAttrProp<Tango::DevEnum> presetProps; while(!found && i<(int)deviceList.size()) {
eAtt.get_properties(presetProps); found = !isDisabled(i);
presetProps.enum_labels = ae.enum_labels; if(!found) i++;
eAtt.set_properties(presetProps); }
if(found) {
Tango::AttributeInfoEx ae = deviceGroup->get_device(deviceList[i])->get_attribute_config(attNames[0]);
Tango::Attribute &eAtt = get_device_attr()->get_attr_by_name(name.c_str());
Tango::MultiAttrProp<Tango::DevEnum> presetProps;
eAtt.get_properties(presetProps);
presetProps.enum_labels = ae.enum_labels;
eAtt.set_properties(presetProps);
}
} }
......
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