Skip to content

Commit

Permalink
updated parser to latest version, update to settings.json file
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian Tollenaar committed Jul 11, 2014
1 parent d2410cd commit ab98c2b
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 24 deletions.
6 changes: 0 additions & 6 deletions lib/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@
};

try {
//var pkg = fs.readFileSync('package.json', { encoding: 'utf8' });
// pkg = JSON.parse(pkg);

//config.settings = fs.readFileSync('settings.json', { encoding: 'utf8' });
//config.settings = JSON.parse(config.settings);

var pkg = require('../../package.json');

config.settings = require('../../settings.json');
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "saildata-server",
"version": "0.1.3",
"version": "0.1.4",
"description": "An implementation of a [Signal K](http://signalk.github.io) central server for boats.",
"main": "index.js",
"scripts": {
Expand All @@ -23,13 +23,13 @@
"tape": "^2.12.1"
},
"dependencies": {
"express": "3.x",
"colors": "^0.6.2",
"e-json": "0.0.4",
"express": "3.x",
"lodash": "^2.4.1",
"nmea0183-signalk": "^0.1.8",
"node-uuid": "^1.4.1",
"e-json": "0.0.4",
"nmea0183-signalk": "^0.1.5",
"stream-throttle": "^0.1.3",
"socket.io": "^1.0.6"
"socket.io": "^1.0.6",
"stream-throttle": "^0.1.3"
}
}
10 changes: 7 additions & 3 deletions providers/filerunner/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@ if(typeof process.send !== 'function') {
return process.exit();
}

var Parser, fs, reader, filestream, parser, mw, colors, counter, Throttle, throttled, last;
var Parser, fs, reader, filestream, parser, mw, colors, counter, Throttle, throttled, last, path, vessel, FILE;

FILE = 'gofree-merrimac.log';
path = require('path');
vessel = require(path.normalize(__dirname + '/../../settings.json')).vessel;
colors = require('colors');
// mw = require('memwatch');
fs = require('fs');
Expand All @@ -33,6 +36,7 @@ Throttle = require('stream-throttle').Throttle;
// counter = Date.now();
// last = Date.now();


process.send({
messageType: 'identity', // in order to find out if the message contains actual data or the Provider's identity
payload: {
Expand All @@ -55,10 +59,10 @@ process.send({
});

function reader() {
filestream = fs.createReadStream(__dirname + '/nmea.log');
filestream = fs.createReadStream(__dirname + '/logs/' + FILE);

parser = new Parser({
vessel: {},
vessel: vessel,
debug: false
});

Expand Down
24 changes: 15 additions & 9 deletions settings.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
{
"ship": {
"name": "Volare",
"callsign": "",
"length": 7.0,
"width": 2.5,
"height": 14.0,
"depth": 1.5,
"type": "sailboat",
"mmsi": ""
"vessel": {
"name" : "Volare",
"brand" : "Friendship",
"type" : "22",
"mmsi" : "123456789",
"uuid" : "87654321",
"ident" : "mmsi",

"dimensions": {
"length": 7,
"width": 2.5,
"mast": 10,
"depthTransducer": 0.5,
"keel": 1.5
}
},

"network": {
Expand Down

0 comments on commit ab98c2b

Please sign in to comment.