Add euler rotation (accumulate)
parent
b23dbe6cfd
commit
a51b183aad
11
server.js
11
server.js
|
@ -9,6 +9,8 @@ const port = 6676
|
||||||
// Vzemi iz argumenta
|
// Vzemi iz argumenta
|
||||||
const tty = process.argv[2]
|
const tty = process.argv[2]
|
||||||
|
|
||||||
|
let eulerRotation = [0, 0, 0]
|
||||||
|
|
||||||
let baudrate = parseInt(process.argv[3])
|
let baudrate = parseInt(process.argv[3])
|
||||||
if (!baudrate) {
|
if (!baudrate) {
|
||||||
baudrate = 115200
|
baudrate = 115200
|
||||||
|
@ -179,6 +181,15 @@ const sendAll = (msg, info, oscWS, osclients) => {
|
||||||
address: '/eulerDiff',
|
address: '/eulerDiff',
|
||||||
args: euler
|
args: euler
|
||||||
}, info, oscWS, osclients)
|
}, 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 => {
|
osclients.forEach( client => {
|
||||||
|
|
Loading…
Reference in New Issue