BluetoothLE-Examples icon indicating copy to clipboard operation
BluetoothLE-Examples copied to clipboard

write() method in ble-uart example loses bytes

Open chrisbartley opened this issue 7 years ago • 0 comments

Line 197, where you slice data, which reads:

var output = data.slice(0, 19);

...should instead read:

var output = data.slice(0, 20);

because the endIndex for slice() is exclusive.

https://github.com/tigoe/BluetoothLE-Examples/blob/976148f7b7b4ab3f70886c8978da614fd20da659/noble/readSerial/ble-uart.js#L197

chrisbartley avatar Jul 03 '18 14:07 chrisbartley