From 6248f713624e831c7ffed5d6a4a390be34fd20e0 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Tue, 17 Jan 2017 18:53:40 +0000 Subject: [PATCH] Remove most remaining references to nfast and m_nfast. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@7525 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- commons.h | 2 +- getfile.cpp | 8 ++++---- getfile.h | 4 ++-- mainwindow.cpp | 39 ++++++++++++--------------------------- mainwindow.h | 1 - soundin.cpp | 2 +- 6 files changed, 20 insertions(+), 36 deletions(-) diff --git a/commons.h b/commons.h index 00788f5ec..174456600 100644 --- a/commons.h +++ b/commons.h @@ -31,7 +31,7 @@ extern struct { //This is "common/datcom/..." in Fortran int nfsample; //Input sample rate int nxpol; //1 if using xpol antennas, 0 otherwise int nmode; //nmode = 10*m_modeQRA64 + m_modeJT65 - int nfast; //1 for sub-modes ABC; 2 for B2, C2 + int nfast; //No longer used int nsave; //Number of s3(64,63) spectra saved char mycall[12]; char mygrid[6]; diff --git a/getfile.cpp b/getfile.cpp index dd314c3ba..55f90c4ee 100644 --- a/getfile.cpp +++ b/getfile.cpp @@ -6,9 +6,9 @@ extern qint16 id[4*60*96000]; -void getfile(QString fname, bool xpol, int dbDgrd, int nfast) +void getfile(QString fname, bool xpol, int dbDgrd) { - int npts=2*52*96000/nfast; + int npts=2*52*96000; if(xpol) npts=2*npts; // Degrade S/N by dbDgrd dB -- for tests only!! @@ -53,9 +53,9 @@ void getfile(QString fname, bool xpol, int dbDgrd, int nfast) } } -void savetf2(QString fname, bool xpol, int nfast) +void savetf2(QString fname, bool xpol) { - int npts=2*52*96000/nfast; + int npts=2*52*96000; if(xpol) npts=2*npts; qint16* buf=(qint16*)malloc(2*npts); diff --git a/getfile.h b/getfile.h index abb3f89bc..796c31e5c 100644 --- a/getfile.h +++ b/getfile.h @@ -5,8 +5,8 @@ #include #include "commons.h" -void getfile(QString fname, bool xpol, int dbDgrd, int nfast); -void savetf2(QString fname, bool xpol, int nfast); +void getfile(QString fname, bool xpol, int dbDgrd); +void savetf2(QString fname, bool xpol); float gran(); #endif // GETFILE_H diff --git a/mainwindow.cpp b/mainwindow.cpp index 942c9cf72..3c0019ea1 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -157,7 +157,6 @@ MainWindow::MainWindow(QWidget *parent) : m_adjustIQ=0; m_applyIQcal=0; m_colors="000066ff0000ffff00969696646464"; - m_nfast=1; m_nsave=0; m_modeJT65=0; m_modeQRA64=0; @@ -614,7 +613,7 @@ void MainWindow::dataSink(int k) t.time().toString("hhmm"); if(m_xpol) fname += ".tf2"; if(!m_xpol) fname += ".iq"; - *future2 = QtConcurrent::run(savetf2, fname, m_xpol, m_nfast); + *future2 = QtConcurrent::run(savetf2, fname, m_xpol); watcher2->setFuture(*future2); } } @@ -1042,7 +1041,7 @@ void MainWindow::on_actionOpen_triggered() //Open File m_diskData=true; int dbDgrd=0; if(m_myCall=="K1JT" and m_idInt<0) dbDgrd=m_idInt; - *future1 = QtConcurrent::run(getfile, fname, m_xpol, dbDgrd, m_nfast); + *future1 = QtConcurrent::run(getfile, fname, m_xpol, dbDgrd); watcher1->setFuture(*future1); } } @@ -1074,7 +1073,7 @@ void MainWindow::on_actionOpen_next_in_directory_triggered() //Open Next m_diskData=true; int dbDgrd=0; if(m_myCall=="K1JT" and m_idInt<0) dbDgrd=m_idInt; - *future1 = QtConcurrent::run(getfile, fname, m_xpol, dbDgrd, m_nfast); + *future1 = QtConcurrent::run(getfile, fname, m_xpol, dbDgrd); watcher1->setFuture(*future1); return; } @@ -1096,7 +1095,7 @@ void MainWindow::diskDat() //diskDat() if(m_fs96000) hsym=2048.0*96000.0/11025.0; //Samples per JT65 half-symbol if(!m_fs96000) hsym=2048.0*95238.1/11025.0; - for(int i=0; i<284/m_nfast; i++) { // Do the half-symbol FFTs + for(int i=0; i<284; i++) { // Do the half-symbol FFTs int k = i*hsym + 2048.5; dataSink(k); if(i%10 == 0) qApp->processEvents(); //Keep the GUI responsive @@ -1203,10 +1202,7 @@ void MainWindow::on_actionAvailable_suffixes_and_add_on_prefixes_triggered() void MainWindow::on_DecodeButton_clicked() //Decode request { int n=m_sec0%m_TRperiod; - if(m_nfast==1) { - if(m_monitoring and n>47 and (n<52 or m_decoderBusy)) return; - } else { - if(m_monitoring and n>21 and (n<26 or m_decoderBusy)) return; } + if(m_monitoring and n>47 and (n<52 or m_decoderBusy)) return; if(!m_decoderBusy) { datcom_.newdat=0; datcom_.nagain=1; @@ -1276,7 +1272,7 @@ void MainWindow::decode() //decode() datcom_.nxpol=0; if(m_xpol) datcom_.nxpol=1; datcom_.nmode=10*m_modeQRA64 + m_modeJT65; - datcom_.nfast=m_nfast; + datcom_.nfast=1; //No longer used datcom_.nsave=m_nsave; QString mcall=(m_myCall+" ").mid(0,12); @@ -1421,7 +1417,7 @@ void MainWindow::guiUpdate() int khsym=0; double tx1=0.0; - double tx2=126.0*4096.0/(m_nfast*11025.0) + 1.8; + double tx2=126.0*4096.0/11025.0 + 1.8; if(m_modeTx=="QRA64") tx2=84.0*6912.0/12000.0 + 1.8; if(!m_txFirst) { @@ -1431,7 +1427,7 @@ void MainWindow::guiUpdate() qint64 ms = QDateTime::currentMSecsSinceEpoch() % 86400000; int nsec=ms/1000; double tsec=0.001*ms; - double t2p=fmod(tsec,120.0/m_nfast); + double t2p=fmod(tsec,120.0); bool bTxTime = (t2p >= tx1) and (t2p < tx2); if(bTune0 and !bTune) { @@ -1725,12 +1721,8 @@ void MainWindow::doubleClickOnCall(QString hiscall, bool ctrl) QString t1 = t.mid(0,i2); //contents up to text cursor int i1=t1.lastIndexOf("\n") + 1; QString t2 = t1.mid(i1,i2-i1); //selected line - if(m_nfast==1) { - int n = 60*t2.mid(13,2).toInt() + t2.mid(15,2).toInt(); - m_txFirst = ((n%2) == 1); - } else { - m_txFirst = (t2.mid(17,2).toInt()==30); - } + int n = 60*t2.mid(13,2).toInt() + t2.mid(15,2).toInt(); + m_txFirst = ((n%2) == 1); ui->txFirstCheckBox->setChecked(m_txFirst); QString rpt=""; if(ctrl or m_modeTx=="QRA64") rpt=t2.mid(25,3); @@ -1751,12 +1743,8 @@ void MainWindow::doubleClickOnMessages(QString hiscall, QString t2) msgBox("Possible dupe: " + hiscall + " already in log."); } ui->dxCallEntry->setText(hiscall); - if(m_nfast==1) { - int n = 60*t2.mid(13,2).toInt() + t2.mid(15,2).toInt(); - m_txFirst = ((n%2) == 1); - } else { - m_txFirst = (t2.mid(17,2).toInt()==30); - } + int n = 60*t2.mid(13,2).toInt() + t2.mid(15,2).toInt(); + m_txFirst = ((n%2) == 1); ui->txFirstCheckBox->setChecked(m_txFirst); lookup(); genStdMsgs(""); @@ -2083,7 +2071,6 @@ void MainWindow::on_actionJT65A_triggered() m_mode="JT65A"; m_modeJT65=1; m_mode65=1; - m_nfast=1; m_TRperiod=60; soundInThread.setPeriod(m_TRperiod); soundOutThread.setPeriod(m_TRperiod); @@ -2099,7 +2086,6 @@ void MainWindow::on_actionJT65B_triggered() m_mode="JT65B"; m_modeJT65=2; m_mode65=2; - m_nfast=1; m_TRperiod=60; soundInThread.setPeriod(m_TRperiod); soundOutThread.setPeriod(m_TRperiod); @@ -2115,7 +2101,6 @@ void MainWindow::on_actionJT65C_triggered() m_mode="JT65C"; m_modeJT65=3; m_mode65=4; - m_nfast=1; m_TRperiod=60; soundInThread.setPeriod(m_TRperiod); soundOutThread.setPeriod(m_TRperiod); diff --git a/mainwindow.h b/mainwindow.h index 68c8e2508..4983157d2 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -168,7 +168,6 @@ private: qint32 m_applyIQcal; qint32 m_mult570; qint32 m_mult570Tx; - qint32 m_nfast; qint32 m_nsum; qint32 m_nsave; qint32 m_TRperiod; diff --git a/soundin.cpp b/soundin.cpp index 093a4e4ce..77480cff8 100644 --- a/soundin.cpp +++ b/soundin.cpp @@ -32,7 +32,7 @@ extern struct { int nfsample; //Input sample rate int nxpol; //1 if using xpol antennas, 0 otherwise int mode65; //JT65 sub-mode: A=1, B=2, C=4 - int nfast; //1 for sub-modes ABC; 2 for B2, C2 + int nfast; //1No longer used int nsave; //Number of s3(64,63) spectra saved char mycall[12]; char mygrid[6];