Skip to content

Commit fbaf666

Browse files
committed
Merge branch 'master' of github.com:OpenZWave/node-openzwave-shared
2 parents d89c82b + 0922116 commit fbaf666

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

src/openzwave-nodes.cc

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,19 @@ namespace OZW {
104104
OpenZWave::Manager::Get()->PressButton(*ozwvid);
105105
}
106106
}
107-
108-
107+
108+
// ===================================================================
109+
NAN_METHOD(OZW::ReleaseButton)
110+
// ===================================================================
111+
{
112+
Nan::HandleScope scope;
113+
OpenZWave::ValueID* ozwvid = populateValueId(info);
114+
if (ozwvid == NULL) {
115+
Nan::ThrowTypeError("OpenZWave valueId not found");
116+
} else {
117+
OpenZWave::Manager::Get()->ReleaseButton(*ozwvid);
118+
}
119+
}
109120
/*
110121
* Write a new location string to the device, if supported.
111122
*/

src/openzwave.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ namespace OZW {
117117
Nan::SetPrototypeMethod(t, "switchAllOn", OZW::SwitchAllOn);
118118
Nan::SetPrototypeMethod(t, "switchAllOff", OZW::SwitchAllOff);
119119
Nan::SetPrototypeMethod(t, "pressButton", OZW::PressButton);
120+
Nan::SetPrototypeMethod(t, "releaseButton", OZW::ReleaseButton);
120121
//
121122
Nan::SetPrototypeMethod(t, "refreshNodeInfo", OZW::RefreshNodeInfo); // ** new
122123
Nan::SetPrototypeMethod(t, "requestNodeState", OZW::RequestNodeState); // ** new

src/openzwave.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ namespace OZW {
111111
static NAN_METHOD(SwitchAllOn);
112112
static NAN_METHOD(SwitchAllOff);
113113
static NAN_METHOD(PressButton);
114+
static NAN_METHOD(ReleaseButton);
114115
//
115116
static NAN_METHOD(RefreshNodeInfo);
116117
static NAN_METHOD(RequestNodeState);

0 commit comments

Comments
 (0)