Cleanup options workaround

This commit is contained in:
Moritz Hoffmann 2016-11-18 02:54:30 +01:00
parent 7be968808e
commit 9cd301711b

View file

@ -8,11 +8,7 @@ function BBDMX(device_id, options) {
self.universe = new Buffer(512); self.universe = new Buffer(512);
self.universe.fill(0); self.universe.fill(0);
self.host = device_id || '127.0.0.1'; self.host = device_id || '127.0.0.1';
if (typeof options === 'undefined') { self.port = self.options.port || 9930;
self.port = 9930;
} else {
self.port = options.port || 9930;
}
self.dev = dgram.createSocket('udp4'); self.dev = dgram.createSocket('udp4');
self.sleepTime = 24; self.sleepTime = 24;
self.start(); self.start();