Exported Consts

This commit is contained in:
Nathan Kunicki 2018-06-27 16:44:06 +01:00
parent e0a6694bd9
commit ac9d17da92
3 changed files with 4 additions and 3 deletions

1
hub.ts
View File

@ -6,7 +6,6 @@ import { Port } from "./port";
import * as Consts from "./consts"; import * as Consts from "./consts";
import Debug = require("debug"); import Debug = require("debug");
import { METHODS } from "http";
const debug = Debug("hub"); const debug = Debug("hub");

View File

@ -4,6 +4,8 @@ import { Hub } from "./hub";
import { LPF2Hub } from "./lpf2hub"; import { LPF2Hub } from "./lpf2hub";
import { WeDo2Hub } from "./wedo2hub"; import { WeDo2Hub } from "./wedo2hub";
import * as Consts from "./consts";
import { EventEmitter} from "events"; import { EventEmitter} from "events";
import Debug = require("debug"); import Debug = require("debug");
@ -135,4 +137,4 @@ export class LPF2 extends EventEmitter {
} }
export default LPF2; export default LPF2;
export { Hub, WeDo2Hub, LPF2Hub }; export { Hub, WeDo2Hub, LPF2Hub, Consts };

View File

@ -17,7 +17,7 @@ export class WeDo2Hub extends Hub {
public static IsWeDo2Hub (peripheral: Peripheral) { 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);
} }