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

Fix for stopped devices that may prevent to start

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