diff --git a/src/lpf2hub.ts b/src/lpf2hub.ts index 3a56712..a6fe694 100644 --- a/src/lpf2hub.ts +++ b/src/lpf2hub.ts @@ -91,12 +91,12 @@ export class LPF2Hub extends Hub { */ public setLEDColor (color: number | boolean) { return new Promise((resolve, reject) => { - let data = Buffer.from([0x41, 0x32, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00]); + let data = Buffer.from([0x41, this._ledPort, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00]); this._writeMessage(Consts.BLECharacteristic.LPF2_ALL, data); if (typeof color === "boolean") { color = 0; } - data = Buffer.from([0x81, 0x32, 0x11, 0x51, 0x00, color]); + data = Buffer.from([0x81, this._ledPort, 0x11, 0x51, 0x00, color]); this._writeMessage(Consts.BLECharacteristic.LPF2_ALL, data); return resolve(); });