I have notices that there is a big breaking change with values type list, seems that now valueID value is not the string metching the list value but is the index of the values array and also values array labels are prefixed with "<index>|". This is such a breaking change for me, did you do it on purpose or is it a bug?
case OpenZWave::ValueID::ValueType_List: {
::std::string val;
::std::vector < ::std::string > items;
// populate array of all available items in the list
OZWManager( GetValueListItems, value, &items);
AddArrayOfStringProp(valobj, values, items);
// populated selected element
OZWManager( GetValueListSelection, value, &val);
AddStringProp(valobj, value, val.c_str())
break;
}
After 1.5.x
case OpenZWave::ValueID::ValueType_List: {
std::string val;
int32 val;
std::vector < std::string > items;
std::vector < int32> itemsvalues;
// populate array of all available items in the list
OpenZWave::Manager::Get()->GetValueListItems(value, &items);
OpenZWave::Manager::Get()->GetValueListValues(value, &itemsvalues);
for (int i = 0; i != items.size(); i++){
items[i]=std::to_string(itemsvalues[i])+"|"+items[i];
}
AddArrayOfStringProp(valobj, values, items);
// populated selected element
OpenZWave::Manager::Get()->GetValueListSelection(value, &val);
AddStringProp(valobj, value, val.c_str())
AddIntegerProp(valobj, value, val);
break;
}
I have notices that there is a big breaking change with values type list, seems that now valueID value is not the string metching the list value but is the index of the values array and also values array labels are prefixed with
"<index>|"
. This is such a breaking change for me, did you do it on purpose or is it a bug?Here: https://github.com/OpenZWave/node-openzwave-shared/blob/master/src/utils.cc#L125
Before 1.5.x:
After 1.5.x
Can you revert this change?