mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 14:32:59 -05:00
Fixing #1504: WeDo2: Distance sensor not being cleared on device disconnect.
This commit is contained in:
parent
3659973101
commit
f4e9212249
1 changed files with 8 additions and 1 deletions
|
@ -479,7 +479,14 @@ class WeDo2 {
|
||||||
*/
|
*/
|
||||||
// TODO: rename disconnect?
|
// TODO: rename disconnect?
|
||||||
disconnectSession () {
|
disconnectSession () {
|
||||||
// window.clearInterval(this._timeoutID);
|
this._ports = ['none', 'none'];
|
||||||
|
this._motors = [null, null];
|
||||||
|
this._sensors = {
|
||||||
|
tiltX: 0,
|
||||||
|
tiltY: 0,
|
||||||
|
distance: 0
|
||||||
|
};
|
||||||
|
|
||||||
this._ble.disconnectSession();
|
this._ble.disconnectSession();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue