mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-03-14 01:09:51 -04:00
Adding callback back to battery read to fix clearing the characteristicChanged callback by accident.
This commit is contained in:
parent
d7b6cfae97
commit
e4b82aeaef
2 changed files with 4 additions and 2 deletions
|
@ -787,7 +787,9 @@ class WeDo2 {
|
|||
_checkBatteryLevel () {
|
||||
this._ble.read(
|
||||
BLEService.DEVICE_SERVICE,
|
||||
BLECharacteristic.LOW_VOLTAGE_ALERT
|
||||
BLECharacteristic.LOW_VOLTAGE_ALERT,
|
||||
false,
|
||||
this._onMessage
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ class BLE extends JSONRPCWebSocket {
|
|||
if (this._discoverTimeoutID) {
|
||||
window.clearTimeout(this._discoverTimeoutID);
|
||||
}
|
||||
|
||||
|
||||
this._runtime.emit(this._runtime.constructor.PERIPHERAL_DISCONNECT);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue