Skip to content

Commit

Permalink
Remove inline definitions and need to function call
Browse files Browse the repository at this point in the history
  • Loading branch information
aacuevas committed Aug 12, 2015
1 parent 5bf879e commit 99cd169
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions Source/Processors/DataThreads/RHD2000Thread.cpp
Expand Up @@ -1531,7 +1531,7 @@ bool RHD2000Thread::updateBuffer()
for (int chan = 0; chan < nChans; chan++)
{
channel++;
thisSample[channel] = float(Rhd2000DataBlock::convertUsbWord(bufferPtr, chanIndex) - 32768)*0.195f;
thisSample[channel] = float(*(uint16*)(bufferPtr + chanIndex) - 32768)*0.195f;
chanIndex += 2*numStreams;
}
}
Expand All @@ -1545,7 +1545,7 @@ bool RHD2000Thread::updateBuffer()
int auxNum = (samp+3) % 4;
if (auxNum < 3)
{
auxSamples[dataStream][auxNum] = float(Rhd2000DataBlock::convertUsbWord(bufferPtr, auxIndex) - 32768)*0.0000374;
auxSamples[dataStream][auxNum] = float(*(uint16*)(bufferPtr + auxIndex) - 32768)*0.0000374;
}
for (int chan = 0; chan < 3; chan++)
{
Expand All @@ -1570,15 +1570,15 @@ bool RHD2000Thread::updateBuffer()
// ADC waveform units = volts
thisSample[channel] =
//0.000050354 * float(dataBlock->boardAdcData[adcChan][samp]);
0.00015258789 * float(Rhd2000DataBlock::convertUsbWord(bufferPtr, index)) - 5 - 0.4096; // account for +/-5V input range and DC offset
0.00015258789 * float(*(uint16*)(bufferPtr + index)) - 5 - 0.4096; // account for +/-5V input range and DC offset
index += 2;
}
}
else
{
index += 16;
}
eventCode = Rhd2000DataBlock::convertUsbWord(bufferPtr, index);
eventCode = *(uint16*)(bufferPtr + index);
index += 4;
dataBuffer->addToBuffer(thisSample, &timestamp, &eventCode, 1);
#if 0
Expand Down
6 changes: 3 additions & 3 deletions Source/Processors/DataThreads/rhythm-api/rhd2000datablock.h
Expand Up @@ -49,9 +49,9 @@ class Rhd2000DataBlock
void print(int stream) const;
void write(ofstream &saveOut, int numDataStreams) const;

static inline bool checkUsbHeader(unsigned char usbBuffer[], int index);
static inline unsigned int convertUsbTimeStamp(unsigned char usbBuffer[], int index);
static inline int convertUsbWord(unsigned char usbBuffer[], int index);
static bool checkUsbHeader(unsigned char usbBuffer[], int index);
static unsigned int convertUsbTimeStamp(unsigned char usbBuffer[], int index);
static int convertUsbWord(unsigned char usbBuffer[], int index);

private:
void allocateIntArray3D(vector<vector<vector<int> > > &array3D, int xSize, int ySize, int zSize);
Expand Down

0 comments on commit 99cd169

Please sign in to comment.