diff --git a/docs/BoostMoveHub.html b/docs/BoostMoveHub.html index 81f503e..096e302 100644 --- a/docs/BoostMoveHub.html +++ b/docs/BoostMoveHub.html @@ -1,70 +1,131 @@ + - - JSDoc: Class: BoostMoveHub + + + DocStrap Class: BoostMoveHub + + + + + - - - - - -
+ +
+
+ +
+ +
+ +

Class: BoostMoveHub

-

BoostMoveHub()

+

+ BoostMoveHub +

+
+
+
+

new BoostMoveHub()

+ + +
+
- - -

new BoostMoveHub()

+
+

The BoostMoveHub is emitted if the discovered device is a Boost Move Hub.

+
+ + + -
- The BoostMoveHub is emitted if the discovered device is a Boost Move Hub. -
- - - - - - - - - - - - - +
+ + + + + + + @@ -74,52 +135,52 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + + - - - - - - - - - + +
@@ -148,28 +209,30 @@ - -

Members

- +
-

(readonly) batteryLevel

- - - - - - +
+
+

<readonly> batteryLevel

+ +
+
+ + + +
+
Properties:
- +
- +
@@ -200,6 +263,7 @@ number + @@ -207,23 +271,30 @@ - +
Battery level of the hub (Percentage between 0-100)

Battery level of the hub (Percentage between 0-100)

- - - - -
+
- + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -238,53 +309,63 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
- - - + +
-

(readonly) current

+
+
+

<readonly> current

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -315,6 +396,7 @@ number + @@ -322,34 +404,30 @@ - +
Current usage of the hub (Amps)

Current usage of the hub (Amps)

- - - - -
+
- + - -
Inherited From:
-
- + - - - - - + +
Inherited From:
+
+ +
+ @@ -359,47 +437,63 @@ - + - + - -
Source:
-
- + - + - + - + + + +
Source:
+
+ +
+ + + + + + +
- - - + + -

(readonly) firmwareVersion

+
+
+

<readonly> firmwareVersion

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -430,6 +524,7 @@ string + @@ -437,23 +532,30 @@ - +
Firmware version of the hub

Firmware version of the hub

- - - - -
+
- + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -468,53 +570,63 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + + - - - + + -

(readonly) name

+
+
+

<readonly> name

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -545,6 +657,7 @@ string + @@ -552,23 +665,30 @@ - +
Name of the hub

Name of the hub

- - - - -
+
- + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -583,53 +703,63 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + + - - - + + -

(readonly) rssi

+
+
+

<readonly> rssi

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -660,6 +790,7 @@ number + @@ -667,23 +798,30 @@ - +
Signal strength of the hub

Signal strength of the hub

- - - - -
+
- + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -698,53 +836,63 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + + - - - + + -

(readonly) uuid

+
+
+

<readonly> uuid

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -775,6 +923,7 @@ string + @@ -782,23 +931,30 @@ - +
UUID of the hub

UUID of the hub

- - - - -
+
- + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -813,53 +969,63 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + + - - - + + -

(readonly) voltage

+
+
+

<readonly> voltage

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -890,6 +1056,7 @@ number + @@ -897,34 +1064,30 @@ - +
Voltage of the hub (Volts)

Voltage of the hub (Volts)

- - - - -
+
- + - -
Inherited From:
-
- + - - - - - + +
Inherited From:
+
+ +
+ @@ -934,71 +1097,88 @@ - + - + - -
Source:
-
- + - + - + - + + + +
Source:
+
+ +
+ + + + + + + + + - - - - +

Methods

- +
+
+
+

connect()

+ + +
+
- - -

connect() → {Promise}

+
+

Connect to the Hub.

+
+ + + -
- Connect to the Hub. -
- - - - - - - - - - - - - +
- - + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -1013,47 +1193,54 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful connect. +

Resolved upon successful connect.

@@ -1067,51 +1254,57 @@ Promise +
+ + + - - - - + +
+
+

disconnect()

+ + +
+
- - -

disconnect() → {Promise}

+
+

Disconnect the Hub.

+
+ + + -
- Disconnect the Hub. -
- - - - - - - - - - - - - +
- - + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -1126,47 +1319,54 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful disconnect. +

Resolved upon successful disconnect.

@@ -1180,51 +1380,57 @@ Promise +
+ + + - - - - + +
+
+

getHubType()

+ + +
+
- - -

getHubType() → {HubType}

+
+

Get the hub type.

+
+ + + -
- Get the hub type. -
- - - - - - - - - - - - - +
- - + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -1239,45 +1445,52 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
@@ -1289,44 +1502,42 @@ HubType +
+ + + - - - - + +
+
+

getPortDeviceType(port)

+ + +
+
- - -

getPortDeviceType(port) → {DeviceType}

+
+

Get the device type for a given port.

+
- - -
- Get the device type for a given port. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -1357,6 +1568,7 @@ string + @@ -1371,18 +1583,26 @@
+ - - - - +
- - + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -1397,45 +1617,52 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
@@ -1447,44 +1674,42 @@ DeviceType +
+ + + - - - - + +
+
+

hardStopMotor(port)

+ + +
+
- - -

hardStopMotor(port) → {Promise}

+
+

Fully (hard) stop the motor on a given port.

+
- - -
- Fully (hard) stop the motor on a given port. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -1515,6 +1740,7 @@ string + @@ -1529,12 +1755,17 @@
+ - - - - +
+ + + + + + + @@ -1544,53 +1775,54 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful completion of command. +

Resolved upon successful completion of command.

@@ -1604,44 +1836,42 @@ Promise +
+ + + - - - - + +
+
+

rampMotorSpeed(port, fromSpeed, toSpeed, time)

+ + +
+
- - -

rampMotorSpeed(port, fromSpeed, toSpeed, time) → {Promise}

+
+

Ramp the motor speed on a given port.

+
- - -
- Ramp the motor speed on a given port. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -1672,6 +1902,7 @@ string + @@ -1695,6 +1926,7 @@ number + @@ -1702,7 +1934,7 @@ - + @@ -1718,6 +1950,7 @@ number + @@ -1725,7 +1958,7 @@ - + @@ -1741,6 +1974,7 @@ number + @@ -1748,19 +1982,24 @@ - +
For forward, a value between 1 - 100 should be set. For reverse, a value between -1 to -100. Stop is 0.

For forward, a value between 1 - 100 should be set. For reverse, a value between -1 to -100. Stop is 0.

For forward, a value between 1 - 100 should be set. For reverse, a value between -1 to -100. Stop is 0.

For forward, a value between 1 - 100 should be set. For reverse, a value between -1 to -100. Stop is 0.

How long the ramp should last (in milliseconds).

How long the ramp should last (in milliseconds).

+ - - - - +
+ + + + + + + @@ -1770,53 +2009,54 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful completion of command. +

Resolved upon successful completion of command.

@@ -1830,44 +2070,42 @@ Promise +
+ + + - - - - + +
+
+

setLEDColor(color)

+ + +
+
- - -

setLEDColor(color) → {Promise}

+
+

Set the color of the LED on the Hub via a color value.

+
- - -
- Set the color of the LED on the Hub via a color value. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -1898,6 +2136,7 @@ Color + @@ -1912,23 +2151,26 @@
+ - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -1938,47 +2180,54 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful issuance of command. +

Resolved upon successful issuance of command.

@@ -1992,44 +2241,42 @@ Promise +
+ + + - - - - + +
+
+

setLEDRGB(red, green, blue)

+ + +
+
- - -

setLEDRGB(red, green, blue) → {Promise}

+
+

Set the color of the LED on the Hub via RGB values.

+
- - -
- Set the color of the LED on the Hub via RGB values. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -2060,6 +2307,7 @@ number + @@ -2083,6 +2331,7 @@ number + @@ -2106,6 +2355,7 @@ number + @@ -2120,23 +2370,26 @@
+ - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -2146,47 +2399,54 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful issuance of command. +

Resolved upon successful issuance of command.

@@ -2200,44 +2460,42 @@ Promise +
+ + + - - - - + +
+
+

setLightBrightness(port, brightness [, time])

+ + +
+
- - -

setLightBrightness(port, brightness, timeopt) → {Promise}

+
+

Set the light brightness on a given port.

+
- - -
- Set the light brightness on a given port. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -2247,7 +2505,7 @@ - + @@ -2270,6 +2528,7 @@ string + @@ -2301,6 +2560,7 @@ number + @@ -2316,7 +2576,7 @@ - + @@ -2332,6 +2592,7 @@ number + @@ -2349,19 +2610,24 @@ - +
TypeAttributesArgumentBrightness value between 0-100 (0 is off)

Brightness value between 0-100 (0 is off)

How long to turn the light on (in milliseconds). Leave empty to turn the light on indefinitely.

How long to turn the light on (in milliseconds). Leave empty to turn the light on indefinitely.

+ - - - - +
+ + + + + + + @@ -2371,53 +2637,54 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful completion of command. If time is specified, this is once the light is turned off. +

Resolved upon successful completion of command. If time is specified, this is once the light is turned off.

@@ -2431,44 +2698,42 @@ Promise +
+ + + - - - - + +
+
+

setMotorAngle(port, angle [, speed])

+ + +
+
- - -

setMotorAngle(port, angle, speedopt) → {Promise}

+
+

Rotate a motor by a given angle.

+
- - -
- Rotate a motor by a given angle. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -2478,7 +2743,7 @@ - + @@ -2503,6 +2768,7 @@ string + @@ -2538,6 +2804,7 @@ number + @@ -2557,7 +2824,7 @@ - + @@ -2576,6 +2843,7 @@ Array.<number> + @@ -2599,19 +2867,24 @@ - +
TypeAttributesArgumentHow much the motor should be rotated (in degrees).

How much the motor should be rotated (in degrees).

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.

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.

+ - - - - +
+ + + + + + + @@ -2621,53 +2894,54 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful completion of command (ie. once the motor is finished). +

Resolved upon successful completion of command (ie. once the motor is finished).

@@ -2681,44 +2955,42 @@ Promise +
+ + + - - - - + +
+
+

setMotorSpeed(port, speed [, time])

+ + +
+
- - -

setMotorSpeed(port, speed, timeopt) → {Promise}

+
+

Set the motor speed on a given port.

+
- - -
- Set the motor speed on a given port. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -2728,7 +3000,7 @@ - + @@ -2751,6 +3023,7 @@ string + @@ -2785,6 +3058,7 @@ Array.<number> + @@ -2800,7 +3074,7 @@ - + @@ -2816,6 +3090,7 @@ number + @@ -2833,19 +3108,24 @@ - +
TypeAttributesArgumentFor 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.

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.

How long to activate the motor for (in milliseconds). Leave empty to turn the motor on indefinitely.

How long to activate the motor for (in milliseconds). Leave empty to turn the motor on indefinitely.

+ - - - - +
+ + + + + + + @@ -2855,53 +3135,54 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful completion of command. If time is specified, this is once the motor is finished. +

Resolved upon successful completion of command. If time is specified, this is once the motor is finished.

@@ -2915,44 +3196,42 @@ Promise +
+ + + - - - - + +
+
+

setName(name)

+ + +
+
- - -

setName(name) → {Promise}

+
+

Set the name of the Hub.

+
- - -
- Set the name of the Hub. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -2983,6 +3262,7 @@ string + @@ -2990,30 +3270,33 @@ - +
New name of the hub (14 characters or less, ASCII only).

New name of the hub (14 characters or less, ASCII only).

+ - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -3023,47 +3306,54 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful issuance of command. +

Resolved upon successful issuance of command.

@@ -3077,46 +3367,43 @@ Promise +
+ + + - - - - + +
+
+

sleep(delay)

+ + +
+
- - -

sleep(delay) → {Promise}

+
+

Sleep a given amount of time.

+

This is a helper method to make it easier to add delays into a chain of commands.

+
- - -
- Sleep a given amount of time. - -This is a helper method to make it easier to add delays into a chain of commands. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -3147,6 +3434,7 @@ This is a helper method to make it easier to add delays into a chain of commands number + @@ -3154,25 +3442,33 @@ This is a helper method to make it easier to add delays into a chain of commands - +
How long to sleep (in milliseconds).

How long to sleep (in milliseconds).

+ - - - - +
- - + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -3187,47 +3483,54 @@ This is a helper method to make it easier to add delays into a chain of commands - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved after the delay is finished. +

Resolved after the delay is finished.

@@ -3241,44 +3544,42 @@ This is a helper method to make it easier to add delays into a chain of commands Promise +
+ + + - - - - + +
+
+

subscribe(port [, mode])

+ + +
+
- - -

subscribe(port, modeopt) → {Promise}

+
+

Subscribe to sensor notifications on a given port.

+
- - -
- Subscribe to sensor notifications on a given port. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -3288,7 +3589,7 @@ This is a helper method to make it easier to add delays into a chain of commands - + @@ -3311,6 +3612,7 @@ This is a helper method to make it easier to add delays into a chain of commands string + @@ -3342,6 +3644,7 @@ This is a helper method to make it easier to add delays into a chain of commands number + @@ -3359,25 +3662,33 @@ This is a helper method to make it easier to add delays into a chain of commands - +
TypeAttributesArgumentThe sensor mode to activate. If no mode is provided, the default for that sensor will be chosen.

The sensor mode to activate. If no mode is provided, the default for that sensor will be chosen.

+ - - - - +
- - + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -3392,47 +3703,54 @@ This is a helper method to make it easier to add delays into a chain of commands - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful issuance of command. +

Resolved upon successful issuance of command.

@@ -3446,44 +3764,42 @@ This is a helper method to make it easier to add delays into a chain of commands Promise +
+ + + - - - - + +
+
+

unsubscribe(port)

+ + +
+
- - -

unsubscribe(port) → {Promise}

+
+

Unsubscribe to sensor notifications on a given port.

+
- - -
- Unsubscribe to sensor notifications on a given port. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -3514,6 +3830,7 @@ This is a helper method to make it easier to add delays into a chain of commands string + @@ -3528,18 +3845,26 @@ This is a helper method to make it easier to add delays into a chain of commands
+ - - - - +
- - + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -3554,47 +3879,54 @@ This is a helper method to make it easier to add delays into a chain of commands - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful issuance of command. +

Resolved upon successful issuance of command.

@@ -3608,46 +3940,43 @@ This is a helper method to make it easier to add delays into a chain of commands Promise +
+ + + - - - - + +
+
+

wait(commands)

+ + +
+
- - -

wait(commands) → {Promise}

+
+

Wait until a given list of concurrently running commands are complete.

+

This is a helper method to make it easier to wait for concurrent commands to complete.

+
- - -
- Wait until a given list of concurrently running commands are complete. - -This is a helper method to make it easier to wait for concurrent commands to complete. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -3678,6 +4007,7 @@ This is a helper method to make it easier to wait for concurrent commands to com Array.<Promise.<any>> + @@ -3685,25 +4015,33 @@ This is a helper method to make it easier to wait for concurrent commands to com - +
Array of executing commands.

Array of executing commands.

+ - - - - +
- - + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -3718,47 +4056,54 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved after the commands are finished. +

Resolved after the commands are finished.

@@ -3772,16 +4117,17 @@ This is a helper method to make it easier to wait for concurrent commands to com Promise +
- - - - - + + + + + @@ -3789,35 +4135,32 @@ This is a helper method to make it easier to wait for concurrent commands to com

Events

- +
- - - - +
+

attach

+ +
+
+ + +
+

Emits when a motor or sensor is attached to the Hub.

+
+ - - -
- Emits when a motor or sensor is attached to the Hub. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -3848,6 +4191,7 @@ This is a helper method to make it easier to wait for concurrent commands to com string + @@ -3871,6 +4215,7 @@ This is a helper method to make it easier to wait for concurrent commands to com DeviceType + @@ -3885,18 +4230,26 @@ This is a helper method to make it easier to wait for concurrent commands to com
+ - - - - +
- - + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -3911,76 +4264,79 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + + - - - - - - - - - + +
- - - - +
+

button

+ +
+
+ + +
+

Emits when a button is pressed.

+
+ - - -
- Emits when a button is pressed. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -4011,6 +4367,7 @@ This is a helper method to make it easier to wait for concurrent commands to com string + @@ -4034,6 +4391,7 @@ This is a helper method to make it easier to wait for concurrent commands to com ButtonState + @@ -4048,23 +4406,26 @@ This is a helper method to make it easier to wait for concurrent commands to com
+ - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -4074,76 +4435,79 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + + - - - - - - - - - + +
- - - - +
+

color

+ +
+
+ + +
+

Emits when a color sensor is activated.

+
+ - - -
- Emits when a color sensor is activated. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -4174,6 +4538,7 @@ This is a helper method to make it easier to wait for concurrent commands to com string + @@ -4197,6 +4562,7 @@ This is a helper method to make it easier to wait for concurrent commands to com Color + @@ -4211,23 +4577,26 @@ This is a helper method to make it easier to wait for concurrent commands to com
+ - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -4237,76 +4606,79 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + + - - - - - - - - - + +
- - - - +
+

colorAndDistance

+ +
+
+ + +
+

A combined color and distance event, emits when the sensor is activated.

+
+ - - -
- A combined color and distance event, emits when the sensor is activated. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -4337,6 +4709,7 @@ This is a helper method to make it easier to wait for concurrent commands to com string + @@ -4360,6 +4733,7 @@ This is a helper method to make it easier to wait for concurrent commands to com Color + @@ -4383,6 +4757,7 @@ This is a helper method to make it easier to wait for concurrent commands to com number + @@ -4390,30 +4765,33 @@ This is a helper method to make it easier to wait for concurrent commands to com - +
Distance, in millimeters.

Distance, in millimeters.

+ - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -4423,76 +4801,79 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + + - - - - - - - - - + +
- - - - +
+

detach

+ +
+
+ + +
+

Emits when an attached motor or sensor is detached from the Hub.

+
+ - - -
- Emits when an attached motor or sensor is detached from the Hub. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -4523,6 +4904,7 @@ This is a helper method to make it easier to wait for concurrent commands to com string + @@ -4537,18 +4919,26 @@ This is a helper method to make it easier to wait for concurrent commands to com
+ - - - - +
- - + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -4563,76 +4953,79 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + + - - - - - - - - - + +
- - - - +
+

distance

+ +
+
+ + +
+

Emits when a distance sensor is activated.

+
+ - - -
- Emits when a distance sensor is activated. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -4663,6 +5056,7 @@ This is a helper method to make it easier to wait for concurrent commands to com string + @@ -4686,6 +5080,7 @@ This is a helper method to make it easier to wait for concurrent commands to com number + @@ -4693,30 +5088,33 @@ This is a helper method to make it easier to wait for concurrent commands to com - +
Distance, in millimeters.

Distance, in millimeters.

+ - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -4726,76 +5124,79 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + + - - - - - - - - - + +
- - - - +
+

rotate

+ +
+
+ + +
+

