diff --git a/DOCS.md b/DOCS.md index 55f2f83..2407ac7 100644 --- a/DOCS.md +++ b/DOCS.md @@ -45,13 +45,13 @@ Emits when a LPF2 Hub device is found. **Extends**: [Hub](#Hub) * [BoostHub](#BoostHub) ⇐ [Hub](#Hub) - * [.setLEDColor(color)](#BoostHub+setLEDColor) ⇒ Promise - * [.setMotorSpeed(port, speed, [time])](#BoostHub+setMotorSpeed) ⇒ Promise - * [.setMotorAngle(port, angle, [speed])](#BoostHub+setMotorAngle) ⇒ Promise + * [.setLEDColor(color)](#BoostHub+setLEDColor) + * [.setMotorSpeed(port, speed, [time])](#BoostHub+setMotorSpeed) + * [.setMotorAngle(port, angle, [speed])](#BoostHub+setMotorAngle) * [.connect([callback])](#Hub+connect) * [.subscribe(port, [mode])](#Hub+subscribe) * [.unsubscribe(port)](#Hub+unsubscribe) - * ["button" (button, state)](#BoostHub+event_button) + * ["button" (state)](#BoostHub+event_button) * ["distance" (port, distance)](#BoostHub+event_distance) * ["color" (port, color)](#BoostHub+event_color) * ["tilt" (port, x, y)](#BoostHub+event_tilt) @@ -59,11 +59,10 @@ Emits when a LPF2 Hub device is found. -### boostHub.setLEDColor(color) ⇒ Promise +### boostHub.setLEDColor(color) Set the color of the LED on the Hub via a color value. **Kind**: instance method of [BoostHub](#BoostHub) -**Returns**: Promise - Resolved upon successful completion of command. | Param | Type | Description | | --- | --- | --- | @@ -71,11 +70,10 @@ Set the color of the LED on the Hub via a color value. -### boostHub.setMotorSpeed(port, speed, [time]) ⇒ Promise +### boostHub.setMotorSpeed(port, speed, [time]) Set the motor speed on a given port. **Kind**: instance method of [BoostHub](#BoostHub) -**Returns**: Promise - Resolved upon successful completion of command. If time is specified, this is once the motor is finished. | Param | Type | Description | | --- | --- | --- | @@ -85,11 +83,10 @@ Set the motor speed on a given port. -### boostHub.setMotorAngle(port, angle, [speed]) ⇒ Promise +### boostHub.setMotorAngle(port, angle, [speed]) Rotate a motor by a given angle. **Kind**: instance method of [BoostHub](#BoostHub) -**Returns**: Promise - Resolved upon successful completion of command (ie. once the motor is finished). | Param | Type | Default | Description | | --- | --- | --- | --- | @@ -134,14 +131,13 @@ Unsubscribe to sensor notifications on a given port. -### "button" (button, state) +### "button" (state) Emits when a button is pressed. **Kind**: event emitted by [BoostHub](#BoostHub) | Param | Type | Description | | --- | --- | --- | -| button | string | | | state | number | A number representing one of the button state consts. | @@ -200,13 +196,13 @@ Emits when a rotation sensor is activated. **Extends**: [Hub](#Hub) * [WeDo2Hub](#WeDo2Hub) ⇐ [Hub](#Hub) - * [.setLEDColor(color)](#WeDo2Hub+setLEDColor) ⇒ Promise - * [.setLEDRGB(red, green, blue)](#WeDo2Hub+setLEDRGB) ⇒ Promise - * [.setMotorSpeed(port, speed)](#WeDo2Hub+setMotorSpeed) ⇒ Promise + * [.setLEDColor(color)](#WeDo2Hub+setLEDColor) + * [.setLEDRGB(red, green, blue)](#WeDo2Hub+setLEDRGB) + * [.setMotorSpeed(port, speed)](#WeDo2Hub+setMotorSpeed) * [.connect([callback])](#Hub+connect) * [.subscribe(port, [mode])](#Hub+subscribe) * [.unsubscribe(port)](#Hub+unsubscribe) - * ["button" (button, state)](#WeDo2Hub+event_button) + * ["button" (state)](#WeDo2Hub+event_button) * ["distance" (port, distance)](#WeDo2Hub+event_distance) * ["color" (port, color)](#WeDo2Hub+event_color) * ["tilt" (port, x, y)](#WeDo2Hub+event_tilt) @@ -214,11 +210,10 @@ Emits when a rotation sensor is activated. -### weDo2Hub.setLEDColor(color) ⇒ Promise +### weDo2Hub.setLEDColor(color) Set the color of the LED on the Hub via a color value. **Kind**: instance method of [WeDo2Hub](#WeDo2Hub) -**Returns**: Promise - Resolved upon successful completion of command. | Param | Type | Description | | --- | --- | --- | @@ -226,11 +221,10 @@ Set the color of the LED on the Hub via a color value. -### weDo2Hub.setLEDRGB(red, green, blue) ⇒ Promise +### weDo2Hub.setLEDRGB(red, green, blue) Set the color of the LED on the Hub via RGB values. **Kind**: instance method of [WeDo2Hub](#WeDo2Hub) -**Returns**: Promise - Resolved upon successful completion of command. | Param | Type | | --- | --- | @@ -240,11 +234,10 @@ Set the color of the LED on the Hub via RGB values. -### weDo2Hub.setMotorSpeed(port, speed) ⇒ Promise +### weDo2Hub.setMotorSpeed(port, speed) Set the motor speed on a given port. **Kind**: instance method of [WeDo2Hub](#WeDo2Hub) -**Returns**: Promise - Resolved upon successful completion of command. | Param | Type | Description | | --- | --- | --- | @@ -288,14 +281,13 @@ Unsubscribe to sensor notifications on a given port. -### "button" (button, state) +### "button" (state) Emits when a button is pressed. **Kind**: event emitted by [WeDo2Hub](#WeDo2Hub) | Param | Type | Description | | --- | --- | --- | -| button | string | | | state | number | A number representing one of the button state consts. | diff --git a/README.md b/README.md index 447fe0d..3ac81b0 100644 --- a/README.md +++ b/README.md @@ -85,13 +85,13 @@ Emits when a LPF2 Hub device is found. **Extends**: [Hub](#Hub) * [BoostHub](#BoostHub) ⇐ [Hub](#Hub) - * [.setLEDColor(color)](#BoostHub+setLEDColor) ⇒ Promise - * [.setMotorSpeed(port, speed, [time])](#BoostHub+setMotorSpeed) ⇒ Promise - * [.setMotorAngle(port, angle, [speed])](#BoostHub+setMotorAngle) ⇒ Promise + * [.setLEDColor(color)](#BoostHub+setLEDColor) + * [.setMotorSpeed(port, speed, [time])](#BoostHub+setMotorSpeed) + * [.setMotorAngle(port, angle, [speed])](#BoostHub+setMotorAngle) * [.connect([callback])](#Hub+connect) * [.subscribe(port, [mode])](#Hub+subscribe) * [.unsubscribe(port)](#Hub+unsubscribe) - * ["button" (button, state)](#BoostHub+event_button) + * ["button" (state)](#BoostHub+event_button) * ["distance" (port, distance)](#BoostHub+event_distance) * ["color" (port, color)](#BoostHub+event_color) * ["tilt" (port, x, y)](#BoostHub+event_tilt) @@ -99,11 +99,10 @@ Emits when a LPF2 Hub device is found. -### boostHub.setLEDColor(color) ⇒ Promise +### boostHub.setLEDColor(color) Set the color of the LED on the Hub via a color value. **Kind**: instance method of [BoostHub](#BoostHub) -**Returns**: Promise - Resolved upon successful completion of command. | Param | Type | Description | | --- | --- | --- | @@ -111,11 +110,10 @@ Set the color of the LED on the Hub via a color value. -### boostHub.setMotorSpeed(port, speed, [time]) ⇒ Promise +### boostHub.setMotorSpeed(port, speed, [time]) Set the motor speed on a given port. **Kind**: instance method of [BoostHub](#BoostHub) -**Returns**: Promise - Resolved upon successful completion of command. If time is specified, this is once the motor is finished. | Param | Type | Description | | --- | --- | --- | @@ -125,11 +123,10 @@ Set the motor speed on a given port. -### boostHub.setMotorAngle(port, angle, [speed]) ⇒ Promise +### boostHub.setMotorAngle(port, angle, [speed]) Rotate a motor by a given angle. **Kind**: instance method of [BoostHub](#BoostHub) -**Returns**: Promise - Resolved upon successful completion of command (ie. once the motor is finished). | Param | Type | Default | Description | | --- | --- | --- | --- | @@ -174,14 +171,13 @@ Unsubscribe to sensor notifications on a given port. -### "button" (button, state) +### "button" (state) Emits when a button is pressed. **Kind**: event emitted by [BoostHub](#BoostHub) | Param | Type | Description | | --- | --- | --- | -| button | string | | | state | number | A number representing one of the button state consts. | @@ -240,13 +236,13 @@ Emits when a rotation sensor is activated. **Extends**: [Hub](#Hub) * [WeDo2Hub](#WeDo2Hub) ⇐ [Hub](#Hub) - * [.setLEDColor(color)](#WeDo2Hub+setLEDColor) ⇒ Promise - * [.setLEDRGB(red, green, blue)](#WeDo2Hub+setLEDRGB) ⇒ Promise - * [.setMotorSpeed(port, speed)](#WeDo2Hub+setMotorSpeed) ⇒ Promise + * [.setLEDColor(color)](#WeDo2Hub+setLEDColor) + * [.setLEDRGB(red, green, blue)](#WeDo2Hub+setLEDRGB) + * [.setMotorSpeed(port, speed)](#WeDo2Hub+setMotorSpeed) * [.connect([callback])](#Hub+connect) * [.subscribe(port, [mode])](#Hub+subscribe) * [.unsubscribe(port)](#Hub+unsubscribe) - * ["button" (button, state)](#WeDo2Hub+event_button) + * ["button" (state)](#WeDo2Hub+event_button) * ["distance" (port, distance)](#WeDo2Hub+event_distance) * ["color" (port, color)](#WeDo2Hub+event_color) * ["tilt" (port, x, y)](#WeDo2Hub+event_tilt) @@ -254,11 +250,10 @@ Emits when a rotation sensor is activated. -### weDo2Hub.setLEDColor(color) ⇒ Promise +### weDo2Hub.setLEDColor(color) Set the color of the LED on the Hub via a color value. **Kind**: instance method of [WeDo2Hub](#WeDo2Hub) -**Returns**: Promise - Resolved upon successful completion of command. | Param | Type | Description | | --- | --- | --- | @@ -266,11 +261,10 @@ Set the color of the LED on the Hub via a color value. -### weDo2Hub.setLEDRGB(red, green, blue) ⇒ Promise +### weDo2Hub.setLEDRGB(red, green, blue) Set the color of the LED on the Hub via RGB values. **Kind**: instance method of [WeDo2Hub](#WeDo2Hub) -**Returns**: Promise - Resolved upon successful completion of command. | Param | Type | | --- | --- | @@ -280,11 +274,10 @@ Set the color of the LED on the Hub via RGB values. -### weDo2Hub.setMotorSpeed(port, speed) ⇒ Promise +### weDo2Hub.setMotorSpeed(port, speed) Set the motor speed on a given port. **Kind**: instance method of [WeDo2Hub](#WeDo2Hub) -**Returns**: Promise - Resolved upon successful completion of command. | Param | Type | Description | | --- | --- | --- | @@ -328,14 +321,13 @@ Unsubscribe to sensor notifications on a given port. -### "button" (button, state) +### "button" (state) Emits when a button is pressed. **Kind**: event emitted by [WeDo2Hub](#WeDo2Hub) | Param | Type | Description | | --- | --- | --- | -| button | string | | | state | number | A number representing one of the button state consts. |