1
0

Updates - node v7 compatible now

This commit is contained in:
Lukas Bachschwell 2016-11-08 17:51:12 +01:00
parent 33de2725f8
commit d8be9e5ffc
3 changed files with 5 additions and 6 deletions

View File

@ -160,8 +160,9 @@ body {
<div id="debugOut"> </div> <div id="debugOut"> </div>
</div> </div>
</div> </div>
<div id="footer"> <!-- <div id="footer">
<h2>Send an SMS with a message to <span class="number" style="color:#3399ff;"></span></h2> <h2>Send an SMS with a message to <span class="number" style="color:#3399ff;"></span></h2>
</div> </div>
-->
</body> </body>
</html> </html>

View File

@ -6,7 +6,7 @@
"dependencies": { "dependencies": {
"emojize": "^0.2.0", "emojize": "^0.2.0",
"lowdb": "^0.12.5", "lowdb": "^0.12.5",
"serialport": "^2.0.6", "serialport": "^4.0.5",
"socket.io": "^1.4.5" "socket.io": "^1.4.5"
}, },
"devDependencies": {}, "devDependencies": {},

View File

@ -2,14 +2,12 @@ var fs = require('fs'),
http = require('http'), http = require('http'),
socketio = require('socket.io'), socketio = require('socket.io'),
url = require("url"), url = require("url"),
serialport = require("serialport"); SerialPort = require("serialport");
low = require('lowdb'), low = require('lowdb'),
storage = require('lowdb/file-async'), storage = require('lowdb/file-async'),
db = low('db.json', { storage }); db = low('db.json', { storage });
var convert = require('emojize').emojize; var convert = require('emojize').emojize;
var SerialPort = serialport.SerialPort;
var config = low('config.json', { storage }); var config = low('config.json', { storage });
var socketServer; var socketServer;
var port = config('mainConfig').chain().find({ param: 'port' }).value()['value']; var port = config('mainConfig').chain().find({ param: 'port' }).value()['value'];
@ -126,7 +124,7 @@ function serialListener(debug)
var receivedData = ""; var receivedData = "";
serialPort = new SerialPort(portName, { serialPort = new SerialPort(portName, {
baudrate: 19200, baudrate: 19200,
parser: serialport.parsers.readline("\n") parser: SerialPort.parsers.readline("\n")
}); });
serialPort.on("open", function () { serialPort.on("open", function () {