Yay, port object is no longer a thing
This commit is contained in:
parent
a02249f696
commit
f9cea9a6bf
@ -1,7 +1,6 @@
|
||||
import { Peripheral } from "@abandonware/noble";
|
||||
|
||||
import { LPF2Hub } from "./lpf2hub";
|
||||
import { Port } from "./port";
|
||||
|
||||
import * as Consts from "./consts";
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
import { EventEmitter } from "events";
|
||||
|
||||
import { IBLEAbstraction } from "./interfaces";
|
||||
import { Port } from "./port";
|
||||
|
||||
import * as Consts from "./consts";
|
||||
|
||||
|
33
src/port.ts
33
src/port.ts
@ -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;
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user