mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 12:23:37 -05:00
Correct an error in aligning "Cumulative" when "Start freq" > 0.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3522 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
5af0f6880f
commit
e9f9180088
@ -1,4 +1,4 @@
|
||||
//-------------------------------------------------------------- MainWindow
|
||||
//--------------------------------------------------------------- MainWindow
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
#include "devsetup.h"
|
||||
|
@ -85,7 +85,7 @@ void CPlotter::paintEvent(QPaintEvent *) // paintEvent()
|
||||
|
||||
void CPlotter::draw(float swide[]) //draw()
|
||||
{
|
||||
int j,y2;
|
||||
int j,j0,y2;
|
||||
float y;
|
||||
|
||||
double gain = pow(10.0,0.05*(m_plotGain+7));
|
||||
@ -100,7 +100,7 @@ void CPlotter::draw(float swide[]) //draw()
|
||||
|
||||
QPoint LineBuf[MAX_SCREENSIZE];
|
||||
j=0;
|
||||
|
||||
j0=int(m_startFreq/m_fftBinWidth + 0.5);
|
||||
int iz=XfromFreq(5000.0);
|
||||
m_fMax=FreqfromX(iz);
|
||||
for(int i=0; i<iz; i++) {
|
||||
@ -117,7 +117,7 @@ void CPlotter::draw(float swide[]) //draw()
|
||||
if(m_bCurrent) y2 = 0.4*gain*y - 15;
|
||||
if(m_bCumulative) {
|
||||
float sum=0.0;
|
||||
int j=m_binsPerPixel*i;
|
||||
int j=j0+m_binsPerPixel*i;
|
||||
for(int k=0; k<m_binsPerPixel; k++) {
|
||||
sum+=jt9com_.savg[j++];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user