Remove space after command

This commit is contained in:
Moritz Hoffmann 2016-11-18 03:31:43 +01:00
parent 85a26af9b4
commit b0d61fa041

View file

@ -15,10 +15,10 @@ function BBDMX(device_id, options) {
} }
BBDMX.prototype.send_universe = function() { BBDMX.prototype.send_universe = function() {
let messageBuffer = new Buffer(this.universe.length + ' '); let messageBuffer = new Buffer(this.universe.length.toString());
for (let i = 0; i < this.universe.length; i++) { for (let i = 0; i < this.universe.length; i++) {
const channel = new Buffer(this.universe[i] + ' '); const channel = new Buffer(' ' + this.universe[i]);
const length = channel.length + messageBuffer.length; const length = channel.length + messageBuffer.length;
messageBuffer = Buffer.concat([messageBuffer, channel], length); messageBuffer = Buffer.concat([messageBuffer, channel], length);
} }