From fbf5b5ccf3807ed3d692d2654a84ca1dcc21a2d7 Mon Sep 17 00:00:00 2001 From: Denis Pushkarev Date: Tue, 8 Jun 2021 20:40:15 +0300 Subject: [PATCH] Fix path for constants after renaming it --- src/hubs/lpf2hub.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hubs/lpf2hub.ts b/src/hubs/lpf2hub.ts index 806fb47..e7b7d0c 100644 --- a/src/hubs/lpf2hub.ts +++ b/src/hubs/lpf2hub.ts @@ -238,7 +238,7 @@ export class LPF2Hub extends BaseHub { const event = message[4]; const deviceType = event ? message.readUInt16LE(5) : 0; - if (event === Consts.AlertPayload.ATTACHED_IO) { + if (event === Consts.Event.ATTACHED_IO) { if (modeInfoDebug.enabled) { const deviceTypeName = Consts.DeviceTypeNames[message[5]] || "Unknown"; @@ -252,7 +252,7 @@ export class LPF2Hub extends BaseHub { const device = this._createDevice(deviceType, portId); this._attachDevice(device); - } else if (event === Consts.AlertPayload.DETACHED_IO) { + } else if (event === Consts.Event.DETACHED_IO) { const device = this._getDeviceByPortId(portId); if (device) { this._detachDevice(device); @@ -265,7 +265,7 @@ export class LPF2Hub extends BaseHub { } } - } else if (event === Consts.AlertPayload.ATTACHED_VIRTUAL_IO) { + } else if (event === Consts.Event.ATTACHED_VIRTUAL_IO) { const firstPortName = this.getPortNameForPortId(message[7]); const secondPortName = this.getPortNameForPortId(message[8]); // @ts-ignore NK These should never be undefined