mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-19 10:32:02 -05:00
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:
parent
e9e319da1e
commit
00273a5540
@ -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"
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user