Skip to content
Snippets Groups Projects
Commit c5c13d8d authored by jsiegle's avatar jsiegle
Browse files

Fixed bug in SourceNode stopping acquisition

There was a minor bug in the SourceNode code, which caused it to delay restarting
acquisition for about 1 second after acquisition was stopped. Now acquisition from
the Intan Board can be restarted almost immediately after it finishes.
parent ac72523a
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,8 @@
<PROCESSORGRAPH>
<SIGNALCHAIN>
<PROCESSOR name="Sources/Intan Demo Board" insertionPoint="0"/>
<PROCESSOR name="Sinks/LFP Viewer" insertionPoint="1"/>
<PROCESSOR name="Filters/Bandpass Filter" insertionPoint="1"/>
<PROCESSOR name="Filters/Bandpass Filter" insertionPoint="2"/>
<PROCESSOR name="Sinks/LFP Viewer" insertionPoint="3"/>
</SIGNALCHAIN>
</PROCESSORGRAPH>
<?xml version="1.0" encoding="UTF-8"?>
<MAINWINDOW>
<BOUNDS x="1739" y="52" w="1181" h="831" fullscreen="0"/>
<BOUNDS x="1745" y="52" w="1229" h="968" fullscreen="0"/>
</MAINWINDOW>
......@@ -94,6 +94,8 @@ bool IntanThread::stopAcquisition()
unsigned char buf[4097]; // has to be bigger than the on-chip buffer
ftdi_read_data(&ftdic, buf, sizeof(buf));
closeUSB();
} else {
deviceFound = false;
}
return true;
......
......@@ -208,7 +208,7 @@ void FilterNode::process(AudioSampleBuffer &buffer,
//int nSamps = getNumSamples(midiMessages);
//std::cout << nSamples << std::endl;
filter->process (nSamples, buffer.getArrayOfChannels());
//filter->process (nSamples, buffer.getArrayOfChannels());
//std::cout << "Filter node:" << *buffer.getSampleData(0,0);
......
......@@ -213,11 +213,13 @@ bool SourceNode::disable() {
void SourceNode::acquisitionStopped()
{
std::cout << "Source node sending signal to UI." << std::endl;
UI->disableCallbacks();
enabledState(false);
GenericEditor* ed = (GenericEditor*) getEditor();
viewport->updateVisibleEditors(ed, 4);
if (!dataThread->foundInputSource()) {
std::cout << "Source node sending signal to UI." << std::endl;
UI->disableCallbacks();
enabledState(false);
GenericEditor* ed = (GenericEditor*) getEditor();
viewport->updateVisibleEditors(ed, 4);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment