From ac9d17da926a583bb76898274224ac94b9f60c4b Mon Sep 17 00:00:00 2001 From: Nathan Kunicki Date: Wed, 27 Jun 2018 16:44:06 +0100 Subject: [PATCH] Exported Consts --- hub.ts | 1 - lpf2.ts | 4 +++- wedo2hub.ts | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hub.ts b/hub.ts index 5f1f9bf..770dd75 100644 --- a/hub.ts +++ b/hub.ts @@ -6,7 +6,6 @@ import { Port } from "./port"; import * as Consts from "./consts"; import Debug = require("debug"); -import { METHODS } from "http"; const debug = Debug("hub"); diff --git a/lpf2.ts b/lpf2.ts index a174661..8493bb4 100644 --- a/lpf2.ts +++ b/lpf2.ts @@ -4,6 +4,8 @@ import { Hub } from "./hub"; import { LPF2Hub } from "./lpf2hub"; import { WeDo2Hub } from "./wedo2hub"; +import * as Consts from "./consts"; + import { EventEmitter} from "events"; import Debug = require("debug"); @@ -135,4 +137,4 @@ export class LPF2 extends EventEmitter { } export default LPF2; -export { Hub, WeDo2Hub, LPF2Hub }; +export { Hub, WeDo2Hub, LPF2Hub, Consts }; diff --git a/wedo2hub.ts b/wedo2hub.ts index 86f5f2c..e24c2f6 100644 --- a/wedo2hub.ts +++ b/wedo2hub.ts @@ -17,7 +17,7 @@ export class WeDo2Hub extends Hub { public static IsWeDo2Hub (peripheral: Peripheral) { - return (peripheral.advertisement.localName === Consts.BLENames.WEDO2_SMART_HUB_NAME && peripheral.advertisement.serviceUuids.indexOf(Consts.BLEServices.WEDO2_SMART_HUB) >= 0); + return (peripheral.advertisement.serviceUuids.indexOf(Consts.BLEServices.WEDO2_SMART_HUB) >= 0); }