Comparing version 0.1.0 to 0.1.1
{ | ||
"name": "rittal_pdu", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Allows easy control of Rittal PDU 7200.0014 power plugs.", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -22,3 +22,3 @@ NodeJS Rittal PDU package | ||
* `id` is the id of the corresponding Rittal device and should be an integer between 1 and 8. | ||
* The `callback` is called once the power plug answers or the operation times out. The callback should be a function that looks like: `function (error) { ... }`. On timeout `error` contains an error message else `this` will contain an object similar to the following | ||
* The `callback` is called once the power plug answers or the operation times out. The callback should be a function that looks like: `function (error, data) { ... }`. On timeout `error` contains an error message else `data` will contain an object similar to the following | ||
@@ -25,0 +25,0 @@ ````json |
@@ -140,3 +140,3 @@ 'use strict'; | ||
if (typeof(callback) === 'function') { | ||
callback.call(status_to_object(temp)); | ||
callback(null, status_to_object(temp)); | ||
} else { | ||
@@ -196,3 +196,3 @@ return status_to_object(temp); | ||
if (typeof(callback) === 'function') { | ||
callback.call(); | ||
callback(false); | ||
} | ||
@@ -199,0 +199,0 @@ } |
8572