device.connectGATT() deprecated. No need for notification callback handler in writeMode().

This commit is contained in:
Michael Dietz
2016-02-23 10:09:08 +01:00
parent 2dbbbb1378
commit 9dcd9ad046

7
dist/dfu.js vendored
View File

@@ -130,7 +130,6 @@
}) })
.then(() => { .then(() => {
log("writing modeData"); log("writing modeData");
controlChar.addEventListener('characteristicvaluechanged', handleNotifications);
return controlChar.writeValue(new Uint8Array([1, 4])); return controlChar.writeValue(new Uint8Array([1, 4]));
}) })
.then(() => { .then(() => {
@@ -142,10 +141,6 @@
log(error); log(error);
reject(error); reject(error);
}); });
function handleNotifications(event) {
log('received notification on control characteristic - ERROR this should not happen');
}
}); });
} }
@@ -217,7 +212,7 @@
}); });
} }
device.connectGATT() device.gatt.connect()
.then(gattServer => { .then(gattServer => {
// Connected // Connected
server = gattServer; server = gattServer;