diff --git a/lpf2.ts b/lpf2.ts index cad88c4..8493bb4 100644 --- a/lpf2.ts +++ b/lpf2.ts @@ -64,8 +64,6 @@ export class LPF2 extends EventEmitter { return; } - console.log(peripheral); - peripheral.removeAllListeners(); noble.stopScanning(); noble.startScanning(); diff --git a/wedo2hub.ts b/wedo2hub.ts index 188a998..581d414 100644 --- a/wedo2hub.ts +++ b/wedo2hub.ts @@ -59,12 +59,12 @@ export class WeDo2Hub extends Hub { public setLEDColor (color: number | boolean) { return new Promise((resolve, reject) => { let data = Buffer.from([0x06, 0x17, 0x01, 0x01]); - this._writeMessage(Consts.BLECharacteristics.WEDO2_MOTOR_VALUE_WRITE, data); + this._writeMessage(Consts.BLECharacteristics.WEDO2_PORT_TYPE_WRITE, data); if (color === false) { color = 0; } data = Buffer.from([0x06, 0x04, 0x01, color]); - this._writeMessage(Consts.BLECharacteristics.WEDO2_PORT_TYPE_WRITE, data); + this._writeMessage(Consts.BLECharacteristics.WEDO2_MOTOR_VALUE_WRITE, data); return resolve(); }); }