From f9cea9a6bf40d3f51efacaf17fb397158a7e47e5 Mon Sep 17 00:00:00 2001 From: Nathan Kellenicki Date: Sun, 8 Dec 2019 22:59:25 -0800 Subject: [PATCH] Yay, port object is no longer a thing --- src/duplotrainbase.ts | 1 - src/hub.ts | 1 - src/port.ts | 33 --------------------------------- 3 files changed, 35 deletions(-) delete mode 100644 src/port.ts diff --git a/src/duplotrainbase.ts b/src/duplotrainbase.ts index 596cbd3..fd24fc3 100644 --- a/src/duplotrainbase.ts +++ b/src/duplotrainbase.ts @@ -1,7 +1,6 @@ import { Peripheral } from "@abandonware/noble"; import { LPF2Hub } from "./lpf2hub"; -import { Port } from "./port"; import * as Consts from "./consts"; diff --git a/src/hub.ts b/src/hub.ts index 36fe735..76899f7 100644 --- a/src/hub.ts +++ b/src/hub.ts @@ -1,7 +1,6 @@ import { EventEmitter } from "events"; import { IBLEAbstraction } from "./interfaces"; -import { Port } from "./port"; import * as Consts from "./consts"; diff --git a/src/port.ts b/src/port.ts deleted file mode 100644 index 0a279cb..0000000 --- a/src/port.ts +++ /dev/null @@ -1,33 +0,0 @@ -import * as Consts from "./consts"; - - -export class Port { - - - public id: string; - public value: number; - public type: Consts.DeviceType; - public connected: boolean = false; - public busy: boolean = false; - public finished: (() => void) | null = null; - - private _eventTimer: NodeJS.Timer | null = null; - - constructor (id: string, value: number) { - this.id = id; - this.value = value; - this.type = Consts.DeviceType.UNKNOWN; - } - - public cancelEventTimer () { - if (this._eventTimer) { - clearTimeout(this._eventTimer); - this._eventTimer = null; - } - } - - public setEventTimer (timer: NodeJS.Timer) { - this._eventTimer = timer; - } - -}