Skip to content

Commit c206b9c

Browse files
committed
clip warning fixes
1 parent 83563e8 commit c206b9c

1 file changed

Lines changed: 5 additions & 15 deletions

File tree

Source/Plugins/LfpDisplayNode/LfpDisplayCanvas.cpp

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2355,25 +2355,15 @@ void LfpChannelDisplay::pxPaint()
23552355
if(saturateWarningHi || saturateWarningLo) {
23562356

23572357

2358-
for (int k=jfrom_wholechannel_almost; k<=jto_wholechannel_almost; k++){ // draw line
2358+
for (int k=jfrom_wholechannel; k<=jto_wholechannel; k++){ // draw line
23592359
Colour thiscolour=Colour(255,0,0);
2360-
if (fmod((i+k),100)>50){
2360+
if (fmod((i+k),50)>25){
23612361
thiscolour=Colour(255,255,255);
23622362
}
2363-
bdLfpChannelBitmap.setPixelColour(i,k,thiscolour);
2363+
if(k>0 & k<display->lfpChannelBitmap.getHeight()){
2364+
bdLfpChannelBitmap.setPixelColour(i,k,thiscolour);
2365+
}
23642366
};
2365-
2366-
//bdLfpChannelBitmap.setPixelColour(i,k,bdLfpChannelBitmap.getPixelColour(i,k).interpolatedWith(Colour(fmod((i+k)/100,255),0,0),0.5f));
2367-
2368-
2369-
//for (int j=0; j<=10; j++)
2370-
//{
2371-
//int clipmarker = jto_wholechannel_clip;
2372-
2373-
//if(clipmarker>0 & clipmarker<display->lfpChannelBitmap.getHeight()){
2374-
// bdLfpChannelBitmap.setPixelColour(i,clipmarker-j,Colour(255,0,0));
2375-
//}
2376-
//}
23772367
}
23782368

23792369
saturateWarningHi=false; // we likely just need one of this because for this warning we dont care if its saturating on the positive or negative side

0 commit comments

Comments
 (0)