Fixed Technic Control+ hub when used with web bluetooth
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
Nathan Kellenicki 2019-08-09 10:18:20 -07:00
parent 17a64c51dd
commit 9a9d3ee4d5
26 changed files with 32 additions and 27 deletions

View File

@ -6722,7 +6722,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Wed Aug 7th 2019
on Fri Aug 9th 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -6722,7 +6722,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Wed Aug 7th 2019
on Fri Aug 9th 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -5966,7 +5966,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Wed Aug 7th 2019
on Fri Aug 9th 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -2586,7 +2586,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Wed Aug 7th 2019
on Fri Aug 9th 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -4968,7 +4968,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Wed Aug 7th 2019
on Fri Aug 9th 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -6722,7 +6722,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Wed Aug 7th 2019
on Fri Aug 9th 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -5163,7 +5163,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Wed Aug 7th 2019
on Fri Aug 9th 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -1021,7 +1021,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Wed Aug 7th 2019
on Fri Aug 9th 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -5286,7 +5286,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Wed Aug 7th 2019
on Fri Aug 9th 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -418,7 +418,7 @@ exports.BoostMoveHub = BoostMoveHub;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Wed Aug 7th 2019
on Fri Aug 9th 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -13677,7 +13677,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Wed Aug 7th 2019
on Fri Aug 9th 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -307,7 +307,7 @@ var BLECharacteristic;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Wed Aug 7th 2019
on Fri Aug 9th 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -408,7 +408,7 @@ exports.ControlPlusHub = ControlPlusHub;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Wed Aug 7th 2019
on Fri Aug 9th 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -271,7 +271,7 @@ exports.DuploTrainBase = DuploTrainBase;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Wed Aug 7th 2019
on Fri Aug 9th 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -3416,7 +3416,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Wed Aug 7th 2019
on Fri Aug 9th 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -462,7 +462,7 @@ exports.Hub = Hub;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Wed Aug 7th 2019
on Fri Aug 9th 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -360,7 +360,7 @@ console.log(&quot;Scanning for Hubs...&quot;);
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Wed Aug 7th 2019
on Fri Aug 9th 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -659,7 +659,7 @@ exports.LPF2Hub = LPF2Hub;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Wed Aug 7th 2019
on Fri Aug 9th 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -273,7 +273,7 @@ exports.PoweredUP = PoweredUP;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Wed Aug 7th 2019
on Fri Aug 9th 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -412,7 +412,7 @@ exports.PUPHub = PUPHub;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Wed Aug 7th 2019
on Fri Aug 9th 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -209,7 +209,7 @@ exports.PUPRemote = PUPRemote;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Wed Aug 7th 2019
on Fri Aug 9th 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -546,7 +546,7 @@ exports.WeDo2SmartHub = WeDo2SmartHub;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a>
on Wed Aug 7th 2019
on Fri Aug 9th 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -1,6 +1,6 @@
{
"name": "node-poweredup",
"version": "3.5.0",
"version": "3.5.1",
"description": "A Javascript module to interface with LEGO Powered Up components.",
"homepage": "https://github.com/nathankellenicki/node-poweredup/",
"main": "dist/node/index-node.js",

View File

@ -1,5 +1,7 @@
import { BoostMoveHub } from "./boostmovehub";
import * as Consts from "./consts";
import { BoostMoveHub } from "./boostmovehub";
import { ControlPlusHub } from "./controlplushub";
import { DuploTrainBase } from "./duplotrainbase";
import { Hub } from "./hub";
import { PoweredUP } from "./poweredup-browser";
@ -10,4 +12,4 @@ import { WeDo2SmartHub } from "./wedo2smarthub";
import { isWebBluetooth } from "./utils";
// @ts-ignore
window.PoweredUP = { PoweredUP, Hub, WeDo2SmartHub, BoostMoveHub, PUPHub, PUPRemote, DuploTrainBase, Consts, isWebBluetooth };
window.PoweredUP = { PoweredUP, Hub, WeDo2SmartHub, BoostMoveHub, ControlPlusHub, PUPHub, PUPRemote, DuploTrainBase, Consts, isWebBluetooth };

View File

@ -1,5 +1,7 @@
import { BoostMoveHub } from "./boostmovehub";
import * as Consts from "./consts";
import { BoostMoveHub } from "./boostmovehub";
import { ControlPlusHub } from "./controlplushub";
import { DuploTrainBase } from "./duplotrainbase";
import { Hub } from "./hub";
import { PoweredUP } from "./poweredup-node";
@ -10,4 +12,4 @@ import { WeDo2SmartHub } from "./wedo2smarthub";
import { isWebBluetooth } from "./utils";
export default PoweredUP;
export { PoweredUP, Hub, WeDo2SmartHub, BoostMoveHub, PUPHub, PUPRemote, DuploTrainBase, Consts, isWebBluetooth };
export { PoweredUP, Hub, WeDo2SmartHub, BoostMoveHub, ControlPlusHub, PUPHub, PUPRemote, DuploTrainBase, Consts, isWebBluetooth };

View File

@ -189,6 +189,7 @@ export class PoweredUP extends EventEmitter {
break;
case Consts.HubType.CONTROL_PLUS_HUB:
hub = new ControlPlusHub(device, this.autoSubscribe);
break;
default:
return;
}