more untested open usb dmx fixes

This commit is contained in:
Sebastian Wiedenroth 2016-06-02 21:28:23 +02:00
parent 9a34f3de30
commit e3f52f9968

View file

@ -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})
})
}