1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00

set makeymakey node to use the module.exports style

This commit is contained in:
Dave C-J 2014-07-18 21:20:14 +01:00
parent 232a11983b
commit 76d05dc2cd

View File

@ -14,10 +14,11 @@
* limitations under the License.
**/
var RED = require(process.env.NODE_RED_HOME+"/red/red");
var hids = require('hidstream');
module.exports = function(RED) {
"use strict";
var hids = require('hidstream');
function MakeyNode(n) {
function MakeyNode(n) {
RED.nodes.createNode(this,n);
this.vid = 0x1b4f; // MakeyMakey vendor ID
this.pid = 0x2b75; // MakeyMakey product ID
@ -80,5 +81,6 @@ function MakeyNode(n) {
if (tout) { clearTimeout(tout); }
if (node.makey) { node.makey.device.close(); }
});
}
RED.nodes.registerType("makeymakey",MakeyNode);
}
RED.nodes.registerType("makeymakey",MakeyNode);