Improved logic for setting the red Sync marker. Needs further work!

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@7493 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2017-01-14 00:26:33 +00:00
parent e15629d05d
commit 50ba68c3cd
2 changed files with 11 additions and 9 deletions

View File

@ -12,7 +12,7 @@ subroutine qra64b(nutc,nqd,ikhz,mousedf,ntol,xpol,mycall_12,hiscall_12, &
open(17,file='red.dat',status='unknown') open(17,file='red.dat',status='unknown')
df=96000.0/NFFT1 df=96000.0/NFFT1
k0=(ikhz-75.74)*1000.0/df k0=(ikhz-75.170)*1000.0/df
nh=nfft2/2 nh=nfft2/2
fac=1.0/NFFT2 fac=1.0/NFFT2
cx(0:nh)=ca(k0:k0+nh) cx(0:nh)=ca(k0:k0+nh)

View File

@ -134,18 +134,20 @@ void CPlotter::paintEvent(QPaintEvent *) // paintEvent()
std::ifstream f; std::ifstream f;
f.open("./red.dat"); f.open("./red.dat");
if(f) { if(f) {
int x; int x,y;
int y0=30;
float freq,sync; float freq,sync;
// float df = 0.001*m_fSample/32768.0; QPen pen0(Qt::red,1);
QPen pen0(Qt::red, 3);
painter2.setPen(pen0); painter2.setPen(pen0);
for(int i=0; i<50; i++) { for(int i=0; i<99999; i++) {
f >> freq >> sync; f >> freq >> sync;
// x = (freq - m_ZoomStartFreq)/df; if(f.eof()) break;
x=500; x=(freq - m_ZoomStartFreq)/df;
// qDebug() << "a" << m_line << freq << sync << x; y=(sync-1.5)*2.0;
painter2.drawLine(x,15,x,30); if(y>15.0) y=15.0;
if(x>=0 and x<=w) painter2.drawLine(x,y0-y,x,y0);
} }
f.close();
} }
} }