Emits when a rotation sensor is activated.

+
+ - - -
- Emits when a rotation sensor is activated. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -4826,6 +5227,7 @@ This is a helper method to make it easier to wait for concurrent commands to com string + @@ -4849,6 +5251,7 @@ This is a helper method to make it easier to wait for concurrent commands to com number + @@ -4863,23 +5266,26 @@ This is a helper method to make it easier to wait for concurrent commands to com
+ - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -4889,76 +5295,79 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + + - - - - - - - - - + +
- - - - +
+

tilt

+ +
+
+ + +
+

Emits when a tilt sensor is activated.

+
+ - - -
- Emits when a tilt sensor is activated. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -4989,6 +5398,7 @@ This is a helper method to make it easier to wait for concurrent commands to com string + @@ -4996,7 +5406,7 @@ This is a helper method to make it easier to wait for concurrent commands to com - + @@ -5012,6 +5422,7 @@ This is a helper method to make it easier to wait for concurrent commands to com number + @@ -5035,6 +5446,7 @@ This is a helper method to make it easier to wait for concurrent commands to com number + @@ -5049,23 +5461,26 @@ This is a helper method to make it easier to wait for concurrent commands to com
If the event is fired from the Move Hub's in-built tilt sensor, the special port "TILT" is used.

If the event is fired from the Move Hub's in-built tilt sensor, the special port "TILT" is used.

+ - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -5075,48 +5490,54 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + + + +
- - - - - - - - - - +
@@ -5125,19 +5546,136 @@ This is a helper method to make it easier to wait for concurrent commands to com +
+
+ +
+ + +
+ +
+ + +
- -
+ + - - + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/DuploTrainBase.html b/docs/DuploTrainBase.html index 5161644..48dde12 100644 --- a/docs/DuploTrainBase.html +++ b/docs/DuploTrainBase.html @@ -1,70 +1,131 @@ + - - JSDoc: Class: DuploTrainBase + + + DocStrap Class: DuploTrainBase + + + + + - - - - - -
+ +
+
+ +
+ +
+ +

Class: DuploTrainBase

-

DuploTrainBase()

+

+ DuploTrainBase +

+
+
+
+

new DuploTrainBase()

+ + +
+
- - -

new DuploTrainBase()

+
+

The DuploTrainBase is emitted if the discovered device is a Duplo Train Base.

+
+ + + -
- The DuploTrainBase is emitted if the discovered device is a Duplo Train Base. -
- - - - - - - - - - - - - +
+ + + + + + + @@ -74,52 +135,52 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + + - - - - - - - - - + +
@@ -148,28 +209,30 @@ - -

Members

- +
-

(readonly) batteryLevel

- - - - - - +
+
+

<readonly> batteryLevel

+ +
+
+ + + +
+
Properties:
- +
- +
@@ -200,6 +263,7 @@ number + @@ -207,23 +271,30 @@ - +
Battery level of the hub (Percentage between 0-100)

Battery level of the hub (Percentage between 0-100)

- - - - -
+
- + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -238,53 +309,63 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
- - - + +
-

(readonly) current

+
+
+

<readonly> current

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -315,6 +396,7 @@ number + @@ -322,34 +404,30 @@ - +
Current usage of the hub (Amps)

Current usage of the hub (Amps)

- - - - -
+
- + - -
Inherited From:
-
- + - - - - - + +
Inherited From:
+
+ +
+ @@ -359,47 +437,63 @@ - + - + - -
Source:
-
- + - + - + - + + + +
Source:
+
+ +
+ + + + + + +
- - - + + -

(readonly) firmwareVersion

+
+
+

<readonly> firmwareVersion

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -430,6 +524,7 @@ string + @@ -437,23 +532,30 @@ - +
Firmware version of the hub

Firmware version of the hub

- - - - -
+
- + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -468,53 +570,63 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + + - - - + + -

(readonly) name

+
+
+

<readonly> name

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -545,6 +657,7 @@ string + @@ -552,23 +665,30 @@ - +
Name of the hub

Name of the hub

- - - - -
+
- + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -583,53 +703,63 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + + - - - + + -

(readonly) rssi

+
+
+

<readonly> rssi

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -660,6 +790,7 @@ number + @@ -667,23 +798,30 @@ - +
Signal strength of the hub

Signal strength of the hub

- - - - -
+
- + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -698,53 +836,63 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + + - - - + + -

(readonly) uuid

+
+
+

<readonly> uuid

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -775,6 +923,7 @@ string + @@ -782,23 +931,30 @@ - +
UUID of the hub

UUID of the hub

- - - - -
+
- + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -813,53 +969,63 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + + - - - + + -

(readonly) voltage

+
+
+

<readonly> voltage

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -890,6 +1056,7 @@ number + @@ -897,34 +1064,30 @@ - +
Voltage of the hub (Volts)

Voltage of the hub (Volts)

- - - - -
+
- + - -
Inherited From:
-
- + - - - - - + +
Inherited From:
+
+ +
+ @@ -934,71 +1097,88 @@ - + - + - -
Source:
-
- + - + - + - + + + +
Source:
+
+ +
+ + + + + + + + + - - - - +

Methods

- +
+
+
+

connect()

+ + +
+
- - -

connect() → {Promise}

+
+

Connect to the Hub.

+
+ + + -
- Connect to the Hub. -
- - - - - - - - - - - - - +
- - + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -1013,47 +1193,54 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful connect. +

Resolved upon successful connect.

@@ -1067,51 +1254,57 @@ Promise +
+ + + - - - - + +
+
+

disconnect()

+ + +
+
- - -

disconnect() → {Promise}

+
+

Disconnect the Hub.

+
+ + + -
- Disconnect the Hub. -
- - - - - - - - - - - - - +
- - + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -1126,47 +1319,54 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful disconnect. +

Resolved upon successful disconnect.

@@ -1180,51 +1380,57 @@ Promise +
+ + + - - - - + +
+
+

getHubType()

+ + +
+
- - -

getHubType() → {HubType}

+
+

Get the hub type.

+
+ + + -
- Get the hub type. -
- - - - - - - - - - - - - +
- - + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -1239,45 +1445,52 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
@@ -1289,44 +1502,42 @@ HubType +
+ + + - - - - + +
+
+

getPortDeviceType(port)

+ + +
+
- - -

getPortDeviceType(port) → {DeviceType}

+
+

Get the device type for a given port.

+
- - -
- Get the device type for a given port. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -1357,6 +1568,7 @@ string + @@ -1371,18 +1583,26 @@
+ - - - - +
- - + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -1397,45 +1617,52 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
@@ -1447,44 +1674,42 @@ DeviceType +
+ + + - - - - + +
+
+

hardStopMotor(port)

+ + +
+
- - -

hardStopMotor(port) → {Promise}

+
+

Fully (hard) stop the motor on a given port.

+
- - -
- Fully (hard) stop the motor on a given port. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -1515,6 +1740,7 @@ string + @@ -1529,12 +1755,17 @@
+ - - - - +
+ + + + + + + @@ -1544,53 +1775,54 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful completion of command. +

Resolved upon successful completion of command.

@@ -1604,44 +1836,42 @@ Promise +
+ + + - - - - + +
+
+

playSound(sound)

+ + +
+
- - -

playSound(sound) → {Promise}

+
+

Play a built-in train sound.

+
- - -
- Play a built-in train sound. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -1672,6 +1902,7 @@ DuploTrainBaseSound + @@ -1686,12 +1917,17 @@
+ - - - - +
+ + + + + + + @@ -1701,53 +1937,54 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful issuance of command. +

Resolved upon successful issuance of command.

@@ -1761,44 +1998,42 @@ Promise +
+ + + - - - - + +
+
+

rampMotorSpeed(port, fromSpeed, toSpeed, time)

+ + +
+
- - -

rampMotorSpeed(port, fromSpeed, toSpeed, time) → {Promise}

+
+

Ramp the motor speed on a given port.

+
- - -
- Ramp the motor speed on a given port. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -1829,6 +2064,7 @@ string + @@ -1852,6 +2088,7 @@ number + @@ -1859,7 +2096,7 @@ - + @@ -1875,6 +2112,7 @@ number + @@ -1882,7 +2120,7 @@ - + @@ -1898,6 +2136,7 @@ number + @@ -1905,19 +2144,24 @@ - +
For forward, a value between 1 - 100 should be set. For reverse, a value between -1 to -100. Stop is 0.

For forward, a value between 1 - 100 should be set. For reverse, a value between -1 to -100. Stop is 0.

For forward, a value between 1 - 100 should be set. For reverse, a value between -1 to -100. Stop is 0.

For forward, a value between 1 - 100 should be set. For reverse, a value between -1 to -100. Stop is 0.

How long the ramp should last (in milliseconds).

How long the ramp should last (in milliseconds).

+ - - - - +
+ + + + + + + @@ -1927,53 +2171,54 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful completion of command. +

Resolved upon successful completion of command.

@@ -1987,44 +2232,42 @@ Promise +
+ + + - - - - + +
+
+

setLEDColor(color)

+ + +
+
- - -

setLEDColor(color) → {Promise}

+
+

Set the color of the LED on the train via a color value.

+
- - -
- Set the color of the LED on the train via a color value. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -2055,6 +2298,7 @@ Color + @@ -2069,18 +2313,17 @@
+ - - - - +
- - + - + + +
Overrides:
@@ -2095,47 +2338,54 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful issuance of command. +

Resolved upon successful issuance of command.

@@ -2149,44 +2399,42 @@ Promise +
+ + + - - - - + +
+
+

setLEDRGB(red, green, blue)

+ + +
+
- - -

setLEDRGB(red, green, blue) → {Promise}

+
+

Set the color of the LED on the Hub via RGB values.

+
- - -
- Set the color of the LED on the Hub via RGB values. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -2217,6 +2465,7 @@ number + @@ -2240,6 +2489,7 @@ number + @@ -2263,6 +2513,7 @@ number + @@ -2277,23 +2528,26 @@
+ - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -2303,47 +2557,54 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful issuance of command. +

Resolved upon successful issuance of command.

@@ -2357,44 +2618,42 @@ Promise +
+ + + - - - - + +
+
+

setMotorSpeed(port, speed [, time])

+ + +
+
- - -

setMotorSpeed(port, speed, timeopt) → {Promise}

+
+

Set the motor speed on a given port.

+
- - -
- Set the motor speed on a given port. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -2404,7 +2663,7 @@ - + @@ -2427,6 +2686,7 @@ string + @@ -2461,6 +2721,7 @@ Array.<number> + @@ -2476,7 +2737,7 @@ - + @@ -2492,6 +2753,7 @@ number + @@ -2509,19 +2771,24 @@ - +
TypeAttributesArgumentFor 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.

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.

How long to activate the motor for (in milliseconds). Leave empty to turn the motor on indefinitely.

How long to activate the motor for (in milliseconds). Leave empty to turn the motor on indefinitely.

+ - - - - +
+ + + + + + + @@ -2531,53 +2798,54 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful completion of command. If time is specified, this is once the motor is finished. +

Resolved upon successful completion of command. If time is specified, this is once the motor is finished.

@@ -2591,44 +2859,42 @@ Promise +
+ + + - - - - + +
+
+

setName(name)

+ + +
+
- - -

setName(name) → {Promise}

+
+

Set the name of the Hub.

+
- - -
- Set the name of the Hub. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -2659,6 +2925,7 @@ string + @@ -2666,30 +2933,33 @@ - +
New name of the hub (14 characters or less, ASCII only).

New name of the hub (14 characters or less, ASCII only).

+ - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -2699,47 +2969,54 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful issuance of command. +

Resolved upon successful issuance of command.

@@ -2753,46 +3030,43 @@ Promise +
+ + + - - - - + +
+
+

sleep(delay)

+ + +
+
- - -

sleep(delay) → {Promise}

+
+

Sleep a given amount of time.

+

This is a helper method to make it easier to add delays into a chain of commands.

+
- - -
- Sleep a given amount of time. - -This is a helper method to make it easier to add delays into a chain of commands. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -2823,6 +3097,7 @@ This is a helper method to make it easier to add delays into a chain of commands number + @@ -2830,25 +3105,33 @@ This is a helper method to make it easier to add delays into a chain of commands - +
How long to sleep (in milliseconds).

How long to sleep (in milliseconds).

+ - - - - +
- - + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -2863,47 +3146,54 @@ This is a helper method to make it easier to add delays into a chain of commands - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved after the delay is finished. +

Resolved after the delay is finished.

@@ -2917,44 +3207,42 @@ This is a helper method to make it easier to add delays into a chain of commands Promise +
+ + + - - - - + +
+
+

subscribe(port [, mode])

+ + +
+
- - -

subscribe(port, modeopt) → {Promise}

+
+

Subscribe to sensor notifications on a given port.

+
- - -
- Subscribe to sensor notifications on a given port. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -2964,7 +3252,7 @@ This is a helper method to make it easier to add delays into a chain of commands - + @@ -2987,6 +3275,7 @@ This is a helper method to make it easier to add delays into a chain of commands string + @@ -3018,6 +3307,7 @@ This is a helper method to make it easier to add delays into a chain of commands number + @@ -3035,25 +3325,33 @@ This is a helper method to make it easier to add delays into a chain of commands - +
TypeAttributesArgumentThe sensor mode to activate. If no mode is provided, the default for that sensor will be chosen.

The sensor mode to activate. If no mode is provided, the default for that sensor will be chosen.

+ - - - - +
- - + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -3068,47 +3366,54 @@ This is a helper method to make it easier to add delays into a chain of commands - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful issuance of command. +

Resolved upon successful issuance of command.

@@ -3122,44 +3427,42 @@ This is a helper method to make it easier to add delays into a chain of commands Promise +
+ + + - - - - + +
+
+

unsubscribe(port)

+ + +
+
- - -

unsubscribe(port) → {Promise}

+
+

Unsubscribe to sensor notifications on a given port.

+
- - -
- Unsubscribe to sensor notifications on a given port. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -3190,6 +3493,7 @@ This is a helper method to make it easier to add delays into a chain of commands string + @@ -3204,18 +3508,26 @@ This is a helper method to make it easier to add delays into a chain of commands
+ - - - - +
- - + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -3230,47 +3542,54 @@ This is a helper method to make it easier to add delays into a chain of commands - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful issuance of command. +

Resolved upon successful issuance of command.

@@ -3284,46 +3603,43 @@ This is a helper method to make it easier to add delays into a chain of commands Promise +
+ + + - - - - + +
+
+

wait(commands)

+ + +
+
- - -

wait(commands) → {Promise}

+
+

Wait until a given list of concurrently running commands are complete.

+

This is a helper method to make it easier to wait for concurrent commands to complete.

+
- - -
- Wait until a given list of concurrently running commands are complete. - -This is a helper method to make it easier to wait for concurrent commands to complete. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -3354,6 +3670,7 @@ This is a helper method to make it easier to wait for concurrent commands to com Array.<Promise.<any>> + @@ -3361,25 +3678,33 @@ This is a helper method to make it easier to wait for concurrent commands to com - +
Array of executing commands.

Array of executing commands.

+ - - - - +
- - + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -3394,47 +3719,54 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved after the commands are finished. +

Resolved after the commands are finished.

@@ -3448,16 +3780,17 @@ This is a helper method to make it easier to wait for concurrent commands to com Promise +
- - - - - + + + + + @@ -3465,35 +3798,32 @@ This is a helper method to make it easier to wait for concurrent commands to com

Events

- +
- - - - +
+

color

+ +
+
+ + +
+

Emits when a color sensor is activated.

+
+ - - -
- Emits when a color sensor is activated. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -3524,6 +3854,7 @@ This is a helper method to make it easier to wait for concurrent commands to com string + @@ -3547,6 +3878,7 @@ This is a helper method to make it easier to wait for concurrent commands to com Color + @@ -3561,23 +3893,26 @@ This is a helper method to make it easier to wait for concurrent commands to com
+ - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -3587,76 +3922,79 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + + - - - - - - - - - + +
- - - - +
+

speed

+ +
+
+ + +
+

Emits on a speed change.

+
+ - - -
- Emits on a speed change. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -3687,6 +4025,7 @@ This is a helper method to make it easier to wait for concurrent commands to com string + @@ -3710,6 +4049,7 @@ This is a helper method to make it easier to wait for concurrent commands to com number + @@ -3724,23 +4064,26 @@ This is a helper method to make it easier to wait for concurrent commands to com
+ - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -3750,48 +4093,54 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + + + +
- - - - - - - - - - +
@@ -3800,19 +4149,136 @@ This is a helper method to make it easier to wait for concurrent commands to com +
+
+ +
+ + +
+ +
+ + +
- -
+ +
- Documentation generated by JSDoc 3.5.5 on Fri Jan 18 2019 16:16:36 GMT-0800 (Pacific Standard Time) + + + + node-poweredup by Nathan Kellenicki licensed under the MIT license. + + + + Documentation generated by JSDoc 3.5.5 + + on Fri Jan 18th 2019 + + using the DocStrap template. +
- - + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/Hub.html b/docs/Hub.html index b5715e1..5460ad3 100644 --- a/docs/Hub.html +++ b/docs/Hub.html @@ -1,66 +1,127 @@ + - - JSDoc: Class: Hub + + + DocStrap Class: Hub + + + + + - - - - - -
+ +
+
+ +
+ +
+ +

Class: Hub

-

Hub()

+

+ Hub +

+
+
+
+

new Hub()

+ + +
+
-

new Hub()

- + + - - - - - - - - - - - - - +
+ + + + + + + @@ -70,52 +131,52 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + + - - - - - - - - - + +
@@ -142,28 +203,30 @@ - -

Members

- +
-

(readonly) batteryLevel

- - - - - - +
+
+

<readonly> batteryLevel

+ +
+
+ + + +
+
Properties:
- +
- +
@@ -194,6 +257,7 @@ number + @@ -201,17 +265,21 @@ - +
Battery level of the hub (Percentage between 0-100)

Battery level of the hub (Percentage between 0-100)

+
+ + + -
+ @@ -221,59 +289,63 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
- - - + +
-

(readonly) firmwareVersion

+
+
+

<readonly> firmwareVersion

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -304,6 +376,7 @@ string + @@ -311,17 +384,21 @@ - +
Firmware version of the hub

Firmware version of the hub

+
+ + + -
+ @@ -331,59 +408,63 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
- - - + + -

(readonly) name

+
+
+

<readonly> name

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -414,6 +495,7 @@ string + @@ -421,17 +503,21 @@ - +
Name of the hub

Name of the hub

+ + + + -
+ @@ -441,59 +527,63 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
- - - + +
-

(readonly) rssi

+
+
+

<readonly> rssi

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -524,6 +614,7 @@ number + @@ -531,17 +622,21 @@ - +
Signal strength of the hub

Signal strength of the hub

+ + + + -
+ @@ -551,59 +646,63 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
- - - + +
-

(readonly) uuid

+
+
+

