Permalink
Browse files

Fix issue with re-loading FPGA

  • Loading branch information...
1 parent 2796d65 commit f2739771002e3336a01dbad5dba0243f9dadcbfc jsiegle committed Jan 23, 2014
Showing with 9 additions and 2 deletions.
  1. +4 −1 Source/Processors/DataThreads/RHD2000Thread.cpp
  2. +5 −1 Source/Processors/SpikeDetector.cpp
@@ -109,7 +109,10 @@ RHD2000Thread::~RHD2000Thread()
}
if (deviceFound)
+ {
evalBoard->resetFpga();
+ }
+
deleteAndZero(dataBlock);
@@ -276,7 +279,7 @@ void RHD2000Thread::initializeBoard()
Rhd2000DataBlock* dataBlock = new Rhd2000DataBlock(evalBoard->getNumEnabledDataStreams());
- evalBoard->readDataBlock(dataBlock);
+ // evalBoard->readDataBlock(dataBlock);
// Now that ADC calibration has been performed, we switch to the command sequence
// that does not execute ADC calibration.
@@ -213,7 +213,11 @@ void SpikeDetector::setChannel(int electrodeIndex, int channelNum, int newChanne
int SpikeDetector::getNumChannels(int index)
{
- return electrodes[index]->numChannels;
+
+ if (index < electrodes.size())
+ return electrodes[index]->numChannels;
+ else
+ return 0;
}
int SpikeDetector::getChannel(int index, int i)

0 comments on commit f273977

Please sign in to comment.