Better documentation

This commit is contained in:
Nathan Kunicki 2018-06-22 09:54:15 +01:00
parent e950b14e16
commit 81471c182f
4 changed files with 17 additions and 23 deletions

View File

@ -21,13 +21,13 @@ While most LPF2 components and Hubs are compatible with each other, there are ex
| WeDo 2.0 Tilt Sensor | Sensor | Yes | Yes | Yes | | WeDo 2.0 Tilt Sensor | Sensor | Yes | Yes | Yes |
| WeDo 2.0 Distance Sensor | Sensor | Yes | Yes | Yes | | WeDo 2.0 Distance Sensor | Sensor | Yes | Yes | Yes |
| WeDo 2.0 Medium Motor | Motor | Yes | Yes | Yes | | WeDo 2.0 Medium Motor | Motor | Yes | Yes | Yes |
| Boost Color and Distance Sensor | Sensor | *Some (<a href="#compatibility-note-1">1</a>)* | Yes | Yes | | Boost Color and Distance Sensor | Sensor | *Partial (<a href="#compatibility-note-1">1</a>)* | Yes | Yes |
| Boost Interactive Medium Motor | Motor | *Some (<a href="#compatibility-note-2">2</a>)* | Yes | Yes | | Boost Interactive Medium Motor | Motor | *Partial (<a href="#compatibility-note-2">2</a>)* | Yes | Yes |
| Powered Up Train Motor | Motor | Yes | Yes | Yes | | Powered Up Train Motor | Motor | Yes | Yes | Yes |
<a name="compatibility-note-1"></a><sub>(1) Only color mode is supported on the WeDo 2.0 Smart Hub at this point.</sub> <a name="compatibility-note-1"></a><sub>(1) Only color mode is supported on the WeDo 2.0 Smart Hub at this point.</sub>
<a name="compatibility-note-2"></a><sub>(2) Only basic motor functionality is supported on the WeDo 2.0 Smart Hub at this point. No interactive functionality. In short, it functions like the WeDo 2.0 Medium Motor.</sub> <a name="compatibility-note-2"></a><sub>(2) When used with the WeDo 2.0 Smart Hub, the Boost Interactive Medium Motor functions like the WeDo 2.0 Medium Motor - that is, only basic constant speed is possible. However the rotation sensing functionality is supported.</sub>
### Usage ### Usage

12
DOCS.md
View File

@ -173,15 +173,13 @@ Emits when a color sensor is activated.
### "tilt" (port, x, y) ### "tilt" (port, x, y)
Emits when a tilt sensor is activated. Emits when a tilt sensor is activated.
**Note**: If the event is fired from the Move Hub's in-built tilt sensor, the special port "TILT" is used.
**Kind**: event emitted by [<code>BoostHub</code>](#BoostHub) **Kind**: event emitted by [<code>BoostHub</code>](#BoostHub)
| Param | Type | | Param | Type | Description |
| --- | --- | | --- | --- | --- |
| port | <code>string</code> | | port | <code>string</code> | If the event is fired from the Move Hub's in-built tilt sensor, the special port "TILT" is used. |
| x | <code>number</code> | | x | <code>number</code> | |
| y | <code>number</code> | | y | <code>number</code> | |
<a name="BoostHub+event_rotate"></a> <a name="BoostHub+event_rotate"></a>

View File

@ -21,13 +21,13 @@ While most LPF2 components and Hubs are compatible with each other, there are ex
| WeDo 2.0 Tilt Sensor | Sensor | Yes | Yes | Yes | | WeDo 2.0 Tilt Sensor | Sensor | Yes | Yes | Yes |
| WeDo 2.0 Distance Sensor | Sensor | Yes | Yes | Yes | | WeDo 2.0 Distance Sensor | Sensor | Yes | Yes | Yes |
| WeDo 2.0 Medium Motor | Motor | Yes | Yes | Yes | | WeDo 2.0 Medium Motor | Motor | Yes | Yes | Yes |
| Boost Color and Distance Sensor | Sensor | *Some (<a href="#compatibility-note-1">1</a>)* | Yes | Yes | | Boost Color and Distance Sensor | Sensor | *Partial (<a href="#compatibility-note-1">1</a>)* | Yes | Yes |
| Boost Interactive Medium Motor | Motor | *Some (<a href="#compatibility-note-2">2</a>)* | Yes | Yes | | Boost Interactive Medium Motor | Motor | *Partial (<a href="#compatibility-note-2">2</a>)* | Yes | Yes |
| Powered Up Train Motor | Motor | Yes | Yes | Yes | | Powered Up Train Motor | Motor | Yes | Yes | Yes |
<a name="compatibility-note-1"></a><sub>(1) Only color mode is supported on the WeDo 2.0 Smart Hub at this point.</sub> <a name="compatibility-note-1"></a><sub>(1) Only color mode is supported on the WeDo 2.0 Smart Hub at this point.</sub>
<a name="compatibility-note-2"></a><sub>(2) Only basic motor functionality is supported on the WeDo 2.0 Smart Hub at this point. No interactive functionality. In short, it functions like the WeDo 2.0 Medium Motor.</sub> <a name="compatibility-note-2"></a><sub>(2) When used with the WeDo 2.0 Smart Hub, the Boost Interactive Medium Motor functions like the WeDo 2.0 Medium Motor - that is, only basic constant speed is possible. However the rotation sensing functionality is supported.</sub>
### Usage ### Usage
@ -213,15 +213,13 @@ Emits when a color sensor is activated.
### "tilt" (port, x, y) ### "tilt" (port, x, y)
Emits when a tilt sensor is activated. Emits when a tilt sensor is activated.
**Note**: If the event is fired from the Move Hub's in-built tilt sensor, the special port "TILT" is used.
**Kind**: event emitted by [<code>BoostHub</code>](#BoostHub) **Kind**: event emitted by [<code>BoostHub</code>](#BoostHub)
| Param | Type | | Param | Type | Description |
| --- | --- | | --- | --- | --- |
| port | <code>string</code> | | port | <code>string</code> | If the event is fired from the Move Hub's in-built tilt sensor, the special port "TILT" is used. |
| x | <code>number</code> | | x | <code>number</code> | |
| y | <code>number</code> | | y | <code>number</code> | |
<a name="BoostHub+event_rotate"></a> <a name="BoostHub+event_rotate"></a>

View File

@ -321,10 +321,8 @@ export class BoostHub extends Hub {
this._lastTiltY = tiltY; this._lastTiltY = tiltY;
/** /**
* Emits when a tilt sensor is activated. * Emits when a tilt sensor is activated.
*
* **Note**: If the event is fired from the Move Hub's in-built tilt sensor, the special port "TILT" is used.
* @event BoostHub#tilt * @event BoostHub#tilt
* @param {string} port * @param {string} port If the event is fired from the Move Hub's in-built tilt sensor, the special port "TILT" is used.
* @param {number} x * @param {number} x
* @param {number} y * @param {number} y
*/ */