<readonly> uuid

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -634,6 +733,7 @@ string + @@ -641,17 +741,21 @@ - +
UUID of the hub

UUID of the hub

+ + + + -
+ @@ -661,77 +765,79 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ +
- - - - +

Methods

- +
+
+
+

connect()

+ + +
+
- - -

connect() → {Promise}

+
+

Connect to the Hub.

+
+ + + -
- Connect to the Hub. -
- - - - - - - - - - - - - +
+ + + + + + + @@ -741,53 +847,54 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful connect. +

Resolved upon successful connect.

@@ -801,45 +908,48 @@ Promise +
+ + + - - - - + +
+
+

disconnect()

+ + +
+
- - -

disconnect() → {Promise}

+
+

Disconnect the Hub.

+
+ + + -
- Disconnect the Hub. -
- - - - - - - - - - - - - +
+ + + + + + + @@ -849,53 +959,54 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful disconnect. +

Resolved upon successful disconnect.

@@ -909,45 +1020,48 @@ Promise +
+ + + - - - - + +
+
+

getHubType()

+ + +
+
- - -

getHubType() → {HubType}

+
+

Get the hub type.

+
+ + + -
- Get the hub type. -
- - - - - - - - - - - - - +
+ + + + + + + @@ -957,51 +1071,52 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
@@ -1013,44 +1128,42 @@ HubType +
+ + + - - - - + +
+
+

getPortDeviceType(port)

+ + +
+
- - -

getPortDeviceType(port) → {DeviceType}

+
+

Get the device type for a given port.

+
- - -
- Get the device type for a given port. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -1081,6 +1194,7 @@ string + @@ -1095,12 +1209,17 @@
+ - - - - +
+ + + + + + + @@ -1110,51 +1229,52 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
@@ -1166,46 +1286,43 @@ DeviceType +
+ + + - - - - + +
+
+

sleep(delay)

+ + +
+
- - -

sleep(delay) → {Promise}

+
+

Sleep a given amount of time.

+

This is a helper method to make it easier to add delays into a chain of commands.

+
- - -
- Sleep a given amount of time. - -This is a helper method to make it easier to add delays into a chain of commands. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -1236,6 +1353,7 @@ This is a helper method to make it easier to add delays into a chain of commands number + @@ -1243,19 +1361,24 @@ This is a helper method to make it easier to add delays into a chain of commands - +
How long to sleep (in milliseconds).

How long to sleep (in milliseconds).

+ - - - - +
+ + + + + + + @@ -1265,53 +1388,54 @@ This is a helper method to make it easier to add delays into a chain of commands - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved after the delay is finished. +

Resolved after the delay is finished.

@@ -1325,44 +1449,42 @@ This is a helper method to make it easier to add delays into a chain of commands Promise +
+ + + - - - - + +
+
+

subscribe(port [, mode])

+ + +
+
- - -

subscribe(port, modeopt) → {Promise}

+
+

Subscribe to sensor notifications on a given port.

+
- - -
- Subscribe to sensor notifications on a given port. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -1372,7 +1494,7 @@ This is a helper method to make it easier to add delays into a chain of commands - + @@ -1395,6 +1517,7 @@ This is a helper method to make it easier to add delays into a chain of commands string + @@ -1426,6 +1549,7 @@ This is a helper method to make it easier to add delays into a chain of commands number + @@ -1443,19 +1567,24 @@ This is a helper method to make it easier to add delays into a chain of commands - +
TypeAttributesArgumentThe sensor mode to activate. If no mode is provided, the default for that sensor will be chosen.

The sensor mode to activate. If no mode is provided, the default for that sensor will be chosen.

+ - - - - +
+ + + + + + + @@ -1465,53 +1594,54 @@ This is a helper method to make it easier to add delays into a chain of commands - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful issuance of command. +

Resolved upon successful issuance of command.

@@ -1525,44 +1655,42 @@ This is a helper method to make it easier to add delays into a chain of commands Promise +
+ + + - - - - + +
+
+

unsubscribe(port)

+ + +
+
- - -

unsubscribe(port) → {Promise}

+
+

Unsubscribe to sensor notifications on a given port.

+
- - -
- Unsubscribe to sensor notifications on a given port. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -1593,6 +1721,7 @@ This is a helper method to make it easier to add delays into a chain of commands string + @@ -1607,12 +1736,17 @@ This is a helper method to make it easier to add delays into a chain of commands
+ - - - - +
+ + + + + + + @@ -1622,53 +1756,54 @@ This is a helper method to make it easier to add delays into a chain of commands - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful issuance of command. +

Resolved upon successful issuance of command.

@@ -1682,46 +1817,43 @@ This is a helper method to make it easier to add delays into a chain of commands Promise +
+ + + - - - - + +
+
+

wait(commands)

+ + +
+
- - -

wait(commands) → {Promise}

+
+

Wait until a given list of concurrently running commands are complete.

+

This is a helper method to make it easier to wait for concurrent commands to complete.

+
- - -
- Wait until a given list of concurrently running commands are complete. - -This is a helper method to make it easier to wait for concurrent commands to complete. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -1752,6 +1884,7 @@ This is a helper method to make it easier to wait for concurrent commands to com Array.<Promise.<any>> + @@ -1759,19 +1892,24 @@ This is a helper method to make it easier to wait for concurrent commands to com - +
Array of executing commands.

Array of executing commands.

+ - - - - +
+ + + + + + + @@ -1781,53 +1919,54 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved after the commands are finished. +

Resolved after the commands are finished.

@@ -1841,16 +1980,17 @@ This is a helper method to make it easier to wait for concurrent commands to com Promise +
- - - - - + + + + + @@ -1858,35 +1998,32 @@ This is a helper method to make it easier to wait for concurrent commands to com

Events

- +
- - - - +
+

attach

+ +
+
+ + +
+

Emits when a motor or sensor is attached to the Hub.

+
+ - - -
- Emits when a motor or sensor is attached to the Hub. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -1917,6 +2054,7 @@ This is a helper method to make it easier to wait for concurrent commands to com string + @@ -1940,6 +2078,7 @@ This is a helper method to make it easier to wait for concurrent commands to com DeviceType + @@ -1954,12 +2093,17 @@ This is a helper method to make it easier to wait for concurrent commands to com
+ - - - - +
+ + + + + + + @@ -1969,82 +2113,79 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + + - - - - - - - - - + +
- - - - +
+

detach

+ +
+
+ + +
+

Emits when an attached motor or sensor is detached from the Hub.

+
+ - - -
- Emits when an attached motor or sensor is detached from the Hub. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -2075,6 +2216,7 @@ This is a helper method to make it easier to wait for concurrent commands to com string + @@ -2089,12 +2231,17 @@ This is a helper method to make it easier to wait for concurrent commands to com
+ - - - - +
+ + + + + + + @@ -2104,54 +2251,54 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + + + +
- - - - - - - - - - +
@@ -2160,19 +2307,136 @@ This is a helper method to make it easier to wait for concurrent commands to com +
+
+ +
+ + +
+ +
+ + +
- -
+ +
- Documentation generated by JSDoc 3.5.5 on Fri Jan 18 2019 16:16:36 GMT-0800 (Pacific Standard Time) + + + + node-poweredup by Nathan Kellenicki licensed under the MIT license. + + + + Documentation generated by JSDoc 3.5.5 + + on Fri Jan 18th 2019 + + using the DocStrap template. +
- - + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/LPF2Hub.html b/docs/LPF2Hub.html index c58ec21..66924a4 100644 --- a/docs/LPF2Hub.html +++ b/docs/LPF2Hub.html @@ -1,66 +1,127 @@ + - - JSDoc: Class: LPF2Hub + + + DocStrap Class: LPF2Hub + + + + + - - - - - -
+ +
+
+ +
+ +
+ +

Class: LPF2Hub

-

LPF2Hub()

+

+ LPF2Hub +

+
+
+
+

new LPF2Hub()

+ + +
+
-

new LPF2Hub()

- + + - - - - - - - - - - - - - +
+ + + + + + + @@ -70,52 +131,52 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + + - - - - - - - - - + +
@@ -142,28 +203,30 @@ - -

Members

- +
-

(readonly) batteryLevel

- - - - - - +
+
+

<readonly> batteryLevel

+ +
+
+ + + +
+
Properties:
- +
- +
@@ -194,6 +257,7 @@ number + @@ -201,34 +265,30 @@ - +
Battery level of the hub (Percentage between 0-100)

Battery level of the hub (Percentage between 0-100)

- - - - -
+
- + - -
Inherited From:
-
- + - - - - - + +
Inherited From:
+
+ +
+ @@ -238,47 +298,63 @@ - + - + - -
Source:
-
- + - + - + - + + + +
Source:
+
+ +
+ + + + + + +
- - - + +
-

(readonly) current

+
+
+

<readonly> current

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -309,6 +385,7 @@ number + @@ -316,17 +393,21 @@ - +
Current usage of the hub (Amps)

Current usage of the hub (Amps)

+
+ + + -
+ @@ -336,59 +417,63 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
- - - + + -

(readonly) firmwareVersion

+
+
+

<readonly> firmwareVersion

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -419,6 +504,7 @@ string + @@ -426,34 +512,30 @@ - +
Firmware version of the hub

Firmware version of the hub

- - - - -
+
- + - -
Inherited From:
-
- + - - - - - + +
Inherited From:
+
+ +
+ @@ -463,47 +545,63 @@ - + - + - -
Source:
-
- + - + - + - + + + +
Source:
+
+ +
+ + + + + + + - - - + + -

(readonly) name

+
+
+

<readonly> name

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -534,6 +632,7 @@ string + @@ -541,34 +640,30 @@ - +
Name of the hub

Name of the hub

- - - - -
+
- + - -
Inherited From:
-
- + - - - - - + +
Inherited From:
+
+ +
+ @@ -578,47 +673,63 @@ - + - + - -
Source:
-
- + - + - + - + + + +
Source:
+
+ +
+ + + + + + + - - - + + -

(readonly) rssi

+
+
+

<readonly> rssi

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -649,6 +760,7 @@ number + @@ -656,34 +768,30 @@ - +
Signal strength of the hub

Signal strength of the hub

- - - - -
+
- + - -
Inherited From:
-
- + - - - - - + +
Inherited From:
+
+ +
+ @@ -693,47 +801,63 @@ - + - + - -
Source:
-
- + - + - + - + + + +
Source:
+
+ +
+ + + + + + + - - - + + -

(readonly) uuid

+
+
+

<readonly> uuid

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -764,6 +888,7 @@ string + @@ -771,34 +896,30 @@ - +
UUID of the hub

UUID of the hub

- - - - -
+
- + - -
Inherited From:
-
- + - - - - - + +
Inherited From:
+
+ +
+ @@ -808,47 +929,63 @@ - + - + - -
Source:
-
- + - + - + - + + + +
Source:
+
+ +
+ + + + + + + - - - + + -

(readonly) voltage

+
+
+

<readonly> voltage

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -879,6 +1016,7 @@ number + @@ -886,17 +1024,21 @@ - +
Voltage of the hub (Volts)

Voltage of the hub (Volts)

+ + + + -
+ @@ -906,83 +1048,88 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ +
- - - - +

Methods

- +
+
+
+

connect()

+ + +
+
- - -

connect() → {Promise}

+
+

Connect to the Hub.

+
+ + + -
- Connect to the Hub. -
- - - - - - - - - - - - - +
- - + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -997,47 +1144,54 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful connect. +

Resolved upon successful connect.

@@ -1051,56 +1205,57 @@ Promise +
+ + + - - - - + +
+
+

disconnect()

+ + +
+
- - -

disconnect() → {Promise}

+
+

Disconnect the Hub.

+
+ + + -
- Disconnect the Hub. -
- - - - - - - - - - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -1110,47 +1265,54 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful disconnect. +

Resolved upon successful disconnect.

@@ -1164,56 +1326,57 @@ Promise +
+ + + - - - - + +
+
+

getHubType()

+ + +
+
- - -

getHubType() → {HubType}

+
+

Get the hub type.

+
+ + + -
- Get the hub type. -
- - - - - - - - - - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -1223,45 +1386,52 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
@@ -1273,44 +1443,42 @@ HubType +
+ + + - - - - + +
+
+

getPortDeviceType(port)

+ + +
+
- - -

getPortDeviceType(port) → {DeviceType}

+
+

Get the device type for a given port.

+
- - -
- Get the device type for a given port. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -1341,6 +1509,7 @@ string + @@ -1355,23 +1524,26 @@
+ - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -1381,45 +1553,52 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
@@ -1431,44 +1610,42 @@ DeviceType +
+ + + - - - - + +
+
+

setLEDColor(color)

+ + +
+
- - -

setLEDColor(color) → {Promise}

+
+

Set the color of the LED on the Hub via a color value.

+
- - -
- Set the color of the LED on the Hub via a color value. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -1499,6 +1676,7 @@ Color + @@ -1513,12 +1691,17 @@
+ - - - - +
+ + + + + + + @@ -1528,53 +1711,54 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful issuance of command. +

Resolved upon successful issuance of command.

@@ -1588,44 +1772,42 @@ Promise +
+ + + - - - - + +
+
+

setLEDRGB(red, green, blue)

+ + +
+
- - -

setLEDRGB(red, green, blue) → {Promise}

+
+

Set the color of the LED on the Hub via RGB values.

+
- - -
- Set the color of the LED on the Hub via RGB values. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -1656,6 +1838,7 @@ number + @@ -1679,6 +1862,7 @@ number + @@ -1702,6 +1886,7 @@ number + @@ -1716,12 +1901,17 @@
+ - - - - +
+ + + + + + + @@ -1731,53 +1921,54 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful issuance of command. +

Resolved upon successful issuance of command.

@@ -1791,44 +1982,42 @@ Promise +
+ + + - - - - + +
+
+

setName(name)

+ + +
+
- - -

setName(name) → {Promise}

+
+

Set the name of the Hub.

+
- - -
- Set the name of the Hub. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -1859,6 +2048,7 @@ string + @@ -1866,19 +2056,24 @@ - +
New name of the hub (14 characters or less, ASCII only).

New name of the hub (14 characters or less, ASCII only).

+ - - - - +
+ + + + + + + @@ -1888,53 +2083,54 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful issuance of command. +

Resolved upon successful issuance of command.

@@ -1948,46 +2144,43 @@ Promise +
+ + + - - - - + +
+
+

sleep(delay)

+ + +
+
- - -

sleep(delay) → {Promise}

+
+

Sleep a given amount of time.

+

This is a helper method to make it easier to add delays into a chain of commands.

+
- - -
- Sleep a given amount of time. - -This is a helper method to make it easier to add delays into a chain of commands. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -2018,6 +2211,7 @@ This is a helper method to make it easier to add delays into a chain of commands number + @@ -2025,30 +2219,33 @@ This is a helper method to make it easier to add delays into a chain of commands - +
How long to sleep (in milliseconds).

How long to sleep (in milliseconds).

+ - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -2058,47 +2255,54 @@ This is a helper method to make it easier to add delays into a chain of commands - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved after the delay is finished. +

Resolved after the delay is finished.

@@ -2112,44 +2316,42 @@ This is a helper method to make it easier to add delays into a chain of commands Promise +
+ + + - - - - + +
+
+

subscribe(port [, mode])

+ + +
+
- - -

subscribe(port, modeopt) → {Promise}

+
+

Subscribe to sensor notifications on a given port.

+
- - -
- Subscribe to sensor notifications on a given port. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -2159,7 +2361,7 @@ This is a helper method to make it easier to add delays into a chain of commands - + @@ -2182,6 +2384,7 @@ This is a helper method to make it easier to add delays into a chain of commands string + @@ -2213,6 +2416,7 @@ This is a helper method to make it easier to add delays into a chain of commands number + @@ -2230,30 +2434,33 @@ This is a helper method to make it easier to add delays into a chain of commands - +
TypeAttributesArgumentThe sensor mode to activate. If no mode is provided, the default for that sensor will be chosen.

The sensor mode to activate. If no mode is provided, the default for that sensor will be chosen.

+ - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -2263,47 +2470,54 @@ This is a helper method to make it easier to add delays into a chain of commands - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful issuance of command. +

Resolved upon successful issuance of command.

@@ -2317,44 +2531,42 @@ This is a helper method to make it easier to add delays into a chain of commands Promise +
+ + + - - - - + +
+
+

unsubscribe(port)

+ + +
+
- - -

unsubscribe(port) → {Promise}

+
+

Unsubscribe to sensor notifications on a given port.

+
- - -
- Unsubscribe to sensor notifications on a given port. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -2385,6 +2597,7 @@ This is a helper method to make it easier to add delays into a chain of commands string + @@ -2399,23 +2612,26 @@ This is a helper method to make it easier to add delays into a chain of commands
+ - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -2425,47 +2641,54 @@ This is a helper method to make it easier to add delays into a chain of commands - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful issuance of command. +

Resolved upon successful issuance of command.

@@ -2479,46 +2702,43 @@ This is a helper method to make it easier to add delays into a chain of commands Promise +
+ + + - - - - + +
+
+

wait(commands)

+ + +
+
- - -

wait(commands) → {Promise}

+
+

Wait until a given list of concurrently running commands are complete.

+

This is a helper method to make it easier to wait for concurrent commands to complete.

+
- - -
- Wait until a given list of concurrently running commands are complete. - -This is a helper method to make it easier to wait for concurrent commands to complete. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -2549,6 +2769,7 @@ This is a helper method to make it easier to wait for concurrent commands to com Array.<Promise.<any>> + @@ -2556,30 +2777,33 @@ This is a helper method to make it easier to wait for concurrent commands to com - +
Array of executing commands.

Array of executing commands.

+ - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -2589,47 +2813,54 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved after the commands are finished. +

Resolved after the commands are finished.

@@ -2643,16 +2874,17 @@ This is a helper method to make it easier to wait for concurrent commands to com Promise +
- - - - - + + + + + @@ -2660,35 +2892,32 @@ This is a helper method to make it easier to wait for concurrent commands to com

Events

- +
- - - - +
+

attach

+ +
+
+ + +
+

Emits when a motor or sensor is attached to the Hub.

+
+ - - -
- Emits when a motor or sensor is attached to the Hub. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -2719,6 +2948,7 @@ This is a helper method to make it easier to wait for concurrent commands to com string + @@ -2742,6 +2972,7 @@ This is a helper method to make it easier to wait for concurrent commands to com DeviceType + @@ -2756,23 +2987,26 @@ This is a helper method to make it easier to wait for concurrent commands to com
+ - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -2782,76 +3016,79 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + + - - - - - - - - - + +
- - - - +
+

button

+ +
+
+ + +
+

Emits when a button is pressed.

