noble / noble-device

A Node.js lib to abstract BLE (Bluetooth Low Energy) peripherals, uses noble
MIT License
97 stars 66 forks source link

Make the callback optional on writeDataCharacteristics #5

Closed bbx10 closed 9 years ago

bbx10 commented 9 years ago

@sandeepmistry

firmata sometimes calls the function write(data) without a callback parameter. The node-nRF8001 module handles this case by creating a dummy callback function and passing it on to writeDataCharacteristics. This change lets writeDataCharacteristics handle an optional callback so the nrfuart module can stop creating dummy callback functions.

sandeepmistry commented 9 years ago

@bbx10 thanks!

I'll also apply something similar to the notify API ...

bbx10 commented 9 years ago

@sandeepmistry

I will give it a try now.

bbx10 commented 9 years ago

@sandeepmistry

The latest commit works fine so please publish whenever convenient for you. I will publish shortlly after.

Thanks!

sandeepmistry commented 9 years ago

@bbx10 great! Just published version 0.1.3 of noble-device with your changes included :)

bbx10 commented 9 years ago

@sandeepmistry

I published nrfuart 0.0.2 but I accidentally included some extraneous files. I am sure there will be some bugs so I will remove them later in another fix.

Thanks for all your help!

sandeepmistry commented 9 years ago

@bbx10 nice work!

Feel free to send me an email if you have any node.js/JavaScript related questions, I'll try my best to help out ...