Fixed documentation
This commit is contained in:
parent
dc5094cf01
commit
e60598bba9
4
DOCS.md
4
DOCS.md
@ -64,7 +64,7 @@ Emits when a LPF2 Hub device is found.
|
|||||||
|
|
||||||
| Param | Type |
|
| 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>
|
<a name="WeDo2SmartHub"></a>
|
||||||
|
|
||||||
@ -492,7 +492,7 @@ Rotate a motor by a given angle.
|
|||||||
| --- | --- | --- | --- |
|
| --- | --- | --- | --- |
|
||||||
| port | <code>string</code> | | |
|
| port | <code>string</code> | | |
|
||||||
| angle | <code>number</code> | | How much the motor should be rotated (in degrees). |
|
| 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.<number></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>
|
<a name="LPF2Hub+setName"></a>
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ Emits when a LPF2 Hub device is found.
|
|||||||
|
|
||||||
| Param | Type |
|
| 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>
|
<a name="WeDo2SmartHub"></a>
|
||||||
|
|
||||||
@ -544,7 +544,7 @@ Rotate a motor by a given angle.
|
|||||||
| --- | --- | --- | --- |
|
| --- | --- | --- | --- |
|
||||||
| port | <code>string</code> | | |
|
| port | <code>string</code> | | |
|
||||||
| angle | <code>number</code> | | How much the motor should be rotated (in degrees). |
|
| 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.<number></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>
|
<a name="LPF2Hub+setName"></a>
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@ export class BoostMoveHub extends LPF2Hub {
|
|||||||
* @method BoostMoveHub#setMotorAngle
|
* @method BoostMoveHub#setMotorAngle
|
||||||
* @param {string} port
|
* @param {string} port
|
||||||
* @param {number} angle How much the motor should be rotated (in degrees).
|
* @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).
|
* @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) {
|
public setMotorAngle (port: string, angle: number, speed: number | [number, number] = 100) {
|
||||||
|
2
lpf2.ts
2
lpf2.ts
@ -92,7 +92,7 @@ export class LPF2 extends EventEmitter {
|
|||||||
/**
|
/**
|
||||||
* Emits when a LPF2 Hub device is found.
|
* Emits when a LPF2 Hub device is found.
|
||||||
* @event LPF2#discover
|
* @event LPF2#discover
|
||||||
* @param {WeDo2SmartHub | LPF2Hub} hub
|
* @param {WeDo2SmartHub | BoostMoveHub | PUPHub | PUPRemote} hub
|
||||||
*/
|
*/
|
||||||
this.emit("discover", hub);
|
this.emit("discover", hub);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user