mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 14:32:59 -05:00
Add userDidPickPeripheral to bt
This commit is contained in:
parent
f19fd83563
commit
87cb4a7ef0
1 changed files with 10 additions and 2 deletions
12
src/io/bt.js
12
src/io/bt.js
|
@ -128,9 +128,17 @@ class BT extends JSONRPC {
|
|||
window.clearTimeout(this._discoverTimeoutID);
|
||||
}
|
||||
break;
|
||||
//TODO why isn't 'user did pick peripheral' here?
|
||||
case 'userDidPickPeripheral':
|
||||
this._availablePeripherals[params.peripheralId] = params;
|
||||
this._runtime.emit(
|
||||
this._runtime.constructor.USER_PICKED_PERIPHERAL,
|
||||
this._availablePeripherals
|
||||
);
|
||||
if (this._discoverTimeoutID) {
|
||||
window.clearTimeout(this._discoverTimeoutID);
|
||||
}
|
||||
break;
|
||||
case 'userDidNotPickPeripheral':
|
||||
// this._availablePeripherals[params.peripheralId] = params;
|
||||
this._runtime.emit(
|
||||
this._runtime.constructor.PERIPHERAL_SCAN_TIMEOUT
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue