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
This commit is contained in:
Joe Taylor 2012-09-13 18:42:02 +00:00
parent e0ec7918bf
commit 2b1d49d994
3 changed files with 10 additions and 7 deletions

View File

@ -174,7 +174,7 @@ subroutine symspec(k,nfast,nxpol,ndiskdat,nb,nbslider,idphi,nfsample, &
if(iqapply.ne.0) call iqfix(cy,NFFT,gainy,phasey) if(iqapply.ne.0) call iqfix(cy,NFFT,gainy,phasey)
endif endif
n=ihsym n=min(322,ihsym)
do i=1,NFFT do i=1,NFFT
sx=real(cx(i))**2 + aimag(cx(i))**2 sx=real(cx(i))**2 + aimag(cx(i))**2
ss(1,n,i)=sx ! Pol = 0 ss(1,n,i)=sx ! Pol = 0

View File

@ -187,7 +187,7 @@ void SoundInThread::run() //SoundInThread::run()
// const PaStreamInfo* p=Pa_GetStreamInfo(inStream); // const PaStreamInfo* p=Pa_GetStreamInfo(inStream);
bool qe = quitExecution; bool qe = quitExecution;
int ntrz=99; int ntr0=99;
int k=0; int k=0;
int nsec; int nsec;
int ntr; int ntr;
@ -203,9 +203,10 @@ void SoundInThread::run() //SoundInThread::run()
ntr = nsec % m_TRperiod; ntr = nsec % m_TRperiod;
// Reset buffer pointer and symbol number at start of minute // 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; nhsym0=0;
udata.bzero=true; udata.bzero=true;
m_TRperiod0=m_TRperiod;
} }
k=udata.kin; k=udata.kin;
udata.iqswap=m_IQswap; udata.iqswap=m_IQswap;
@ -228,7 +229,7 @@ void SoundInThread::run() //SoundInThread::run()
} }
} }
msleep(100); msleep(100);
ntrz=ntr; ntr0=ntr;
} }
Pa_StopStream(inStream); Pa_StopStream(inStream);
Pa_CloseStream(inStream); Pa_CloseStream(inStream);
@ -346,7 +347,7 @@ void SoundInThread::inputUDP()
double d8[174]; double d8[174];
} b; } b;
int ntrz=99; int ntr0=99;
int k=0; int k=0;
int nsec; int nsec;
int ntr; int ntr;
@ -369,11 +370,12 @@ void SoundInThread::inputUDP()
ntr = nsec % m_TRperiod; ntr = nsec % m_TRperiod;
// Reset buffer pointer and symbol number at start of minute // 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; k=0;
nhsym0=0; nhsym0=0;
m_TRperiod0=m_TRperiod;
} }
ntrz=ntr; ntr0=ntr;
if(m_monitoring) { if(m_monitoring) {
m_nrx=b.nrx; m_nrx=b.nrx;

View File

@ -75,6 +75,7 @@ private:
qint32 m_nDevIn; qint32 m_nDevIn;
qint32 m_udpPort; qint32 m_udpPort;
qint32 m_TRperiod; qint32 m_TRperiod;
qint32 m_TRperiod0;
QUdpSocket *udpSocket; QUdpSocket *udpSocket;
}; };