+
+ - - -
- Emits when a button is pressed. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -2882,6 +3119,7 @@ This is a helper method to make it easier to wait for concurrent commands to com string + @@ -2905,6 +3143,7 @@ This is a helper method to make it easier to wait for concurrent commands to com ButtonState + @@ -2919,12 +3158,17 @@ This is a helper method to make it easier to wait for concurrent commands to com
+ - - - - +
+ + + + + + + @@ -2934,82 +3178,79 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + + - - - - - - - - - + +
- - - - +
+

color

+ +
+
+ + +
+

Emits when a color sensor is activated.

+
+ - - -
- Emits when a color sensor is activated. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -3040,6 +3281,7 @@ This is a helper method to make it easier to wait for concurrent commands to com string + @@ -3063,6 +3305,7 @@ This is a helper method to make it easier to wait for concurrent commands to com Color + @@ -3077,12 +3320,17 @@ This is a helper method to make it easier to wait for concurrent commands to com
+ - - - - +
+ + + + + + + @@ -3092,82 +3340,79 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + + - - - - - - - - - + +
- - - - +
+

colorAndDistance

+ +
+
+ + +
+

A combined color and distance event, emits when the sensor is activated.

+
+ - - -
- A combined color and distance event, emits when the sensor is activated. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -3198,6 +3443,7 @@ This is a helper method to make it easier to wait for concurrent commands to com string + @@ -3221,6 +3467,7 @@ This is a helper method to make it easier to wait for concurrent commands to com Color + @@ -3244,6 +3491,7 @@ This is a helper method to make it easier to wait for concurrent commands to com number + @@ -3251,19 +3499,24 @@ This is a helper method to make it easier to wait for concurrent commands to com - +
Distance, in millimeters.

Distance, in millimeters.

+ - - - - +
+ + + + + + + @@ -3273,82 +3526,79 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + + - - - - - - - - - + +
- - - - +
+

detach

+ +
+
+ + +
+

Emits when an attached motor or sensor is detached from the Hub.

+
+ - - -
- Emits when an attached motor or sensor is detached from the Hub. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -3379,6 +3629,7 @@ This is a helper method to make it easier to wait for concurrent commands to com string + @@ -3393,23 +3644,26 @@ This is a helper method to make it easier to wait for concurrent commands to com
+ - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -3419,76 +3673,79 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + + - - - - - - - - - + +
- - - - +
+

distance

+ +
+
+ + +
+

Emits when a distance sensor is activated.

+
+ - - -
- Emits when a distance sensor is activated. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -3519,6 +3776,7 @@ This is a helper method to make it easier to wait for concurrent commands to com string + @@ -3542,6 +3800,7 @@ This is a helper method to make it easier to wait for concurrent commands to com number + @@ -3549,19 +3808,24 @@ This is a helper method to make it easier to wait for concurrent commands to com - +
Distance, in millimeters.

Distance, in millimeters.

+ - - - - +
+ + + + + + + @@ -3571,82 +3835,79 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + + - - - - - - - - - + +
- - - - +
+

rotate

+ +
+
+ + +
+

Emits when a rotation sensor is activated.

+
+ - - -
- Emits when a rotation sensor is activated. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -3677,6 +3938,7 @@ This is a helper method to make it easier to wait for concurrent commands to com string + @@ -3700,6 +3962,7 @@ This is a helper method to make it easier to wait for concurrent commands to com number + @@ -3714,12 +3977,17 @@ This is a helper method to make it easier to wait for concurrent commands to com
+ - - - - +
+ + + + + + + @@ -3729,82 +3997,79 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + + - - - - - - - - - + +
- - - - +
+

speed

+ +
+
+ + +
+

Emits on a speed change.

+
+ - - -
- Emits on a speed change. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -3835,6 +4100,7 @@ This is a helper method to make it easier to wait for concurrent commands to com string + @@ -3858,6 +4124,7 @@ This is a helper method to make it easier to wait for concurrent commands to com number + @@ -3872,12 +4139,17 @@ This is a helper method to make it easier to wait for concurrent commands to com
+ - - - - +
+ + + + + + + @@ -3887,82 +4159,79 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + + - - - - - - - - - + +
- - - - +
+

tilt

+ +
+
+ + +
+

Emits when a tilt sensor is activated.

+
+ - - -
- Emits when a tilt sensor is activated. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -3993,6 +4262,7 @@ This is a helper method to make it easier to wait for concurrent commands to com string + @@ -4000,7 +4270,7 @@ This is a helper method to make it easier to wait for concurrent commands to com - + @@ -4016,6 +4286,7 @@ This is a helper method to make it easier to wait for concurrent commands to com number + @@ -4039,6 +4310,7 @@ This is a helper method to make it easier to wait for concurrent commands to com number + @@ -4053,12 +4325,17 @@ This is a helper method to make it easier to wait for concurrent commands to com
If the event is fired from the Move Hub's in-built tilt sensor, the special port "TILT" is used.

If the event is fired from the Move Hub's in-built tilt sensor, the special port "TILT" is used.

+ - - - - +
+ + + + + + + @@ -4068,54 +4345,54 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + + + +
- - - - - - - - - - +
@@ -4124,19 +4401,136 @@ This is a helper method to make it easier to wait for concurrent commands to com +
+
+ +
+ + +
+ +
+ + +
- -
+ +
- Documentation generated by JSDoc 3.5.5 on Fri Jan 18 2019 16:16:36 GMT-0800 (Pacific Standard Time) + + + + node-poweredup by Nathan Kellenicki licensed under the MIT license. + + + + Documentation generated by JSDoc 3.5.5 + + on Fri Jan 18th 2019 + + using the DocStrap template. +
- - + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/PUPHub.html b/docs/PUPHub.html index 021feff..0b18841 100644 --- a/docs/PUPHub.html +++ b/docs/PUPHub.html @@ -1,70 +1,131 @@ + - - JSDoc: Class: PUPHub + + + DocStrap Class: PUPHub + + + + + - - - - - -
+ +
+
+ +
+ +
+ +

Class: PUPHub

-

PUPHub()

+

+ PUPHub +

+
+
+
+

new PUPHub()

+ + +
+
- - -

new PUPHub()

+
+

The PUPHub is emitted if the discovered device is a Powered UP Hub.

+
+ + + -
- The PUPHub is emitted if the discovered device is a Powered UP Hub. -
- - - - - - - - - - - - - +
+ + + + + + + @@ -74,52 +135,52 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + + - - - - - - - - - + +
@@ -148,28 +209,30 @@ - -

Members

- +
-

(readonly) batteryLevel

- - - - - - +
+
+

<readonly> batteryLevel

+ +
+
+ + + +
+
Properties:
- +
- +
@@ -200,6 +263,7 @@ number + @@ -207,23 +271,30 @@ - +
Battery level of the hub (Percentage between 0-100)

Battery level of the hub (Percentage between 0-100)

- - - - -
+
- + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -238,53 +309,63 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
- - - + +
-

(readonly) current

+
+
+

<readonly> current

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -315,6 +396,7 @@ number + @@ -322,34 +404,30 @@ - +
Current usage of the hub (Amps)

Current usage of the hub (Amps)

- - - - -
+
- + - -
Inherited From:
-
- + - - - - - + +
Inherited From:
+
+ +
+ @@ -359,47 +437,63 @@ - + - + - -
Source:
-
- + - + - + - + + + +
Source:
+
+ +
+ + + + + + +
- - - + + -

(readonly) firmwareVersion

+
+
+

<readonly> firmwareVersion

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -430,6 +524,7 @@ string + @@ -437,23 +532,30 @@ - +
Firmware version of the hub

Firmware version of the hub

- - - - -
+
- + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -468,53 +570,63 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + + - - - + + -

(readonly) name

+
+
+

<readonly> name

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -545,6 +657,7 @@ string + @@ -552,23 +665,30 @@ - +
Name of the hub

Name of the hub

- - - - -
+
- + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -583,53 +703,63 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + + - - - + + -

(readonly) rssi

+
+
+

<readonly> rssi

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -660,6 +790,7 @@ number + @@ -667,23 +798,30 @@ - +
Signal strength of the hub

Signal strength of the hub

- - - - -
+
- + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -698,53 +836,63 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + + - - - + + -

(readonly) uuid

+
+
+

<readonly> uuid

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -775,6 +923,7 @@ string + @@ -782,23 +931,30 @@ - +
UUID of the hub

UUID of the hub

- - - - -
+
- + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -813,53 +969,63 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + + - - - + + -

(readonly) voltage

+
+
+

<readonly> voltage

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -890,6 +1056,7 @@ number + @@ -897,34 +1064,30 @@ - +
Voltage of the hub (Volts)

Voltage of the hub (Volts)

- - - - -
+
- + - -
Inherited From:
-
- + - - - - - + +
Inherited From:
+
+ +
+ @@ -934,71 +1097,88 @@ - + - + - -
Source:
-
- + - + - + - + + + +
Source:
+
+ +
+ + + + + + + + + - - - - +

Methods

- +
+
+
+

connect()

+ + +
+
- - -

connect() → {Promise}

+
+

Connect to the Hub.

+
+ + + -
- Connect to the Hub. -
- - - - - - - - - - - - - +
- - + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -1013,47 +1193,54 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful connect. +

Resolved upon successful connect.

@@ -1067,51 +1254,57 @@ Promise +
+ + + - - - - + +
+
+

disconnect()

+ + +
+
- - -

disconnect() → {Promise}

+
+

Disconnect the Hub.

+
+ + + -
- Disconnect the Hub. -
- - - - - - - - - - - - - +
- - + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -1126,47 +1319,54 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful disconnect. +

Resolved upon successful disconnect.

@@ -1180,51 +1380,57 @@ Promise +
+ + + - - - - + +
+
+

getHubType()

+ + +
+
- - -

getHubType() → {HubType}

+
+

Get the hub type.

+
+ + + -
- Get the hub type. -
- - - - - - - - - - - - - +
- - + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -1239,45 +1445,52 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
@@ -1289,44 +1502,42 @@ HubType +
+ + + - - - - + +
+
+

getPortDeviceType(port)

+ + +
+
- - -

getPortDeviceType(port) → {DeviceType}

+
+

Get the device type for a given port.

+
- - -
- Get the device type for a given port. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -1357,6 +1568,7 @@ string + @@ -1371,18 +1583,26 @@
+ - - - - +
- - + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -1397,45 +1617,52 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
@@ -1447,44 +1674,42 @@ DeviceType +
+ + + - - - - + +
+
+

hardStopMotor(port)

+ + +
+
- - -

hardStopMotor(port) → {Promise}

+
+

Fully (hard) stop the motor on a given port.

+
- - -
- Fully (hard) stop the motor on a given port. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -1515,6 +1740,7 @@ string + @@ -1529,12 +1755,17 @@
+ - - - - +
+ + + + + + + @@ -1544,53 +1775,54 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful completion of command. +

Resolved upon successful completion of command.

@@ -1604,44 +1836,42 @@ Promise +
+ + + - - - - + +
+
+

rampMotorSpeed(port, fromSpeed, toSpeed, time)

+ + +
+
- - -

rampMotorSpeed(port, fromSpeed, toSpeed, time) → {Promise}

+
+

Ramp the motor speed on a given port.

+
- - -
- Ramp the motor speed on a given port. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -1672,6 +1902,7 @@ string + @@ -1695,6 +1926,7 @@ number + @@ -1702,7 +1934,7 @@ - + @@ -1718,6 +1950,7 @@ number + @@ -1725,7 +1958,7 @@ - + @@ -1741,6 +1974,7 @@ number + @@ -1748,19 +1982,24 @@ - +
For forward, a value between 1 - 100 should be set. For reverse, a value between -1 to -100. Stop is 0.

For forward, a value between 1 - 100 should be set. For reverse, a value between -1 to -100. Stop is 0.

For forward, a value between 1 - 100 should be set. For reverse, a value between -1 to -100. Stop is 0.

For forward, a value between 1 - 100 should be set. For reverse, a value between -1 to -100. Stop is 0.

How long the ramp should last (in milliseconds).

How long the ramp should last (in milliseconds).

+ - - - - +
+ + + + + + + @@ -1770,53 +2009,54 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful completion of command. +

Resolved upon successful completion of command.

@@ -1830,44 +2070,42 @@ Promise +
+ + + - - - - + +
+
+

setLEDColor(color)

+ + +
+
- - -

setLEDColor(color) → {Promise}

+
+

Set the color of the LED on the Hub via a color value.

+
- - -
- Set the color of the LED on the Hub via a color value. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -1898,6 +2136,7 @@ Color + @@ -1912,23 +2151,26 @@
+ - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -1938,47 +2180,54 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful issuance of command. +

Resolved upon successful issuance of command.

@@ -1992,44 +2241,42 @@ Promise +
+ + + - - - - + +
+
+

setLEDRGB(red, green, blue)

+ + +
+
- - -

setLEDRGB(red, green, blue) → {Promise}

+
+

Set the color of the LED on the Hub via RGB values.

+
- - -
- Set the color of the LED on the Hub via RGB values. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -2060,6 +2307,7 @@ number + @@ -2083,6 +2331,7 @@ number + @@ -2106,6 +2355,7 @@ number + @@ -2120,23 +2370,26 @@
+ - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -2146,47 +2399,54 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful issuance of command. +

Resolved upon successful issuance of command.

@@ -2200,44 +2460,42 @@ Promise +
+ + + - - - - + +
+
+

setLightBrightness(port, brightness [, time])

+ + +
+
- - -

setLightBrightness(port, brightness, timeopt) → {Promise}

+
+

Set the light brightness on a given port.

+
- - -
- Set the light brightness on a given port. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -2247,7 +2505,7 @@ - + @@ -2270,6 +2528,7 @@ string + @@ -2301,6 +2560,7 @@ number + @@ -2316,7 +2576,7 @@ - + @@ -2332,6 +2592,7 @@ number + @@ -2349,19 +2610,24 @@ - +
TypeAttributesArgumentBrightness value between 0-100 (0 is off)

Brightness value between 0-100 (0 is off)

How long to turn the light on (in milliseconds). Leave empty to turn the light on indefinitely.

How long to turn the light on (in milliseconds). Leave empty to turn the light on indefinitely.

+ - - - - +
+ + + + + + + @@ -2371,53 +2637,54 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful completion of command. If time is specified, this is once the light is turned off. +

Resolved upon successful completion of command. If time is specified, this is once the light is turned off.

@@ -2431,44 +2698,42 @@ Promise +
+ + + - - - - + +
+
+

setMotorSpeed(port, speed [, time])

+ + +
+
- - -

setMotorSpeed(port, speed, timeopt) → {Promise}

+
+

Set the motor speed on a given port.

+
- - -
- Set the motor speed on a given port. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -2478,7 +2743,7 @@ - + @@ -2501,6 +2766,7 @@ string + @@ -2535,6 +2801,7 @@ Array.<number> + @@ -2550,7 +2817,7 @@ - + @@ -2566,6 +2833,7 @@ number + @@ -2583,19 +2851,24 @@ - +
TypeAttributesArgumentFor 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.

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.

How long to activate the motor for (in milliseconds). Leave empty to turn the motor on indefinitely.

How long to activate the motor for (in milliseconds). Leave empty to turn the motor on indefinitely.

+ - - - - +
+ + + + + + + @@ -2605,53 +2878,54 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful completion of command. If time is specified, this is once the motor is finished. +

Resolved upon successful completion of command. If time is specified, this is once the motor is finished.

@@ -2665,44 +2939,42 @@ Promise +
+ + + - - - - + +
+
+

setName(name)

+ + +
+
- - -

setName(name) → {Promise}

+
+

Set the name of the Hub.

+
- - -
- Set the name of the Hub. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -2733,6 +3005,7 @@ string + @@ -2740,30 +3013,33 @@ - +
New name of the hub (14 characters or less, ASCII only).

New name of the hub (14 characters or less, ASCII only).

+ - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -2773,47 +3049,54 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful issuance of command. +

Resolved upon successful issuance of command.

@@ -2827,46 +3110,43 @@ Promise +
+ + + - - - - + +
+
+

sleep(delay)

+ + +
+
- - -

sleep(delay) → {Promise}

+
+

Sleep a given amount of time.

+

This is a helper method to make it easier to add delays into a chain of commands.

+
- - -
- Sleep a given amount of time. - -This is a helper method to make it easier to add delays into a chain of commands. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -2897,6 +3177,7 @@ This is a helper method to make it easier to add delays into a chain of commands number + @@ -2904,25 +3185,33 @@ This is a helper method to make it easier to add delays into a chain of commands - +
How long to sleep (in milliseconds).

How long to sleep (in milliseconds).

+ - - - - +
- - + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -2937,47 +3226,54 @@ This is a helper method to make it easier to add delays into a chain of commands - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved after the delay is finished. +

Resolved after the delay is finished.

@@ -2991,44 +3287,42 @@ This is a helper method to make it easier to add delays into a chain of commands Promise +
+ + + - - - - + +
+
+

subscribe(port [, mode])

+ + +
+
- - -

subscribe(port, modeopt) → {Promise}

+
+

Subscribe to sensor notifications on a given port.

+
- - -
- Subscribe to sensor notifications on a given port. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -3038,7 +3332,7 @@ This is a helper method to make it easier to add delays into a chain of commands - + @@ -3061,6 +3355,7 @@ This is a helper method to make it easier to add delays into a chain of commands string + @@ -3092,6 +3387,7 @@ This is a helper method to make it easier to add delays into a chain of commands number + @@ -3109,25 +3405,33 @@ This is a helper method to make it easier to add delays into a chain of commands - +
TypeAttributesArgumentThe sensor mode to activate. If no mode is provided, the default for that sensor will be chosen.

The sensor mode to activate. If no mode is provided, the default for that sensor will be chosen.

+ - - - - +
- - + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -3142,47 +3446,54 @@ This is a helper method to make it easier to add delays into a chain of commands - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful issuance of command. +

Resolved upon successful issuance of command.

@@ -3196,44 +3507,42 @@ This is a helper method to make it easier to add delays into a chain of commands Promise +
+ + + - - - - + +
+
+

unsubscribe(port)

+ + +
+
- - -

unsubscribe(port) → {Promise}

+
+

Unsubscribe to sensor notifications on a given port.

+
- - -
- Unsubscribe to sensor notifications on a given port. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -3264,6 +3573,7 @@ This is a helper method to make it easier to add delays into a chain of commands string + @@ -3278,18 +3588,26 @@ This is a helper method to make it easier to add delays into a chain of commands
+ - - - - +
- - + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -3304,47 +3622,54 @@ This is a helper method to make it easier to add delays into a chain of commands - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful issuance of command. +

Resolved upon successful issuance of command.

@@ -3358,46 +3683,43 @@ This is a helper method to make it easier to add delays into a chain of commands Promise +
+ + + - - - - + +
+
+

wait(commands)

+ + +
+
- - -

wait(commands) → {Promise}

+
+

Wait until a given list of concurrently running commands are complete.

+

This is a helper method to make it easier to wait for concurrent commands to complete.

