diff --git a/ABOUT.md b/ABOUT.md index f339b32..1cfa734 100644 --- a/ABOUT.md +++ b/ABOUT.md @@ -31,11 +31,11 @@ While most Powered UP components and Hubs are compatible with each other, there * The Boost Color and Distance sensor only works in color mode with the WeDo 2.0 Smart Hub. -* When used with the WeDo 2.0 Smart Hub, the Boost Interactive Motor does not support rotating the motor by angle. +* When used with the WeDo 2.0 Smart Hub, the Boost Tacho Motor does not support rotating the motor by angle. -* When used with the Powered Up Hub, the Boost Interactive Motor does not support rotating the motor by angle. It also does not support rotation detection. +* When used with the Powered Up Hub, the Boost Tacho Motor does not support rotating the motor by angle. It also does not support rotation detection. -* Plugging two Boost Interactive Motors into the Powered Up Hub will crash the Hub (This requires a firmware update from LEGO to fix). +* Plugging two Boost Tacho Motors into the Powered Up Hub will crash the Hub (This requires a firmware update from LEGO to fix). ### Usage diff --git a/README.md b/README.md index 02fbb9b..412fbc8 100644 --- a/README.md +++ b/README.md @@ -31,11 +31,11 @@ While most Powered UP components and Hubs are compatible with each other, there * The Boost Color and Distance sensor only works in color mode with the WeDo 2.0 Smart Hub. -* When used with the WeDo 2.0 Smart Hub, the Boost Interactive Motor does not support rotating the motor by angle. +* When used with the WeDo 2.0 Smart Hub, the Boost Tacho Motor does not support rotating the motor by angle. -* When used with the Powered Up Hub, the Boost Interactive Motor does not support rotating the motor by angle. It also does not support rotation detection. +* When used with the Powered Up Hub, the Boost Tacho Motor does not support rotating the motor by angle. It also does not support rotation detection. -* Plugging two Boost Interactive Motors into the Powered Up Hub will crash the Hub (This requires a firmware update from LEGO to fix). +* Plugging two Boost Tacho Motors into the Powered Up Hub will crash the Hub (This requires a firmware update from LEGO to fix). ### Usage diff --git a/boostmovehub.ts b/boostmovehub.ts index 2eb37eb..96e7e59 100644 --- a/boostmovehub.ts +++ b/boostmovehub.ts @@ -82,7 +82,7 @@ export class BoostMoveHub extends LPF2Hub { return new Promise((resolve, reject) => { if (time) { - if (portObj.type === Consts.Devices.BOOST_INTERACTIVE_MOTOR || portObj.type === Consts.Devices.BOOST_MOVE_HUB_MOTOR) { + if (portObj.type === Consts.Devices.BOOST_TACHO_MOTOR || portObj.type === Consts.Devices.BOOST_MOVE_HUB_MOTOR) { portObj.busy = true; let data = null; if (portObj.id === "AB") { @@ -109,7 +109,7 @@ export class BoostMoveHub extends LPF2Hub { } else { - if (portObj.type === Consts.Devices.BOOST_INTERACTIVE_MOTOR || portObj.type === Consts.Devices.BOOST_MOVE_HUB_MOTOR) { + if (portObj.type === Consts.Devices.BOOST_TACHO_MOTOR || portObj.type === Consts.Devices.BOOST_MOVE_HUB_MOTOR) { portObj.busy = true; let data = null; if (portObj.id === "AB") { @@ -163,8 +163,8 @@ export class BoostMoveHub extends LPF2Hub { */ public setMotorAngle (port: string, angle: number, speed: number | [number, number] = 100) { const portObj = this._portLookup(port); - if (!(portObj.type === Consts.Devices.BOOST_INTERACTIVE_MOTOR || portObj.type === Consts.Devices.BOOST_MOVE_HUB_MOTOR)) { - throw new Error("Angle rotation is only available when using a Boost Interactive Motor or Boost Move Hub Motor"); + if (!(portObj.type === Consts.Devices.BOOST_TACHO_MOTOR || portObj.type === Consts.Devices.BOOST_MOVE_HUB_MOTOR)) { + throw new Error("Angle rotation is only available when using a Boost Tacho Motor or Boost Move Hub Motor"); } if (portObj.id !== "AB" && speed instanceof Array) { throw new Error(`Port ${portObj.id} can only accept a single speed`); diff --git a/consts.ts b/consts.ts index 6141fd3..876655d 100644 --- a/consts.ts +++ b/consts.ts @@ -14,7 +14,7 @@ export enum Devices { WEDO2_TILT = 34, WEDO2_DISTANCE = 35, BOOST_DISTANCE = 37, - BOOST_INTERACTIVE_MOTOR = 38, + BOOST_TACHO_MOTOR = 38, BOOST_MOVE_HUB_MOTOR = 39, BOOST_TILT = 40, POWERED_UP_REMOTE_BUTTON = 55 diff --git a/hub.ts b/hub.ts index 4dc1372..23cd983 100644 --- a/hub.ts +++ b/hub.ts @@ -348,7 +348,7 @@ export class Hub extends EventEmitter { return 0x02; case Consts.Devices.TRAIN_MOTOR: return 0x02; - case Consts.Devices.BOOST_INTERACTIVE_MOTOR: + case Consts.Devices.BOOST_TACHO_MOTOR: return 0x02; case Consts.Devices.BOOST_MOVE_HUB_MOTOR: return 0x02; diff --git a/lpf2hub.ts b/lpf2hub.ts index 90dec0b..cc4a483 100644 --- a/lpf2hub.ts +++ b/lpf2hub.ts @@ -280,7 +280,7 @@ export class LPF2Hub extends Hub { this.emit("tilt", port.id, this._lastTiltX, this._lastTiltY); break; } - case Consts.Devices.BOOST_INTERACTIVE_MOTOR: + case Consts.Devices.BOOST_TACHO_MOTOR: { const rotation = data.readInt32LE(2); /** diff --git a/wedo2smarthub.ts b/wedo2smarthub.ts index b77935e..d9533ab 100644 --- a/wedo2smarthub.ts +++ b/wedo2smarthub.ts @@ -288,7 +288,7 @@ export class WeDo2SmartHub extends Hub { this.emit("tilt", port.id, this._lastTiltX, this._lastTiltY); break; } - case Consts.Devices.BOOST_INTERACTIVE_MOTOR: + case Consts.Devices.BOOST_TACHO_MOTOR: { const rotation = data.readInt32LE(2); /**