mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-03-01 10:37:43 +00:00
set makeymakey node to use the module.exports style
This commit is contained in:
parent
232a11983b
commit
76d05dc2cd
@ -14,10 +14,11 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
**/
|
**/
|
||||||
|
|
||||||
var RED = require(process.env.NODE_RED_HOME+"/red/red");
|
module.exports = function(RED) {
|
||||||
var hids = require('hidstream');
|
"use strict";
|
||||||
|
var hids = require('hidstream');
|
||||||
|
|
||||||
function MakeyNode(n) {
|
function MakeyNode(n) {
|
||||||
RED.nodes.createNode(this,n);
|
RED.nodes.createNode(this,n);
|
||||||
this.vid = 0x1b4f; // MakeyMakey vendor ID
|
this.vid = 0x1b4f; // MakeyMakey vendor ID
|
||||||
this.pid = 0x2b75; // MakeyMakey product ID
|
this.pid = 0x2b75; // MakeyMakey product ID
|
||||||
@ -80,5 +81,6 @@ function MakeyNode(n) {
|
|||||||
if (tout) { clearTimeout(tout); }
|
if (tout) { clearTimeout(tout); }
|
||||||
if (node.makey) { node.makey.device.close(); }
|
if (node.makey) { node.makey.device.close(); }
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
RED.nodes.registerType("makeymakey",MakeyNode);
|
||||||
}
|
}
|
||||||
RED.nodes.registerType("makeymakey",MakeyNode);
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user