+
- - -
- Wait until a given list of concurrently running commands are complete. - -This is a helper method to make it easier to wait for concurrent commands to complete. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -3428,6 +3750,7 @@ This is a helper method to make it easier to wait for concurrent commands to com Array.<Promise.<any>> + @@ -3435,25 +3758,33 @@ This is a helper method to make it easier to wait for concurrent commands to com - +
Array of executing commands.

Array of executing commands.

+ - - - - +
- - + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -3468,47 +3799,54 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved after the commands are finished. +

Resolved after the commands are finished.

@@ -3522,16 +3860,17 @@ This is a helper method to make it easier to wait for concurrent commands to com Promise +
- - - - - + + + + + @@ -3539,35 +3878,32 @@ This is a helper method to make it easier to wait for concurrent commands to com

Events

- +
- - - - +
+

attach

+ +
+
+ + +
+

Emits when a motor or sensor is attached to the Hub.

+
+ - - -
- Emits when a motor or sensor is attached to the Hub. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -3598,6 +3934,7 @@ This is a helper method to make it easier to wait for concurrent commands to com string + @@ -3621,6 +3958,7 @@ This is a helper method to make it easier to wait for concurrent commands to com DeviceType + @@ -3635,18 +3973,26 @@ This is a helper method to make it easier to wait for concurrent commands to com
+ - - - - +
- - + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -3661,76 +4007,79 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + + - - - - - - - - - + +
- - - - +
+

button

+ +
+
+ + +
+

Emits when a button is pressed.

+
+ - - -
- Emits when a button is pressed. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -3761,6 +4110,7 @@ This is a helper method to make it easier to wait for concurrent commands to com string + @@ -3784,6 +4134,7 @@ This is a helper method to make it easier to wait for concurrent commands to com ButtonState + @@ -3798,23 +4149,26 @@ This is a helper method to make it easier to wait for concurrent commands to com
+ - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -3824,76 +4178,79 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + + - - - - - - - - - + +
- - - - +
+

color

+ +
+
+ + +
+

Emits when a color sensor is activated.

+
+ - - -
- Emits when a color sensor is activated. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -3924,6 +4281,7 @@ This is a helper method to make it easier to wait for concurrent commands to com string + @@ -3947,6 +4305,7 @@ This is a helper method to make it easier to wait for concurrent commands to com Color + @@ -3961,23 +4320,26 @@ This is a helper method to make it easier to wait for concurrent commands to com
+ - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -3987,76 +4349,79 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + + - - - - - - - - - + +
- - - - +
+

colorAndDistance

+ +
+
+ + +
+

A combined color and distance event, emits when the sensor is activated.

+
+ - - -
- A combined color and distance event, emits when the sensor is activated. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -4087,6 +4452,7 @@ This is a helper method to make it easier to wait for concurrent commands to com string + @@ -4110,6 +4476,7 @@ This is a helper method to make it easier to wait for concurrent commands to com Color + @@ -4133,6 +4500,7 @@ This is a helper method to make it easier to wait for concurrent commands to com number + @@ -4140,30 +4508,33 @@ This is a helper method to make it easier to wait for concurrent commands to com - +
Distance, in millimeters.

Distance, in millimeters.

+ - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -4173,76 +4544,79 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + + - - - - - - - - - + +
- - - - +
+

detach

+ +
+
+ + +
+

Emits when an attached motor or sensor is detached from the Hub.

+
+ - - -
- Emits when an attached motor or sensor is detached from the Hub. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -4273,6 +4647,7 @@ This is a helper method to make it easier to wait for concurrent commands to com string + @@ -4287,18 +4662,26 @@ This is a helper method to make it easier to wait for concurrent commands to com
+ - - - - +
- - + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -4313,76 +4696,79 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + + - - - - - - - - - + +
- - - - +
+

distance

+ +
+
+ + +
+

Emits when a distance sensor is activated.

+
+ - - -
- Emits when a distance sensor is activated. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -4413,6 +4799,7 @@ This is a helper method to make it easier to wait for concurrent commands to com string + @@ -4436,6 +4823,7 @@ This is a helper method to make it easier to wait for concurrent commands to com number + @@ -4443,30 +4831,33 @@ This is a helper method to make it easier to wait for concurrent commands to com - +
Distance, in millimeters.

Distance, in millimeters.

+ - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -4476,76 +4867,79 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + + - - - - - - - - - + +
- - - - +
+

tilt

+ +
+
+ + +
+

Emits when a tilt sensor is activated.

+
+ - - -
- Emits when a tilt sensor is activated. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -4576,6 +4970,7 @@ This is a helper method to make it easier to wait for concurrent commands to com string + @@ -4583,7 +4978,7 @@ This is a helper method to make it easier to wait for concurrent commands to com - + @@ -4599,6 +4994,7 @@ This is a helper method to make it easier to wait for concurrent commands to com number + @@ -4622,6 +5018,7 @@ This is a helper method to make it easier to wait for concurrent commands to com number + @@ -4636,23 +5033,26 @@ This is a helper method to make it easier to wait for concurrent commands to com
If the event is fired from the Move Hub's in-built tilt sensor, the special port "TILT" is used.

If the event is fired from the Move Hub's in-built tilt sensor, the special port "TILT" is used.

+ - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -4662,48 +5062,54 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + + + +
- - - - - - - - - - +
@@ -4712,19 +5118,136 @@ This is a helper method to make it easier to wait for concurrent commands to com +
+
+ +
+ + +
+ +
+ + +
- -
+ +
- Documentation generated by JSDoc 3.5.5 on Fri Jan 18 2019 16:16:36 GMT-0800 (Pacific Standard Time) + + + + node-poweredup by Nathan Kellenicki licensed under the MIT license. + + + + Documentation generated by JSDoc 3.5.5 + + on Fri Jan 18th 2019 + + using the DocStrap template. +
- - + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/PUPRemote.html b/docs/PUPRemote.html index f61390f..5f89d4b 100644 --- a/docs/PUPRemote.html +++ b/docs/PUPRemote.html @@ -1,70 +1,131 @@ + - - JSDoc: Class: PUPRemote + + + DocStrap Class: PUPRemote + + + + + - - - - - -
+ +
+
+ +
+ +
+ +

Class: PUPRemote

-

PUPRemote()

+

+ PUPRemote +

+
+
+
+

new PUPRemote()

+ + +
+
- - -

new PUPRemote()

+
+

The PUPRemote is emitted if the discovered device is a Powered UP Remote.

+
+ + + -
- The PUPRemote is emitted if the discovered device is a Powered UP Remote. -
- - - - - - - - - - - - - +
+ + + + + + + @@ -74,52 +135,52 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + + - - - - - - - - - + +
@@ -148,28 +209,30 @@ - -

Members

- +
-

(readonly) batteryLevel

- - - - - - +
+
+

<readonly> batteryLevel

+ +
+
+ + + +
+
Properties:
- +
- +
@@ -200,6 +263,7 @@ number + @@ -207,23 +271,30 @@ - +
Battery level of the hub (Percentage between 0-100)

Battery level of the hub (Percentage between 0-100)

- - - - -
+
- + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -238,53 +309,63 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
- - - + +
-

(readonly) current

+
+
+

<readonly> current

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -315,6 +396,7 @@ number + @@ -322,34 +404,30 @@ - +
Current usage of the hub (Amps)

Current usage of the hub (Amps)

- - - - -
+
- + - -
Inherited From:
-
- + - - - - - + +
Inherited From:
+
+ +
+ @@ -359,47 +437,63 @@ - + - + - -
Source:
-
- + - + - + - + + + +
Source:
+
+ +
+ + + + + + +
- - - + + -

(readonly) firmwareVersion

+
+
+

<readonly> firmwareVersion

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -430,6 +524,7 @@ string + @@ -437,23 +532,30 @@ - +
Firmware version of the hub

Firmware version of the hub

- - - - -
+
- + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -468,53 +570,63 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + + - - - + + -

(readonly) name

+
+
+

<readonly> name

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -545,6 +657,7 @@ string + @@ -552,23 +665,30 @@ - +
Name of the hub

Name of the hub

- - - - -
+
- + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -583,53 +703,63 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + + - - - + + -

(readonly) rssi

+
+
+

<readonly> rssi

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -660,6 +790,7 @@ number + @@ -667,23 +798,30 @@ - +
Signal strength of the hub

Signal strength of the hub

- - - - -
+
- + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -698,53 +836,63 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + + - - - + + -

(readonly) uuid

+
+
+

<readonly> uuid

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -775,6 +923,7 @@ string + @@ -782,23 +931,30 @@ - +
UUID of the hub

UUID of the hub

- - - - -
+
- + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -813,53 +969,63 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + + - - - + + -

(readonly) voltage

+
+
+

<readonly> voltage

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -890,6 +1056,7 @@ number + @@ -897,34 +1064,30 @@ - +
Voltage of the hub (Volts)

Voltage of the hub (Volts)

- - - - -
+
- + - -
Inherited From:
-
- + - - - - - + +
Inherited From:
+
+ +
+ @@ -934,71 +1097,88 @@ - + - + - -
Source:
-
- + - + - + - + + + +
Source:
+
+ +
+ + + + + + + + + - - - - +

Methods

- +
+
+
+

connect()

+ + +
+
- - -

connect() → {Promise}

+
+

Connect to the Hub.

+
+ + + -
- Connect to the Hub. -
- - - - - - - - - - - - - +
- - + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -1013,47 +1193,54 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful connect. +

Resolved upon successful connect.

@@ -1067,51 +1254,57 @@ Promise +
+ + + - - - - + +
+
+

disconnect()

+ + +
+
- - -

disconnect() → {Promise}

+
+

Disconnect the Hub.

+
+ + + -
- Disconnect the Hub. -
- - - - - - - - - - - - - +
- - + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -1126,47 +1319,54 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful disconnect. +

Resolved upon successful disconnect.

@@ -1180,51 +1380,57 @@ Promise +
+ + + - - - - + +
+
+

getHubType()

+ + +
+
- - -

getHubType() → {HubType}

+
+

Get the hub type.

+
+ + + -
- Get the hub type. -
- - - - - - - - - - - - - +
- - + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -1239,45 +1445,52 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
@@ -1289,44 +1502,42 @@ HubType +
+ + + - - - - + +
+
+

getPortDeviceType(port)

+ + +
+
- - -

getPortDeviceType(port) → {DeviceType}

+
+

Get the device type for a given port.

+
- - -
- Get the device type for a given port. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -1357,6 +1568,7 @@ string + @@ -1371,18 +1583,26 @@
+ - - - - +
- - + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -1397,45 +1617,52 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
@@ -1447,44 +1674,42 @@ DeviceType +
+ + + - - - - + +
+
+

setLEDColor(color)

+ + +
+
- - -

setLEDColor(color) → {Promise}

+
+

Set the color of the LED on the Remote via a color value.

+
- - -
- Set the color of the LED on the Remote via a color value. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -1515,6 +1740,7 @@ Color + @@ -1529,18 +1755,17 @@
+ - - - - +
- - + - + + +
Overrides:
@@ -1555,47 +1780,54 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful issuance of command. +

Resolved upon successful issuance of command.

@@ -1609,44 +1841,42 @@ Promise +
+ + + - - - - + +
+
+

setLEDRGB(red, green, blue)

+ + +
+
- - -

setLEDRGB(red, green, blue) → {Promise}

+
+

Set the color of the LED on the Hub via RGB values.

+
- - -
- Set the color of the LED on the Hub via RGB values. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -1677,6 +1907,7 @@ number + @@ -1700,6 +1931,7 @@ number + @@ -1723,6 +1955,7 @@ number + @@ -1737,18 +1970,17 @@
+ - - - - +
- - + - + + +
Overrides:
@@ -1763,47 +1995,54 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful issuance of command. +

Resolved upon successful issuance of command.

@@ -1817,44 +2056,42 @@ Promise +
+ + + - - - - + +
+
+

setName(name)

+ + +
+
- - -

setName(name) → {Promise}

+
+

Set the name of the Hub.

+
- - -
- Set the name of the Hub. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -1885,6 +2122,7 @@ string + @@ -1892,30 +2130,33 @@ - +
New name of the hub (14 characters or less, ASCII only).

New name of the hub (14 characters or less, ASCII only).

+ - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -1925,47 +2166,54 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful issuance of command. +

Resolved upon successful issuance of command.

@@ -1979,46 +2227,43 @@ Promise +
+ + + - - - - + +
+
+

sleep(delay)

+ + +
+
- - -

sleep(delay) → {Promise}

+
+

Sleep a given amount of time.

+

This is a helper method to make it easier to add delays into a chain of commands.

+
- - -
- Sleep a given amount of time. - -This is a helper method to make it easier to add delays into a chain of commands. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -2049,6 +2294,7 @@ This is a helper method to make it easier to add delays into a chain of commands number + @@ -2056,25 +2302,33 @@ This is a helper method to make it easier to add delays into a chain of commands - +
How long to sleep (in milliseconds).

How long to sleep (in milliseconds).

+ - - - - +
- - + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -2089,47 +2343,54 @@ This is a helper method to make it easier to add delays into a chain of commands - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved after the delay is finished. +

Resolved after the delay is finished.

@@ -2143,44 +2404,42 @@ This is a helper method to make it easier to add delays into a chain of commands Promise +
+ + + - - - - + +
+
+

subscribe(port [, mode])

+ + +
+
- - -

subscribe(port, modeopt) → {Promise}

+
+

Subscribe to sensor notifications on a given port.

+
- - -
- Subscribe to sensor notifications on a given port. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -2190,7 +2449,7 @@ This is a helper method to make it easier to add delays into a chain of commands - + @@ -2213,6 +2472,7 @@ This is a helper method to make it easier to add delays into a chain of commands string + @@ -2244,6 +2504,7 @@ This is a helper method to make it easier to add delays into a chain of commands number + @@ -2261,25 +2522,33 @@ This is a helper method to make it easier to add delays into a chain of commands - +
TypeAttributesArgumentThe sensor mode to activate. If no mode is provided, the default for that sensor will be chosen.

The sensor mode to activate. If no mode is provided, the default for that sensor will be chosen.

+ - - - - +
- - + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -2294,47 +2563,54 @@ This is a helper method to make it easier to add delays into a chain of commands - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful issuance of command. +

Resolved upon successful issuance of command.

@@ -2348,44 +2624,42 @@ This is a helper method to make it easier to add delays into a chain of commands Promise +
+ + + - - - - + +
+
+

unsubscribe(port)

+ + +
+
- - -

unsubscribe(port) → {Promise}

+
+

Unsubscribe to sensor notifications on a given port.

+
- - -
- Unsubscribe to sensor notifications on a given port. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -2416,6 +2690,7 @@ This is a helper method to make it easier to add delays into a chain of commands string + @@ -2430,18 +2705,26 @@ This is a helper method to make it easier to add delays into a chain of commands
+ - - - - +
- - + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -2456,47 +2739,54 @@ This is a helper method to make it easier to add delays into a chain of commands - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful issuance of command. +

Resolved upon successful issuance of command.

@@ -2510,46 +2800,43 @@ This is a helper method to make it easier to add delays into a chain of commands Promise +
+ + + - - - - + +
+
+

wait(commands)

+ + +
+
- - -

wait(commands) → {Promise}

+
+

Wait until a given list of concurrently running commands are complete.

+

This is a helper method to make it easier to wait for concurrent commands to complete.

+
- - -
- Wait until a given list of concurrently running commands are complete. - -This is a helper method to make it easier to wait for concurrent commands to complete. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -2580,6 +2867,7 @@ This is a helper method to make it easier to wait for concurrent commands to com Array.<Promise.<any>> + @@ -2587,25 +2875,33 @@ This is a helper method to make it easier to wait for concurrent commands to com - +
Array of executing commands.

Array of executing commands.

+ - - - - +
- - + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -2620,47 +2916,54 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved after the commands are finished. +

Resolved after the commands are finished.

@@ -2674,16 +2977,17 @@ This is a helper method to make it easier to wait for concurrent commands to com Promise +
- - - - - + + + + + @@ -2691,35 +2995,32 @@ This is a helper method to make it easier to wait for concurrent commands to com

Events

- +
- - - - +
+

button

+ +
+
+ + +
+

Emits when a button is pressed.

+
+ - - -
- Emits when a button is pressed. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -2750,6 +3051,7 @@ This is a helper method to make it easier to wait for concurrent commands to com string + @@ -2773,6 +3075,7 @@ This is a helper method to make it easier to wait for concurrent commands to com ButtonState + @@ -2787,23 +3090,26 @@ This is a helper method to make it easier to wait for concurrent commands to com
+ - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -2813,76 +3119,79 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + + - - - - - - - - - + +
- - - - +
+

colorAndDistance

+ +
+
+ + +
+

A combined color and distance event, emits when the sensor is activated.

+
+ - - -
- A combined color and distance event, emits when the sensor is activated. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -2913,6 +3222,7 @@ This is a helper method to make it easier to wait for concurrent commands to com string + @@ -2936,6 +3246,7 @@ This is a helper method to make it easier to wait for concurrent commands to com Color + @@ -2959,6 +3270,7 @@ This is a helper method to make it easier to wait for concurrent commands to com number + @@ -2966,30 +3278,33 @@ This is a helper method to make it easier to wait for concurrent commands to com - +
Distance, in millimeters.

Distance, in millimeters.

+ - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -2999,48 +3314,54 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + + + +
- - - - - - - - - - +
@@ -3049,19 +3370,136 @@ This is a helper method to make it easier to wait for concurrent commands to com +
+
+ +
+ + +
+ +
+ + +
- -
+ +
- Documentation generated by JSDoc 3.5.5 on Fri Jan 18 2019 16:16:36 GMT-0800 (Pacific Standard Time) + + + + node-poweredup by Nathan Kellenicki licensed under the MIT license. + + + + Documentation generated by JSDoc 3.5.5 + + on Fri Jan 18th 2019 + + using the DocStrap template. +
- - + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/PoweredUP.html b/docs/PoweredUP.html index 0479f45..624d1f6 100644 --- a/docs/PoweredUP.html +++ b/docs/PoweredUP.html @@ -1,66 +1,127 @@ + - - JSDoc: Class: PoweredUP + + + DocStrap Class: PoweredUP + + + + + - - - - - -
+ +
+
+ +
+ +
+ +

Class: PoweredUP

-

PoweredUP()

+

+ PoweredUP +

+
+
+
+

new PoweredUP()

+ + +
+
-

new PoweredUP()

- + + - - - - - - - - - - - - - +
+ + + + + + + @@ -70,52 +131,52 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + + - - - - - - - - - + +
@@ -144,39 +205,34 @@ - -

Methods

- +
+
+
+

getConnectedHubByUUID(uuid)

+ + +
+
- - -

getConnectedHubByUUID(uuid) → {Hub|null}

+
+

Retrieve a Powered UP Hub by UUID.

