mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-08-28 22:30:40 -04:00
Adding extension ids to customize error alerts for extensions.
This commit is contained in:
parent
ad3328197e
commit
3c905503b7
5 changed files with 20 additions and 13 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue