From 2b1d49d994c6780a9db3ff7066b149e91186c259 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 13 Sep 2012 18:42:02 +0000 Subject: [PATCH] Correct several operational bugs in the fast (B2, C2) sub-modes. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@2579 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- libm65/symspec.f90 | 2 +- soundin.cpp | 14 ++++++++------ soundin.h | 1 + 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/libm65/symspec.f90 b/libm65/symspec.f90 index 2627f5ddd..9fe6d7a32 100644 --- a/libm65/symspec.f90 +++ b/libm65/symspec.f90 @@ -174,7 +174,7 @@ subroutine symspec(k,nfast,nxpol,ndiskdat,nb,nbslider,idphi,nfsample, & if(iqapply.ne.0) call iqfix(cy,NFFT,gainy,phasey) endif - n=ihsym + n=min(322,ihsym) do i=1,NFFT sx=real(cx(i))**2 + aimag(cx(i))**2 ss(1,n,i)=sx ! Pol = 0 diff --git a/soundin.cpp b/soundin.cpp index a7b3cfe96..e8493f4c6 100644 --- a/soundin.cpp +++ b/soundin.cpp @@ -187,7 +187,7 @@ void SoundInThread::run() //SoundInThread::run() // const PaStreamInfo* p=Pa_GetStreamInfo(inStream); bool qe = quitExecution; - int ntrz=99; + int ntr0=99; int k=0; int nsec; int ntr; @@ -203,9 +203,10 @@ void SoundInThread::run() //SoundInThread::run() ntr = nsec % m_TRperiod; // Reset buffer pointer and symbol number at start of minute - if(ntr < ntrz or !m_monitoring) { + if(ntr < ntr0 or !m_monitoring or m_TRperiod!=m_TRperiod0) { nhsym0=0; udata.bzero=true; + m_TRperiod0=m_TRperiod; } k=udata.kin; udata.iqswap=m_IQswap; @@ -228,7 +229,7 @@ void SoundInThread::run() //SoundInThread::run() } } msleep(100); - ntrz=ntr; + ntr0=ntr; } Pa_StopStream(inStream); Pa_CloseStream(inStream); @@ -346,7 +347,7 @@ void SoundInThread::inputUDP() double d8[174]; } b; - int ntrz=99; + int ntr0=99; int k=0; int nsec; int ntr; @@ -369,11 +370,12 @@ void SoundInThread::inputUDP() ntr = nsec % m_TRperiod; // Reset buffer pointer and symbol number at start of minute - if(ntr < ntrz) { + if(ntr < ntr0 or !m_monitoring or m_TRperiod!=m_TRperiod0) { k=0; nhsym0=0; + m_TRperiod0=m_TRperiod; } - ntrz=ntr; + ntr0=ntr; if(m_monitoring) { m_nrx=b.nrx; diff --git a/soundin.h b/soundin.h index 30862b568..b31420fd2 100644 --- a/soundin.h +++ b/soundin.h @@ -75,6 +75,7 @@ private: qint32 m_nDevIn; qint32 m_udpPort; qint32 m_TRperiod; + qint32 m_TRperiod0; QUdpSocket *udpSocket; };