+
- - -
- Retrieve a Powered UP Hub by UUID. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -207,6 +263,7 @@ string + @@ -221,12 +278,17 @@
+ - - - - +
+ + + + + + + @@ -236,51 +298,52 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
@@ -295,45 +358,48 @@ null +
+ + + - - - - + +
+
+

getConnectedHubs()

+ + +
+
- - -

getConnectedHubs() → {Array.<Hub>}

+
+

Retrieve a list of Powered UP Hubs.

+
+ + + -
- Retrieve a list of Powered UP Hubs. -
- - - - - - - - - - - - - +
+ + + + + + + @@ -343,51 +409,52 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
@@ -399,45 +466,48 @@ Array.<Hub> +
+ + + - - - - + +
+
+

scan()

+ + +
+
- - -

scan()

+
+

Begin scanning for Powered UP Hub devices.

+
+ + + -
- Begin scanning for Powered UP Hub devices. -
- - - - - - - - - - - - - +
+ + + + + + + @@ -447,83 +517,85 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + + - - - - - - - - - + +
+
+
+

stop()

+ + +
+
- - -

stop()

+
+

Stop scanning for Powered UP Hub devices.

+
+ + + -
- Stop scanning for Powered UP Hub devices. -
- - - - - - - - - - - - - +
+ + + + + + + @@ -533,54 +605,54 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + + + +
- - - - - - - - - - + @@ -588,35 +660,32 @@

Events

- +
- - - - +
+

discover

+ +
+
+ + +
+

Emits when a Powered UP Hub device is found.

+
+ - - -
- Emits when a Powered UP Hub device is found. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -659,6 +728,7 @@ DuploTrainBase + @@ -673,12 +743,17 @@
+ - - - - +
+ + + + + + + @@ -688,54 +763,54 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + + + +
- - - - - - - - - - +
@@ -744,19 +819,136 @@ +
+
+ +
+ + +
+ +
+ + +
- -
+ +
- Documentation generated by JSDoc 3.5.5 on Fri Jan 18 2019 16:16:36 GMT-0800 (Pacific Standard Time) + + + + node-poweredup by Nathan Kellenicki licensed under the MIT license. + + + + Documentation generated by JSDoc 3.5.5 + + on Fri Jan 18th 2019 + + using the DocStrap template. +
- - + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/WeDo2SmartHub.html b/docs/WeDo2SmartHub.html index 829614e..7eb603d 100644 --- a/docs/WeDo2SmartHub.html +++ b/docs/WeDo2SmartHub.html @@ -1,70 +1,131 @@ + - - JSDoc: Class: WeDo2SmartHub + + + DocStrap Class: WeDo2SmartHub + + + + + - - - - - -
+ +
+
+ +
+ +
+ +

Class: WeDo2SmartHub

-

WeDo2SmartHub()

+

+ WeDo2SmartHub +

+
+
+
+

new WeDo2SmartHub()

+ + +
+
- - -

new WeDo2SmartHub()

+
+

The WeDo2SmartHub is emitted if the discovered device is a WeDo 2.0 Smart Hub.

+
+ + + -
- The WeDo2SmartHub is emitted if the discovered device is a WeDo 2.0 Smart Hub. -
- - - - - - - - - - - - - +
+ + + + + + + @@ -74,52 +135,52 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + + - - - - - - - - - + +
@@ -146,28 +207,30 @@ - -

Members

- +
-

(readonly) batteryLevel

- - - - - - +
+
+

<readonly> batteryLevel

+ +
+
+ + + +
+
Properties:
- +
- +
@@ -198,6 +261,7 @@ number + @@ -205,34 +269,30 @@ - +
Battery level of the hub (Percentage between 0-100)

Battery level of the hub (Percentage between 0-100)

- - - - -
+
- + - -
Inherited From:
-
- + - - - - - + +
Inherited From:
+
+ +
+ @@ -242,47 +302,63 @@ - + - + - -
Source:
-
- + - + - + - + + + +
Source:
+
+ +
+ + + + + + +
- - - + +
-

(readonly) firmwareVersion

+
+
+

<readonly> firmwareVersion

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -313,6 +389,7 @@ string + @@ -320,34 +397,30 @@ - +
Firmware version of the hub

Firmware version of the hub

- - - - -
+
- + - -
Inherited From:
-
- + - - - - - + +
Inherited From:
+
+ +
+ @@ -357,47 +430,63 @@ - + - + - -
Source:
-
- + - + - + - + + + +
Source:
+
+ +
+ + + + + + +
- - - + + -

(readonly) name

+
+
+

<readonly> name

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -428,6 +517,7 @@ string + @@ -435,34 +525,30 @@ - +
Name of the hub

Name of the hub

- - - - -
+
- + - -
Inherited From:
-
- + - - - - - + +
Inherited From:
+
+ +
+ @@ -472,47 +558,63 @@ - + - + - -
Source:
-
- + - + - + - + + + +
Source:
+
+ +
+ + + + + + + - - - + + -

(readonly) rssi

+
+
+

<readonly> rssi

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -543,6 +645,7 @@ number + @@ -550,34 +653,30 @@ - +
Signal strength of the hub

Signal strength of the hub

- - - - -
+
- + - -
Inherited From:
-
- + - - - - - + +
Inherited From:
+
+ +
+ @@ -587,47 +686,63 @@ - + - + - -
Source:
-
- + - + - + - + + + +
Source:
+
+ +
+ + + + + + + - - - + + -

(readonly) uuid

+
+
+

<readonly> uuid

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -658,6 +773,7 @@ string + @@ -665,34 +781,30 @@ - +
UUID of the hub

UUID of the hub

- - - - -
+
- + - -
Inherited From:
-
- + - - - - - + +
Inherited From:
+
+ +
+ @@ -702,71 +814,88 @@ - + - + - -
Source:
-
- + - + - + - + + + +
Source:
+
+ +
+ + + + + + + + + - - - - +

Methods

- +
+
+
+

connect()

+ + +
+
- - -

connect() → {Promise}

+
+

Connect to the Hub.

+
+ + + -
- Connect to the Hub. -
- - - - - - - - - - - - - +
- - + - + + + +
Inherited From:
+
+ +
+
Overrides:
@@ -781,47 +910,54 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful connect. +

Resolved upon successful connect.

@@ -835,56 +971,57 @@ Promise +
+ + + - - - - + +
+
+

disconnect()

+ + +
+
- - -

disconnect() → {Promise}

+
+

Disconnect the Hub.

+
+ + + -
- Disconnect the Hub. -
- - - - - - - - - - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -894,47 +1031,54 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful disconnect. +

Resolved upon successful disconnect.

@@ -948,56 +1092,57 @@ Promise +
+ + + - - - - + +
+
+

getHubType()

+ + +
+
- - -

getHubType() → {HubType}

+
+

Get the hub type.

+
+ + + -
- Get the hub type. -
- - - - - - - - - - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -1007,45 +1152,52 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
@@ -1057,44 +1209,42 @@ HubType +
+ + + - - - - + +
+
+

getPortDeviceType(port)

+ + +
+
- - -

getPortDeviceType(port) → {DeviceType}

+
+

Get the device type for a given port.

+
- - -
- Get the device type for a given port. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -1125,6 +1275,7 @@ string + @@ -1139,23 +1290,26 @@
+ - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -1165,45 +1319,52 @@ - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
@@ -1215,44 +1376,42 @@ DeviceType +
+ + + - - - - + +
+
+

hardStopMotor(port)

+ + +
+
- - -

hardStopMotor(port) → {Promise}

+
+

Fully (hard) stop the motor on a given port.

+
- - -
- Fully (hard) stop the motor on a given port. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -1283,6 +1442,7 @@ string + @@ -1297,12 +1457,17 @@
+ - - - - +
+ + + + + + + @@ -1312,53 +1477,54 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful completion of command. +

Resolved upon successful completion of command.

@@ -1372,44 +1538,42 @@ Promise +
+ + + - - - - + +
+
+

playTone(frequency, time)

+ + +
+
- - -

playTone(frequency, time) → {Promise}

+
+

Play a tone on the Hub's in-built buzzer

+
- - -
- Play a tone on the Hub's in-built buzzer -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -1440,6 +1604,7 @@ number + @@ -1463,6 +1628,7 @@ number + @@ -1470,19 +1636,24 @@ - +
How long the tone should play for (in milliseconds).

How long the tone should play for (in milliseconds).

+ - - - - +
+ + + + + + + @@ -1492,53 +1663,54 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful completion of command (ie. once the tone has finished playing). +

Resolved upon successful completion of command (ie. once the tone has finished playing).

@@ -1552,44 +1724,42 @@ Promise +
+ + + - - - - + +
+
+

rampMotorSpeed(port, fromSpeed, toSpeed, time)

+ + +
+
- - -

rampMotorSpeed(port, fromSpeed, toSpeed, time) → {Promise}

+
+

Ramp the motor speed on a given port.

+
- - -
- Ramp the motor speed on a given port. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -1620,6 +1790,7 @@ string + @@ -1643,6 +1814,7 @@ number + @@ -1650,7 +1822,7 @@ - + @@ -1666,6 +1838,7 @@ number + @@ -1673,7 +1846,7 @@ - + @@ -1689,6 +1862,7 @@ number + @@ -1696,19 +1870,24 @@ - +
For forward, a value between 1 - 100 should be set. For reverse, a value between -1 to -100. Stop is 0.

For forward, a value between 1 - 100 should be set. For reverse, a value between -1 to -100. Stop is 0.

For forward, a value between 1 - 100 should be set. For reverse, a value between -1 to -100. Stop is 0.

For forward, a value between 1 - 100 should be set. For reverse, a value between -1 to -100. Stop is 0.

How long the ramp should last (in milliseconds).

How long the ramp should last (in milliseconds).

+ - - - - +
+ + + + + + + @@ -1718,53 +1897,54 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful completion of command. +

Resolved upon successful completion of command.

@@ -1778,44 +1958,42 @@ Promise +
+ + + - - - - + +
+
+

setLEDColor(color)

+ + +
+
- - -

setLEDColor(color) → {Promise}

+
+

Set the color of the LED on the Hub via a color value.

+
- - -
- Set the color of the LED on the Hub via a color value. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -1846,6 +2024,7 @@ Color + @@ -1860,12 +2039,17 @@
+ - - - - +
+ + + + + + + @@ -1875,53 +2059,54 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful issuance of command. +

Resolved upon successful issuance of command.

@@ -1935,44 +2120,42 @@ Promise +
+ + + - - - - + +
+
+

setLEDRGB(red, green, blue)

+ + +
+
- - -

setLEDRGB(red, green, blue) → {Promise}

+
+

Set the color of the LED on the Hub via RGB values.

+
- - -
- Set the color of the LED on the Hub via RGB values. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -2003,6 +2186,7 @@ number + @@ -2026,6 +2210,7 @@ number + @@ -2049,6 +2234,7 @@ number + @@ -2063,12 +2249,17 @@
+ - - - - +
+ + + + + + + @@ -2078,53 +2269,54 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful issuance of command. +

Resolved upon successful issuance of command.

@@ -2138,44 +2330,42 @@ Promise +
+ + + - - - - + +
+
+

setLightBrightness(port, brightness [, time])

+ + +
+
- - -

setLightBrightness(port, brightness, timeopt) → {Promise}

+
+

Set the light brightness on a given port.

+
- - -
- Set the light brightness on a given port. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -2185,7 +2375,7 @@ - + @@ -2208,6 +2398,7 @@ string + @@ -2239,6 +2430,7 @@ number + @@ -2254,7 +2446,7 @@ - + @@ -2270,6 +2462,7 @@ number + @@ -2287,19 +2480,24 @@ - +
TypeAttributesArgumentBrightness value between 0-100 (0 is off)

Brightness value between 0-100 (0 is off)

How long to turn the light on (in milliseconds). Leave empty to turn the light on indefinitely.

How long to turn the light on (in milliseconds). Leave empty to turn the light on indefinitely.

+ - - - - +
+ + + + + + + @@ -2309,53 +2507,54 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful completion of command. If time is specified, this is once the light is turned off. +

Resolved upon successful completion of command. If time is specified, this is once the light is turned off.

@@ -2369,44 +2568,42 @@ Promise +
+ + + - - - - + +
+
+

setMotorSpeed(port, speed [, time])

+ + +
+
- - -

setMotorSpeed(port, speed, timeopt) → {Promise}

+
+

Set the motor speed on a given port.

+
- - -
- Set the motor speed on a given port. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -2416,7 +2613,7 @@ - + @@ -2439,6 +2636,7 @@ string + @@ -2470,6 +2668,7 @@ number + @@ -2485,7 +2684,7 @@ - + @@ -2501,6 +2700,7 @@ number + @@ -2518,19 +2718,24 @@ - +
TypeAttributesArgumentFor forward, a value between 1 - 100 should be set. For reverse, a value between -1 to -100. Stop is 0.

For forward, a value between 1 - 100 should be set. For reverse, a value between -1 to -100. Stop is 0.

How long to activate the motor for (in milliseconds). Leave empty to turn the motor on indefinitely.

How long to activate the motor for (in milliseconds). Leave empty to turn the motor on indefinitely.

+ - - - - +
+ + + + + + + @@ -2540,53 +2745,54 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful completion of command. If time is specified, this is once the motor is finished. +

Resolved upon successful completion of command. If time is specified, this is once the motor is finished.

@@ -2600,44 +2806,42 @@ Promise +
+ + + - - - - + +
+
+

setName(name)

+ + +
+
- - -

setName(name) → {Promise}

+
+

Set the name of the Hub.

+
- - -
- Set the name of the Hub. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -2668,6 +2872,7 @@ string + @@ -2675,19 +2880,24 @@ - +
New name of the hub (14 characters or less, ASCII only).

New name of the hub (14 characters or less, ASCII only).

+ - - - - +
+ + + + + + + @@ -2697,53 +2907,54 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful issuance of command. +

Resolved upon successful issuance of command.

@@ -2757,46 +2968,43 @@ Promise +
+ + + - - - - + +
+
+

sleep(delay)

+ + +
+
- - -

sleep(delay) → {Promise}

+
+

Sleep a given amount of time.

+

This is a helper method to make it easier to add delays into a chain of commands.

+
- - -
- Sleep a given amount of time. - -This is a helper method to make it easier to add delays into a chain of commands. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -2827,6 +3035,7 @@ This is a helper method to make it easier to add delays into a chain of commands number + @@ -2834,30 +3043,33 @@ This is a helper method to make it easier to add delays into a chain of commands - +
How long to sleep (in milliseconds).

How long to sleep (in milliseconds).

+ - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -2867,47 +3079,54 @@ This is a helper method to make it easier to add delays into a chain of commands - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved after the delay is finished. +

Resolved after the delay is finished.

@@ -2921,44 +3140,42 @@ This is a helper method to make it easier to add delays into a chain of commands Promise +
+ + + - - - - + +
+
+

subscribe(port [, mode])

+ + +
+
- - -

subscribe(port, modeopt) → {Promise}

+
+

Subscribe to sensor notifications on a given port.

+
- - -
- Subscribe to sensor notifications on a given port. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -2968,7 +3185,7 @@ This is a helper method to make it easier to add delays into a chain of commands - + @@ -2991,6 +3208,7 @@ This is a helper method to make it easier to add delays into a chain of commands string + @@ -3022,6 +3240,7 @@ This is a helper method to make it easier to add delays into a chain of commands number + @@ -3039,30 +3258,33 @@ This is a helper method to make it easier to add delays into a chain of commands - +
TypeAttributesArgumentThe sensor mode to activate. If no mode is provided, the default for that sensor will be chosen.

The sensor mode to activate. If no mode is provided, the default for that sensor will be chosen.

+ - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -3072,47 +3294,54 @@ This is a helper method to make it easier to add delays into a chain of commands - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful issuance of command. +

Resolved upon successful issuance of command.

@@ -3126,44 +3355,42 @@ This is a helper method to make it easier to add delays into a chain of commands Promise +
+ + + - - - - + +
+
+

unsubscribe(port)

+ + +
+
- - -

unsubscribe(port) → {Promise}

+
+

Unsubscribe to sensor notifications on a given port.

+
- - -
- Unsubscribe to sensor notifications on a given port. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -3194,6 +3421,7 @@ This is a helper method to make it easier to add delays into a chain of commands string + @@ -3208,23 +3436,26 @@ This is a helper method to make it easier to add delays into a chain of commands
+ - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -3234,47 +3465,54 @@ This is a helper method to make it easier to add delays into a chain of commands - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved upon successful issuance of command. +

Resolved upon successful issuance of command.

@@ -3288,46 +3526,43 @@ This is a helper method to make it easier to add delays into a chain of commands Promise +
+ + + - - - - + +
+
+

wait(commands)

+ + +
+
- - -

wait(commands) → {Promise}

+
+

Wait until a given list of concurrently running commands are complete.

+

This is a helper method to make it easier to wait for concurrent commands to complete.

+
- - -
- Wait until a given list of concurrently running commands are complete. - -This is a helper method to make it easier to wait for concurrent commands to complete. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -3358,6 +3593,7 @@ This is a helper method to make it easier to wait for concurrent commands to com Array.<Promise.<any>> + @@ -3365,30 +3601,33 @@ This is a helper method to make it easier to wait for concurrent commands to com - +
Array of executing commands.

Array of executing commands.

+ - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -3398,47 +3637,54 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + - - - - - - -
Returns:
- - + +
Returns:
+ +
- Resolved after the commands are finished. +

Resolved after the commands are finished.

@@ -3452,16 +3698,17 @@ This is a helper method to make it easier to wait for concurrent commands to com Promise +
- - - - - + + + + + @@ -3469,35 +3716,32 @@ This is a helper method to make it easier to wait for concurrent commands to com

Events

- +
- - - - +
+

attach

+ +
+
+ + +
+

Emits when a motor or sensor is attached to the Hub.

+
+ - - -
- Emits when a motor or sensor is attached to the Hub. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -3528,6 +3772,7 @@ This is a helper method to make it easier to wait for concurrent commands to com string + @@ -3551,6 +3796,7 @@ This is a helper method to make it easier to wait for concurrent commands to com DeviceType + @@ -3565,23 +3811,26 @@ This is a helper method to make it easier to wait for concurrent commands to com
+ - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -3591,76 +3840,79 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + + - - - - - - - - - + +
- - - - +
+

button

+ +
+
+ + +
+

Emits when a button is pressed.

+
+ - - -
- Emits when a button is pressed. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -3691,6 +3943,7 @@ This is a helper method to make it easier to wait for concurrent commands to com string + @@ -3714,6 +3967,7 @@ This is a helper method to make it easier to wait for concurrent commands to com ButtonState + @@ -3728,12 +3982,17 @@ This is a helper method to make it easier to wait for concurrent commands to com
+ - - - - +
+ + + + + + + @@ -3743,82 +4002,79 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + + - - - - - - - - - + +
- - - - +
+

color

+ +
+
+ + +
+

