mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-25 07:22:33 -05:00
Remove the onClose skeletons
This commit is contained in:
parent
4529533aa8
commit
4d75f7776c
2 changed files with 1 additions and 7 deletions
|
@ -144,7 +144,6 @@ class GdxFor {
|
||||||
const adapter = new ScratchLinkDeviceAdapter(this._scratchLinkSocket);
|
const adapter = new ScratchLinkDeviceAdapter(this._scratchLinkSocket);
|
||||||
createDevice(adapter, {open: true, startMeasurements: false}).then(device => {
|
createDevice(adapter, {open: true, startMeasurements: false}).then(device => {
|
||||||
this._device = device;
|
this._device = device;
|
||||||
this._device.on('device-closed', this._onClose);
|
|
||||||
this._startMeasurements();
|
this._startMeasurements();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -214,11 +213,6 @@ class GdxFor {
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
_onClose () {
|
|
||||||
this._scratchLinkSocket.disconnect();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -33,7 +33,7 @@ class ScratchLinkDeviceAdapter {
|
||||||
.write(BLEUUID.service, BLEUUID.commandChar, data, 'base64', true);
|
.write(BLEUUID.service, BLEUUID.commandChar, data, 'base64', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
setup ({onClosed, onResponse}) {
|
setup ({onResponse}) {
|
||||||
this._deviceOnResponse = onResponse;
|
this._deviceOnResponse = onResponse;
|
||||||
return this.scratchLinkNativeDevice
|
return this.scratchLinkNativeDevice
|
||||||
.startNotifications(BLEUUID.service, BLEUUID.responseChar, this._onResponse);
|
.startNotifications(BLEUUID.service, BLEUUID.responseChar, this._onResponse);
|
||||||
|
|
Loading…
Reference in a new issue