node-poweredup 8.0.4 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.drone.yml +2 -2
- package/.gitmodules +0 -3
- package/.jsdoc.json +1 -2
- package/dist/browser/poweredup.js +1 -1
- package/dist/browser/poweredup.js.map +1 -1
- package/dist/node/color.js +5 -1
- package/dist/node/color.js.map +1 -1
- package/dist/node/consts.d.ts +21 -21
- package/dist/node/consts.js +27 -27
- package/dist/node/consts.js.map +1 -1
- package/dist/node/devices/absolutemotor.js +6 -2
- package/dist/node/devices/absolutemotor.js.map +1 -1
- package/dist/node/devices/basicmotor.js +5 -1
- package/dist/node/devices/basicmotor.js.map +1 -1
- package/dist/node/devices/colordistancesensor.js +7 -3
- package/dist/node/devices/colordistancesensor.js.map +1 -1
- package/dist/node/devices/currentsensor.js +6 -2
- package/dist/node/devices/currentsensor.js.map +1 -1
- package/dist/node/devices/device.d.ts +3 -1
- package/dist/node/devices/device.js +5 -1
- package/dist/node/devices/device.js.map +1 -1
- package/dist/node/devices/duplotrainbasecolorsensor.js +6 -2
- package/dist/node/devices/duplotrainbasecolorsensor.js.map +1 -1
- package/dist/node/devices/duplotrainbasemotor.js +5 -1
- package/dist/node/devices/duplotrainbasemotor.js.map +1 -1
- package/dist/node/devices/duplotrainbasespeaker.js +6 -2
- package/dist/node/devices/duplotrainbasespeaker.js.map +1 -1
- package/dist/node/devices/duplotrainbasespeedometer.js +6 -2
- package/dist/node/devices/duplotrainbasespeedometer.js.map +1 -1
- package/dist/node/devices/hubled.js +6 -2
- package/dist/node/devices/hubled.js.map +1 -1
- package/dist/node/devices/light.js +5 -1
- package/dist/node/devices/light.js.map +1 -1
- package/dist/node/devices/marioaccelerometer.js +6 -2
- package/dist/node/devices/marioaccelerometer.js.map +1 -1
- package/dist/node/devices/mariobarcodesensor.js +6 -2
- package/dist/node/devices/mariobarcodesensor.js.map +1 -1
- package/dist/node/devices/mariopantssensor.js +6 -2
- package/dist/node/devices/mariopantssensor.js.map +1 -1
- package/dist/node/devices/mediumlinearmotor.js +5 -1
- package/dist/node/devices/mediumlinearmotor.js.map +1 -1
- package/dist/node/devices/motionsensor.js +6 -2
- package/dist/node/devices/motionsensor.js.map +1 -1
- package/dist/node/devices/movehubmediumlinearmotor.js +5 -1
- package/dist/node/devices/movehubmediumlinearmotor.js.map +1 -1
- package/dist/node/devices/movehubtiltsensor.js +6 -2
- package/dist/node/devices/movehubtiltsensor.js.map +1 -1
- package/dist/node/devices/piezobuzzer.js +5 -1
- package/dist/node/devices/piezobuzzer.js.map +1 -1
- package/dist/node/devices/remotecontrolbutton.js +7 -3
- package/dist/node/devices/remotecontrolbutton.js.map +1 -1
- package/dist/node/devices/simplemediumlinearmotor.js +5 -1
- package/dist/node/devices/simplemediumlinearmotor.js.map +1 -1
- package/dist/node/devices/tachomotor.js +6 -2
- package/dist/node/devices/tachomotor.js.map +1 -1
- package/dist/node/devices/technic3x3colorlightmatrix.js +6 -2
- package/dist/node/devices/technic3x3colorlightmatrix.js.map +1 -1
- package/dist/node/devices/techniccolorsensor.js +6 -2
- package/dist/node/devices/techniccolorsensor.js.map +1 -1
- package/dist/node/devices/technicdistancesensor.js +6 -2
- package/dist/node/devices/technicdistancesensor.js.map +1 -1
- package/dist/node/devices/technicforcesensor.js +6 -2
- package/dist/node/devices/technicforcesensor.js.map +1 -1
- package/dist/node/devices/techniclargeangularmotor.js +5 -1
- package/dist/node/devices/techniclargeangularmotor.js.map +1 -1
- package/dist/node/devices/techniclargelinearmotor.js +5 -1
- package/dist/node/devices/techniclargelinearmotor.js.map +1 -1
- package/dist/node/devices/technicmediumangularmotor.js +5 -1
- package/dist/node/devices/technicmediumangularmotor.js.map +1 -1
- package/dist/node/devices/technicmediumhubaccelerometersensor.js +6 -2
- package/dist/node/devices/technicmediumhubaccelerometersensor.js.map +1 -1
- package/dist/node/devices/technicmediumhubgyrosensor.js +6 -2
- package/dist/node/devices/technicmediumhubgyrosensor.js.map +1 -1
- package/dist/node/devices/technicmediumhubtiltsensor.js +7 -3
- package/dist/node/devices/technicmediumhubtiltsensor.js.map +1 -1
- package/dist/node/devices/technicsmallangularmotor.js +5 -1
- package/dist/node/devices/technicsmallangularmotor.js.map +1 -1
- package/dist/node/devices/technicxlargelinearmotor.js +5 -1
- package/dist/node/devices/technicxlargelinearmotor.js.map +1 -1
- package/dist/node/devices/tiltsensor.js +6 -2
- package/dist/node/devices/tiltsensor.js.map +1 -1
- package/dist/node/devices/trainmotor.js +5 -1
- package/dist/node/devices/trainmotor.js.map +1 -1
- package/dist/node/devices/voltagesensor.js +6 -2
- package/dist/node/devices/voltagesensor.js.map +1 -1
- package/dist/node/hubs/basehub.d.ts +1 -0
- package/dist/node/hubs/basehub.js +5 -1
- package/dist/node/hubs/basehub.js.map +1 -1
- package/dist/node/hubs/duplotrainbase.d.ts +1 -0
- package/dist/node/hubs/duplotrainbase.js +5 -1
- package/dist/node/hubs/duplotrainbase.js.map +1 -1
- package/dist/node/hubs/hub.d.ts +1 -0
- package/dist/node/hubs/hub.js +12 -11
- package/dist/node/hubs/hub.js.map +1 -1
- package/dist/node/hubs/lpf2hub.js +5 -1
- package/dist/node/hubs/lpf2hub.js.map +1 -1
- package/dist/node/hubs/mario.d.ts +1 -0
- package/dist/node/hubs/mario.js +5 -1
- package/dist/node/hubs/mario.js.map +1 -1
- package/dist/node/hubs/movehub.d.ts +1 -0
- package/dist/node/hubs/movehub.js +7 -6
- package/dist/node/hubs/movehub.js.map +1 -1
- package/dist/node/hubs/remotecontrol.d.ts +1 -0
- package/dist/node/hubs/remotecontrol.js +5 -1
- package/dist/node/hubs/remotecontrol.js.map +1 -1
- package/dist/node/hubs/technicmediumhub.d.ts +1 -0
- package/dist/node/hubs/technicmediumhub.js +5 -1
- package/dist/node/hubs/technicmediumhub.js.map +1 -1
- package/dist/node/hubs/technicsmallhub.d.ts +1 -0
- package/dist/node/hubs/technicsmallhub.js +10 -6
- package/dist/node/hubs/technicsmallhub.js.map +1 -1
- package/dist/node/hubs/wedo2smarthub.d.ts +1 -0
- package/dist/node/hubs/wedo2smarthub.js +10 -6
- package/dist/node/hubs/wedo2smarthub.js.map +1 -1
- package/dist/node/index-browser.js +5 -1
- package/dist/node/index-browser.js.map +1 -1
- package/dist/node/index-node.js +5 -1
- package/dist/node/index-node.js.map +1 -1
- package/dist/node/interfaces.d.ts +1 -0
- package/dist/node/nobleabstraction.d.ts +1 -0
- package/dist/node/nobleabstraction.js.map +1 -1
- package/dist/node/poweredup-browser.js +10 -3
- package/dist/node/poweredup-browser.js.map +1 -1
- package/dist/node/poweredup-node.js +5 -3
- package/dist/node/poweredup-node.js.map +1 -1
- package/dist/node/utils.d.ts +2 -1
- package/dist/node/utils.js.map +1 -1
- package/dist/node/webbleabstraction.d.ts +2 -1
- package/dist/node/webbleabstraction.js +1 -1
- package/dist/node/webbleabstraction.js.map +1 -1
- package/docs/AbsoluteMotor.html +1037 -1066
- package/docs/BaseHub.html +622 -807
- package/docs/BasicMotor.html +707 -809
- package/docs/ColorDistanceSensor.html +1500 -1611
- package/docs/CurrentSensor.html +470 -623
- package/docs/Device.html +372 -502
- package/docs/DuploTrainBase.html +1004 -1225
- package/docs/DuploTrainBaseColorSensor.html +712 -874
- package/docs/DuploTrainBaseMotor.html +723 -841
- package/docs/DuploTrainBaseSpeaker.html +565 -693
- package/docs/DuploTraniBaseSpeedometer.html +396 -550
- package/docs/Hub.html +3842 -3987
- package/docs/HubLED.html +591 -731
- package/docs/LPF2Hub.html +983 -1188
- package/docs/Light.html +591 -731
- package/docs/Mario.html +1004 -1225
- package/docs/MarioAccelerometer.html +568 -732
- package/docs/MarioBarcodeSensor.html +568 -732
- package/docs/MarioPantsSensor.html +470 -623
- package/docs/MediumLinearMotor.html +679 -748
- package/docs/MotionSensor.html +470 -623
- package/docs/MoveHub.html +1004 -1225
- package/docs/MoveHubMediumLinearMotor.html +679 -748
- package/docs/MoveHubTiltSensor.html +483 -642
- package/docs/PiezoBuzzer.html +495 -642
- package/docs/PoweredUP.html +2223 -2174
- package/docs/RemoteControl.html +1004 -1225
- package/docs/RemoteControlButton.html +470 -623
- package/docs/SimpleMediumLinearMotor.html +396 -550
- package/docs/TachoMotor.html +1298 -1393
- package/docs/Technic3x3ColorLightMatrix.html +484 -628
- package/docs/TechnicColorSensor.html +726 -876
- package/docs/TechnicDistanceSensor.html +667 -824
- package/docs/TechnicForceSensor.html +614 -765
- package/docs/TechnicLargeAngularMotor.html +1046 -1091
- package/docs/TechnicLargeLinearMotor.html +1046 -1091
- package/docs/TechnicMediumAngularMotor.html +1046 -1091
- package/docs/TechnicMediumHub.html +1004 -1225
- package/docs/TechnicMediumHubAccelerometerSensor.html +496 -661
- package/docs/TechnicMediumHubGyroSensor.html +496 -661
- package/docs/TechnicMediumHubTiltSensor.html +820 -945
- package/docs/TechnicSmallAngularMotor.html +1046 -1091
- package/docs/TechnicXLargeLinearMotor.html +1046 -1091
- package/docs/TiltSensor.html +483 -642
- package/docs/TrainMotor.html +723 -841
- package/docs/VoltageSensor.html +470 -623
- package/docs/WeDo2SmartHub.html +890 -1102
- package/docs/consts.js.html +53 -116
- package/docs/devices_absolutemotor.js.html +35 -94
- package/docs/devices_basicmotor.js.html +34 -93
- package/docs/devices_colordistancesensor.js.html +33 -92
- package/docs/devices_currentsensor.js.html +35 -94
- package/docs/devices_device.js.html +32 -91
- package/docs/devices_duplotrainbasecolorsensor.js.html +35 -94
- package/docs/devices_duplotrainbasemotor.js.html +34 -93
- package/docs/devices_duplotrainbasespeaker.js.html +35 -94
- package/docs/devices_duplotrainbasespeedometer.js.html +35 -94
- package/docs/devices_hubled.js.html +35 -94
- package/docs/devices_light.js.html +34 -93
- package/docs/devices_marioaccelerometer.js.html +35 -94
- package/docs/devices_mariobarcodesensor.js.html +35 -94
- package/docs/devices_mariopantssensor.js.html +35 -94
- package/docs/devices_mediumlinearmotor.js.html +34 -93
- package/docs/devices_motionsensor.js.html +35 -94
- package/docs/devices_movehubmediumlinearmotor.js.html +34 -93
- package/docs/devices_movehubtiltsensor.js.html +35 -94
- package/docs/devices_piezobuzzer.js.html +34 -93
- package/docs/devices_remotecontrolbutton.js.html +36 -95
- package/docs/devices_simplemediumlinearmotor.js.html +34 -93
- package/docs/devices_tachomotor.js.html +33 -92
- package/docs/devices_technic3x3colorlightmatrix.js.html +35 -94
- package/docs/devices_techniccolorsensor.js.html +35 -94
- package/docs/devices_technicdistancesensor.js.html +35 -94
- package/docs/devices_technicforcesensor.js.html +35 -94
- package/docs/devices_techniclargeangularmotor.js.html +34 -93
- package/docs/devices_techniclargelinearmotor.js.html +34 -93
- package/docs/devices_technicmediumangularmotor.js.html +34 -93
- package/docs/devices_technicmediumhubaccelerometersensor.js.html +35 -94
- package/docs/devices_technicmediumhubgyrosensor.js.html +35 -94
- package/docs/devices_technicmediumhubtiltsensor.js.html +36 -95
- package/docs/devices_technicsmallangularmotor.js.html +34 -93
- package/docs/devices_technicxlargelinearmotor.js.html +34 -93
- package/docs/devices_tiltsensor.js.html +35 -94
- package/docs/devices_trainmotor.js.html +34 -93
- package/docs/devices_voltagesensor.js.html +35 -94
- package/docs/global.html +2094 -7927
- package/docs/hubs_basehub.js.html +31 -90
- package/docs/hubs_duplotrainbase.js.html +34 -93
- package/docs/hubs_hub.js.html +41 -103
- package/docs/hubs_lpf2hub.js.html +31 -90
- package/docs/hubs_mario.js.html +34 -93
- package/docs/hubs_movehub.js.html +36 -98
- package/docs/hubs_remotecontrol.js.html +34 -93
- package/docs/hubs_technicmediumhub.js.html +34 -93
- package/docs/hubs_technicsmallhub.js.html +39 -98
- package/docs/hubs_wedo2smarthub.js.html +36 -95
- package/docs/index.html +36 -83
- package/docs/poweredup-browser.js.html +36 -92
- package/docs/poweredup-node.js.html +32 -93
- package/docs/scripts/linenumber.js +21 -19
- package/docs/scripts/prettify/Apache-License-2.0.txt +202 -0
- package/docs/scripts/prettify/lang-css.js +2 -0
- package/docs/scripts/prettify/prettify.js +28 -0
- package/docs/styles/jsdoc-default.css +192 -787
- package/docs/styles/prettify-jsdoc.css +1 -1
- package/docs/styles/prettify-tomorrow.css +8 -14
- package/package.json +13 -13
- package/src/devices/device.ts +2 -2
- package/src/devices/remotecontrolbutton.ts +1 -1
- package/src/devices/technicmediumhubtiltsensor.ts +1 -1
- package/src/hubs/hub.ts +2 -2
- package/src/hubs/movehub.ts +2 -2
- package/src/poweredup-browser.ts +5 -2
- package/src/poweredup-node.ts +0 -2
- package/src/webbleabstraction.ts +2 -2
- package/jsdoc-template/braintree/CHANGELOG.md +0 -31
- package/jsdoc-template/braintree/LICENSE +0 -27
- package/jsdoc-template/braintree/README.md +0 -90
- package/jsdoc-template/braintree/package.json +0 -39
- package/jsdoc-template/braintree/publish.js +0 -675
- package/jsdoc-template/braintree/static/fonts/OpenSans-Bold-webfont.eot +0 -0
- package/jsdoc-template/braintree/static/fonts/OpenSans-Bold-webfont.svg +0 -1830
- package/jsdoc-template/braintree/static/fonts/OpenSans-Bold-webfont.woff +0 -0
- package/jsdoc-template/braintree/static/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
- package/jsdoc-template/braintree/static/fonts/OpenSans-BoldItalic-webfont.svg +0 -1830
- package/jsdoc-template/braintree/static/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
- package/jsdoc-template/braintree/static/fonts/OpenSans-Italic-webfont.eot +0 -0
- package/jsdoc-template/braintree/static/fonts/OpenSans-Italic-webfont.svg +0 -1830
- package/jsdoc-template/braintree/static/fonts/OpenSans-Italic-webfont.woff +0 -0
- package/jsdoc-template/braintree/static/fonts/OpenSans-Light-webfont.eot +0 -0
- package/jsdoc-template/braintree/static/fonts/OpenSans-Light-webfont.svg +0 -1831
- package/jsdoc-template/braintree/static/fonts/OpenSans-Light-webfont.woff +0 -0
- package/jsdoc-template/braintree/static/fonts/OpenSans-LightItalic-webfont.eot +0 -0
- package/jsdoc-template/braintree/static/fonts/OpenSans-LightItalic-webfont.svg +0 -1835
- package/jsdoc-template/braintree/static/fonts/OpenSans-LightItalic-webfont.woff +0 -0
- package/jsdoc-template/braintree/static/fonts/OpenSans-Regular-webfont.eot +0 -0
- package/jsdoc-template/braintree/static/fonts/OpenSans-Regular-webfont.svg +0 -1831
- package/jsdoc-template/braintree/static/fonts/OpenSans-Regular-webfont.woff +0 -0
- package/jsdoc-template/braintree/static/fonts/OpenSans-Semibold-webfont.eot +0 -0
- package/jsdoc-template/braintree/static/fonts/OpenSans-Semibold-webfont.svg +0 -1830
- package/jsdoc-template/braintree/static/fonts/OpenSans-Semibold-webfont.ttf +0 -0
- package/jsdoc-template/braintree/static/fonts/OpenSans-Semibold-webfont.woff +0 -0
- package/jsdoc-template/braintree/static/fonts/OpenSans-SemiboldItalic-webfont.eot +0 -0
- package/jsdoc-template/braintree/static/fonts/OpenSans-SemiboldItalic-webfont.svg +0 -1830
- package/jsdoc-template/braintree/static/fonts/OpenSans-SemiboldItalic-webfont.ttf +0 -0
- package/jsdoc-template/braintree/static/fonts/OpenSans-SemiboldItalic-webfont.woff +0 -0
- package/jsdoc-template/braintree/static/icons/home.svg +0 -4
- package/jsdoc-template/braintree/static/icons/search.svg +0 -4
- package/jsdoc-template/braintree/static/scripts/linenumber.js +0 -23
- package/jsdoc-template/braintree/static/scripts/pagelocation.js +0 -89
- package/jsdoc-template/braintree/static/styles/collapse.css +0 -27
- package/jsdoc-template/braintree/static/styles/jsdoc-default.css +0 -953
- package/jsdoc-template/braintree/static/styles/prettify-jsdoc.css +0 -111
- package/jsdoc-template/braintree/static/styles/prettify-tomorrow.css +0 -138
- package/jsdoc-template/braintree/tmpl/augments.tmpl +0 -10
- package/jsdoc-template/braintree/tmpl/container.tmpl +0 -213
- package/jsdoc-template/braintree/tmpl/details.tmpl +0 -223
- package/jsdoc-template/braintree/tmpl/example.tmpl +0 -2
- package/jsdoc-template/braintree/tmpl/examples.tmpl +0 -14
- package/jsdoc-template/braintree/tmpl/exceptions.tmpl +0 -28
- package/jsdoc-template/braintree/tmpl/layout.tmpl +0 -150
- package/jsdoc-template/braintree/tmpl/mainpage.tmpl +0 -9
- package/jsdoc-template/braintree/tmpl/members.tmpl +0 -38
- package/jsdoc-template/braintree/tmpl/method.tmpl +0 -128
- package/jsdoc-template/braintree/tmpl/params.tmpl +0 -125
- package/jsdoc-template/braintree/tmpl/properties.tmpl +0 -111
- package/jsdoc-template/braintree/tmpl/returns.tmpl +0 -17
- package/jsdoc-template/braintree/tmpl/source.tmpl +0 -9
- package/jsdoc-template/braintree/tmpl/tutorial.tmpl +0 -23
- package/jsdoc-template/braintree/tmpl/type.tmpl +0 -11
|
@@ -9,35 +9,35 @@
|
|
|
9
9
|
@media screen {
|
|
10
10
|
/* string content */
|
|
11
11
|
.str {
|
|
12
|
-
color:
|
|
12
|
+
color: #718c00; }
|
|
13
13
|
|
|
14
14
|
/* a keyword */
|
|
15
15
|
.kwd {
|
|
16
|
-
color:
|
|
16
|
+
color: #8959a8; }
|
|
17
17
|
|
|
18
18
|
/* a comment */
|
|
19
19
|
.com {
|
|
20
|
-
color:
|
|
20
|
+
color: #8e908c; }
|
|
21
21
|
|
|
22
22
|
/* a type name */
|
|
23
23
|
.typ {
|
|
24
|
-
color:
|
|
24
|
+
color: #4271ae; }
|
|
25
25
|
|
|
26
26
|
/* a literal value */
|
|
27
27
|
.lit {
|
|
28
|
-
color:
|
|
28
|
+
color: #f5871f; }
|
|
29
29
|
|
|
30
30
|
/* punctuation */
|
|
31
31
|
.pun {
|
|
32
|
-
color: #
|
|
32
|
+
color: #4d4d4c; }
|
|
33
33
|
|
|
34
34
|
/* lisp open bracket */
|
|
35
35
|
.opn {
|
|
36
|
-
color: #
|
|
36
|
+
color: #4d4d4c; }
|
|
37
37
|
|
|
38
38
|
/* lisp close bracket */
|
|
39
39
|
.clo {
|
|
40
|
-
color: #
|
|
40
|
+
color: #4d4d4c; }
|
|
41
41
|
|
|
42
42
|
/* a markup tag name */
|
|
43
43
|
.tag {
|
|
@@ -105,12 +105,6 @@ pre.prettyprint {
|
|
|
105
105
|
padding: 10px; }
|
|
106
106
|
*/
|
|
107
107
|
|
|
108
|
-
/* Get LI elements to show when they are in the main article */
|
|
109
|
-
article ul li {
|
|
110
|
-
list-style-type: circle;
|
|
111
|
-
margin-left: 25px;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
108
|
/* Specify class=linenums on a pre to get line numbering */
|
|
115
109
|
ol.linenums {
|
|
116
110
|
margin-top: 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-poweredup",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"description": "A Javascript module to interface with LEGO Powered Up components.",
|
|
5
5
|
"homepage": "https://github.com/nathankellenicki/node-poweredup/",
|
|
6
6
|
"main": "dist/node/index-node.js",
|
|
@@ -18,21 +18,21 @@
|
|
|
18
18
|
"author": "Nathan Kellenicki <nathan@kellenicki.com>",
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@abandonware/noble": "1.9.2-
|
|
22
|
-
"compare-versions": "^
|
|
23
|
-
"debug": "^4.3.
|
|
21
|
+
"@abandonware/noble": "1.9.2-24",
|
|
22
|
+
"compare-versions": "^6.1.0",
|
|
23
|
+
"debug": "^4.3.4"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@types/debug": "4.1.
|
|
27
|
-
"@types/node": "^
|
|
28
|
-
"@types/web-bluetooth": "0.0.
|
|
26
|
+
"@types/debug": "4.1.12",
|
|
27
|
+
"@types/node": "^20.12.7",
|
|
28
|
+
"@types/web-bluetooth": "0.0.20",
|
|
29
29
|
"buffer": "^6.0.3",
|
|
30
|
-
"jsdoc": "^
|
|
31
|
-
"jsdoc-to-markdown": "^
|
|
32
|
-
"ts-loader": "^9.
|
|
30
|
+
"jsdoc": "^4.0.2",
|
|
31
|
+
"jsdoc-to-markdown": "^8.0.1",
|
|
32
|
+
"ts-loader": "^9.5.1",
|
|
33
33
|
"tslint": "^6.1.3",
|
|
34
|
-
"typescript": "^4.5
|
|
35
|
-
"webpack": "^5.
|
|
36
|
-
"webpack-cli": "^
|
|
34
|
+
"typescript": "^5.4.5",
|
|
35
|
+
"webpack": "^5.91.0",
|
|
36
|
+
"webpack-cli": "^5.1.4"
|
|
37
37
|
}
|
|
38
38
|
}
|
package/src/devices/device.ts
CHANGED
|
@@ -25,7 +25,7 @@ export class Device extends EventEmitter {
|
|
|
25
25
|
|
|
26
26
|
private _isWeDo2SmartHub: boolean;
|
|
27
27
|
private _isVirtualPort: boolean = false;
|
|
28
|
-
private _eventTimer: NodeJS.
|
|
28
|
+
private _eventTimer: NodeJS.Timeout | null = null;
|
|
29
29
|
|
|
30
30
|
constructor (hub: IDeviceInterface, portId: number, modeMap: {[event: string]: number} = {}, type: Consts.DeviceType = Consts.DeviceType.UNKNOWN) {
|
|
31
31
|
super();
|
|
@@ -178,7 +178,7 @@ export class Device extends EventEmitter {
|
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
-
public setEventTimer (timer: NodeJS.
|
|
181
|
+
public setEventTimer (timer: NodeJS.Timeout) {
|
|
182
182
|
this._eventTimer = timer;
|
|
183
183
|
}
|
|
184
184
|
|
|
@@ -21,7 +21,7 @@ export class RemoteControlButton extends Device {
|
|
|
21
21
|
case Mode.BUTTON_EVENTS:
|
|
22
22
|
/**
|
|
23
23
|
* Emits when a button on the remote is pressed or released.
|
|
24
|
-
* @event RemoteControlButton#
|
|
24
|
+
* @event RemoteControlButton#remoteButton
|
|
25
25
|
* @type {object}
|
|
26
26
|
* @param {number} event
|
|
27
27
|
*/
|
package/src/hubs/hub.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Peripheral } from "@abandonware/noble";
|
|
2
|
-
import
|
|
2
|
+
import { compareVersions } from "compare-versions";
|
|
3
3
|
|
|
4
4
|
import { IBLEAbstraction } from "../interfaces";
|
|
5
5
|
|
|
@@ -47,7 +47,7 @@ export class Hub extends LPF2Hub {
|
|
|
47
47
|
|
|
48
48
|
|
|
49
49
|
protected _checkFirmware (version: string) {
|
|
50
|
-
if (
|
|
50
|
+
if (compareVersions("1.1.00.0004", version) === 1) {
|
|
51
51
|
throw new Error(`Your Powered Up Hub's (${this.name}) firmware is out of date and unsupported by this library. Please update it via the official Powered Up app.`);
|
|
52
52
|
}
|
|
53
53
|
}
|
package/src/hubs/movehub.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Peripheral } from "@abandonware/noble";
|
|
2
|
-
import
|
|
2
|
+
import { compareVersions } from "compare-versions";
|
|
3
3
|
|
|
4
4
|
import { IBLEAbstraction } from "../interfaces";
|
|
5
5
|
|
|
@@ -45,7 +45,7 @@ export class MoveHub extends LPF2Hub {
|
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
protected _checkFirmware (version: string) {
|
|
48
|
-
if (
|
|
48
|
+
if (compareVersions("2.0.00.0017", version) === 1) {
|
|
49
49
|
throw new Error(`Your Move Hub's (${this.name}) firmware is out of date and unsupported by this library. Please update it via the official Powered Up app.`);
|
|
50
50
|
}
|
|
51
51
|
}
|
package/src/poweredup-browser.ts
CHANGED
|
@@ -130,9 +130,9 @@ export class PoweredUP extends EventEmitter {
|
|
|
130
130
|
|
|
131
131
|
|
|
132
132
|
private _determineLPF2HubType (device: IBLEAbstraction): Promise<Consts.HubType> {
|
|
133
|
-
return new Promise((resolve) => {
|
|
133
|
+
return new Promise(async (resolve) => {
|
|
134
134
|
let buf: Buffer = Buffer.alloc(0);
|
|
135
|
-
device.subscribeToCharacteristic(Consts.BLECharacteristic.LPF2_ALL, (data: Buffer) => {
|
|
135
|
+
await device.subscribeToCharacteristic(Consts.BLECharacteristic.LPF2_ALL, (data: Buffer) => {
|
|
136
136
|
buf = Buffer.concat([buf, data]);
|
|
137
137
|
while (buf[0] <= buf.length) {
|
|
138
138
|
const len = buf[0];
|
|
@@ -158,6 +158,9 @@ export class PoweredUP extends EventEmitter {
|
|
|
158
158
|
case Consts.BLEManufacturerData.TECHNIC_MEDIUM_HUB_ID:
|
|
159
159
|
resolve(Consts.HubType.TECHNIC_MEDIUM_HUB);
|
|
160
160
|
break;
|
|
161
|
+
case Consts.BLEManufacturerData.MARIO_ID:
|
|
162
|
+
resolve(Consts.HubType.MARIO);
|
|
163
|
+
break;
|
|
161
164
|
}
|
|
162
165
|
debug("Hub type determined");
|
|
163
166
|
} else {
|
package/src/poweredup-node.ts
CHANGED
|
@@ -72,7 +72,6 @@ export class PoweredUP extends EventEmitter {
|
|
|
72
72
|
public async scan () {
|
|
73
73
|
wantScan = true;
|
|
74
74
|
// @ts-ignore
|
|
75
|
-
noble.removeAllListeners();
|
|
76
75
|
noble.on("discover", this._discoveryEventHandler);
|
|
77
76
|
|
|
78
77
|
if (ready) {
|
|
@@ -91,7 +90,6 @@ export class PoweredUP extends EventEmitter {
|
|
|
91
90
|
public stop () {
|
|
92
91
|
wantScan = false;
|
|
93
92
|
// @ts-ignore
|
|
94
|
-
noble.removeAllListeners();
|
|
95
93
|
noble.removeListener("discover", this._discoveryEventHandler);
|
|
96
94
|
noble.stopScanning();
|
|
97
95
|
}
|
package/src/webbleabstraction.ts
CHANGED
|
@@ -85,7 +85,7 @@ export class WebBLEDevice extends EventEmitter implements IBLEAbstraction {
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
|
|
88
|
-
public subscribeToCharacteristic (uuid: string, callback: (data: Buffer) => void) {
|
|
88
|
+
public subscribeToCharacteristic (uuid: string, callback: (data: Buffer) => void): Promise<any> {
|
|
89
89
|
if (this._listeners[uuid]) {
|
|
90
90
|
this._characteristics[uuid].removeEventListener("characteristicvaluechanged", this._listeners[uuid]);
|
|
91
91
|
}
|
|
@@ -108,7 +108,7 @@ export class WebBLEDevice extends EventEmitter implements IBLEAbstraction {
|
|
|
108
108
|
callback(data);
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
this._characteristics[uuid].startNotifications();
|
|
111
|
+
return this._characteristics[uuid].startNotifications();
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# CHANGELOG
|
|
2
|
-
|
|
3
|
-
## v3.4.0 (2020-10-15)
|
|
4
|
-
|
|
5
|
-
* Added a postprocess function option to template config options
|
|
6
|
-
|
|
7
|
-
## 3.3.0
|
|
8
|
-
|
|
9
|
-
* Added support for templates.collapse option. When set to true only the active component\'s members are expanded.
|
|
10
|
-
* Added templates.resources option that takes an object where the keys are the labels and the values are links to external resources.
|
|
11
|
-
* Minor css bugfixes
|
|
12
|
-
|
|
13
|
-
## 3.2.0
|
|
14
|
-
|
|
15
|
-
* Fix issue where all elements would be hidden if no excludePattern is included ([#16] thanks [@mercmobily])
|
|
16
|
-
* Display bullet points in documentation ([#17]) thanks [@mercmobily])
|
|
17
|
-
* Allow `disableSort` to be included in template to prevent automatic sorting of classes and methods ([#15] thanks [@mercmobily])
|
|
18
|
-
|
|
19
|
-
## 3.1.1
|
|
20
|
-
|
|
21
|
-
* Hide hidden modules from members section
|
|
22
|
-
|
|
23
|
-
## 3.1.0
|
|
24
|
-
|
|
25
|
-
* Add anchor tags to examples
|
|
26
|
-
* Increase max-width of sections
|
|
27
|
-
|
|
28
|
-
[@mercmobily]: /mercmobily/
|
|
29
|
-
[#15]: /braintree/jsdoc-template/pull/15
|
|
30
|
-
[#16]: /braintree/jsdoc-template/pull/16
|
|
31
|
-
[#17]: /braintree/jsdoc-template/pull/17
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
## JSDoc 3
|
|
2
|
-
|
|
3
|
-
JSDoc 3 is free software, licensed under the Apache License, Version 2.0 (the
|
|
4
|
-
"License"). Commercial and non-commercial use are permitted in compliance with
|
|
5
|
-
the License.
|
|
6
|
-
|
|
7
|
-
Copyright (c) 2011-2015 Michael Mathews <micmath@gmail.com> and the
|
|
8
|
-
[contributors to JSDoc](https://github.com/jsdoc3/jsdoc/graphs/contributors).
|
|
9
|
-
All rights reserved.
|
|
10
|
-
|
|
11
|
-
You may obtain a copy of the License at:
|
|
12
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
-
|
|
14
|
-
In addition, a copy of the License is included with this distribution.
|
|
15
|
-
|
|
16
|
-
As stated in Section 7, "Disclaimer of Warranty," of the License:
|
|
17
|
-
|
|
18
|
-
> Licensor provides the Work (and each Contributor provides its Contributions)
|
|
19
|
-
> on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
|
20
|
-
> express or implied, including, without limitation, any warranties or
|
|
21
|
-
> conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
22
|
-
> PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
23
|
-
> appropriateness of using or redistributing the Work and assume any risks
|
|
24
|
-
> associated with Your exercise of permissions under this License.
|
|
25
|
-
|
|
26
|
-
The source code for JSDoc 3 is available at:
|
|
27
|
-
https://github.com/jsdoc3/jsdoc
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
# Braintree JSDoc Template
|
|
2
|
-
|
|
3
|
-
A clean, responsive documentation template with search and navigation highlighting for JSDoc 3. Forked from [github.com/nijikokun/minami](https://github.com/nijikokun/minami).
|
|
4
|
-
|
|
5
|
-

|
|
6
|
-
|
|
7
|
-
## Responsive
|
|
8
|
-
|
|
9
|
-

|
|
10
|
-
|
|
11
|
-
## Uses
|
|
12
|
-
|
|
13
|
-
- [the Taffy Database library](http://taffydb.com/)
|
|
14
|
-
- [Underscore Template library](http://documentcloud.github.com/underscore/#template)
|
|
15
|
-
- [Algolia DocSearch](https://community.algolia.com/docsearch/)
|
|
16
|
-
|
|
17
|
-
## Usage
|
|
18
|
-
|
|
19
|
-
Clone repository to your designated `jsdoc` template directory, then:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
### Node.js Dependency
|
|
23
|
-
|
|
24
|
-
In your projects `package.json` file add a generate script:
|
|
25
|
-
|
|
26
|
-
```json
|
|
27
|
-
"script": {
|
|
28
|
-
"generate-docs": "node_modules/.bin/jsdoc --configure .jsdoc.json --verbose"
|
|
29
|
-
}
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
In your `.jsdoc.json` file, add a template option.
|
|
33
|
-
|
|
34
|
-
```json
|
|
35
|
-
"opts": {
|
|
36
|
-
"template": "node_modules/jsdoc-template"
|
|
37
|
-
}
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
### Example JSDoc Config
|
|
41
|
-
|
|
42
|
-
```json
|
|
43
|
-
{
|
|
44
|
-
"tags": {
|
|
45
|
-
"allowUnknownTags": true,
|
|
46
|
-
"dictionaries": ["jsdoc"]
|
|
47
|
-
},
|
|
48
|
-
"source": {
|
|
49
|
-
"include": ["lib", "package.json", "README.md"],
|
|
50
|
-
"includePattern": ".js$",
|
|
51
|
-
"excludePattern": "(node_modules/|docs)"
|
|
52
|
-
},
|
|
53
|
-
"plugins": [
|
|
54
|
-
"plugins/markdown"
|
|
55
|
-
],
|
|
56
|
-
"templates": {
|
|
57
|
-
"referenceTitle": "My SDK Name",
|
|
58
|
-
"disableSort": false,
|
|
59
|
-
"collapse": true,
|
|
60
|
-
"resources": {
|
|
61
|
-
"google": "https://www.google.com/"
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
"opts": {
|
|
65
|
-
"destination": "./docs/",
|
|
66
|
-
"encoding": "utf8",
|
|
67
|
-
"private": true,
|
|
68
|
-
"recurse": true,
|
|
69
|
-
"template": "./node_modules/jsdoc-template"
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
Note: `referenceTitle` and `disableSort` will affect the output of this theme.
|
|
75
|
-
|
|
76
|
-
If you would like to enable [Algolia DocSearch](https://community.algolia.com/docsearch/), you can pass a `search` object into the `templates` object.
|
|
77
|
-
|
|
78
|
-
```json
|
|
79
|
-
"templates": {
|
|
80
|
-
"search": {
|
|
81
|
-
"apiKey": "your-api-key",
|
|
82
|
-
"indexName": "Your index name. Defaults to braintree.",
|
|
83
|
-
"hitsPerPage": "Number of Results to show. Defaults to 7.",
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
## License
|
|
89
|
-
|
|
90
|
-
Licensed under the Apache2 license.
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "jsdoc-template",
|
|
3
|
-
"version": "3.4.0",
|
|
4
|
-
"description": "Braintree JSDoc 3 Template",
|
|
5
|
-
"main": "publish.js",
|
|
6
|
-
"files": [
|
|
7
|
-
"static",
|
|
8
|
-
"tmpl",
|
|
9
|
-
"publish.js",
|
|
10
|
-
"CHANGELOG.md",
|
|
11
|
-
"LICENSE",
|
|
12
|
-
"README.md"
|
|
13
|
-
],
|
|
14
|
-
"scripts": {
|
|
15
|
-
"lint": "eslint .",
|
|
16
|
-
"test": "npm run lint",
|
|
17
|
-
"preversion": "./scripts/preversion"
|
|
18
|
-
},
|
|
19
|
-
"repository": {
|
|
20
|
-
"type": "git",
|
|
21
|
-
"url": "https://github.com/braintree/jsdoc-template"
|
|
22
|
-
},
|
|
23
|
-
"author": "Braintreeps <code@getbraintree.com>",
|
|
24
|
-
"licenses": [
|
|
25
|
-
{
|
|
26
|
-
"type": "Apache-2.0",
|
|
27
|
-
"url": "http://www.apache.org/licenses/LICENSE-2.0"
|
|
28
|
-
}
|
|
29
|
-
],
|
|
30
|
-
"bugs": {
|
|
31
|
-
"url": "https://github.com/braintree/jsdoc-template"
|
|
32
|
-
},
|
|
33
|
-
"homepage": "https://github.com/braintree/jsdoc-template",
|
|
34
|
-
"devDependencies": {
|
|
35
|
-
"eslint": "^7.4.0",
|
|
36
|
-
"eslint-config-braintree": "^4.0.0",
|
|
37
|
-
"taffydb": "^2.7.3"
|
|
38
|
-
}
|
|
39
|
-
}
|