From 6bfa704a6abc9d159fc025fbee2db03dcc6cf1f0 Mon Sep 17 00:00:00 2001 From: Nathan Kunicki Date: Tue, 12 Jun 2018 21:53:40 +0100 Subject: [PATCH] Boost Interactive Motor should not have constant mode --- boosthub.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/boosthub.js b/boosthub.js index 1ea4a59..00770e2 100644 --- a/boosthub.js +++ b/boosthub.js @@ -46,10 +46,11 @@ class BoostHub extends Hub { setMotorSpeed (port, speed, seconds) { const characteristic = this._characteristics[Consts.BLE.Characteristics.Boost.ALL]; if (characteristic) { - const data = Buffer.from([0x0c, 0x00, 0x81, this.ports[port].value, 0x11, 0x09, 0xff, 0xff, speed, 0x64, 0x7f, 0x03]); + /*const data = Buffer.from([0x0c, 0x00, 0x81, this.ports[port].value, 0x11, 0x09, 0xff, 0xff, speed, 0x64, 0x7f, 0x03]); if (seconds) { data.writeUInt16LE(seconds * 1000, 6); - } + }*/ + const data = Buffer.from([0x0c, 0x00, 0x81, this.ports[port].value, 0x11, 0x01, 0x00, 0x00, speed, 0x64, 0x7f, 0x03]); characteristic.write(data); } }