diff --git a/Builds/VisualStudio2013/open-ephys.vcxproj b/Builds/VisualStudio2013/open-ephys.vcxproj index 9b47cfcecd5b0f764c2a668579e67cc04742fe3f..f0554c20ead4c37a14acb350075443378c1d22f8 100644 --- a/Builds/VisualStudio2013/open-ephys.vcxproj +++ b/Builds/VisualStudio2013/open-ephys.vcxproj @@ -87,7 +87,7 @@ <Optimization>Disabled</Optimization> <DebugInformationFormat>EditAndContinue</DebugInformationFormat> <AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\JuceLibraryCode\modules;../../Resources/windows-libs/HDF5/include;../../Resources/windows-libs/ZeroMQ/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>WIN32;_WINDOWS;DEBUG;_DEBUG;NOMINMAX;ZEROMQ;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=0.3.4;JUCE_APP_VERSION_HEX=0x304;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>ECUBE_COMPILE;WIN32;_WINDOWS;DEBUG;_DEBUG;NOMINMAX;ZEROMQ;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=0.3.4;JUCE_APP_VERSION_HEX=0x304;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeTypeInfo>true</RuntimeTypeInfo> <PrecompiledHeader /> diff --git a/Source/Processors/DataThreads/DataThread.h b/Source/Processors/DataThreads/DataThread.h index 9696fe9550f5db72cdf2466887436af98ca6e085..453b714fbd94678a98177d9da85d1987f2df7bcb 100755 --- a/Source/Processors/DataThreads/DataThread.h +++ b/Source/Processors/DataThreads/DataThread.h @@ -128,12 +128,6 @@ public: return false; } - /** Returns the number of ADC channels of the data source.*/ - virtual int getNumADCchannels() - { - return 0; - } - /** Changes the names of channels, if the thread needs custom names. */ void updateChannels(); diff --git a/Source/Processors/DataThreads/EcubeThread.cpp b/Source/Processors/DataThreads/EcubeThread.cpp index 45e97cf24ac4900570f873b09ba808b5718a090d..2dc25c20e6e1bc6092b831974974ec6449bd5d18 100644 --- a/Source/Processors/DataThreads/EcubeThread.cpp +++ b/Source/Processors/DataThreads/EcubeThread.cpp @@ -298,7 +298,7 @@ EcubeThread::EcubeThread(SourceNode* sn) : DataThread(sn), numberingScheme(1), a pDevInt->buf_timestamp_locked = false; - setDefaultChannelNamesAndType(); + setDefaultChannelNames(); } catch (_com_error& e) @@ -308,24 +308,11 @@ EcubeThread::EcubeThread(SourceNode* sn) : DataThread(sn), numberingScheme(1), a } } -void EcubeThread::getChannelsInfo(StringArray &Names_, Array<ChannelType> &type_, Array<int> &stream_, Array<int> &originalChannelNumber_, Array<float> &gains_) -{ - Names_ = Names; - type_ = type; - stream_ = stream; - originalChannelNumber_ = originalChannelNumber; - gains_ = gains; -} - /* This will give default names & gains to channels, unless they were manually modified by the user In that case, the query channelModified, will return the values that need to be put */ -void EcubeThread::setDefaultChannelNamesAndType() +void EcubeThread::setDefaultChannelNames() { - Names.clear(); - type.clear(); - stream.clear(); - gains.clear(); - originalChannelNumber.clear(); + String prefix; ChannelType common_type; @@ -352,31 +339,23 @@ void EcubeThread::setDefaultChannelNamesAndType() for (int i = 0; i < numch; i++) { - Names.add(prefix + String(i)); - gains.add(getBitVolts(i)); - type.add(common_type); - originalChannelNumber.add(i); + ChannelCustomInfo ci; + ci.name = prefix + String(i); + ci.gain = getBitVolts(i); + channelInfo.set(i, ci); } - stream.add(0); } -void EcubeThread::updateChannelNames() +bool EcubeThread::usesCustomNames() { - setDefaultChannelNamesAndType(); - - for (int i = 0; i < sn->channels.size(); i++) - { - sn->channels[i]->setName(Names[i]); - sn->channels[i]->bitVolts = gains[i]; - sn->channels[i]->setType(type[i]); - } + return true; } void EcubeThread::setDefaultNamingScheme(int scheme) { numberingScheme = scheme; - setDefaultChannelNamesAndType(); + setDefaultChannelNames(); } @@ -432,16 +411,6 @@ int EcubeThread::getNumEventChannels() return 0; } -int EcubeThread::getNumADCchannels() -{ - if (pDevInt->data_format == EcubeDevInt::dfInterleavedChannelsAnalog) - return 32; - else if(pDevInt->data_format == EcubeDevInt::dfDigital) - return 64; - else - return 0; -} - float EcubeThread::getSampleRate() { return m_samplerate; diff --git a/Source/Processors/DataThreads/EcubeThread.h b/Source/Processors/DataThreads/EcubeThread.h index efd9d67bfb9232243767e094c8955e406479a4ff..d6afc1821db2bb6584f4bf57ef4ca362fe23262a 100644 --- a/Source/Processors/DataThreads/EcubeThread.h +++ b/Source/Processors/DataThreads/EcubeThread.h @@ -85,9 +85,6 @@ public: /** Returns the number of event channels of the data source.*/ virtual int getNumEventChannels(); - /** Returns the number of ADC channels of the data source.*/ - virtual int getNumADCchannels(); - /** Returns the sample rate of the data source.*/ virtual float getSampleRate(); @@ -96,25 +93,17 @@ public: virtual float getBitVolts(Channel* chan); - virtual void getChannelsInfo(StringArray &Names, Array<ChannelType> &type, Array<int> &stream, Array<int> &originalChannelNumber, Array<float> &gains); void setDefaultNamingScheme(int scheme); - /** Changes the names of channels, if the thread needs custom names. */ - virtual void updateChannelNames(); + + bool usesCustomNames(); // Custom thread control functions void setSpeakerVolume(double volume); void setSpeakerChannel(unsigned short channel); private: - void setDefaultChannelNamesAndType(); - - // used for data stream names... - int numberingScheme; - StringArray Names; - Array<ChannelType> type; - Array<float> gains; - Array<int> stream; - Array<int> originalChannelNumber; + int numberingScheme; + void setDefaultChannelNames(); ScopedPointer<EcubeDevInt> pDevInt;