Mercurial > hg > beaglert
comparison core/Scope.cpp @ 301:e4392164b458 prerelease
RENAMED BeagleRT to Bela AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA, scripts probably not working
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Fri, 27 May 2016 14:34:41 +0100 |
parents | 733006bdbca2 |
children | 421a69d42943 |
comparison
equal
deleted
inserted
replaced
300:dbeed520b014 | 301:e4392164b458 |
---|---|
29 // used for sending raw frame data | 29 // used for sending raw frame data |
30 socket.setServer("127.0.0.1"); | 30 socket.setServer("127.0.0.1"); |
31 socket.setPort(SCOPE_UDP_PORT); | 31 socket.setPort(SCOPE_UDP_PORT); |
32 | 32 |
33 // setup the auxiliary tasks | 33 // setup the auxiliary tasks |
34 scopeTriggerTask = BeagleRT_createAuxiliaryTask(Scope::triggerTask, BEAGLERT_AUDIO_PRIORITY-2, "scopeTriggerTask", this, true); | 34 scopeTriggerTask = Bela_createAuxiliaryTask(Scope::triggerTask, BEAGLERT_AUDIO_PRIORITY-2, "scopeTriggerTask", this, true); |
35 scopeSendBufferTask = BeagleRT_createAuxiliaryTask(Scope::sendBufferTask, BEAGLERT_AUDIO_PRIORITY-1, "scopeSendBufferTask", this); | 35 scopeSendBufferTask = Bela_createAuxiliaryTask(Scope::sendBufferTask, BEAGLERT_AUDIO_PRIORITY-1, "scopeSendBufferTask", this); |
36 | 36 |
37 // send an OSC message to address /scope-setup | 37 // send an OSC message to address /scope-setup |
38 // then wait 1 second for a reply on /scope-setup-reply | 38 // then wait 1 second for a reply on /scope-setup-reply |
39 bool handshakeRecieved = false; | 39 bool handshakeRecieved = false; |
40 oscClient.sendMessageNow(oscClient.newMessage.to("/scope-setup").add((int)numChannels).add(sampleRate).end()); | 40 oscClient.sendMessageNow(oscClient.newMessage.to("/scope-setup").add((int)numChannels).add(sampleRate).end()); |
138 } | 138 } |
139 return false; | 139 return false; |
140 } | 140 } |
141 | 141 |
142 void Scope::scheduleSendBufferTask(){ | 142 void Scope::scheduleSendBufferTask(){ |
143 BeagleRT_scheduleAuxiliaryTask(scopeSendBufferTask); | 143 Bela_scheduleAuxiliaryTask(scopeSendBufferTask); |
144 } | 144 } |
145 | 145 |
146 bool Scope::triggered(){ | 146 bool Scope::triggered(){ |
147 if (triggerMode == 0 || triggerMode == 1){ // normal or auto trigger | 147 if (triggerMode == 0 || triggerMode == 1){ // normal or auto trigger |
148 return (!triggerDir && buffer[channelWidth*triggerChannel+((readPointer-1+channelWidth)%channelWidth)] < triggerLevel // positive trigger direction | 148 return (!triggerDir && buffer[channelWidth*triggerChannel+((readPointer-1+channelWidth)%channelWidth)] < triggerLevel // positive trigger direction |