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

Add sample rate output to LfpDisplayCanvas

parent 1020d126
Branches
Tags
No related merge requests found
......@@ -112,8 +112,9 @@ RHD2000Thread::~RHD2000Thread()
if (deviceFound)
{
evalBoard->flush();
evalBoard->resetBoard();
// evalBoard->resetFpga();
evalBoard->resetFpga();
}
......@@ -282,19 +283,12 @@ void RHD2000Thread::initializeBoard()
;
}
// THIS DOESN'T SEEM TO HELP WITH OCCASIONAL CRASHES:
///std::cout << "Flushing the buffer" << std::endl;
// flush out everything from the buffer
//evalBoard->setMaxTimeStep(0);
//evalBoard->run();
//evalBoard->flush();
evalBoard->flush();
// Read the resulting single data block from the USB interface. We don't
// need to do anything with this, since it was only used for ADC calibration
//Rhd2000DataBlock* dataBlock = new Rhd2000DataBlock(evalBoard->getNumEnabledDataStreams());
// Now that ADC calibration has been performed, we switch to the command sequence
// that does not execute ADC calibration.
evalBoard->selectAuxCommandBank(Rhd2000EvalBoard::PortA, Rhd2000EvalBoard::AuxCmd3,
......
......@@ -650,6 +650,12 @@ void Rhd2000EvalBoard::resetBoard()
dev->UpdateWireIns();
}
// Use the Opal Kelly library to reset the FPGA
void Rhd2000EvalBoard::resetFpga()
{
dev->ResetFPGA();
}
// Set the FPGA to run continuously once started (if continuousMode == true) or to run until
// maxTimeStep is reached (if continuousMode == false).
void Rhd2000EvalBoard::setContinuousRunMode(bool continuousMode)
......
......@@ -86,6 +86,7 @@ public:
void selectAuxCommandLength(AuxCmdSlot auxCommandSlot, int loopIndex, int endIndex);
void resetBoard();
void resetFpga();
void setContinuousRunMode(bool continuousMode);
void setMaxTimeStep(unsigned int maxTimeStep);
void run();
......
......@@ -199,6 +199,8 @@ void LfpDisplayCanvas::update()
nChans = jmax(processor->getNumInputs(),1);
sampleRate = processor->getSampleRate();
std::cout << "Setting sample rate of LfpDisplayCanvas to " << sampleRate << std::endl;
if (nChans != lfpDisplay->getNumChannels())
{
std::cout << "Setting num inputs on LfpDisplayCanvas to " << nChans << std::endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment