From 81471c182fba68ac8ae953ef50940190eb8e24bc Mon Sep 17 00:00:00 2001 From: Nathan Kunicki Date: Fri, 22 Jun 2018 09:54:15 +0100 Subject: [PATCH] Better documentation --- ABOUT.md | 6 +++--- DOCS.md | 12 +++++------- README.md | 18 ++++++++---------- boosthub.ts | 4 +--- 4 files changed, 17 insertions(+), 23 deletions(-) diff --git a/ABOUT.md b/ABOUT.md index 7496564..8b6bc01 100644 --- a/ABOUT.md +++ b/ABOUT.md @@ -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 Distance Sensor | Sensor | Yes | Yes | Yes | | WeDo 2.0 Medium Motor | Motor | Yes | Yes | Yes | -| Boost Color and Distance Sensor | Sensor | *Some (1)* | Yes | Yes | -| Boost Interactive Medium Motor | Motor | *Some (2)* | Yes | Yes | +| Boost Color and Distance Sensor | Sensor | *Partial (1)* | Yes | Yes | +| Boost Interactive Medium Motor | Motor | *Partial (2)* | Yes | Yes | | Powered Up Train Motor | Motor | Yes | Yes | Yes | (1) Only color mode is supported on the WeDo 2.0 Smart Hub at this point. -(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. +(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. ### Usage diff --git a/DOCS.md b/DOCS.md index 102f3ef..d9bac54 100644 --- a/DOCS.md +++ b/DOCS.md @@ -173,15 +173,13 @@ Emits when a color sensor is activated. ### "tilt" (port, x, y) 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 [BoostHub](#BoostHub) -| Param | Type | -| --- | --- | -| port | string | -| x | number | -| y | number | +| Param | Type | Description | +| --- | --- | --- | +| port | string | If the event is fired from the Move Hub's in-built tilt sensor, the special port "TILT" is used. | +| x | number | | +| y | number | | diff --git a/README.md b/README.md index 05fcac3..fd612e5 100644 --- a/README.md +++ b/README.md @@ -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 Distance Sensor | Sensor | Yes | Yes | Yes | | WeDo 2.0 Medium Motor | Motor | Yes | Yes | Yes | -| Boost Color and Distance Sensor | Sensor | *Some (1)* | Yes | Yes | -| Boost Interactive Medium Motor | Motor | *Some (2)* | Yes | Yes | +| Boost Color and Distance Sensor | Sensor | *Partial (1)* | Yes | Yes | +| Boost Interactive Medium Motor | Motor | *Partial (2)* | Yes | Yes | | Powered Up Train Motor | Motor | Yes | Yes | Yes | (1) Only color mode is supported on the WeDo 2.0 Smart Hub at this point. -(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. +(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. ### Usage @@ -213,15 +213,13 @@ Emits when a color sensor is activated. ### "tilt" (port, x, y) 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 [BoostHub](#BoostHub) -| Param | Type | -| --- | --- | -| port | string | -| x | number | -| y | number | +| Param | Type | Description | +| --- | --- | --- | +| port | string | If the event is fired from the Move Hub's in-built tilt sensor, the special port "TILT" is used. | +| x | number | | +| y | number | | diff --git a/boosthub.ts b/boosthub.ts index 56d9071..a8c0163 100644 --- a/boosthub.ts +++ b/boosthub.ts @@ -321,10 +321,8 @@ export class BoostHub extends Hub { this._lastTiltY = tiltY; /** * 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 - * @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} y */