diff --git a/js/msp.js b/js/msp.js index ebb869c3..00a2b68b 100644 --- a/js/msp.js +++ b/js/msp.js @@ -868,7 +868,7 @@ var MSP = { // always send messages with data payload (even when there is a message already in the queue) if (data || !requestExists) { serial.send(bufferOut, function (sendInfo) { - if (sendInfo.bytesSent == bufferOut.length) { + if (sendInfo.bytesSent == bufferOut.byteLength) { if (callback_sent) callback_sent(); } });