update dependencies

This commit is contained in:
Max Stockner 2018-01-10 21:28:44 +01:00
parent f1c580f49b
commit 8b20123dca
7 changed files with 21 additions and 24 deletions

View file

@ -3,7 +3,7 @@
var fs = require('fs')
var http = require('http')
var connect = require('connect')
var body = require('body-parser')
var express = require('express')
var socketio = require('socket.io')
var program = require('commander')
@ -48,14 +48,11 @@ function DMXWeb() {
}
}
})
io.set('log level', 1)
app.configure(function() {
app.use(connect.json())
})
app.use(body.json())
app.get('/', function(req, res) {
res.sendfile(__dirname + '/index.html')
res.sendFile(__dirname + '/index.html')
})
app.get('/config', function(req, res) {
@ -75,7 +72,7 @@ function DMXWeb() {
res.json({"state": dmx.universeToObject(req.params.universe)})
})
app.post('/state/:universe', function(req, res) {
if(!(req.params.universe in dmx.universes)) {
res.status(404).json({"error": "universe not found"})

View file

@ -11,7 +11,7 @@ function DMX4ALL(device_id, options) {
this.universe.fill(0)
this.dev = new SerialPort(device_id, {
'baudrate': 38400,
'baudRate': 38400,
'databits': 8,
'stopbits': 1,
'parity': 'none'
@ -26,7 +26,7 @@ function DMX4ALL(device_id, options) {
}
DMX4ALL.prototype.send_universe = function() {
if(!this.dev.isOpen()) {
if(!this.dev.writable) {
return
}
@ -64,4 +64,4 @@ DMX4ALL.prototype.get = function(c) {
return this.universe[c]
}
module.exports = DMX4ALL
module.exports = DMX4ALL

View file

@ -25,7 +25,7 @@ function DMXKingUltraDMXPro(device_id, options) {
}
this.dev = new SerialPort(device_id, {
'baudrate': 250000,
'baudRate': 250000,
'databits': 8,
'stopbits': 2,
'parity': 'none'
@ -37,7 +37,7 @@ function DMXKingUltraDMXPro(device_id, options) {
}
DMXKingUltraDMXPro.prototype.send_universe = function() {
if(!this.dev.isOpen()) {
if(!this.dev.writable) {
return
}
var hdr = Buffer([
@ -81,4 +81,4 @@ DMXKingUltraDMXPro.prototype.get = function(c) {
return this.universe[c]
}
module.exports = DMXKingUltraDMXPro
module.exports = DMXKingUltraDMXPro

View file

@ -12,7 +12,7 @@ function EnttecOpenUsbDMX(device_id, options) {
self.interval = 46
this.dev = new SerialPort(device_id, {
'baudrate': 250000,
'baudRate': 250000,
'databits': 8,
'stopbits': 2,
'parity': 'none'
@ -27,7 +27,7 @@ function EnttecOpenUsbDMX(device_id, options) {
EnttecOpenUsbDMX.prototype.send_universe = function() {
var self = this
if(!this.dev.isOpen()) {
if(!this.dev.writable) {
return
}

View file

@ -16,7 +16,7 @@ function EnttecUSBDMXPRO(device_id, options) {
this.universe.fill(0)
this.dev = new SerialPort(device_id, {
'baudrate': 250000,
'baudRate': 250000,
'databits': 8,
'stopbits': 2,
'parity': 'none'
@ -28,7 +28,7 @@ function EnttecUSBDMXPRO(device_id, options) {
}
EnttecUSBDMXPRO.prototype.send_universe = function() {
if(!this.dev.isOpen()) {
if(!this.dev.writable) {
return
}
var hdr = Buffer([
@ -72,4 +72,4 @@ EnttecUSBDMXPRO.prototype.get = function(c) {
return this.universe[c]
}
module.exports = EnttecUSBDMXPRO
module.exports = EnttecUSBDMXPRO

View file

@ -56,7 +56,7 @@
return 'channel_' + universe + '_' + channel;
}
var socket = io.connect();
var socket = io();
socket.on('init', function (msg) {
$('#presets').empty();
$('#sliders').empty();

View file

@ -17,11 +17,11 @@
"light control"
],
"dependencies": {
"serialport": "4.0.x",
"socket.io": "0.9.x",
"connect": "2.11.x",
"express": "3.4.x",
"commander": "2.0.x"
"serialport": "^6.0.4",
"socket.io": "^2.0.4",
"express": "^4.16.2",
"body-parser": "^1.5.2",
"commander": "^2.12.2"
},
"licenses": [
{