EV3/Microbit critical fixes for code freeze ()

* Resolves - BLESession and BTSession should emit PERIPHERAL_SCAN_TIMEOUT .

* Resolves - BLESession should handle 'could not find service' error .

* Resolves - BTSession should handle 'no peripheral connected' error .

* Fixing a typo that caused device scan timeout bugs.

* Resolves - Add casting and clamping throughout the EV3 extension .

* Fixing a linting error.

* Further fixes for issue .
This commit is contained in:
Evelyn Eastmond 2018-07-17 16:03:06 -04:00 committed by Eric Rosenbaum
parent 1dcdfc9548
commit c4ee7065a2
6 changed files with 117 additions and 46 deletions
src/engine

View file

@ -428,6 +428,14 @@ class Runtime extends EventEmitter {
return 'PERIPHERAL_ERROR';
}
/**
* Event name for reporting that a peripheral has not been discovered.
* @const {string}
*/
static get PERIPHERAL_SCAN_TIMEOUT () {
return 'PERIPHERAL_SCAN_TIMEOUT';
}
/**
* Event name for reporting that blocksInfo was updated.
* @const {string}