Fix the red plot when bins/pixel > 1.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3024 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2013-02-28 21:22:56 +00:00
parent e9e319da1e
commit 00273a5540
2 changed files with 6 additions and 2 deletions

View File

@ -1,4 +1,4 @@
//------------------------------------------------------------- MainWindow //------------------------------------------------------------ MainWindow
#include "mainwindow.h" #include "mainwindow.h"
#include "ui_mainwindow.h" #include "ui_mainwindow.h"
#include "devsetup.h" #include "devsetup.h"

View File

@ -87,6 +87,7 @@ void WideGraph::dataSink2(float s[], float red[], float df3, int ihsym,
{ {
static float splot[NSMAX]; static float splot[NSMAX];
static float swide[2048]; static float swide[2048];
static float rwide[2048];
int nbpp = ui->widePlot->binsPerPixel(); int nbpp = ui->widePlot->binsPerPixel();
static int n=0; static int n=0;
@ -111,11 +112,14 @@ void WideGraph::dataSink2(float s[], float red[], float df3, int ihsym,
int jz=1000.0/df3; int jz=1000.0/df3;
for (int j=0; j<jz; j++) { for (int j=0; j<jz; j++) {
float sum=0; float sum=0;
float rsum=0;
for (int k=0; k<nbpp; k++) { for (int k=0; k<nbpp; k++) {
i++; i++;
sum += splot[i]; sum += splot[i];
rsum += red[i];
} }
swide[j]=sum; swide[j]=sum;
rwide[j]=rsum;
// if(lstrong[1 + i/32]!=0) swide[j]=-smax; //Tag strong signals // if(lstrong[1 + i/32]!=0) swide[j]=-smax; //Tag strong signals
} }
@ -128,7 +132,7 @@ void WideGraph::dataSink2(float s[], float red[], float df3, int ihsym,
} }
} }
m_ntr0=ntr; m_ntr0=ntr;
ui->widePlot->draw(swide,red,i0); ui->widePlot->draw(swide,rwide,i0);
} }
} }