diff --git a/server.js b/server.js index 678703e..5a0d9e0 100644 --- a/server.js +++ b/server.js @@ -9,6 +9,8 @@ const port = 6676 // Vzemi iz argumenta const tty = process.argv[2] +let eulerRotation = [0, 0, 0] + let baudrate = parseInt(process.argv[3]) if (!baudrate) { baudrate = 115200 @@ -179,6 +181,15 @@ const sendAll = (msg, info, oscWS, osclients) => { address: '/eulerDiff', args: euler }, info, oscWS, osclients) + + eulerRotation[0] += euler[0] + eulerRotation[1] += euler[1] + eulerRotation[2] += euler[2] + + sendAll({ + address: '/euler', + args: eulerRotation + }, info, oscWS, osclients) } osclients.forEach( client => {