Commit 4b14838d authored by Spencer Williams's avatar Spencer Williams

some cleanup

parent 6d8d7a52
"use strict";
const MAX_PERIPHERALS = 8;
const NOBLE_HCI_DEVICE_ID = 1;
const DEFAULT_DEVICE_NAME = "Thingy";
// const THINGY_ADV_SERVICE_UUID = "ef6801009b3549339b1052ffa9740042";
// const TMS_SERVICE_UUID = "ef6804009b3549339b1052ffa9740042";
// const TMS_RAW_RX_CHAR_UUID = "ef6804069b3549339b1052ffa9740042";
// const TMS_RAW_RX_CHAR_LEN = 18;
const DISCOVER_RESTART_TIMEOUT = 5000; // XXX: Workaround for noble-device issue
const NOBLE_HCI_DEVICE_ID = 1;
const DEFAULT_DEVICE_NAME = "Thingy";
const DISCOVER_RESTART_TIMEOUT = 5000; // XXX: Workaround for noble-device issue
const APPLICATION_START_TIMEOUT = 5000; // XXX: Wait HCI devices on system startup
let Thingy = null;
......@@ -26,11 +20,9 @@ const thingyState = {
};
module.exports = function(RED) {
var async = require("async");
var noble = require("noble");
var semaphore = require("semaphore")(1);
function NobleConnectNode(config) {
const NobleConnectNode = (config) => {
RED.nodes.createNode(this, config);
var node = this;
......@@ -264,7 +256,7 @@ module.exports = function(RED) {
// remove listeners since they get added again on deploy
noble.removeAllListeners();
});
RED.nodes.registerType("noble-connect", NobleConnectNode);
}
RED.nodes.registerType("noble-connect", NobleConnectNode);
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment