From e60598bba9e7aa24714623bdd41ecba251ccc304 Mon Sep 17 00:00:00 2001 From: Nathan Kunicki Date: Thu, 2 Aug 2018 20:52:42 +0100 Subject: [PATCH] Fixed documentation --- DOCS.md | 4 ++-- README.md | 4 ++-- boostmovehub.ts | 2 +- lpf2.ts | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/DOCS.md b/DOCS.md index ec2c263..f0501ad 100644 --- a/DOCS.md +++ b/DOCS.md @@ -64,7 +64,7 @@ Emits when a LPF2 Hub device is found. | Param | Type | | --- | --- | -| hub | [WeDo2SmartHub](#WeDo2SmartHub) \| LPF2Hub | +| hub | [WeDo2SmartHub](#WeDo2SmartHub) \| [BoostMoveHub](#BoostMoveHub) \| [PUPHub](#PUPHub) \| [PUPRemote](#PUPRemote) | @@ -492,7 +492,7 @@ Rotate a motor by a given angle. | --- | --- | --- | --- | | port | string | | | | angle | number | | How much the motor should be rotated (in degrees). | -| [speed] | number | 100 | How fast the motor should be rotated. | +| [speed] | number \| Array.<number> | 100 | For forward, a value between 1 - 100 should be set. For reverse, a value between -1 to -100. Stop is 0. If you are specifying port AB to control both motors, you can optionally supply a tuple of speeds. | diff --git a/README.md b/README.md index 8328122..76969bd 100644 --- a/README.md +++ b/README.md @@ -116,7 +116,7 @@ Emits when a LPF2 Hub device is found. | Param | Type | | --- | --- | -| hub | [WeDo2SmartHub](#WeDo2SmartHub) \| LPF2Hub | +| hub | [WeDo2SmartHub](#WeDo2SmartHub) \| [BoostMoveHub](#BoostMoveHub) \| [PUPHub](#PUPHub) \| [PUPRemote](#PUPRemote) | @@ -544,7 +544,7 @@ Rotate a motor by a given angle. | --- | --- | --- | --- | | port | string | | | | angle | number | | How much the motor should be rotated (in degrees). | -| [speed] | number | 100 | How fast the motor should be rotated. | +| [speed] | number \| Array.<number> | 100 | For forward, a value between 1 - 100 should be set. For reverse, a value between -1 to -100. Stop is 0. If you are specifying port AB to control both motors, you can optionally supply a tuple of speeds. | diff --git a/boostmovehub.ts b/boostmovehub.ts index ade6ad2..0aae010 100644 --- a/boostmovehub.ts +++ b/boostmovehub.ts @@ -138,7 +138,7 @@ export class BoostMoveHub extends LPF2Hub { * @method BoostMoveHub#setMotorAngle * @param {string} port * @param {number} angle How much the motor should be rotated (in degrees). - * @param {number} [speed=100] How fast the motor should be rotated. + * @param {number | Array.} [speed=100] For forward, a value between 1 - 100 should be set. For reverse, a value between -1 to -100. Stop is 0. If you are specifying port AB to control both motors, you can optionally supply a tuple of speeds. * @returns {Promise} Resolved upon successful completion of command (ie. once the motor is finished). */ public setMotorAngle (port: string, angle: number, speed: number | [number, number] = 100) { diff --git a/lpf2.ts b/lpf2.ts index 1e081f2..c3a059e 100644 --- a/lpf2.ts +++ b/lpf2.ts @@ -92,7 +92,7 @@ export class LPF2 extends EventEmitter { /** * Emits when a LPF2 Hub device is found. * @event LPF2#discover - * @param {WeDo2SmartHub | LPF2Hub} hub + * @param {WeDo2SmartHub | BoostMoveHub | PUPHub | PUPRemote} hub */ this.emit("discover", hub);