Closed vibr77-zz closed 6 years ago
Hello the SetValueLabel is missing on the lib and it is a useful one
I have written the following function File open-zwave-values.cc
// ================================================================= NAN_METHOD(OZW::SetValueLabel) // ================================================================= { OpenZWave::Manager* mgr = OpenZWave::Manager::Get(); Nan::HandleScope scope; CheckMinArgs(1, "valueid, label"); uint8 nodeid = info[0]->ToNumber()->Value(); OpenZWave::ValueID* vit = populateValueId(info); uint8 validx = (info[0]->IsObject()) ? 1 : 4; std::string location = (*String::Utf8Value(info[validx]->ToString())); if (vit) { OpenZWave::Manager::Get()->SetValueLabel(*vit, location); //cout << location << endl } }
in openzwave.hpp: static NAN_METHOD(SetValueLabel);
static NAN_METHOD(SetValueLabel);
in openzwave.cc: Nan::SetPrototypeMethod(t, "setValueLabel", OZW::SetValueLabel);
Nan::SetPrototypeMethod(t, "setValueLabel", OZW::SetValueLabel);
Could you please integrate this code in the master branch ?
Thanks Vincent
good point, I'll add that shortly.
thanks, resolving
Hello the SetValueLabel is missing on the lib and it is a useful one
I have written the following function File open-zwave-values.cc
in openzwave.hpp:
static NAN_METHOD(SetValueLabel);
in openzwave.cc:
Nan::SetPrototypeMethod(t, "setValueLabel", OZW::SetValueLabel);
Could you please integrate this code in the master branch ?
Thanks Vincent