From 850701f7b1179d7d583ecd462493b59677e45d39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Ple=C3=9F?= Date: Tue, 15 Jan 2013 23:14:44 +0100 Subject: [PATCH] minor changes --- oscreceiver.js | 8 ++++++-- testsender.js | 6 +++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/oscreceiver.js b/oscreceiver.js index e6cc259..dabc426 100644 --- a/oscreceiver.js +++ b/oscreceiver.js @@ -1,4 +1,5 @@ var readline = require('readline'); +var dateFormat = require('dateformat'); var osc = require('node-osc'); var listenPort = 8000; @@ -9,7 +10,8 @@ var oscClient = new osc.Client(hubAddress, hubPort); var oscServer = new osc.Server(listenPort, '0.0.0.0'); oscServer.on("message", function (msg, rinfo) { - console.log("message: " + msg); + var dateString = dateFormat(new Date(), "HH:MM:ss.L"); + console.log(dateString + "\t" + msg); }); oscClient.send('/subscribe','192.168.23.102', listenPort, "sekret"); @@ -42,4 +44,6 @@ function isNumber(value) { return true; } return !isNaN(value - 0); -} \ No newline at end of file +} + + diff --git a/testsender.js b/testsender.js index 199b162..84dbc25 100644 --- a/testsender.js +++ b/testsender.js @@ -1,7 +1,7 @@ var osc = require('node-osc'); -var hubAddress = '192.168.23.43'; -var hubPort = 7110; +var hubAddress = '192.168.23.31'; +var hubPort = 2345; var oscClient = new osc.Client(hubAddress, hubPort); @@ -15,6 +15,6 @@ function fubs() { } -setInterval(fubs, 200); +setInterval(fubs, 50);