Feature/critical extension fixes ()

* Resolves - Turning micro bit power off doesn't disconnect microbit .

* Resolves EV3 motor block causes distance to return 0 .

* Fixing linting.

* Tweak micro:bit auto-disconnect timeout.
This commit is contained in:
Evelyn Eastmond 2018-07-24 17:08:48 +02:00 committed by Eric Rosenbaum
parent dc612fb4a1
commit 6444cf071d
4 changed files with 26 additions and 6 deletions

View file

@ -1,5 +1,5 @@
const JSONRPCWebSocket = require('../util/jsonrpc-web-socket');
const log = require('../util/log');
// const log = require('../util/log');
const ScratchLinkWebSocket = 'wss://device-manager.scratch.mit.edu:20110/scratch/ble';
class BLESession extends JSONRPCWebSocket {
@ -144,9 +144,9 @@ class BLESession extends JSONRPCWebSocket {
});
}
_sendError (e) {
_sendError (/* e */) {
this._connected = false;
log.error(`BLESession error: ${JSON.stringify(e)}`);
// log.error(`BLESession error: ${JSON.stringify(e)}`);
this._runtime.emit(this._runtime.constructor.PERIPHERAL_ERROR);
}