Yay, port object is no longer a thing

This commit is contained in:
Nathan Kellenicki 2019-12-08 22:59:25 -08:00
parent a02249f696
commit f9cea9a6bf
3 changed files with 0 additions and 35 deletions

View File

@ -1,7 +1,6 @@
import { Peripheral } from "@abandonware/noble";
import { LPF2Hub } from "./lpf2hub";
import { Port } from "./port";
import * as Consts from "./consts";

View File

@ -1,7 +1,6 @@
import { EventEmitter } from "events";
import { IBLEAbstraction } from "./interfaces";
import { Port } from "./port";
import * as Consts from "./consts";

View File

@ -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;
}
}