From 4d75f7776c9f555ebf433743d98d42cbf819f946 Mon Sep 17 00:00:00 2001 From: Valerie Young Date: Mon, 7 Jan 2019 18:09:23 -0500 Subject: [PATCH] Remove the onClose skeletons --- src/extensions/scratch3_gdx_for/index.js | 6 ------ .../scratch3_gdx_for/scratch-link-device-adapter.js | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/extensions/scratch3_gdx_for/index.js b/src/extensions/scratch3_gdx_for/index.js index d23c9340f..50026da19 100644 --- a/src/extensions/scratch3_gdx_for/index.js +++ b/src/extensions/scratch3_gdx_for/index.js @@ -144,7 +144,6 @@ class GdxFor { const adapter = new ScratchLinkDeviceAdapter(this._scratchLinkSocket); createDevice(adapter, {open: true, startMeasurements: false}).then(device => { this._device = device; - this._device.on('device-closed', this._onClose); this._startMeasurements(); }); } @@ -214,11 +213,6 @@ class GdxFor { } return 0; } - - - _onClose () { - this._scratchLinkSocket.disconnect(); - } } /** diff --git a/src/extensions/scratch3_gdx_for/scratch-link-device-adapter.js b/src/extensions/scratch3_gdx_for/scratch-link-device-adapter.js index e3d8beb2a..15083544a 100644 --- a/src/extensions/scratch3_gdx_for/scratch-link-device-adapter.js +++ b/src/extensions/scratch3_gdx_for/scratch-link-device-adapter.js @@ -33,7 +33,7 @@ class ScratchLinkDeviceAdapter { .write(BLEUUID.service, BLEUUID.commandChar, data, 'base64', true); } - setup ({onClosed, onResponse}) { + setup ({onResponse}) { this._deviceOnResponse = onResponse; return this.scratchLinkNativeDevice .startNotifications(BLEUUID.service, BLEUUID.responseChar, this._onResponse);