Adding extension ids to customize error alerts for extensions.

This commit is contained in:
Evelyn Eastmond 2018-09-22 14:48:41 -04:00
parent ad3328197e
commit 3c905503b7
5 changed files with 20 additions and 13 deletions

View file

@ -408,6 +408,11 @@ class EV3 {
this._runtime = runtime;
this._runtime.on('PROJECT_STOP_ALL', this.stopAll.bind(this));
/**
* The id of the extension this peripheral belongs to.
*/
this._extensionId = extensionId;
/**
* A list of the names of the sensors connected in ports 1,2,3,4.
* @type {string[]}
@ -548,7 +553,7 @@ class EV3 {
* Called by the runtime when user wants to scan for an EV3 peripheral.
*/
scan () {
this._bt = new BT(this._runtime, 'EV3', {
this._bt = new BT(this._runtime, this._extensionId, {
majorDeviceClass: 8,
minorDeviceClass: 1
}, this._onConnect, this._onMessage);