Skip to content
Snippets Groups Projects
Commit f2904ed7 authored by Aaron Cuevas Lopez's avatar Aaron Cuevas Lopez
Browse files

Fix aux channels for input block < 4channels

parent 10c6cd74
No related branches found
No related tags found
No related merge requests found
...@@ -1307,6 +1307,7 @@ bool RHD2000Thread::startAcquisition() ...@@ -1307,6 +1307,7 @@ bool RHD2000Thread::startAcquisition()
std::cout << "Expecting " << getNumChannels() << " channels." << std::endl; std::cout << "Expecting " << getNumChannels() << " channels." << std::endl;
lastThreshold = false; lastThreshold = false;
auxSamp = 0;
//memset(filter_states,0,256*sizeof(double)); //memset(filter_states,0,256*sizeof(double));
/*int ledArray[8] = {1, 1, 0, 0, 0, 0, 0, 0}; /*int ledArray[8] = {1, 1, 0, 0, 0, 0, 0, 0};
...@@ -1465,7 +1466,8 @@ bool RHD2000Thread::updateBuffer() ...@@ -1465,7 +1466,8 @@ bool RHD2000Thread::updateBuffer()
{ {
if (chipId[dataStream] != CHIP_ID_RHD2164_B) if (chipId[dataStream] != CHIP_ID_RHD2164_B)
{ {
int auxNum = (samp+3) % 4; int auxNum = (auxSamp+3) % 4;
auxSamp = (++auxSamp) % 4;
if (auxNum < 3) if (auxNum < 3)
{ {
auxSamples[dataStream][auxNum] = float(*(uint16*)(bufferPtr + auxIndex) - 32768)*0.0000374; auxSamples[dataStream][auxNum] = float(*(uint16*)(bufferPtr + auxIndex) - 32768)*0.0000374;
......
...@@ -211,6 +211,8 @@ namespace PCIeRhythm { ...@@ -211,6 +211,8 @@ namespace PCIeRhythm {
void checkThreshold(float s); void checkThreshold(float s);
int auxSamp;
// Sync ouput divide factor // Sync ouput divide factor
uint16 clockDivideFactor; uint16 clockDivideFactor;
......
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