mirror of
				https://github.com/saitohirga/WSJT-X.git
				synced 2025-11-03 13:30:52 -05:00 
			
		
		
		
	Revert "Implement mock real-time input for MAP65: read data from a .tf2 file, with"
This reverts commit 60b0c5b98442d0da7529069ff2d598d345e9f89c.
This commit is contained in:
		
							parent
							
								
									924876e92c
								
							
						
					
					
						commit
						139478b865
					
				@ -62,7 +62,6 @@ set (libm65_FSRCS
 | 
			
		||||
  packjt.f90
 | 
			
		||||
  pfxdump.f90
 | 
			
		||||
  polfit.f90
 | 
			
		||||
  read_tf2.f90
 | 
			
		||||
  recvpkt.f90
 | 
			
		||||
  rfile3a.f90
 | 
			
		||||
  s3avg.f90
 | 
			
		||||
 | 
			
		||||
@ -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,59 +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);
 | 
			
		||||
      }
 | 
			
		||||
      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;
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -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
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user