Add logic for erasing wsjtx_rx.log.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2697 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2012-10-27 14:09:34 +00:00
parent 4de2b75ff7
commit 698d997003
3 changed files with 10 additions and 6 deletions

View File

@ -1,4 +1,4 @@
subroutine decoder(ntrSeconds,c0)
subroutine decoder(ntrSeconds,nRxLog,c0)
! Decoder for JT9. Can run stand-alone, reading data from *.wav files;
! or as the back end of wsjt-x, with data placed in a shared memory region.
@ -63,6 +63,10 @@ subroutine decoder(ntrSeconds,c0)
open(14,file='wsjtx_rx.log',status='unknown',position='append')
first=.false.
endif
if(iand(nRxLog,2).ne.0) rewind 14
if(iand(nRxLog,1).ne.0) then
! Write date and time to lu 14
endif
write(14,1010) nutc,nsync,nsnr,xdt,1000.0+fpk,width,msg
call flush(14)

View File

@ -859,7 +859,9 @@ void MainWindow::decode() //decode()
jt9com_.nfqso=g_pWideGraph->QSOfreq();
m_tol=g_pWideGraph->Tol();
jt9com_.ntol=m_tol;
*future3 = QtConcurrent::run(decoder_, &m_TRperiod, &c0[0]);
if(jt9com_.nutc < m_nutc0) m_RxLog |= 1; //Date and Time to wsjtx_rx.log
m_nutc0=jt9com_.nutc;
*future3 = QtConcurrent::run(decoder_, &m_TRperiod, &m_RxLog, &c0[0]);
watcher3->setFuture(*future3);
}
@ -1342,7 +1344,6 @@ void MainWindow::on_logQSOButton_clicked() //Log QSO button
f.close();
}
/*
void MainWindow::on_actionErase_wsjtx_rx_log_triggered() //Erase Rx log
{
int ret = QMessageBox::warning(this, "Confirm Erase",
@ -1352,7 +1353,6 @@ void MainWindow::on_actionErase_wsjtx_rx_log_triggered() //Erase Rx log
m_RxLog |= 2; // Rewind wsjtx_rx.log
}
}
*/
void MainWindow::on_actionErase_wsjtx_tx_log_triggered() //Erase Tx log
{

View File

@ -96,7 +96,7 @@ private slots:
void on_genStdMsgsPushButton_clicked();
void bumpDF(int n);
void on_logQSOButton_clicked();
// void on_actionErase_wsjtx_rx_log_triggered();
void on_actionErase_wsjtx_rx_log_triggered();
void on_actionErase_wsjtx_tx_log_triggered();
void on_actionAFMHot_triggered();
void on_actionBlue_triggered();
@ -225,7 +225,7 @@ void symspec_(int* k, int* ntrperiod, int* nsps, int* nb, int* m_NBslider,
void genjt9_(char* msg, char* msgsent, int itone[], int len1, int len2);
void decoder_(int* ntrperiod, float c0[]);
void decoder_(int* ntrperiod, int* mRxLog, float c0[]);
int ptt_(int* nport, int* itx, int* iptt);
}