Emits when a color sensor is activated.

+
+ - - -
- Emits when a color sensor is activated. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -3849,6 +4105,7 @@ This is a helper method to make it easier to wait for concurrent commands to com string + @@ -3872,6 +4129,7 @@ This is a helper method to make it easier to wait for concurrent commands to com Color + @@ -3886,12 +4144,17 @@ This is a helper method to make it easier to wait for concurrent commands to com
+ - - - - +
+ + + + + + + @@ -3901,82 +4164,79 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + + - - - - - - - - - + +
- - - - +
+

detach

+ +
+
+ + +
+

Emits when an attached motor or sensor is detached from the Hub.

+
+ - - -
- Emits when an attached motor or sensor is detached from the Hub. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -4007,6 +4267,7 @@ This is a helper method to make it easier to wait for concurrent commands to com string + @@ -4021,23 +4282,26 @@ This is a helper method to make it easier to wait for concurrent commands to com
+ - - - - +
- - + - -
Inherited From:
-
- + + + +
Inherited From:
+
+ +
+ @@ -4047,76 +4311,79 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - -
Source:
-
- - - + +
Source:
+
+ +
+ - + + + + +
+ + + + + + - - - - - - - - - + +
- - - - +
+

distance

+ +
+
+ + +
+

Emits when a distance sensor is activated.

+
+ - - -
- Emits when a distance sensor is activated. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -4147,6 +4414,7 @@ This is a helper method to make it easier to wait for concurrent commands to com string + @@ -4170,6 +4438,7 @@ This is a helper method to make it easier to wait for concurrent commands to com number + @@ -4177,19 +4446,24 @@ This is a helper method to make it easier to wait for concurrent commands to com - +
Distance, in millimeters.

Distance, in millimeters.

+ - - - - +
+ + + + + + + @@ -4199,82 +4473,79 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + + - - - - - - - - - + +
- - - - +
+

rotate

+ +
+
+ + +
+

Emits when a rotation sensor is activated.

+
+ - - -
- Emits when a rotation sensor is activated. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -4305,6 +4576,7 @@ This is a helper method to make it easier to wait for concurrent commands to com string + @@ -4328,6 +4600,7 @@ This is a helper method to make it easier to wait for concurrent commands to com number + @@ -4342,12 +4615,17 @@ This is a helper method to make it easier to wait for concurrent commands to com
+ - - - - +
+ + + + + + + @@ -4357,82 +4635,79 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + + - - - - - - - - - + +
- - - - +
+

tilt

+ +
+
+ + +
+

Emits when a tilt sensor is activated.

+
+ - - -
- Emits when a tilt sensor is activated. -
- - - - - - - - - -
Parameters:
- + + +
Parameters:
+ + +
@@ -4463,6 +4738,7 @@ This is a helper method to make it easier to wait for concurrent commands to com string + @@ -4486,6 +4762,7 @@ This is a helper method to make it easier to wait for concurrent commands to com number + @@ -4509,6 +4786,7 @@ This is a helper method to make it easier to wait for concurrent commands to com number + @@ -4523,12 +4801,17 @@ This is a helper method to make it easier to wait for concurrent commands to com
+ - - - - +
+ + + + + + + @@ -4538,54 +4821,54 @@ This is a helper method to make it easier to wait for concurrent commands to com - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ + + + + + + +
- - - - - - - - - - +
@@ -4594,19 +4877,136 @@ This is a helper method to make it easier to wait for concurrent commands to com +
+
+ +
+ + +
+ +
+ + +
- -
+ +
- Documentation generated by JSDoc 3.5.5 on Fri Jan 18 2019 16:16:36 GMT-0800 (Pacific Standard Time) + + + + node-poweredup by Nathan Kellenicki licensed under the MIT license. + + + + Documentation generated by JSDoc 3.5.5 + + on Fri Jan 18th 2019 + + using the DocStrap template. +
- - + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/boostmovehub.js.html b/docs/boostmovehub.js.html index 6cccb31..f9ccec1 100644 --- a/docs/boostmovehub.js.html +++ b/docs/boostmovehub.js.html @@ -1,32 +1,90 @@ + - - JSDoc: Source: boostmovehub.js + + + DocStrap Source: boostmovehub.js + + + + + - - - - - -
+ + +
+
+ + +
+ +
+ + +

Source: boostmovehub.js

- - - - -
-
-
"use strict";
+
+
+
"use strict";
 var __importStar = (this && this.__importStar) || function (mod) {
     if (mod && mod.__esModule) return mod;
     var result = {};
@@ -246,26 +304,140 @@ class BoostMoveHub extends lpf2hub_1.LPF2Hub {
     }
 }
 exports.BoostMoveHub = BoostMoveHub;
-
-
-
+
+
+
+ +
+
+ +
+ + + +
- -
+ +
- Documentation generated by JSDoc 3.5.5 on Fri Jan 18 2019 16:16:36 GMT-0800 (Pacific Standard Time) + + + + node-poweredup by Nathan Kellenicki licensed under the MIT license. + + + + Documentation generated by JSDoc 3.5.5 + + on Fri Jan 18th 2019 + + using the DocStrap template. +
- - + + + + + + + + + + + + + + + + + + + + diff --git a/docs/classes.list.html b/docs/classes.list.html new file mode 100644 index 0000000..93f682a --- /dev/null +++ b/docs/classes.list.html @@ -0,0 +1,6775 @@ + + + + + + + DocStrap Classes + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Classes

+
+ +
+ +

+ +

+ + +
+ + +
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +

Classes

+ +
+
BoostMoveHub
+
+ +
DuploTrainBase
+
+ +
Hub
+
+ +
LPF2Hub
+
+ +
PoweredUP
+
+ +
PUPHub
+
+ +
PUPRemote
+
+ +
WeDo2SmartHub
+
+
+ + + + + + + + + + + + + +

Events

+ +
+ +
+
+

attach

+ + +
+
+ + +
+

Emits when a motor or sensor is attached to the Hub.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
port + + +string + + + + +
type + + +DeviceType + + + + +
+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

button

+ + +
+
+ + +
+

Emits when a button is pressed.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
button + + +string + + + + +
state + + +ButtonState + + + + +
+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

color

+ + +
+
+ + +
+

Emits when a color sensor is activated.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
port + + +string + + + + +
color + + +Color + + + + +
+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

colorAndDistance

+ + +
+
+ + +
+

A combined color and distance event, emits when the sensor is activated.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
port + + +string + + + + +
color + + +Color + + + + +
distance + + +number + + + + +

Distance, in millimeters.

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

detach

+ + +
+
+ + +
+

Emits when an attached motor or sensor is detached from the Hub.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
port + + +string + + + + +
+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

distance

+ + +
+
+ + +
+

Emits when a distance sensor is activated.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
port + + +string + + + + +
distance + + +number + + + + +

Distance, in millimeters.

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

rotate

+ + +
+
+ + +
+

Emits when a rotation sensor is activated.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
port + + +string + + + + +
rotation + + +number + + + + +
+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

tilt

+ + +
+
+ + +
+

Emits when a tilt sensor is activated.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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 + + + + +
+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

color

+ + +
+
+ + +
+

Emits when a color sensor is activated.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
port + + +string + + + + +
color + + +Color + + + + +
+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

speed

+ + +
+
+ + +
+

Emits on a speed change.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
port + + +string + + + + +
speed + + +number + + + + +
+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

attach

+ + +
+
+ + +
+

Emits when a motor or sensor is attached to the Hub.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
port + + +string + + + + +
type + + +DeviceType + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

detach

+ + +
+
+ + +
+

Emits when an attached motor or sensor is detached from the Hub.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
port + + +string + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

attach

+ + +
+
+ + +
+

Emits when a motor or sensor is attached to the Hub.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
port + + +string + + + + +
type + + +DeviceType + + + + +
+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

button

+ + +
+
+ + +
+

Emits when a button is pressed.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
button + + +string + + + + +
state + + +ButtonState + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

color

+ + +
+
+ + +
+

Emits when a color sensor is activated.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
port + + +string + + + + +
color + + +Color + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

colorAndDistance

+ + +
+
+ + +
+

A combined color and distance event, emits when the sensor is activated.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
port + + +string + + + + +
color + + +Color + + + + +
distance + + +number + + + + +

Distance, in millimeters.

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

detach

+ + +
+
+ + +
+

Emits when an attached motor or sensor is detached from the Hub.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
port + + +string + + + + +
+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

distance

+ + +
+
+ + +
+

Emits when a distance sensor is activated.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
port + + +string + + + + +
distance + + +number + + + + +

Distance, in millimeters.

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

rotate

+ + +
+
+ + +
+

Emits when a rotation sensor is activated.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
port + + +string + + + + +
rotation + + +number + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

speed

+ + +
+
+ + +
+

Emits on a speed change.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
port + + +string + + + + +
speed + + +number + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

tilt

+ + +
+
+ + +
+

Emits when a tilt sensor is activated.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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 + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

discover

+ + +
+
+ + +
+

Emits when a Powered UP Hub device is found.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
hub + + +WeDo2SmartHub +| + +BoostMoveHub +| + +PUPHub +| + +PUPRemote +| + +DuploTrainBase + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

attach

+ + +
+
+ + +
+

Emits when a motor or sensor is attached to the Hub.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
port + + +string + + + + +
type + + +DeviceType + + + + +
+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

button

+ + +
+
+ + +
+

Emits when a button is pressed.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
button + + +string + + + + +
state + + +ButtonState + + + + +
+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

color

+ + +
+
+ + +
+

Emits when a color sensor is activated.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
port + + +string + + + + +
color + + +Color + + + + +
+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

colorAndDistance

+ + +
+
+ + +
+

A combined color and distance event, emits when the sensor is activated.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
port + + +string + + + + +
color + + +Color + + + + +
distance + + +number + + + + +

Distance, in millimeters.

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

detach

+ + +
+
+ + +
+

Emits when an attached motor or sensor is detached from the Hub.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
port + + +string + + + + +
+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

distance

+ + +
+
+ + +
+

Emits when a distance sensor is activated.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
port + + +string + + + + +
distance + + +number + + + + +

Distance, in millimeters.

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

tilt

+ + +
+
+ + +
+

Emits when a tilt sensor is activated.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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 + + + + +
+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

button

+ + +
+
+ + +
+

Emits when a button is pressed.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
button + + +string + + + + +
state + + +ButtonState + + + + +
+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

colorAndDistance

+ + +
+
+ + +
+

A combined color and distance event, emits when the sensor is activated.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
port + + +string + + + + +
color + + +Color + + + + +
distance + + +number + + + + +

Distance, in millimeters.

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

attach

+ + +
+
+ + +
+

Emits when a motor or sensor is attached to the Hub.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
port + + +string + + + + +
type + + +DeviceType + + + + +
+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

button

+ + +
+
+ + +
+

Emits when a button is pressed.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
button + + +string + + + + +
state + + +ButtonState + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

color

+ + +
+
+ + +
+

Emits when a color sensor is activated.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
port + + +string + + + + +
color + + +Color + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

detach

+ + +
+
+ + +
+

Emits when an attached motor or sensor is detached from the Hub.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
port + + +string + + + + +
+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

distance

+ + +
+
+ + +
+

Emits when a distance sensor is activated.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
port + + +string + + + + +
distance + + +number + + + + +

Distance, in millimeters.

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

rotate

+ + +
+
+ + +
+

Emits when a rotation sensor is activated.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
port + + +string + + + + +
rotation + + +number + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

tilt

+ + +
+
+ + +
+

Emits when a tilt sensor is activated.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
port + + +string + + + + +
x + + +number + + + + +
y + + +number + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + +
+ + + + node-poweredup by Nathan Kellenicki licensed under the MIT license. + + + + Documentation generated by JSDoc 3.5.5 + + on Fri Jan 18th 2019 + + using the DocStrap template. + +
+ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/consts.js.html b/docs/consts.js.html index 4bfdaaa..4db7a4e 100644 --- a/docs/consts.js.html +++ b/docs/consts.js.html @@ -1,32 +1,90 @@ + - - JSDoc: Source: consts.js + + + DocStrap Source: consts.js + + + + + - - - - - -
+ + +
+
+ + +
+ +
+ + +

Source: consts.js

- - - - -
-
-
"use strict";
+
+
+
"use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 /**
  * @typedef HubType
@@ -174,26 +232,140 @@ var BLECharacteristic;
     BLECharacteristic["WEDO2_NAME_ID"] = "00001524-1212-efde-1523-785feabcd123";
     BLECharacteristic["LPF2_ALL"] = "00001624-1212-efde-1623-785feabcd123";
 })(BLECharacteristic = exports.BLECharacteristic || (exports.BLECharacteristic = {}));
-
-
-
+
+
+
+ +
+
+ +
+ + + +
- -
+ +
- Documentation generated by JSDoc 3.5.5 on Fri Jan 18 2019 16:16:36 GMT-0800 (Pacific Standard Time) + + + + node-poweredup by Nathan Kellenicki licensed under the MIT license. + + + + Documentation generated by JSDoc 3.5.5 + + on Fri Jan 18th 2019 + + using the DocStrap template. +
- - + + + + + + + + + + + + + + + + + + + + diff --git a/docs/duplotrainbase.js.html b/docs/duplotrainbase.js.html index 2a6116a..2234af0 100644 --- a/docs/duplotrainbase.js.html +++ b/docs/duplotrainbase.js.html @@ -1,32 +1,90 @@ + - - JSDoc: Source: duplotrainbase.js + + + DocStrap Source: duplotrainbase.js + + + + + - - - - - -
+ + +
+
+ + +
+ +
+ + +

Source: duplotrainbase.js

- - - - -
-
-
"use strict";
+
+
+
"use strict";
 var __importStar = (this && this.__importStar) || function (mod) {
     if (mod && mod.__esModule) return mod;
     var result = {};
@@ -195,26 +253,140 @@ class DuploTrainBase extends lpf2hub_1.LPF2Hub {
     }
 }
 exports.DuploTrainBase = DuploTrainBase;
-
-
-
+
+
+
+ +
+
+ +
+ + + +
- -
+ +
- Documentation generated by JSDoc 3.5.5 on Fri Jan 18 2019 16:16:36 GMT-0800 (Pacific Standard Time) + + + + node-poweredup by Nathan Kellenicki licensed under the MIT license. + + + + Documentation generated by JSDoc 3.5.5 + + on Fri Jan 18th 2019 + + using the DocStrap template. +
- - + + + + + + + + + + + + + + + + + + + + diff --git a/docs/fonts/glyphicons-halflings-regular.eot b/docs/fonts/glyphicons-halflings-regular.eot new file mode 100644 index 0000000..b93a495 Binary files /dev/null and b/docs/fonts/glyphicons-halflings-regular.eot differ diff --git a/docs/fonts/glyphicons-halflings-regular.svg b/docs/fonts/glyphicons-halflings-regular.svg new file mode 100644 index 0000000..94fb549 --- /dev/null +++ b/docs/fonts/glyphicons-halflings-regular.svg @@ -0,0 +1,288 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/fonts/glyphicons-halflings-regular.ttf b/docs/fonts/glyphicons-halflings-regular.ttf new file mode 100644 index 0000000..1413fc6 Binary files /dev/null and b/docs/fonts/glyphicons-halflings-regular.ttf differ diff --git a/docs/fonts/glyphicons-halflings-regular.woff b/docs/fonts/glyphicons-halflings-regular.woff new file mode 100644 index 0000000..9e61285 Binary files /dev/null and b/docs/fonts/glyphicons-halflings-regular.woff differ diff --git a/docs/fonts/glyphicons-halflings-regular.woff2 b/docs/fonts/glyphicons-halflings-regular.woff2 new file mode 100644 index 0000000..64539b5 Binary files /dev/null and b/docs/fonts/glyphicons-halflings-regular.woff2 differ diff --git a/docs/global.html b/docs/global.html index 430cacb..08ee2a2 100644 --- a/docs/global.html +++ b/docs/global.html @@ -1,47 +1,111 @@ + - - JSDoc: Global + + + DocStrap Global + + + + + - - - - - -
+ +
+
+ +
+ +
+ +

Global

-

+

+ +

+
- -
+ + + + + + + @@ -51,29 +115,25 @@ - + - + - + - + - + - - - + - + - + - - - +
@@ -96,28 +156,30 @@ - -

Type Definitions

- +
-

ButtonState

+
+
+

ButtonState

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -148,6 +210,7 @@ number + @@ -155,7 +218,7 @@ - + @@ -171,6 +234,7 @@ number + @@ -178,7 +242,7 @@ - + @@ -194,6 +258,7 @@ number + @@ -201,7 +266,7 @@ - + @@ -217,6 +282,7 @@ number + @@ -224,7 +290,7 @@ - + @@ -240,6 +306,7 @@ number + @@ -247,17 +314,21 @@ - +
0

0

1

1

2

2

3

3

4

4

+
+ + + -
+ @@ -267,59 +338,63 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
- - - + + -

ButtonState

+
+
+

ButtonState

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -350,6 +425,7 @@ number + @@ -357,7 +433,7 @@ - + @@ -373,6 +449,7 @@ number + @@ -380,7 +457,7 @@ - + @@ -396,6 +473,7 @@ number + @@ -403,7 +481,7 @@ - + @@ -419,6 +497,7 @@ number + @@ -426,7 +505,7 @@ - + @@ -442,6 +521,7 @@ number + @@ -449,17 +529,21 @@ - +
0

0

1

1

2

2

3

3

4

4

+ + + + -
+ @@ -469,59 +553,63 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
- - - + +
-

Color

+
+
+

Color

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -552,6 +640,7 @@ number + @@ -559,7 +648,7 @@ - + @@ -575,6 +664,7 @@ number + @@ -582,7 +672,7 @@ - + @@ -598,6 +688,7 @@ number + @@ -605,7 +696,7 @@ - + @@ -621,6 +712,7 @@ number + @@ -628,7 +720,7 @@ - + @@ -644,6 +736,7 @@ number + @@ -651,7 +744,7 @@ - + @@ -667,6 +760,7 @@ number + @@ -674,7 +768,7 @@ - + @@ -690,6 +784,7 @@ number + @@ -697,7 +792,7 @@ - + @@ -713,6 +808,7 @@ number + @@ -720,7 +816,7 @@ - + @@ -736,6 +832,7 @@ number + @@ -743,7 +840,7 @@ - + @@ -759,6 +856,7 @@ number + @@ -766,7 +864,7 @@ - + @@ -782,6 +880,7 @@ number + @@ -789,7 +888,7 @@ - + @@ -805,6 +904,7 @@ number + @@ -812,17 +912,21 @@ - +
0

0

1

1

2

2

3

3

4

4

5

5

6

6

7

7

8

8

9

9

10

10

255

255

+ + + + -
+ @@ -832,59 +936,63 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
- - - + +
-

Color

+
+
+

Color

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -915,6 +1023,7 @@ number + @@ -922,7 +1031,7 @@ - + @@ -938,6 +1047,7 @@ number + @@ -945,7 +1055,7 @@ - + @@ -961,6 +1071,7 @@ number + @@ -968,7 +1079,7 @@ - + @@ -984,6 +1095,7 @@ number + @@ -991,7 +1103,7 @@ - + @@ -1007,6 +1119,7 @@ number + @@ -1014,7 +1127,7 @@ - + @@ -1030,6 +1143,7 @@ number + @@ -1037,7 +1151,7 @@ - + @@ -1053,6 +1167,7 @@ number + @@ -1060,7 +1175,7 @@ - + @@ -1076,6 +1191,7 @@ number + @@ -1083,7 +1199,7 @@ - + @@ -1099,6 +1215,7 @@ number + @@ -1106,7 +1223,7 @@ - + @@ -1122,6 +1239,7 @@ number + @@ -1129,7 +1247,7 @@ - + @@ -1145,6 +1263,7 @@ number + @@ -1152,7 +1271,7 @@ - + @@ -1168,6 +1287,7 @@ number + @@ -1175,17 +1295,21 @@ - +
0

0

1

1

2

2

3

3

4

4

5

5

6

6

7

7

8

8

9

9

10

10

255

255

+ + + + -
+ @@ -1195,59 +1319,63 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
- - - + +
-

DeviceType

+
+
+

DeviceType

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -1278,6 +1406,7 @@ number + @@ -1285,7 +1414,7 @@ - + @@ -1301,6 +1430,7 @@ number + @@ -1308,7 +1438,7 @@ - + @@ -1324,6 +1454,7 @@ number + @@ -1331,7 +1462,7 @@ - + @@ -1347,6 +1478,7 @@ number + @@ -1354,7 +1486,7 @@ - + @@ -1370,6 +1502,7 @@ number + @@ -1377,7 +1510,7 @@ - + @@ -1393,6 +1526,7 @@ number + @@ -1400,7 +1534,7 @@ - + @@ -1416,6 +1550,7 @@ number + @@ -1423,7 +1558,7 @@ - + @@ -1439,6 +1574,7 @@ number + @@ -1446,7 +1582,7 @@ - + @@ -1462,6 +1598,7 @@ number + @@ -1469,7 +1606,7 @@ - + @@ -1485,6 +1622,7 @@ number + @@ -1492,7 +1630,7 @@ - + @@ -1508,6 +1646,7 @@ number + @@ -1515,7 +1654,7 @@ - + @@ -1531,6 +1670,7 @@ number + @@ -1538,7 +1678,7 @@ - + @@ -1554,6 +1694,7 @@ number + @@ -1561,7 +1702,7 @@ - + @@ -1577,6 +1718,7 @@ number + @@ -1584,7 +1726,7 @@ - + @@ -1600,6 +1742,7 @@ number + @@ -1607,7 +1750,7 @@ - + @@ -1623,6 +1766,7 @@ number + @@ -1630,17 +1774,21 @@ - +
0

0

1

1

2

2

8

8

22

22

34

34

35

35

37

37

38

38

39

39

40

40

41

41

42

42

43

43

44

44

55

55

+ + + + -
+ @@ -1650,59 +1798,63 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
- - - + +
-

DeviceType

+
+
+

DeviceType

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -1733,6 +1885,7 @@ number + @@ -1740,7 +1893,7 @@ - + @@ -1756,6 +1909,7 @@ number + @@ -1763,7 +1917,7 @@ - + @@ -1779,6 +1933,7 @@ number + @@ -1786,7 +1941,7 @@ - + @@ -1802,6 +1957,7 @@ number + @@ -1809,7 +1965,7 @@ - + @@ -1825,6 +1981,7 @@ number + @@ -1832,7 +1989,7 @@ - + @@ -1848,6 +2005,7 @@ number + @@ -1855,7 +2013,7 @@ - + @@ -1871,6 +2029,7 @@ number + @@ -1878,7 +2037,7 @@ - + @@ -1894,6 +2053,7 @@ number + @@ -1901,7 +2061,7 @@ - + @@ -1917,6 +2077,7 @@ number + @@ -1924,7 +2085,7 @@ - + @@ -1940,6 +2101,7 @@ number + @@ -1947,7 +2109,7 @@ - + @@ -1963,6 +2125,7 @@ number + @@ -1970,7 +2133,7 @@ - + @@ -1986,6 +2149,7 @@ number + @@ -1993,7 +2157,7 @@ - + @@ -2009,6 +2173,7 @@ number + @@ -2016,7 +2181,7 @@ - + @@ -2032,6 +2197,7 @@ number + @@ -2039,7 +2205,7 @@ - + @@ -2055,6 +2221,7 @@ number + @@ -2062,7 +2229,7 @@ - + @@ -2078,6 +2245,7 @@ number + @@ -2085,17 +2253,21 @@ - +
0

0

1

1

2

2

8

8

22

22

34

34

35

35

37

37

38

38

39

39

40

40

41

41

42

42

43

43

44

44

55

55

+ + + + -
+ @@ -2105,59 +2277,63 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
- - - + +
-

DuploTrainBaseSound

+
+
+

DuploTrainBaseSound

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -2188,6 +2364,7 @@ number + @@ -2195,7 +2372,7 @@ - + @@ -2211,6 +2388,7 @@ number + @@ -2218,7 +2396,7 @@ - + @@ -2234,6 +2412,7 @@ number + @@ -2241,7 +2420,7 @@ - + @@ -2257,6 +2436,7 @@ number + @@ -2264,7 +2444,7 @@ - + @@ -2280,6 +2460,7 @@ number + @@ -2287,17 +2468,21 @@ - +
3

3

5

5

7

7

9

9

10

10

+ + + + -
+ @@ -2307,59 +2492,63 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
- - - + +
-

DuploTrainBaseSound

+
+
+

DuploTrainBaseSound

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -2390,6 +2579,7 @@ number + @@ -2397,7 +2587,7 @@ - + @@ -2413,6 +2603,7 @@ number + @@ -2420,7 +2611,7 @@ - + @@ -2436,6 +2627,7 @@ number + @@ -2443,7 +2635,7 @@ - + @@ -2459,6 +2651,7 @@ number + @@ -2466,7 +2659,7 @@ - + @@ -2482,6 +2675,7 @@ number + @@ -2489,17 +2683,21 @@ - +
3

3

5

5

7

7

9

9

10

10

+ + + + -
+ @@ -2509,59 +2707,63 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
- - - + +
-

HubType

+
+
+

HubType

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -2592,6 +2794,7 @@ number + @@ -2599,7 +2802,7 @@ - + @@ -2615,6 +2818,7 @@ number + @@ -2622,7 +2826,7 @@ - + @@ -2638,6 +2842,7 @@ number + @@ -2645,7 +2850,7 @@ - + @@ -2661,6 +2866,7 @@ number + @@ -2668,7 +2874,7 @@ - + @@ -2684,6 +2890,7 @@ number + @@ -2691,7 +2898,7 @@ - + @@ -2707,6 +2914,7 @@ number + @@ -2714,17 +2922,21 @@ - +
0

0

1

1

2

2

3

3

4

4

5

5

+ + + + -
+ @@ -2734,59 +2946,63 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
- - - + +
-

HubType

+
+
+

HubType

- - - - - - - - - -
Properties:
+ +
+
+ - + +
+ + +
Properties:
+ +
+ +
@@ -2817,6 +3033,7 @@ number + @@ -2824,7 +3041,7 @@ - + @@ -2840,6 +3057,7 @@ number + @@ -2847,7 +3065,7 @@ - + @@ -2863,6 +3081,7 @@ number + @@ -2870,7 +3089,7 @@ - + @@ -2886,6 +3105,7 @@ number + @@ -2893,7 +3113,7 @@ - + @@ -2909,6 +3129,7 @@ number + @@ -2916,7 +3137,7 @@ - + @@ -2932,6 +3153,7 @@ number + @@ -2939,17 +3161,21 @@ - +
0

0

1

1

2

2

3

3

4

4

5

5

+ + + + -
+ @@ -2959,42 +3185,42 @@ - + - + - + - + - + - - - + +
Source:
+
+ +
+ - -
Source:
-
- + - + - - - +
+ +
- - - - + @@ -3005,19 +3231,136 @@ +
+
+ +
+ + +
+ +
+ + +
- -
+ +
- Documentation generated by JSDoc 3.5.5 on Fri Jan 18 2019 16:16:36 GMT-0800 (Pacific Standard Time) + + + + node-poweredup by Nathan Kellenicki licensed under the MIT license. + + + + Documentation generated by JSDoc 3.5.5 + + on Fri Jan 18th 2019 + + using the DocStrap template. +
- - + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/hub.js.html b/docs/hub.js.html index 73eb194..1196d17 100644 --- a/docs/hub.js.html +++ b/docs/hub.js.html @@ -1,32 +1,90 @@ + - - JSDoc: Source: hub.js + + + DocStrap Source: hub.js + + + + + - - - - - -
+ + +
+
+ + +
+ +
+ + +

Source: hub.js

- - - - -
-
-
"use strict";
+
+
+
"use strict";
 var __importStar = (this && this.__importStar) || function (mod) {
     if (mod && mod.__esModule) return mod;
     var result = {};
@@ -361,26 +419,140 @@ class Hub extends events_1.EventEmitter {
     }
 }
 exports.Hub = Hub;
-
-
-
+
+
+
+ +
+
+ +
+ + + +
- -
+ +
- Documentation generated by JSDoc 3.5.5 on Fri Jan 18 2019 16:16:36 GMT-0800 (Pacific Standard Time) + + + + node-poweredup by Nathan Kellenicki licensed under the MIT license. + + + + Documentation generated by JSDoc 3.5.5 + + on Fri Jan 18th 2019 + + using the DocStrap template. +
- - + + + + + + + + + + + + + + + + + + + + diff --git a/docs/img/glyphicons-halflings-white.png b/docs/img/glyphicons-halflings-white.png new file mode 100644 index 0000000..3bf6484 Binary files /dev/null and b/docs/img/glyphicons-halflings-white.png differ diff --git a/docs/img/glyphicons-halflings.png b/docs/img/glyphicons-halflings.png new file mode 100644 index 0000000..a996999 Binary files /dev/null and b/docs/img/glyphicons-halflings.png differ diff --git a/docs/index.html b/docs/index.html index eb4377b..88f46ac 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,32 +1,86 @@ + - - JSDoc: Home + + + DocStrap Index + + + + + - - - - - -
+ +
+
- + +
+ +
+ - -

+ + @@ -37,15 +91,16 @@ - + + + -
-

CircleCI -Gitter -NPM Version

+ +
+

CircleCI
Gitter
NPM Version

node-poweredup - A Node.js module to interface with LEGO Powered UP components.

Introduction

LEGO Powered UP is the successor to Power Functions, the system for adding electronics to LEGO models. Powered UP is a collection of ranges - starting with LEGO WeDo 2.0 released in 2016, LEGO Boost released in 2017, and LEGO Powered UP released in 2018. It also includes the 2018 Duplo App-Controlled Train sets.

Powered UP has a few improvements over Power Functions:

    @@ -217,19 +272,137 @@ poweredUP.scan(); // Start scanning for Hubs

    More examples are av + +

+
+ +
+ + +
+ +
+ + +
- -
+ +
- Documentation generated by JSDoc 3.5.5 on Fri Jan 18 2019 16:16:36 GMT-0800 (Pacific Standard Time) + + + + node-poweredup by Nathan Kellenicki licensed under the MIT license. + + + + Documentation generated by JSDoc 3.5.5 + + on Fri Jan 18th 2019 + + using the DocStrap template. +
- - + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/lpf2hub.js.html b/docs/lpf2hub.js.html index 1446421..b441b2b 100644 --- a/docs/lpf2hub.js.html +++ b/docs/lpf2hub.js.html @@ -1,32 +1,90 @@ + - - JSDoc: Source: lpf2hub.js + + + DocStrap Source: lpf2hub.js + + + + + - - - - - -
+ + +
+
+ + +
+ +
+ + +

Source: lpf2hub.js

- - - - -
-
-
"use strict";
+
+
+
"use strict";
 var __importStar = (this && this.__importStar) || function (mod) {
     if (mod && mod.__esModule) return mod;
     var result = {};
@@ -406,26 +464,140 @@ class LPF2Hub extends hub_1.Hub {
     }
 }
 exports.LPF2Hub = LPF2Hub;
-
-
-
+
+
+
+ +
+
+ +
+ + + +
- -
+ +
- Documentation generated by JSDoc 3.5.5 on Fri Jan 18 2019 16:16:36 GMT-0800 (Pacific Standard Time) + + + + node-poweredup by Nathan Kellenicki licensed under the MIT license. + + + + Documentation generated by JSDoc 3.5.5 + + on Fri Jan 18th 2019 + + using the DocStrap template. +
- - + + + + + + + + + + + + + + + + + + + + diff --git a/docs/poweredup.js.html b/docs/poweredup.js.html index d4fa640..6f859c9 100644 --- a/docs/poweredup.js.html +++ b/docs/poweredup.js.html @@ -1,32 +1,90 @@ + - - JSDoc: Source: poweredup.js + + + DocStrap Source: poweredup.js + + + + + - - - - - -
+ + +
+
+ + +
+ +
+ + +

Source: poweredup.js

- - - - -
-
-
"use strict";
+
+
+
"use strict";
 var __importStar = (this && this.__importStar) || function (mod) {
     if (mod && mod.__esModule) return mod;
     var result = {};
@@ -170,26 +228,140 @@ class PoweredUP extends events_1.EventEmitter {
     }
 }
 exports.PoweredUP = PoweredUP;
-
-
-
+
+
+
+ +
+
+ +
+ + + +
- -
+ +
- Documentation generated by JSDoc 3.5.5 on Fri Jan 18 2019 16:16:36 GMT-0800 (Pacific Standard Time) + + + + node-poweredup by Nathan Kellenicki licensed under the MIT license. + + + + Documentation generated by JSDoc 3.5.5 + + on Fri Jan 18th 2019 + + using the DocStrap template. +
- - + + + + + + + + + + + + + + + + + + + + diff --git a/docs/puphub.js.html b/docs/puphub.js.html index 555a5d9..10fefaf 100644 --- a/docs/puphub.js.html +++ b/docs/puphub.js.html @@ -1,32 +1,90 @@ + - - JSDoc: Source: puphub.js + + + DocStrap Source: puphub.js + + + + + - - - - - -
+ + +
+
+ + +
+ +
+ + +

Source: puphub.js

- - - - -
-
-
"use strict";
+
+
+
"use strict";
 var __importStar = (this && this.__importStar) || function (mod) {
     if (mod && mod.__esModule) return mod;
     var result = {};
@@ -203,26 +261,140 @@ class PUPHub extends lpf2hub_1.LPF2Hub {
     }
 }
 exports.PUPHub = PUPHub;
-
-
-
+
+
+
+ +
+
+ +
+ + + +
- -
+ +
- Documentation generated by JSDoc 3.5.5 on Fri Jan 18 2019 16:16:36 GMT-0800 (Pacific Standard Time) + + + + node-poweredup by Nathan Kellenicki licensed under the MIT license. + + + + Documentation generated by JSDoc 3.5.5 + + on Fri Jan 18th 2019 + + using the DocStrap template. +
- - + + + + + + + + + + + + + + + + + + + + diff --git a/docs/pupremote.js.html b/docs/pupremote.js.html index f526d54..3e95cde 100644 --- a/docs/pupremote.js.html +++ b/docs/pupremote.js.html @@ -1,32 +1,90 @@ + - - JSDoc: Source: pupremote.js + + + DocStrap Source: pupremote.js + + + + + - - - - - -
+ + +
+
+ + +
+ +
+ + +

Source: pupremote.js

- - - - -
-
-
"use strict";
+
+
+
"use strict";
 var __importStar = (this && this.__importStar) || function (mod) {
     if (mod && mod.__esModule) return mod;
     var result = {};
@@ -133,26 +191,140 @@ class PUPRemote extends lpf2hub_1.LPF2Hub {
     }
 }
 exports.PUPRemote = PUPRemote;
-
-
-
+
+
+
+ +
+
+ +
+ + + +
- -
+ +
- Documentation generated by JSDoc 3.5.5 on Fri Jan 18 2019 16:16:36 GMT-0800 (Pacific Standard Time) + + + + node-poweredup by Nathan Kellenicki licensed under the MIT license. + + + + Documentation generated by JSDoc 3.5.5 + + on Fri Jan 18th 2019 + + using the DocStrap template. +
- - + + + + + + + + + + + + + + + + + + + + diff --git a/docs/quicksearch.html b/docs/quicksearch.html new file mode 100644 index 0000000..7cbf738 --- /dev/null +++ b/docs/quicksearch.html @@ -0,0 +1,31 @@ + + + + + + + + + + + + + diff --git a/docs/scripts/docstrap.lib.js b/docs/scripts/docstrap.lib.js new file mode 100644 index 0000000..09d9272 --- /dev/null +++ b/docs/scripts/docstrap.lib.js @@ -0,0 +1,11 @@ +if(!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b="length"in a&&a.length,c=_.type(a);return"function"!==c&&!_.isWindow(a)&&(!(1!==a.nodeType||!b)||("array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a))}function d(a,b,c){if(_.isFunction(b))return _.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return _.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(ha.test(b))return _.filter(b,a,c);b=_.filter(b,a)}return _.grep(a,function(a){return U.call(b,a)>=0!==c})}function e(a,b){for(;(a=a[b])&&1!==a.nodeType;);return a}function f(a){var b=oa[a]={};return _.each(a.match(na)||[],function(a,c){b[c]=!0}),b}function g(){Z.removeEventListener("DOMContentLoaded",g,!1),a.removeEventListener("load",g,!1),_.ready()}function h(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=_.expando+h.uid++}function i(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(ua,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c||"false"!==c&&("null"===c?null:+c+""===c?+c:ta.test(c)?_.parseJSON(c):c)}catch(a){}sa.set(a,b,c)}else c=void 0;return c}function j(){return!0}function k(){return!1}function l(){try{return Z.activeElement}catch(a){}}function m(a,b){return _.nodeName(a,"table")&&_.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function n(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function o(a){var b=Ka.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function p(a,b){for(var c=0,d=a.length;d>c;c++)ra.set(a[c],"globalEval",!b||ra.get(b[c],"globalEval"))}function q(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(ra.hasData(a)&&(f=ra.access(a),g=ra.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)_.event.add(b,e,j[e][c])}sa.hasData(a)&&(h=sa.access(a),i=_.extend({},h),sa.set(b,i))}}function r(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&_.nodeName(a,b)?_.merge([a],c):c}function s(a,b){var c=b.nodeName.toLowerCase();"input"===c&&ya.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}function t(b,c){var d,e=_(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:_.css(e[0],"display");return e.detach(),f}function u(a){var b=Z,c=Oa[a];return c||(c=t(a,b),"none"!==c&&c||(Na=(Na||_("