mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
update path to red.js to use environmnet variable
This commit is contained in:
parent
50025428a5
commit
75aaaab1a9
@ -17,7 +17,7 @@
|
|||||||
// Sample Node-RED node file
|
// Sample Node-RED node file
|
||||||
|
|
||||||
// Require main module
|
// Require main module
|
||||||
var RED = require("../../red/red");
|
var RED = require(process.env.NODE_RED_HOME+"/red/red");
|
||||||
var HID = require('node-hid');
|
var HID = require('node-hid');
|
||||||
var device;
|
var device;
|
||||||
var node;
|
var node;
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
**/
|
**/
|
||||||
|
|
||||||
//might need to modify accordingly
|
//might need to modify accordingly
|
||||||
var RED = require("../../red/red");
|
var RED = require(process.env.NODE_RED_HOME+"/red/red");
|
||||||
|
|
||||||
//import noble
|
//import noble
|
||||||
var noble = require('noble');
|
var noble = require('noble');
|
||||||
|
@ -14,17 +14,14 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
**/
|
**/
|
||||||
|
|
||||||
// Sample Node-RED node file
|
|
||||||
|
|
||||||
// Require main module
|
// Require main module
|
||||||
var RED = require("../../red/red");
|
var RED = require(process.env.NODE_RED_HOME+"/red/red");
|
||||||
var SensorTag = require('sensortag');
|
var SensorTag = require('sensortag');
|
||||||
var stag;
|
var stag;
|
||||||
var node;
|
var node;
|
||||||
|
|
||||||
// The main node definition - most things happen in here
|
// The main node definition - most things happen in here
|
||||||
function sensorTagNode(n) {
|
function sensorTagNode(n) {
|
||||||
// Create a RED node
|
|
||||||
RED.nodes.createNode(this,n);
|
RED.nodes.createNode(this,n);
|
||||||
this.name = n.name;
|
this.name = n.name;
|
||||||
this.topic = n.topic;
|
this.topic = n.topic;
|
||||||
@ -98,8 +95,6 @@ function sensorTagNode(n) {
|
|||||||
//console.log("reconfig");
|
//console.log("reconfig");
|
||||||
enable();
|
enable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function enable() {
|
function enable() {
|
||||||
@ -139,8 +134,4 @@ function enable() {
|
|||||||
stag.unnotifySimpleKey(function() {});
|
stag.unnotifySimpleKey(function() {});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Register the node by name. This must be called before overriding any of the
|
|
||||||
// Node functions.
|
|
||||||
RED.nodes.registerType("sensorTag",sensorTagNode);
|
RED.nodes.registerType("sensorTag",sensorTagNode);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user