Add euler rotation (accumulate)

rob
Jurij Podgoršek 2022-03-05 13:16:43 +01:00
parent b23dbe6cfd
commit a51b183aad
1 changed files with 11 additions and 0 deletions

View File

@ -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 => {