Skip to content

Commit 24e0225

Browse files
committed
moved new lfpdisplay code to new beta plugin
1 parent 7e54395 commit 24e0225

9 files changed

Lines changed: 3863 additions & 6 deletions

File tree

Source/Plugins/LfpDisplayNode/LfpDisplayCanvas.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -942,7 +942,8 @@ void LfpDisplayCanvas::updateScreenBuffer()
942942

943943
if (nSamples < 0) // buffer has reset to 0
944944
{
945-
nSamples = (displayBufferSize - dbi) + index;
945+
nSamples = (displayBufferSize - dbi) + index +1;
946+
std::cout << "nsamples 0 " ;
946947
}
947948

948949
//if (channel == 15 || channel == 16)
@@ -1007,12 +1008,12 @@ void LfpDisplayCanvas::updateScreenBuffer()
10071008
float sample_min = 10000000;
10081009
float sample_max = -10000000;
10091010

1010-
int nextpix = (dbi +(int)ratio +1) % displayBufferSize; // position to next pixels index
1011+
int nextpix = (dbi +(int)ratio +1) % (displayBufferSize+1); // position to next pixels index
10111012

1012-
if (nextpix <= dbi) { // at the end of the displaybuffer, this can occur and it causes the display to miss one pixel woth of sample - this circumvents that
1013-
//std::cout << "np " ;
1014-
nextpix=dbi;
1015-
}
1013+
//if (nextpix <= dbi) { // at the end of the displaybuffer, this can occur and it causes the display to miss one pixel woth of sample - this circumvents that
1014+
// std::cout << "np " ;
1015+
//nextpix=dbi;
1016+
//}
10161017

10171018
for (int j = dbi; j <= nextpix; j++)
10181019
{

0 commit comments

Comments
 (0)