+
new BoostMoveHub()
+ + +new BoostMoveHub()
+The BoostMoveHub is emitted if the discovered device is a Boost Move Hub.
+-
+
+
+
+
+
+
+
@@ -74,52 +135,52 @@
-
+
-
+
-
+
-
+
-
+
-
-
-
+
+
- Source: +
-
+
-
+
- + boostmovehub.js, + line 15 + +
+
-
- - Source: -
- - boostmovehub.js, line 15 -
-
+
-
+
-
-
-
+
Members
- +-
-
-
+
<readonly> batteryLevel
+ +
+ -
+
+
+
+
-
+
- Inherited From: +
-
+
-
+
- + Hub#batteryLevel + +
+
- Overrides: @@ -238,53 +309,63 @@ - + - + - + - + - + - -
- Source: -
- - - - + +
- Source: +
- + + + - + + + + + - - - + + -
-
+
<readonly> current
- - - - - - - - - -Properties:
+ +
+ -
+
-
+ +
-
+
+
+
- Inherited From: -
- - LPF2Hub#current -
-
+
-
-
-
-
-
+
+ - Inherited From: +
-
+
-
+
- + LPF2Hub#current + +
+
@@ -359,47 +437,63 @@
-
+
-
+
-
- - Source: -
- - lpf2hub.js, line 38 -
-
+
-
+
-
+
-
+
+
+
+ - Source: +
-
+
-
+
- + lpf2hub.js, + line 38 + +
+
+
+
+
+
+
+
-
+
<readonly> firmwareVersion
- - - - - - - - - -Properties:
+ +
+ -
+
-
+ +
-
+
+
+
- Inherited From: +
-
+
-
+
- + Hub#firmwareVersion + +
+
- Overrides: @@ -468,53 +570,63 @@ - + - + - + - + - + - -
- Source: -
- - - - + +
- Source: +
- + + + - + + + + +
-
+
<readonly> name
- - - - - - - - - -Properties:
+ +
+ -
+
-
+ +
-
+
+
+
- Inherited From: +
-
+
-
+
- + Hub#name + +
+
- Overrides: @@ -583,53 +703,63 @@ - + - + - + - + - + - -
- Source: -
- - - - + +
- Source: +
- + + + - + + + + +
-
+
<readonly> rssi
- - - - - - - - - -Properties:
+ +
+ -
+
-
+ +
-
+
+
+
- Inherited From: +
-
+
-
+
- + Hub#rssi + +
+
- Overrides: @@ -698,53 +836,63 @@ - + - + - + - + - + - -
- Source: -
- - - - + +
- Source: +
- + + + - + + + + +
-
+
<readonly> uuid
- - - - - - - - - -Properties:
+ +
+ -
+
-
+ +
-
+
+
+
- Inherited From: +
-
+
-
+
- + Hub#uuid + +
+
- Overrides: @@ -813,53 +969,63 @@ - + - + - + - + - + - -
- Source: -
- - - - + +
- Source: +
- + + + - + + + + +
-
+
<readonly> voltage
- - - - - - - - - -Properties:
+ +
+ -
+
-
+ +
-
+
+
+
- Inherited From: -
- - LPF2Hub#voltage -
-
+
-
-
-
-
-
+
+ - Inherited From: +
-
+
-
+
- + LPF2Hub#voltage + +
+
@@ -934,71 +1097,88 @@
-
+
-
+
-
- - Source: -
- - lpf2hub.js, line 31 -
-
+
-
+
-
+
-
+
+
+
+ - Source: +
-
+
-
+
- + lpf2hub.js, + line 31 + +
+
+
+
+
+
+
+
Properties:
+ +-
+
+
@@ -890,6 +1056,7 @@ number + @@ -897,34 +1064,30 @@ - Voltage of the hub (Volts) +Voltage of the hub (Volts)
-
+
Methods
- +-
+
-
+
connect()
+ + +
+ -
-
-
-
connect() → {Promise}
+++ + + -Connect to the Hub.
+- Connect to the Hub. -- - - - - - - - - - - - - +-
-
-
+
-
+
+
+
+
- Inherited From: +
-
+
-
+
- + Hub#connect + +
+
- Overrides: @@ -1013,47 +1193,54 @@ - + - + - + - + - + - -
- Source: -
- - - - + +
- Source: +
- + + + - + + + + +
Returns:
- - + +Returns:
+ +- Resolved upon successful connect. +@@ -1067,51 +1254,57 @@ Promise +Resolved upon successful connect.
+
+- +
+disconnect()
+ + +- - - -
+ + + - - - - + +disconnect() → {Promise}
+++ + + -Disconnect the Hub.
+- Disconnect the Hub. -- - - - - - - - - - - - - +-
-
-
+
-
+
+
+
+
- Inherited From: +
-
+
-
+
- + Hub#disconnect + +
+
- Overrides: @@ -1126,47 +1319,54 @@ - + - + - + - + - + - -
- Source: -
- - - - + +
- Source: +
- + + + - + + + + +
Returns:
- - + +Returns:
+ +- Resolved upon successful disconnect. +@@ -1180,51 +1380,57 @@ Promise +Resolved upon successful disconnect.
+- +
+getHubType()
+ + +- - - -
+ + + - - - - + +getHubType() → {HubType}
+++ + + -Get the hub type.
+- Get the hub type. -- - - - - - - - - - - - - +-
-
-
+
-
+
+
+
+
- Inherited From: +
-
+
-
+
- + Hub#getHubType + +
+
- 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: +
-
+
-
+
- + Hub#getPortDeviceType + +
+
- 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: +
-
+
-
+
- + boostmovehub.js, + line 183 + +
+
-
- - Source: -
- - boostmovehub.js, line 183 -
-
+
-
+
-
-
-
+
Returns:
- - + +Returns:
+ +- Resolved upon successful completion of command. +@@ -1604,44 +1836,42 @@ Promise + + + + - - - - + +Resolved upon successful completion of command.
+- +
+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 @@ -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. + @@ -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.
How long the ramp should last (in milliseconds). +How long the ramp should last (in milliseconds).
-
+
+
+
+
+
+
+
@@ -1770,53 +2009,54 @@
-
+
-
+
-
+
-
+
-
+
-
-
-
+
+
- Source: +
-
+
-
+
- + boostmovehub.js, + line 129 + +
+
-
- - Source: -
- - boostmovehub.js, line 129 -
-
+
-
+
-
-
-
+
Returns:
- - + +Returns:
+ +- Resolved upon successful completion of command. +@@ -1830,44 +2070,42 @@ Promise + + + + - - - - + +Resolved upon successful completion of command.
+- +
+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: +
-
+
-
+
- + LPF2Hub#setLEDColor + +
+
@@ -1938,47 +2180,54 @@
-
+
-
+
-
+
-
+
-
+
-
- - Source: -
- - lpf2hub.js, line 79 -
-
-
-
+
+ - Source: +
-
+
-
+
- + lpf2hub.js, + line 79 + +
+
-
+
+
+
+
+
Returns:
- - + +Returns:
+ +- Resolved upon successful issuance of command. +@@ -1992,44 +2241,42 @@ Promise + + + + - - - - + +Resolved upon successful issuance of command.
+- +
+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: +
-
+
-
+
- + LPF2Hub#setLEDRGB + +
+
@@ -2146,47 +2399,54 @@
-
+
-
+
-
+
-
+
-
+
-
- - Source: -
- - lpf2hub.js, line 97 -
-
-
-
+
+ - Source: +
-
+
-
+
- + lpf2hub.js, + line 97 + +
+
-
+
+
+
+
+
Returns:
- - + +Returns:
+ +- Resolved upon successful issuance of command. +@@ -2200,44 +2460,42 @@ Promise + + + + - - - - + +Resolved upon successful issuance of command.
+- +
+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 @@ @@ -2332,6 +2592,7 @@ number + @@ -2349,19 +2610,24 @@ -Type -Attributes +Argument @@ -2270,6 +2528,7 @@ string + @@ -2301,6 +2560,7 @@ number + @@ -2316,7 +2576,7 @@ -Brightness 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: +
-
+
-
+
- + boostmovehub.js, + line 192 + +
+
-
- - Source: -
- - boostmovehub.js, line 192 -
-
+
-
+
-
-
-
+
Returns:
- - + +Returns:
+ +- Resolved upon successful completion of command. If time is specified, this is once the light is turned off. +@@ -2431,44 +2698,42 @@ Promise + + + + - - - - + +Resolved upon successful completion of command. If time is specified, this is once the light is turned off.
+- +
+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 @@ @@ -2576,6 +2843,7 @@ Array.<number> + @@ -2599,19 +2867,24 @@ -Type -Attributes +Argument @@ -2503,6 +2768,7 @@ string + @@ -2538,6 +2804,7 @@ number + @@ -2557,7 +2824,7 @@ -How 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: +
-
+
-
+
- + boostmovehub.js, + line 149 + +
+
-
- - Source: -
- - boostmovehub.js, line 149 -
-
+
-
+
-
-
-
+
Returns:
- - + +Returns:
+ +- Resolved upon successful completion of command (ie. once the motor is finished). +@@ -2681,44 +2955,42 @@ Promise + + + + - - - - + +Resolved upon successful completion of command (ie. once the motor is finished).
+- +
+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 @@ @@ -2816,6 +3090,7 @@ number + @@ -2833,19 +3108,24 @@ -Type -Attributes +Argument @@ -2751,6 +3023,7 @@ string + @@ -2785,6 +3058,7 @@ Array.<number> + @@ -2800,7 +3074,7 @@ -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.
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: +
-
+
-
+
- + boostmovehub.js, + line 51 + +
+
-
- - Source: -
- - boostmovehub.js, line 51 -
-
+
-
+
-
-
-
+
Returns:
- - + +Returns:
+ +- Resolved upon successful completion of command. If time is specified, this is once the motor is finished. +@@ -2915,44 +3196,42 @@ Promise + + + + - - - - + +Resolved upon successful completion of command. If time is specified, this is once the motor is finished.
+- +
+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: -
- - LPF2Hub#setName -
-
+
+
+
+ - Inherited From: +
-
+
-
+
- + LPF2Hub#setName + +
+
@@ -3023,47 +3306,54 @@
-
+
-
+
-
+
-
+
-
+
-
- - Source: -
- - lpf2hub.js, line 59 -
-
-
-
+
+ - Source: +
-
+
-
+
- + lpf2hub.js, + line 59 + +
+
-
+
+
+
+
+
Returns:
- - + +Returns:
+ +- Resolved upon successful issuance of command. +@@ -3077,46 +3367,43 @@ Promise + + + + - - - - + +Resolved upon successful issuance of command.
+- +
+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: +
-
+
-
+
- + Hub#sleep + +
+
- 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. +@@ -3241,44 +3544,42 @@ This is a helper method to make it easier to add delays into a chain of commands Promise + + + + - - - - + +Resolved after the delay is finished.
+- +
+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 Type -Attributes +Argument @@ -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 -The 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: +
-
+
-
+
- + Hub#subscribe + +
+
- 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. +@@ -3446,44 +3764,42 @@ This is a helper method to make it easier to add delays into a chain of commands Promise + + + + - - - - + +Resolved upon successful issuance of command.
+- +
+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: +
-
+
-
+
- + Hub#unsubscribe + +
+
- 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. +@@ -3608,46 +3940,43 @@ This is a helper method to make it easier to add delays into a chain of commands Promise + + + + - - - - + +Resolved upon successful issuance of command.
+- +
+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: +
-
+
-
+
- + Hub#wait + +
+
- 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. +@@ -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 comResolved after the commands are finished.
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: +
-
+
-
+
- + Hub#event:attach + +
+
- 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: +
-
+
-
+
- + LPF2Hub#event:button + +
+
@@ -4074,76 +4435,79 @@ This is a helper method to make it easier to wait for concurrent commands to com
-
+
-
+
-
+
-
+
-
+
-
- - Source: -
- - lpf2hub.js, line 173 -
-
-
-
+
+ - Source: +
-
+
-
+
- + lpf2hub.js, + line 173 + +
+
-
+
+
+
+
+
+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: +
-
+
-
+
- + LPF2Hub#event:color + +
+
@@ -4237,76 +4606,79 @@ This is a helper method to make it easier to wait for concurrent commands to com
-
+
-
+
-
+
-
+
-
+
-
- - Source: -
- - lpf2hub.js, line 273 -
-
-
-
+
+ - Source: +
-
+
-
+
- + lpf2hub.js, + line 273 + +
+
-
+
+
+
+
+
+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: +
-
+
-
+
- + LPF2Hub#event:colorAndDistance + +
+
@@ -4423,76 +4801,79 @@ This is a helper method to make it easier to wait for concurrent commands to com
-
+
-
+
-
+
-
+
-
+
-
- - Source: -
- - lpf2hub.js, line 289 -
-
-
-
+
+ - Source: +
-
+
-
+
- + lpf2hub.js, + line 289 + +
+
-
+
+
+
+
+
+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: +
-
+
-
+
- + Hub#event:detach + +
+
- 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: +
-
+
-
+
- + LPF2Hub#event:distance + +
+
@@ -4726,76 +5124,79 @@ This is a helper method to make it easier to wait for concurrent commands to com
-
+
-
+
-
+
-
+
-
+
-
- - Source: -
- - lpf2hub.js, line 263 -
-
-
-
+
+ - Source: +
-
+
-
+
- + lpf2hub.js, + line 263 + +
+
-
+
+
+
+
+
+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: +
-
+
-
+
- + LPF2Hub#event:rotate + +
+
@@ -4889,76 +5295,79 @@ This is a helper method to make it easier to wait for concurrent commands to com
-
+
-
+
-
+
-
+
-
+
-
- - Source: -
- - lpf2hub.js, line 318 -
-
-
-
+
+ - Source: +
-
+
-
+
- + lpf2hub.js, + line 318 + +
+
-
+
+
+
+
+
+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 comIf 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: +
-
+
-
+
- + LPF2Hub#event:tilt + +
+
@@ -5075,48 +5490,54 @@ This is a helper method to make it easier to wait for concurrent commands to com
-
+
-
+
-
+
-
+
-
+
-
- - Source: -
- - lpf2hub.js, line 306 -
-
-
-
+
+ - Source: +
-
+
-
+
- + lpf2hub.js, + line 306 + +
+
-
+
+
+
+
+
+ ++ + + - -
+++ - - + + + + + + + + + + + + + + + + + + + + \ 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 +
+@@ -148,28 +209,30 @@ - -
+- +
+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: +
-
+
-
+
- + duplotrainbase.js, + line 15 + +
+
-
- - Source: -
- - duplotrainbase.js, line 15 -
-
+
-
+
-
-
-
+
Members
- +-
-
-
+
<readonly> batteryLevel
+ +
+ -
+
+
+
+
-
+
- Inherited From: +
-
+
-
+
- + Hub#batteryLevel + +
+
- Overrides: @@ -238,53 +309,63 @@ - + - + - + - + - + - -
- Source: -
- - - - + +
- Source: +
- + + + - + + + + + - - - + + -
-
+
<readonly> current
- - - - - - - - - -Properties:
+ +
+ -
+
-
+ +
-
+
+
+
- Inherited From: -
- - LPF2Hub#current -
-
+
-
-
-
-
-
+
+ - Inherited From: +
-
+
-
+
- + LPF2Hub#current + +
+
@@ -359,47 +437,63 @@
-
+
-
+
-
- - Source: -
- - lpf2hub.js, line 38 -
-
+
-
+
-
+
-
+
+
+
+ - Source: +
-
+
-
+
- + lpf2hub.js, + line 38 + +
+
+
+
+
+
+
+
-
+
<readonly> firmwareVersion
- - - - - - - - - -Properties:
+ +
+ -
+
-
+ +
-
+
+
+
- Inherited From: +
-
+
-
+
- + Hub#firmwareVersion + +
+
- Overrides: @@ -468,53 +570,63 @@ - + - + - + - + - + - -
- Source: -
- - - - + +
- Source: +
- + + + - + + + + +
-
+
<readonly> name
- - - - - - - - - -Properties:
+ +
+ -
+
-
+ +
-
+
+
+
- Inherited From: +
-
+
-
+
- + Hub#name + +
+
- Overrides: @@ -583,53 +703,63 @@ - + - + - + - + - + - -
- Source: -
- - - - + +
- Source: +
- + + + - + + + + +
-
+
<readonly> rssi
- - - - - - - - - -Properties:
+ +
+ -
+
-
+ +
-
+
+
+
- Inherited From: +
-
+
-
+
- + Hub#rssi + +
+
- Overrides: @@ -698,53 +836,63 @@ - + - + - + - + - + - -
- Source: -
- - - - + +
- Source: +
- + + + - + + + + +
-
+
<readonly> uuid
- - - - - - - - - -Properties:
+ +
+ -
+
-
+ +
-
+
+
+
- Inherited From: +
-
+
-
+
- + Hub#uuid + +
+
- Overrides: @@ -813,53 +969,63 @@ - + - + - + - + - + - -
- Source: -
- - - - + +
- Source: +
- + + + - + + + + +
-
+
<readonly> voltage
- - - - - - - - - -Properties:
+ +
+ -
+
-
+ +
-
+
+
+
- Inherited From: -
- - LPF2Hub#voltage -
-
+
-
-
-
-
-
+
+ - Inherited From: +
-
+
-
+
- + LPF2Hub#voltage + +
+
@@ -934,71 +1097,88 @@
-
+
-
+
-
- - Source: -
- - lpf2hub.js, line 31 -
-
+
-
+
-
+
-
+
+
+
+ - Source: +
-
+
-
+
- + lpf2hub.js, + line 31 + +
+
+
+
+
+
+
+
Properties:
+ +-
+
+
@@ -890,6 +1056,7 @@ number + @@ -897,34 +1064,30 @@ - Voltage of the hub (Volts) +Voltage of the hub (Volts)
-
+
Methods
- +-
+
-
+
connect()
+ + +
+ -
-
-
-
connect() → {Promise}
+++ + + -Connect to the Hub.
+- Connect to the Hub. -- - - - - - - - - - - - - +-
-
-
+
-
+
+
+
+
- Inherited From: +
-
+
-
+
- + Hub#connect + +
+
- Overrides: @@ -1013,47 +1193,54 @@ - + - + - + - + - + - -
- Source: -
- - - - + +
- Source: +
- + + + - + + + + +
Returns:
- - + +Returns:
+ +- Resolved upon successful connect. +@@ -1067,51 +1254,57 @@ Promise +Resolved upon successful connect.
+
+- +
+disconnect()
+ + +- - - -
+ + + - - - - + +disconnect() → {Promise}
+++ + + -Disconnect the Hub.
+- Disconnect the Hub. -- - - - - - - - - - - - - +-
-
-
+
-
+
+
+
+
- Inherited From: +
-
+
-
+
- + Hub#disconnect + +
+
- Overrides: @@ -1126,47 +1319,54 @@ - + - + - + - + - + - -
- Source: -
- - - - + +
- Source: +
- + + + - + + + + +
Returns:
- - + +Returns:
+ +- Resolved upon successful disconnect. +@@ -1180,51 +1380,57 @@ Promise +Resolved upon successful disconnect.
+- +
+getHubType()
+ + +- - - -
+ + + - - - - + +getHubType() → {HubType}
+++ + + -Get the hub type.
+- Get the hub type. -- - - - - - - - - - - - - +-
-
-
+
-
+
+
+
+
- Inherited From: +
-
+
-
+
- + Hub#getHubType + +
+
- 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: +
-
+
-
+
- + Hub#getPortDeviceType + +
+
- 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: +
-
+
-
+
- + duplotrainbase.js, + line 146 + +
+
-
- - Source: -
- - + - + - - - +
Returns:
- - + +Returns:
+ +- Resolved upon successful completion of command. +@@ -1604,44 +1836,42 @@ Promise + + + + - - - - + +Resolved upon successful completion of command.
+- +
+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: +
-
+
-
+
- + duplotrainbase.js, + line 155 + +
+
-
- - Source: -
- - + - + - - - +
Returns:
- - + +Returns:
+ +- Resolved upon successful issuance of command. +@@ -1761,44 +1998,42 @@ Promise + + + + - - - - + +Resolved upon successful issuance of command.
+- +
+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 @@ -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. + @@ -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.
How long the ramp should last (in milliseconds). +How long the ramp should last (in milliseconds).
-
+
+
+
+
+
+
+
@@ -1927,53 +2171,54 @@
-
+
-
+
-
+
-
+
-
+
-
-
-
+
+
- Source: +
-
+
-
+
- + duplotrainbase.js, + line 126 + +
+
-
- - Source: -
- - + - + - - - +
Returns:
- - + +Returns:
+ +- Resolved upon successful completion of command. +@@ -1987,44 +2232,42 @@ Promise + + + + - - - - + +Resolved upon successful completion of command.
+- +
+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: -
- - duplotrainbase.js, line 72 -
-
-
-
+
+ - Source: +
-
+
-
+
- + duplotrainbase.js, + line 72 + +
+
-
+
+
+
+
+
Returns:
- - + +Returns:
+ +- Resolved upon successful issuance of command. +@@ -2149,44 +2399,42 @@ Promise + + + + - - - - + +Resolved upon successful issuance of command.
+- +
+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: +
-
+
-
+
- + LPF2Hub#setLEDRGB + +
+
@@ -2303,47 +2557,54 @@
-
+
-
+
-
+
-
+
-
+
-
- - Source: -
- - lpf2hub.js, line 97 -
-
-
-
+
+ - Source: +
-
+
-
+
- + lpf2hub.js, + line 97 + +
+
-
+
+
+
+
+
Returns:
- - + +Returns:
+ +- Resolved upon successful issuance of command. +@@ -2357,44 +2618,42 @@ Promise + + + + - - - - + +Resolved upon successful issuance of command.
+- +
+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 @@ @@ -2492,6 +2753,7 @@ number + @@ -2509,19 +2771,24 @@ -Type -Attributes +Argument @@ -2427,6 +2686,7 @@ string + @@ -2461,6 +2721,7 @@ Array.<number> + @@ -2476,7 +2737,7 @@ -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.
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: +
-
+
-
+
- + duplotrainbase.js, + line 88 + +
+
-
- - Source: -
- - duplotrainbase.js, line 88 -
-
+
-
+
-
-
-
+
Returns:
- - + +Returns:
+ +- Resolved upon successful completion of command. If time is specified, this is once the motor is finished. +@@ -2591,44 +2859,42 @@ Promise + + + + - - - - + +Resolved upon successful completion of command. If time is specified, this is once the motor is finished.
+- +
+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: -
- - LPF2Hub#setName -
-
+
+
+
+ - Inherited From: +
-
+
-
+
- + LPF2Hub#setName + +
+
@@ -2699,47 +2969,54 @@
-
+
-
+
-
+
-
+
-
+
-
- - Source: -
- - lpf2hub.js, line 59 -
-
-
-
+
+ - Source: +
-
+
-
+
- + lpf2hub.js, + line 59 + +
+
-
+
+
+
+
+
Returns:
- - + +Returns:
+ +- Resolved upon successful issuance of command. +@@ -2753,46 +3030,43 @@ Promise + + + + - - - - + +Resolved upon successful issuance of command.
+- +
+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: +
-
+
-
+
- + Hub#sleep + +
+
- 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. +@@ -2917,44 +3207,42 @@ This is a helper method to make it easier to add delays into a chain of commands Promise + + + + - - - - + +Resolved after the delay is finished.
+- +
+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 Type -Attributes +Argument @@ -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 -The 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: +
-
+
-
+
- + Hub#subscribe + +
+
- 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. +@@ -3122,44 +3427,42 @@ This is a helper method to make it easier to add delays into a chain of commands Promise + + + + - - - - + +Resolved upon successful issuance of command.
+- +
+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: +
-
+
-
+
- + Hub#unsubscribe + +
+
- 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. +@@ -3284,46 +3603,43 @@ This is a helper method to make it easier to add delays into a chain of commands Promise + + + + - - - - + +Resolved upon successful issuance of command.
+- +
+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: +
-
+
-
+
- + Hub#wait + +
+
- 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. +@@ -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 comResolved after the commands are finished.
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: +
-
+
-
+
- + LPF2Hub#event:color + +
+
@@ -3587,76 +3922,79 @@ This is a helper method to make it easier to wait for concurrent commands to com
-
+
-
+
-
+
-
+
-
+
-
- - Source: -
- - lpf2hub.js, line 273 -
-
-
-
+
+ - Source: +
-
+
-
+
- + lpf2hub.js, + line 273 + +
+
-
+
+
+
+
+
+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: +
-
+
-
+
- + LPF2Hub#event:speed + +
+
@@ -3750,48 +4093,54 @@ This is a helper method to make it easier to wait for concurrent commands to com
-
+
-
+
-
+
-
+
-
+
-
- - Source: -
- - lpf2hub.js, line 366 -
-
-
-
+
+ - Source: +
-
+
-
+
- + lpf2hub.js, + line 366 + +
+
-
+
+
+
+
+
+ ++ + + - -
+++ - - + + + + + + + + + + + + + + + + + + + + \ 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 +
+@@ -142,28 +203,30 @@ - -
+- +
+new Hub()
+ + +- -
new Hub()
- + + - - - - - - - - - - - - - + + + + + + + - - - - - - - - - + +Members
- +-
-
-
+
<readonly> batteryLevel
+ +
+ -
+
+
+
+
-
+
- Source: +
- + + + - -
- Source: -
- - + - + - - - +
-
+
<readonly> firmwareVersion
- - - - - - - - - -Properties:
+ +
+ -
+
-
+ +
-
+
+
+
- Source: +
- + + + - -
- Source: -
- - + - + - - - +
-
+
<readonly> name
- - - - - - - - - -Properties:
+ +
+ -
+
-
+ +
-
+
+
+
- Source: +
- + + + - -
- Source: -
- - + - + - - - +
-
+
<readonly> rssi
- - - - - - - - - -Properties:
+ +
+ -
+
-
+ +
-
+
+
+
- Source: +
- + + + - -
- Source: -
- - + - + - - - +
-
+
<readonly> uuid
- - - - - - - - - -Properties:
+ +
+ -
+
-
+ +
-
+
+
+
Properties:
+ +-
+
+
@@ -634,6 +733,7 @@ string + @@ -641,17 +741,21 @@ - UUID of the hub +UUID of the hub
Methods
- +-
+
-
+
connect()
+ + +
+ -
-
-
-
connect() → {Promise}
+++ + + -Connect to the Hub.
+- Connect to the Hub. -- - - - - - - - - - - - - +-
+
+
+
+
+
+
+
@@ -741,53 +847,54 @@
-
+
-
+
-
+
-
+
-
+
-
-
-
+
+
- Source: +
- + + + - -
- Source: -
- - + - + - - - +
Returns:
- - + +Returns:
+ +- Resolved upon successful connect. +@@ -801,45 +908,48 @@ Promise +Resolved upon successful connect.
+
+- +
+disconnect()
+ + +- - - -
+ + + - - - - + +disconnect() → {Promise}
+++ + + -Disconnect the Hub.
+- Disconnect the Hub. -- - - - - - - - - - - - - +-
+
+
+
+
+
+
+
@@ -849,53 +959,54 @@
-
+
-
+
-
+
-
+
-
+
-
-
-
+
+
- Source: +
- + + + - -
- Source: -
- - + - + - - - +
Returns:
- - + +Returns:
+ +- Resolved upon successful disconnect. +@@ -909,45 +1020,48 @@ Promise +Resolved upon successful disconnect.
+- +
+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. +@@ -1325,44 +1449,42 @@ This is a helper method to make it easier to add delays into a chain of commands Promise + + + + - - - - + +Resolved after the delay is finished.
+- +
+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 Type -Attributes +Argument @@ -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 -The 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. +@@ -1525,44 +1655,42 @@ This is a helper method to make it easier to add delays into a chain of commands Promise + + + + - - - - + +Resolved upon successful issuance of command.
+- +
+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. +@@ -1682,46 +1817,43 @@ This is a helper method to make it easier to add delays into a chain of commands Promise + + + + - - - - + +Resolved upon successful issuance of command.
+- +
+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. +@@ -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 comResolved after the commands are finished.
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: -
- - + - + - - - +
+ ++ + + - -
+++ - - + + + + + + + + + + + + + + + + + + + + \ 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 +
+@@ -142,28 +203,30 @@ - -
+- +
+new LPF2Hub()
+ + +- -
new LPF2Hub()
- + + - - - - - - - - - - - - - +-
+
+
+
+
+
+
+
@@ -70,52 +131,52 @@
-
+
-
+
-
+
-
+
-
+
-
-
-
+
+
- Source: +
-
+
-
+
- + lpf2hub.js, + line 14 + +
+
-
- - Source: -
- - lpf2hub.js, line 14 -
-
+
-
+
-
-
-
+
Members
- +-
-
-
+
<readonly> batteryLevel
+ +
+ -
+
+
+
+
-
+
- Inherited From: -
- - Hub#batteryLevel -
-
+
-
-
-
-
-
+
+ - Inherited From: +
-
+
-
+
- + Hub#batteryLevel + +
+
@@ -238,47 +298,63 @@
-
+
-
+
-
- - Source: -
- - + - + - + - + + + +
- Source: +
- + + + + + + + + + - - - + + -
-
+
<readonly> current
- - - - - - - - - -Properties:
+ +
+ -
+
-
+ +
-
+
+
+
- Source: +
-
+
-
+
- + lpf2hub.js, + line 38 + +
+
-
- - Source: -
- - lpf2hub.js, line 38 -
-
+
-
+
-
-
-
+
-
+
<readonly> firmwareVersion
- - - - - - - - - -Properties:
+ +
+ -
+
-
+ +
-
+
+
+
- Inherited From: -
- - + - - - - - + +
- Inherited From: +
-
+
-
+
- + Hub#firmwareVersion + +
+
@@ -463,47 +545,63 @@
-
+
-
+
-
- - Source: -
- - + - + - + - + + + +
- Source: +
- + + + + + + + + +
-
+
<readonly> name
- - - - - - - - - -Properties:
+ +
+ -
+
-
+ +
-
+
+
+
- Inherited From: -
- - Hub#name -
-
+
-
-
-
-
-
+
+ - Inherited From: +
-
+
-
+
- + Hub#name + +
+
@@ -578,47 +673,63 @@
-
+
-
+
-
- - Source: -
- - + - + - + - + + + +
- Source: +
- + + + + + + + + +
-
+
<readonly> rssi
- - - - - - - - - -Properties:
+ +
+ -
+
-
+ +
-
+
+
+
- Inherited From: -
- - Hub#rssi -
-
+
-
-
-
-
-
+
+ - Inherited From: +
-
+
-
+
- + Hub#rssi + +
+
@@ -693,47 +801,63 @@
-
+
-
+
-
- - Source: -
- - + - + - + - + + + +
- Source: +
- + + + + + + + + +
-
+
<readonly> uuid
- - - - - - - - - -Properties:
+ +
+ -
+
-
+ +
-
+
+
+
- Inherited From: -
- - Hub#uuid -
-
+
-
-
-
-
-
+
+ - Inherited From: +
-
+
-
+
- + Hub#uuid + +
+
@@ -808,47 +929,63 @@
-
+
-
+
-
- - Source: -
- - + - + - + - + + + +
- Source: +
- + + + + + + + + +
-
+
<readonly> voltage
- - - - - - - - - -Properties:
+ +
+ -
+
-
+ +
-
+
+
+
- Source: +
-
+
-
+
- + lpf2hub.js, + line 31 + +
+
-
- - Source: -
- - lpf2hub.js, line 31 -
-
+
-
+
-
-
-
+
Properties:
+ +-
+
+
@@ -879,6 +1016,7 @@ number + @@ -886,17 +1024,21 @@ - Voltage of the hub (Volts) +Voltage of the hub (Volts)
-
+
@@ -906,83 +1048,88 @@
-
+
-
+
-
+
-
+
-
+
-
-
-
+
+
Methods
- +-
+
-
+
connect()
+ + +
+ -
-
-
-
connect() → {Promise}
+++ + + -Connect to the Hub.
+- Connect to the Hub. -- - - - - - - - - - - - - +-
-
-
+
-
+
+
+
+
- Inherited From: +
-
+
-
+
- + Hub#connect + +
+
- Overrides: @@ -997,47 +1144,54 @@ - + - + - + - + - + - -
- Source: -
- - - - + +
- Source: +
- + + + - + + + + +
Returns:
- - + +Returns:
+ +- Resolved upon successful connect. +@@ -1051,56 +1205,57 @@ Promise +Resolved upon successful connect.
+
+- +
+disconnect()
+ + +- - - -
+ + + - - - - + +disconnect() → {Promise}
+++ + + -Disconnect the Hub.
+- Disconnect the Hub. -- - - - - - - - - - - - - +-
-
-
+
-
-
- Inherited From: -
- - Hub#disconnect -
-
+
+
+
+ - Inherited From: +
-
+
-
+
- + Hub#disconnect + +
+
@@ -1110,47 +1265,54 @@
-
+
-
+
-
+
-
+
-
+
-
- - Source: -
- - - - + +
- Source: +
- + + + - + + + + +
Returns:
- - + +Returns:
+ +- Resolved upon successful disconnect. +@@ -1164,56 +1326,57 @@ Promise +Resolved upon successful disconnect.
+- +
+getHubType()
+ + +- - - -
+ + + - - - - + +getHubType() → {HubType}
+++ + + -Get the hub type.
+- Get the hub type. -- - - - - - - - - - - - - +-
-
-
+
-
-
- Inherited From: -
- - Hub#getHubType -
-
+
+
+
+ - Inherited From: +
-
+
-
+
- + Hub#getHubType + +
+
@@ -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: +
-
+
-
+
- + Hub#getPortDeviceType + +
+
@@ -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: +
-
+
-
+
- + lpf2hub.js, + line 79 + +
+
-
- - Source: -
- - lpf2hub.js, line 79 -
-
+
-
+
-
-
-
+
Returns:
- - + +Returns:
+ +- Resolved upon successful issuance of command. +@@ -1588,44 +1772,42 @@ Promise + + + + - - - - + +Resolved upon successful issuance of command.
+- +
+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: +
-
+
-
+
- + lpf2hub.js, + line 97 + +
+
-
- - Source: -
- - lpf2hub.js, line 97 -
-
+
-
+
-
-
-
+
Returns:
- - + +Returns:
+ +- Resolved upon successful issuance of command. +@@ -1791,44 +1982,42 @@ Promise + + + + - - - - + +Resolved upon successful issuance of command.
+- +
+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: +
-
+
-
+
- + lpf2hub.js, + line 59 + +
+
-
- - Source: -
- - lpf2hub.js, line 59 -
-
+
-
+
-
-
-
+
Returns:
- - + +Returns:
+ +- Resolved upon successful issuance of command. +@@ -1948,46 +2144,43 @@ Promise + + + + - - - - + +Resolved upon successful issuance of command.
+- +
+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: -
- - Hub#sleep -
-
+
+
+
+ - Inherited From: +
-
+
-
+
- + Hub#sleep + +
+
@@ -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. +@@ -2112,44 +2316,42 @@ This is a helper method to make it easier to add delays into a chain of commands Promise + + + + - - - - + +Resolved after the delay is finished.
+- +
+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 Type -Attributes +Argument @@ -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 -The 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: -
- - Hub#subscribe -
-
+
+
+
+ - Inherited From: +
-
+
-
+
- + Hub#subscribe + +
+
@@ -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. +@@ -2317,44 +2531,42 @@ This is a helper method to make it easier to add delays into a chain of commands Promise + + + + - - - - + +Resolved upon successful issuance of command.
+- +
+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: -
- - Hub#unsubscribe -
-
+
+
+
+ - Inherited From: +
-
+
-
+
- + Hub#unsubscribe + +
+
@@ -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. +@@ -2479,46 +2702,43 @@ This is a helper method to make it easier to add delays into a chain of commands Promise + + + + - - - - + +Resolved upon successful issuance of command.
+- +
+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: -
- - Hub#wait -
-
+
+
+
+ - Inherited From: +
-
+
-
+
- + Hub#wait + +
+
@@ -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. +@@ -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 comResolved after the commands are finished.
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: -
- - Hub#event:attach -
-
+
+
+
+ - Inherited From: +
-
+
-
+
- + Hub#event:attach + +
+
@@ -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: +
-
+
-
+
- + lpf2hub.js, + line 173 + +
+
-
- - Source: -
- - lpf2hub.js, line 173 -
-
+
-
+
-
-
-
+
+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: +
-
+
-
+
- + lpf2hub.js, + line 273 + +
+
-
- - Source: -
- - lpf2hub.js, line 273 -
-
+
-
+
-
-
-
+
+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: +
-
+
-
+
- + lpf2hub.js, + line 289 + +
+
-
- - Source: -
- - lpf2hub.js, line 289 -
-
+
-
+
-
-
-
+
+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: -
- - Hub#event:detach -
-
+
+
+
+ - Inherited From: +
-
+
-
+
- + Hub#event:detach + +
+
@@ -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: +
-
+
-
+
- + lpf2hub.js, + line 263 + +
+
-
- - Source: -
- - lpf2hub.js, line 263 -
-
+
-
+
-
-
-
+
+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: +
-
+
-
+
- + lpf2hub.js, + line 318 + +
+
-
- - Source: -
- - lpf2hub.js, line 318 -
-
+
-
+
-
-
-
+
+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: +
-
+
-
+
- + lpf2hub.js, + line 366 + +
+
-
- - Source: -
- - lpf2hub.js, line 366 -
-
+
-
+
-
-
-
+
+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 comIf 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: +
-
+
-
+
- + lpf2hub.js, + line 306 + +
+
-
- - Source: -
- - lpf2hub.js, line 306 -
-
+
-
+
-
-
-
+
+ ++ + + - -
+++ - - + + + + + + + + + + + + + + + + + + + + \ 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 +
+@@ -148,28 +209,30 @@ - -
+- +
+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. -- - - - - - - - - - - - - + + + + + + + - - - - - - - - - + +Members
- +-
-
-
+
<readonly> batteryLevel
+ +
+ -
+
+
+
+
-
+
- Inherited From: +
-
+
-
+
- + Hub#batteryLevel + +
+
- Overrides: @@ -238,53 +309,63 @@ - + - + - + - + - + - -
- Source: -
- - - - + +
- Source: +
- + + + - + + + + + - - - + + -
-
+
<readonly> current
- - - - - - - - - -Properties:
+ +
+ -
+
-
+ +
-
+
+
+
- Inherited From: -
- - LPF2Hub#current -
-
+
-
-
-
-
-
+
+ - Inherited From: +
-
+
-
+
- + LPF2Hub#current + +
+
@@ -359,47 +437,63 @@
-
+
-
+
-
- - Source: -
- - lpf2hub.js, line 38 -
-
+
-
+
-
+
-
+
+
+
+ - Source: +
-
+
-
+
- + lpf2hub.js, + line 38 + +
+
+
+
+
+
+
+
-
+
<readonly> firmwareVersion
- - - - - - - - - -Properties:
+ +
+ -
+
-
+ +
-
+
+
+
Properties:
+ +-
+
+
@@ -430,6 +524,7 @@ string + @@ -437,23 +532,30 @@ - Firmware version of the hub +
Properties:
+ +-
+
+
@@ -315,6 +396,7 @@ number + @@ -322,34 +404,30 @@ - Current usage of the hub (Amps) +Current usage of the hub (Amps)
-
+
(readonly) firmwareVersion
+
+
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)
-
+
(readonly) current
+
+
(readonly) batteryLevel
- - - - - - +
+
+
Properties:
+ +-
+
+
@@ -764,6 +888,7 @@ string + @@ -771,34 +896,30 @@ - UUID of the hub +UUID of the hub
-
+
(readonly) voltage
+
+
Properties:
+ +-
+
+
@@ -649,6 +760,7 @@ number + @@ -656,34 +768,30 @@ - Signal strength of the hub +Signal strength of the hub
-
+
(readonly) uuid
+
+
Properties:
+ +-
+
+
@@ -534,6 +632,7 @@ string + @@ -541,34 +640,30 @@ - Name of the hub +Name of the hub
-
+
(readonly) rssi
+
+
Properties:
+ +-
+
+
@@ -419,6 +504,7 @@ string + @@ -426,34 +512,30 @@ - Firmware version of the hub +Firmware version of the hub
-
+
(readonly) name
+
+
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 @@
-
+
-
+
-
+
-
+
-
+
-
-
-
+
+
(readonly) firmwareVersion
+
+
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)
-
+
(readonly) current
+
+
(readonly) batteryLevel
- - - - - - +
+
+ -
+
Properties:
+ +-
+
+
@@ -524,6 +614,7 @@ number + @@ -531,17 +622,21 @@ - Signal strength of the hub +Signal strength of the hub
-
+
@@ -551,59 +646,63 @@
-
+
-
+
-
+
-
+
-
+
-
-
-
+
+
(readonly) uuid
+
+
Properties:
+ +-
+
+
@@ -414,6 +495,7 @@ string + @@ -421,17 +503,21 @@ - Name of the hub +Name of the hub
-
+
@@ -441,59 +527,63 @@
-
+
-
+
-
+
-
+
-
+
-
-
-
+
+
(readonly) rssi
+
+
Properties:
+ +-
+
+
@@ -304,6 +376,7 @@ string + @@ -311,17 +384,21 @@ - Firmware version of the hub +Firmware version of the hub
-
+
@@ -331,59 +408,63 @@
-
+
-
+
-
+
-
+
-
+
-
-
-
+
+
(readonly) name
+
+
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 @@
-
+
-
+
-
+
-
+
-
+
-
-
-
+
+
(readonly) firmwareVersion
+
+
(readonly) batteryLevel
- - - - - - +
+
+
Properties:
+ +-
+
+
@@ -775,6 +923,7 @@ string + @@ -782,23 +931,30 @@ - UUID of the hub +UUID of the hub
-
+
(readonly) voltage
+
+
Properties:
+ +-
+
+
@@ -660,6 +790,7 @@ number + @@ -667,23 +798,30 @@ - Signal strength of the hub +Signal strength of the hub
-
+
(readonly) uuid
+
+
Properties:
+ +-
+
+
@@ -545,6 +657,7 @@ string + @@ -552,23 +665,30 @@ - Name of the hub +Name of the hub
-
+
(readonly) rssi
+
+
Properties:
+ +-
+
+
@@ -430,6 +524,7 @@ string + @@ -437,23 +532,30 @@ - Firmware version of the hub +Firmware version of the hub
-
+
(readonly) name
+
+
Properties:
+ +-
+
+
@@ -315,6 +396,7 @@ number + @@ -322,34 +404,30 @@ - Current usage of the hub (Amps) +Current usage of the hub (Amps)
-
+
(readonly) firmwareVersion
+
+
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)
-
+
(readonly) current
+
+
(readonly) batteryLevel
- - - - - - +
+
+
Properties:
+ +-
+
+
@@ -775,6 +923,7 @@ string + @@ -782,23 +931,30 @@ - UUID of the hub +UUID of the hub
-
+
(readonly) voltage
+
+
Properties:
+ +-
+
+
@@ -660,6 +790,7 @@ number + @@ -667,23 +798,30 @@ - Signal strength of the hub +Signal strength of the hub
-
+
(readonly) uuid
+
+
Properties:
+ +-
+
+
@@ -545,6 +657,7 @@ string + @@ -552,23 +665,30 @@ - Name of the hub +Name of the hub
-
+
(readonly) rssi
+
+
Properties:
+ +-
+
+
@@ -430,6 +524,7 @@ string + @@ -437,23 +532,30 @@ - Firmware version of the hub +Firmware version of the hub
-
+
(readonly) name
+
+
Properties:
+ +-
+
+
@@ -315,6 +396,7 @@ number + @@ -322,34 +404,30 @@ - Current usage of the hub (Amps) +Current usage of the hub (Amps)
-
+
(readonly) firmwareVersion
+
+
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)
-
+
(readonly) current
+
+
(readonly) batteryLevel
- - - - - - ++