Change microbit extension to send BLE socket error on data lost, instead of calling disconnect directly.

This commit is contained in:
Evelyn Eastmond 2018-11-18 13:31:37 -05:00
parent fab292889f
commit fdda1e53e3
5 changed files with 21 additions and 6 deletions

View file

@ -579,6 +579,7 @@ class EV3 {
* Called by the runtime when user wants to disconnect from the EV3 peripheral.
*/
disconnect () {
console.log('EV3 DISCONNECT');
this._clearSensorsAndMotors();
window.clearInterval(this._pollingIntervalID);
this._pollingIntervalID = null;