diff --git a/libm65/decode1a.f b/libm65/decode1a.f index f9abd66d1..aaaafbcac 100644 --- a/libm65/decode1a.f +++ b/libm65/decode1a.f @@ -133,12 +133,13 @@ call timer('dec65b ',1) if(nqd.eq.1 .and. nkv.eq.0) then - if(nutc.ne.nutc0) syncbest=0. + if(nutc.ne.nutc0 .or. nkhz.ne.nkhz0) syncbest=0. if(sync2.gt.syncbest) then - if(nutc.eq.nutc0) nsave=nsave-1 + if(nutc.eq.nutc0 .and. nkhz.eq.nkhz0) nsave=nsave-1 if(nkhz.ne.nkhz0) nsave=0 nkhz0=nkhz nsave=min(32,nsave+1) + nsave=max(1,nsave) npol=nint(57.296*pol) call s3avg(nsave,mode65,nutc,ndf,dt+0.8,npol,s3,nsum, + nkv,decoded) diff --git a/libm65/s3avg.f90 b/libm65/s3avg.f90 index 87e1cfa37..a3cceb8fd 100644 --- a/libm65/s3avg.f90 +++ b/libm65/s3avg.f90 @@ -18,6 +18,10 @@ subroutine s3avg(nsave,mode65,nutc,ndf,xdt,npol,s3,nsum,nkv,decoded) dt(nsave)=xdt !Save DT s3a(1:64,1:63,nsave)=s3 !Save the spectra + write(71,3001) nsave,nutc,ndf,npol,xdt +3001 format(4i5,f8.1) + flush(71) + s3b=0. nsum=0 idfdiff=100 diff --git a/mainwindow.cpp b/mainwindow.cpp index b7a451fce..e8c9ac4d2 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1337,6 +1337,7 @@ void MainWindow::guiUpdate() static int nc1=1; static char msgsent[23]; static int nsendingsh=0; + static int fQSOz=-1; int khsym=0; double tx1=0.0; @@ -1503,6 +1504,11 @@ void MainWindow::guiUpdate() QDateTime t = QDateTime::currentDateTimeUtc(); int fQSO=g_pWideGraph->QSOfreq(); + if(fQSO != fQSOz) { + qDebug() << fQSOz << fQSO << m_nutc0; + m_nsave=0; + fQSOz=fQSO; + } g_pAstro->astroUpdate(t, m_myGrid, m_hisGrid, fQSO, m_setftx, m_txFreq, m_azelDir); m_setftx=0;