From e3f52f99680d3aaec51ed9ffe2aab54be84d3198 Mon Sep 17 00:00:00 2001 From: Sebastian Wiedenroth Date: Thu, 2 Jun 2016 21:28:23 +0200 Subject: [PATCH] more untested open usb dmx fixes --- drivers/enttec-open-usb-dmx.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/enttec-open-usb-dmx.js b/drivers/enttec-open-usb-dmx.js index cbcee6d..fdb59e6 100644 --- a/drivers/enttec-open-usb-dmx.js +++ b/drivers/enttec-open-usb-dmx.js @@ -24,6 +24,7 @@ function EnttecOpenUsbDMX(device_id, options) { } EnttecOpenUsbDMX.prototype.send_universe = function() { + var self = this if(!this.dev.isOpen()) { return } @@ -31,8 +32,8 @@ EnttecOpenUsbDMX.prototype.send_universe = function() { this.dev.write(this.universe) // toggle break - this.dev.set({brk: true}, function(err, r) { - this.dev.set({brk: false}) + self.dev.set({brk: true}, function(err, r) { + self.dev.set({brk: false}) }) }