merged and resolved the conflict in map65/soundin.cpp

This commit is contained in:
Joe Taylor 2021-07-16 11:45:12 -04:00
commit 2ac5518057
5 changed files with 9 additions and 75 deletions

View File

@ -165,8 +165,8 @@ subroutine q65_dec0(iavg,nutc,iwave,ntrperiod,nfqso,ntol,ndepth,lclearave, &
call timer('list_dec',0)
call q65_dec_q3(s1,iz,jz,s3,LL,ipk,jpk,snr2,dat4,idec,decoded)
call timer('list_dec',1)
if(idec.ge.0) write(70,3070) idec,better,trim(decoded)
3070 format(i3,f8.2,2x,a)
! if(idec.ge.0) write(70,3070) idec,better,trim(decoded)
!3070 format(i3,f8.2,2x,a)
endif
! If idec=3 we have a q3 decode. Continue to compute sync curve for plotting.
endif

View File

@ -62,7 +62,6 @@ set (libm65_FSRCS
packjt.f90
pfxdump.f90
polfit.f90
read_tf2.f90
recvpkt.f90
rfile3a.f90
s3avg.f90

View File

@ -620,7 +620,7 @@ void MainWindow::dataSink(int k)
n=0;
}
if(ihsym == 280 and !m_diskData) { //Early decode, t=52 s
if(ihsym == 280) { //Early decode, t=52 s
datcom_.newdat=1;
datcom_.nagain=0;
datcom_.nhsym=ihsym;
@ -1126,6 +1126,9 @@ void MainWindow::diskDat() //diskDat()
for(int i=0; i<304; i++) { // Do the half-symbol FFTs
int k = i*hsym + 2048.5;
dataSink(k);
while(m_decoderBusy) {
qApp->processEvents();
}
if(i%10 == 0) qApp->processEvents(); //Keep the GUI responsive
}
}

View File

@ -164,16 +164,10 @@ void SoundInThread::run() //SoundInThread::run()
{
quitExecution = false;
QFile f("mockRTfiles.txt");
m_mockRT=f.exists();
if(m_mockRT) {
inputMockRT(); //"Mock realtime" input from a .tf2 file
return;
}
if (m_net) {
inputUDP(); //Network input from Linrad (or equivalent)
// qDebug() << "Start inputUDP()";
inputUDP();
// qDebug() << "Finished inputUDP()";
return;
}
@ -455,62 +449,3 @@ void SoundInThread::inputUDP()
}
delete udpSocket;
}
//--------------------------------------------------------------- inputMockRT()
void SoundInThread::inputMockRT()
{
bool qe = quitExecution;
int ntr0=99;
int k=0;
int nsec;
int ntr;
int nhsym0=0;
int iz=174;
int nBusy=0;
int mstr=0;
int mswait=0;
// Main loop for mock realtime input of data from .tf2 files
while (!qe) {
qe = quitExecution;
if (qe) break;
qint64 ms = QDateTime::currentMSecsSinceEpoch(); // Time according to this computer
mstr = ms % (1000*m_TRperiod);
nsec = (ms % 86400000l) / 1000;
ntr = nsec % m_TRperiod;
// Reset buffer pointer and symbol number at start of minute
if(ntr < ntr0 or !m_monitoring or m_TRperiod!=m_TRperiod0) {
k=0;
nhsym0=0;
m_TRperiod0=m_TRperiod;
}
ntr0=ntr;
if(m_monitoring) {
// If buffer will not overflow, move data into datcom_
if ((k+iz) <= 60*96000) {
if(k>mstr*96) {
mswait=(k-mstr*96)/96;
msleep(mswait);
}
read_tf2_(&k);
if(m_bForceCenterFreq) {
datcom_.fcenter=m_dForceCenterFreq;
}
}
m_hsym=(k-2048)*11025.0/(2048.0*m_rate);
if(m_hsym != nhsym0) {
if(m_dataSinkBusy) {
nBusy++;
} else {
m_dataSinkBusy=true;
emit readyForFFT(k); //Signal to compute new FFTs
}
nhsym0=m_hsym;
}
}
}
}

View File

@ -56,7 +56,6 @@ public slots:
private:
void inputUDP();
void inputMockRT();
double m_fAdd;
bool m_net;
@ -64,7 +63,6 @@ private:
bool m_bForceCenterFreq;
bool m_IQswap;
bool m_10db;
bool m_mockRT;
double m_dForceCenterFreq;
qint32 m_nrx;
qint32 m_hsym;
@ -79,7 +77,6 @@ private:
extern "C" {
void recvpkt_(int* nsam, quint16* iblk, qint8* nrx, int* k, double s1[],
double s2[], double s3[]);
void read_tf2_(int* k);
}
#endif // SOUNDIN_H