From 4f68bacbda1ef18625fc19cc1a5aa1177e6fea0e Mon Sep 17 00:00:00 2001 From: hennieliminator Date: Thu, 10 Jan 2013 02:21:46 +0100 Subject: [PATCH] round dmx value --- nodeartnet/app.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nodeartnet/app.js b/nodeartnet/app.js index 067c095..7bcdd18 100644 --- a/nodeartnet/app.js +++ b/nodeartnet/app.js @@ -70,7 +70,8 @@ function handleMessage(msg) { } // get mapped dmx channel - dmxData[oscMap[chan]] = value*255; + dmxData[oscMap[chan]] = Math.round(value*255); + console.log(Math.round(value*255)); dmxClient.send(dmxData); // update osc devices to show the current state // to be done in extra function (with whole states array?)