Further progress toward Echo mode ...

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@5529 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2015-06-04 20:06:04 +00:00
parent d72b85d6c9
commit b70a02cfcf
1 changed files with 10 additions and 6 deletions

View File

@ -1798,10 +1798,7 @@ void MainWindow::guiUpdate()
static double onAirFreq0=0.0; static double onAirFreq0=0.0;
QString rt; QString rt;
if(m_mode=="Echo") { if(m_mode=="Echo") echoUpdate();
echoUpdate();
return;
}
double txDuration=1.0 + 85.0*m_nsps/12000.0; // JT9 double txDuration=1.0 + 85.0*m_nsps/12000.0; // JT9
if(m_modeTx=="JT65") txDuration=1.0 + 126*4096/11025.0; // JT65 if(m_modeTx=="JT65") txDuration=1.0 + 126*4096/11025.0; // JT65
@ -1820,6 +1817,8 @@ void MainWindow::guiUpdate()
double t2p=fmod(tsec,2*m_TRperiod); double t2p=fmod(tsec,2*m_TRperiod);
m_nseq = nsec % m_TRperiod; m_nseq = nsec % m_TRperiod;
if(m_mode=="Echo") goto ApplyDoppler;
if(m_mode.mid(0,4)=="WSPR") { if(m_mode.mid(0,4)=="WSPR") {
if(m_nseq==0 and m_ntr==0) { //Decide whether to Tx or Rx if(m_nseq==0 and m_ntr==0) { //Decide whether to Tx or Rx
m_tuneup=false; //This is not an ATU tuneup m_tuneup=false; //This is not an ATU tuneup
@ -2113,6 +2112,7 @@ void MainWindow::guiUpdate()
on_actionOpen_next_in_directory_triggered(); on_actionOpen_next_in_directory_triggered();
} }
ApplyDoppler:
Frequency f; Frequency f;
if(m_astroWidget) { if(m_astroWidget) {
m_bDopplerTracking = m_astroWidget->m_bDopplerTracking; m_bDopplerTracking = m_astroWidget->m_bDopplerTracking;
@ -4344,7 +4344,7 @@ void MainWindow::echoUpdate()
qint64 ms = QDateTime::currentMSecsSinceEpoch() % 86400000; qint64 ms = QDateTime::currentMSecsSinceEpoch() % 86400000;
double tsec=0.001*ms; double tsec=0.001*ms;
int nsec=tsec; // int nsec=tsec;
m_s6=fmod(tsec,6.0); m_s6=fmod(tsec,6.0);
// When m_s6 has wrapped back to zero, start a new cycle. // When m_s6 has wrapped back to zero, start a new cycle.
@ -4361,7 +4361,7 @@ void MainWindow::echoUpdate()
int nsec=t.time().second(); int nsec=t.time().second();
r4com_.nutc=10000*nhr+100*nmin+nsec; r4com_.nutc=10000*nhr+100*nmin+nsec;
*/ */
qDebug() << "Assert PTT";
Q_EMIT m_config.transceiver_ptt (true); //Assert the PTT Q_EMIT m_config.transceiver_ptt (true); //Assert the PTT
//Wait 0.2 s, then send a 2.304 s Tx pulse //Wait 0.2 s, then send a 2.304 s Tx pulse
// ptt1Timer->start(200); //Sequencer delay // ptt1Timer->start(200); //Sequencer delay
@ -4372,9 +4372,11 @@ void MainWindow::echoUpdate()
if(m_bTransmittedEcho and m_s6 > 5.4) { if(m_bTransmittedEcho and m_s6 > 5.4) {
m_bTransmittedEcho=false; m_bTransmittedEcho=false;
qDebug() << "Compute Echo Spectrum";
// dataSinkEcho(); // dataSinkEcho();
} }
/*
// float px=20.0*log10(datcom_.rms); // float px=20.0*log10(datcom_.rms);
// signalMeter->setValue(px); // Update signalmeter // signalMeter->setValue(px); // Update signalmeter
@ -4394,5 +4396,7 @@ void MainWindow::echoUpdate()
m_sec0=nsec; m_sec0=nsec;
qDebug() << "A" << nsec << m_s6; qDebug() << "A" << nsec << m_s6;
} }
*/
s6z=m_s6; s6z=m_s6;
} //End of echoUpdate() } //End of echoUpdate()