Fixed documentation

This commit is contained in:
Nathan Kunicki 2018-08-02 20:52:42 +01:00
parent dc5094cf01
commit e60598bba9
4 changed files with 6 additions and 6 deletions

View File

@ -64,7 +64,7 @@ Emits when a LPF2 Hub device is found.
| Param | Type |
| --- | --- |
| hub | [<code>WeDo2SmartHub</code>](#WeDo2SmartHub) \| <code>LPF2Hub</code> |
| hub | [<code>WeDo2SmartHub</code>](#WeDo2SmartHub) \| [<code>BoostMoveHub</code>](#BoostMoveHub) \| [<code>PUPHub</code>](#PUPHub) \| [<code>PUPRemote</code>](#PUPRemote) |
<a name="WeDo2SmartHub"></a>
@ -492,7 +492,7 @@ Rotate a motor by a given angle.
| --- | --- | --- | --- |
| port | <code>string</code> | | |
| angle | <code>number</code> | | How much the motor should be rotated (in degrees). |
| [speed] | <code>number</code> | <code>100</code> | How fast the motor should be rotated. |
| [speed] | <code>number</code> \| <code>Array.&lt;number&gt;</code> | <code>100</code> | 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. |
<a name="LPF2Hub+setName"></a>

View File

@ -116,7 +116,7 @@ Emits when a LPF2 Hub device is found.
| Param | Type |
| --- | --- |
| hub | [<code>WeDo2SmartHub</code>](#WeDo2SmartHub) \| <code>LPF2Hub</code> |
| hub | [<code>WeDo2SmartHub</code>](#WeDo2SmartHub) \| [<code>BoostMoveHub</code>](#BoostMoveHub) \| [<code>PUPHub</code>](#PUPHub) \| [<code>PUPRemote</code>](#PUPRemote) |
<a name="WeDo2SmartHub"></a>
@ -544,7 +544,7 @@ Rotate a motor by a given angle.
| --- | --- | --- | --- |
| port | <code>string</code> | | |
| angle | <code>number</code> | | How much the motor should be rotated (in degrees). |
| [speed] | <code>number</code> | <code>100</code> | How fast the motor should be rotated. |
| [speed] | <code>number</code> \| <code>Array.&lt;number&gt;</code> | <code>100</code> | 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. |
<a name="LPF2Hub+setName"></a>

View File

@ -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.<number>} [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) {

View File

@ -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);