diff --git a/src/blocks/scratch3_wedo2.js b/src/blocks/scratch3_wedo2.js index bc0750f56..5e0dc183b 100644 --- a/src/blocks/scratch3_wedo2.js +++ b/src/blocks/scratch3_wedo2.js @@ -373,9 +373,9 @@ const TiltDirection = { class Scratch3WeDo2Blocks { /** - * @return {string} - the name of this extension. + * @return {string} - the ID of this extension. */ - static get EXTENSION_NAME () { + static get EXTENSION_ID () { return 'wedo2'; } @@ -397,7 +397,7 @@ class Scratch3WeDo2Blocks { */ this.runtime = runtime; - this.runtime.HACK_WeDo2Blocks = this; + this.connect(); } /** @@ -405,7 +405,7 @@ class Scratch3WeDo2Blocks { */ getInfo () { return { - id: 'wedo2', + id: Scratch3WeDo2Blocks.EXTENSION_ID, name: 'WeDo 2.0', blocks: [ { @@ -586,7 +586,7 @@ class Scratch3WeDo2Blocks { } const deviceManager = this.runtime.ioDevices.deviceManager; const finder = this._finder = - deviceManager.searchAndConnect(Scratch3WeDo2Blocks.EXTENSION_NAME, WeDo2.DEVICE_TYPE); + deviceManager.searchAndConnect(Scratch3WeDo2Blocks.EXTENSION_ID, WeDo2.DEVICE_TYPE); this._finder.promise.then( socket => { if (this._finder === finder) { diff --git a/src/engine/runtime.js b/src/engine/runtime.js index c2ae3b3e1..dc76452b7 100644 --- a/src/engine/runtime.js +++ b/src/engine/runtime.js @@ -23,8 +23,7 @@ const defaultBlockPackages = { scratch3_sound: require('../blocks/scratch3_sound'), scratch3_sensing: require('../blocks/scratch3_sensing'), scratch3_data: require('../blocks/scratch3_data'), - scratch3_procedures: require('../blocks/scratch3_procedures'), - scratch3_wedo2: require('../blocks/scratch3_wedo2') + scratch3_procedures: require('../blocks/scratch3_procedures') }; /**