Ko je kegel miren, utisaj

main
Jurij Podgoršek 2022-09-17 13:20:44 +02:00
parent a6a8733501
commit b8e87c8ae0
1 changed files with 10 additions and 0 deletions

View File

@ -33,6 +33,7 @@ oscWS.on('ready', () => {
})
const zaznava = 0.8
const utisaj_vse = 0.1
let cakaj = false
@ -113,6 +114,15 @@ oscWS.on('message', ({ address, args }) => {
console.log('izklopi', midiKanal, visina)
}, izklop * 1000)
}
// Ce izrazito ni gibanja, utisaj vse!
if (vsota < utisaj_vse) {
console.log("UTISAJ")
oscWS.send({
address: '/midi',
args: [120, 0, 0]
})
}
}
} else {
console.log(address)