Skip to content

Commit 90e882f

Browse files
authored
Merge pull request #37 from bluemaex/update-deps
Update dependencies for node 8
2 parents f1c580f + 2a88b32 commit 90e882f

7 files changed

+22
-25
lines changed

dmx-web.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
var fs = require('fs')
55
var http = require('http')
6-
var connect = require('connect')
6+
var body = require('body-parser')
77
var express = require('express')
88
var socketio = require('socket.io')
99
var program = require('commander')
@@ -48,14 +48,11 @@ function DMXWeb() {
4848
}
4949
}
5050
})
51-
io.set('log level', 1)
5251

53-
app.configure(function() {
54-
app.use(connect.json())
55-
})
52+
app.use(body.json())
5653

5754
app.get('/', function(req, res) {
58-
res.sendfile(__dirname + '/index.html')
55+
res.sendFile(__dirname + '/index.html')
5956
})
6057

6158
app.get('/config', function(req, res) {
@@ -75,7 +72,7 @@ function DMXWeb() {
7572

7673
res.json({"state": dmx.universeToObject(req.params.universe)})
7774
})
78-
75+
7976
app.post('/state/:universe', function(req, res) {
8077
if(!(req.params.universe in dmx.universes)) {
8178
res.status(404).json({"error": "universe not found"})

drivers/dmx4all.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function DMX4ALL(device_id, options) {
1111
this.universe.fill(0)
1212

1313
this.dev = new SerialPort(device_id, {
14-
'baudrate': 38400,
14+
'baudRate': 38400,
1515
'databits': 8,
1616
'stopbits': 1,
1717
'parity': 'none'
@@ -26,7 +26,7 @@ function DMX4ALL(device_id, options) {
2626
}
2727

2828
DMX4ALL.prototype.send_universe = function() {
29-
if(!this.dev.isOpen()) {
29+
if(!this.dev.writable) {
3030
return
3131
}
3232

@@ -64,4 +64,4 @@ DMX4ALL.prototype.get = function(c) {
6464
return this.universe[c]
6565
}
6666

67-
module.exports = DMX4ALL
67+
module.exports = DMX4ALL

drivers/dmxking-ultra-dmx-pro.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function DMXKingUltraDMXPro(device_id, options) {
2525
}
2626

2727
this.dev = new SerialPort(device_id, {
28-
'baudrate': 250000,
28+
'baudRate': 250000,
2929
'databits': 8,
3030
'stopbits': 2,
3131
'parity': 'none'
@@ -37,7 +37,7 @@ function DMXKingUltraDMXPro(device_id, options) {
3737
}
3838

3939
DMXKingUltraDMXPro.prototype.send_universe = function() {
40-
if(!this.dev.isOpen()) {
40+
if(!this.dev.writable) {
4141
return
4242
}
4343
var hdr = Buffer([
@@ -81,4 +81,4 @@ DMXKingUltraDMXPro.prototype.get = function(c) {
8181
return this.universe[c]
8282
}
8383

84-
module.exports = DMXKingUltraDMXPro
84+
module.exports = DMXKingUltraDMXPro

drivers/enttec-open-usb-dmx.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function EnttecOpenUsbDMX(device_id, options) {
1212
self.interval = 46
1313

1414
this.dev = new SerialPort(device_id, {
15-
'baudrate': 250000,
15+
'baudRate': 250000,
1616
'databits': 8,
1717
'stopbits': 2,
1818
'parity': 'none'
@@ -27,7 +27,7 @@ function EnttecOpenUsbDMX(device_id, options) {
2727

2828
EnttecOpenUsbDMX.prototype.send_universe = function() {
2929
var self = this
30-
if(!this.dev.isOpen()) {
30+
if(!this.dev.writable) {
3131
return
3232
}
3333

drivers/enttec-usb-dmx-pro.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function EnttecUSBDMXPRO(device_id, options) {
1616
this.universe.fill(0)
1717

1818
this.dev = new SerialPort(device_id, {
19-
'baudrate': 250000,
19+
'baudRate': 250000,
2020
'databits': 8,
2121
'stopbits': 2,
2222
'parity': 'none'
@@ -28,7 +28,7 @@ function EnttecUSBDMXPRO(device_id, options) {
2828
}
2929

3030
EnttecUSBDMXPRO.prototype.send_universe = function() {
31-
if(!this.dev.isOpen()) {
31+
if(!this.dev.writable) {
3232
return
3333
}
3434
var hdr = Buffer([
@@ -72,4 +72,4 @@ EnttecUSBDMXPRO.prototype.get = function(c) {
7272
return this.universe[c]
7373
}
7474

75-
module.exports = EnttecUSBDMXPRO
75+
module.exports = EnttecUSBDMXPRO

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
return 'channel_' + universe + '_' + channel;
5757
}
5858

59-
var socket = io.connect();
59+
var socket = io();
6060
socket.on('init', function (msg) {
6161
$('#presets').empty();
6262
$('#sliders').empty();

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dmx",
3-
"version": "0.0.5",
3+
"version": "0.0.6",
44
"author": "Sebastian Wiedenroth <wiedi@frubar.net>",
55
"description": "DMX library and webservice",
66
"url": "https://github.com/wiedi/node-dmx",
@@ -17,11 +17,11 @@
1717
"light control"
1818
],
1919
"dependencies": {
20-
"serialport": "4.0.x",
21-
"socket.io": "0.9.x",
22-
"connect": "2.11.x",
23-
"express": "3.4.x",
24-
"commander": "2.0.x"
20+
"serialport": "^6.0.4",
21+
"socket.io": "^2.0.4",
22+
"express": "^4.16.2",
23+
"body-parser": "^1.5.2",
24+
"commander": "^2.12.2"
2525
},
2626
"licenses": [
2727
{

0 commit comments

Comments
 (0)