Removed the bi-directional CAT control: an unsuccessful experiment.

Removed an unhelpful change to decoder().


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3193 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2013-04-17 14:53:58 +00:00
parent 3dfe7e5117
commit 8feedd22a2
5 changed files with 30 additions and 68 deletions

View File

@ -63,15 +63,16 @@ subroutine decoder(ss,c0,nstandalone)
do nqd=1,0,-1 do nqd=1,0,-1
limit=5000 limit=5000
ccflim=3.7 ccflim=4.0
if(ndepth.ge.2) then if(ndepth.ge.2) then
limit=50000 limit=50000
ccflim=2.9 ccflim=3.0
endif endif
if(ndepth.ge.3 .or. nqd.eq.1) then if(ndepth.ge.3 .or. nqd.eq.1) then
limit=200000 limit=200000
ccflim=2.5 ccflim=2.5
endif endif
! if(nstandalone.eq.1) ccflim=0.9*ccflim
if(nqd.eq.1) then if(nqd.eq.1) then
nfa1=nfqso-ntol nfa1=nfqso-ntol
@ -92,8 +93,8 @@ subroutine decoder(ss,c0,nstandalone)
ib1=ib ib1=ib
else else
do i=ia+9,ib-25 do i=ia+9,ib-25
t1=ccfred(i)/(sum(ccfred(i-8:i-6)/ccflim)) t1=ccfred(i)/(sum(ccfred(i-8:i-6)/3.0))
t2=ccfred(i)/(sum(ccfred(i+23:i+25)/ccflim)) t2=ccfred(i)/(sum(ccfred(i+23:i+25)/3.0))
if(t1.ge.ccflim .and. t2.ge.ccflim) ccfok(i)=.true. if(t1.ge.ccflim .and. t2.ge.ccflim) ccfok(i)=.true.
enddo enddo
ccfok(ia1:ib1)=.false. ccfok(ia1:ib1)=.false.

View File

@ -97,6 +97,8 @@ program jt9
! id2(i)=100.0*sin(6.283185307*1600.0*i/12000.0) ! id2(i)=100.0*sin(6.283185307*1600.0*i/12000.0)
! enddo ! enddo
id2=0 !??? Why is this necessary ???
do iblk=1,npts/kstep do iblk=1,npts/kstep
k=iblk*kstep k=iblk*kstep
call timer('read_wav',0) call timer('read_wav',0)

View File

@ -93,9 +93,6 @@ MainWindow::MainWindow(QSharedMemory *shdmem, QWidget *parent) :
connect(&proc_jt9, SIGNAL(readyReadStandardError()), connect(&proc_jt9, SIGNAL(readyReadStandardError()),
this, SLOT(readFromStderr())); this, SLOT(readFromStderr()));
connect(&p3, SIGNAL(readyReadStandardOutput()),
this, SLOT(readFromP3()));
connect(&p3, SIGNAL(error(QProcess::ProcessError)), connect(&p3, SIGNAL(error(QProcess::ProcessError)),
this, SLOT(p3_error())); this, SLOT(p3_error()));
@ -830,14 +827,6 @@ void MainWindow::dialFreqChanged2(double f)
t.sprintf("%.6f",m_dialFreq); t.sprintf("%.6f",m_dialFreq);
int n=t.length(); int n=t.length();
t=t.mid(0,n-3) + " " + t.mid(n-3,3); t=t.mid(0,n-3) + " " + t.mid(n-3,3);
float r=m_dialFreq/m_dialFreq0;
if(r>0.9 and r<1.1) {
ui->labDialFreq->setStyleSheet(
"QLabel {background-color : black; color : yellow; }");
} else {
ui->labDialFreq->setStyleSheet(
"QLabel{background-color: red; color : yellow; }");
}
ui->labDialFreq->setText(t); ui->labDialFreq->setText(t);
statusChanged(); statusChanged();
} }
@ -1371,15 +1360,6 @@ void MainWindow::readFromStdout() //readFromStdout
} }
} }
void MainWindow::readFromP3() //readFromP3
{
QByteArray t=p3.readAllStandardOutput();
QString s=t;
double fMHz=s.toDouble()/1000000.0;
int ndiff=1000000.0*(fMHz-m_dialFreq);
if(ndiff!=0) dialFreqChanged2(fMHz);
}
void MainWindow::killFile() void MainWindow::killFile()
{ {
if(m_fname==m_fileToSave) { if(m_fname==m_fileToSave) {
@ -1444,8 +1424,8 @@ void MainWindow::guiUpdate()
if(m_iptt==0 and ((bTxTime and !btxMute and fTR<0.4) or m_tune )) { if(m_iptt==0 and ((bTxTime and !btxMute and fTR<0.4) or m_tune )) {
icw[0]=m_ncw; icw[0]=m_ncw;
//Raise PTT //Raise PTT
if(m_pttMethodIndex==0) { //CAT control for PTT if(m_pttMethodIndex==0) { //CAT control for PTT=1
m_cmnd=rig_command() + " T 1"; m_cmnd=rig_command() + " T 1";
p3.start(m_cmnd); p3.start(m_cmnd);
p3.waitForFinished(); p3.waitForFinished();
@ -1453,7 +1433,6 @@ void MainWindow::guiUpdate()
} }
if(m_pttMethodIndex==1 or m_pttMethodIndex==2) { //DTR or RTS if(m_pttMethodIndex==1 or m_pttMethodIndex==2) { //DTR or RTS
ptt(m_pttPort,1,&m_iptt,&m_COMportOpen); ptt(m_pttPort,1,&m_iptt,&m_COMportOpen);
// ptt(m_pttPort,1,&m_iptt);
} }
if(m_pttMethodIndex==3) { //VOX if(m_pttMethodIndex==3) { //VOX
m_iptt=1; m_iptt=1;
@ -1577,7 +1556,7 @@ void MainWindow::guiUpdate()
if(nc0 == 0) { if(nc0 == 0) {
//Lower PTT //Lower PTT
if(m_pttMethodIndex==0) { //CAT if(m_pttMethodIndex==0) { //CAT for PTT=0
m_cmnd=rig_command() + " T 0"; m_cmnd=rig_command() + " T 0";
p3.start(m_cmnd); p3.start(m_cmnd);
p3.waitForFinished(); p3.waitForFinished();
@ -1618,9 +1597,13 @@ void MainWindow::guiUpdate()
} else { } else {
lab1->setStyleSheet("QLabel{background-color: #ffff33}"); lab1->setStyleSheet("QLabel{background-color: #ffff33}");
} }
char s[37]; if(m_tune) {
sprintf(s,"Tx: %s",msgsent); lab1->setText("Tx: TUNE");
lab1->setText(s); } else {
char s[37];
sprintf(s,"Tx: %s",msgsent);
lab1->setText(s);
}
} else if(m_monitoring) { } else if(m_monitoring) {
lab1->setStyleSheet("QLabel{background-color: #00ff00}"); lab1->setStyleSheet("QLabel{background-color: #00ff00}");
lab1->setText("Receiving "); lab1->setText("Receiving ");
@ -1638,12 +1621,6 @@ void MainWindow::guiUpdate()
} }
m_hsym0=khsym; m_hsym0=khsym;
m_sec0=nsec; m_sec0=nsec;
if(m_catEnabled) {
m_cmnd=rig_command() + " f";
p3.start(m_cmnd);
p3.waitForFinished();
}
} }
iptt0=m_iptt; iptt0=m_iptt;
@ -1680,18 +1657,17 @@ QString MainWindow::rig_command()
void MainWindow::startTx2() void MainWindow::startTx2()
{ {
if(!soundOutThread.isRunning()) { if(!soundOutThread.isRunning()) {
if(!soundOutThread.isRunning()) { QString t=ui->tx6->text();
QString t=ui->tx6->text(); double snr=t.mid(1,5).toDouble();
double snr=t.mid(1,5).toDouble(); if(snr>0.0 or snr < -50.0) snr=99.0;
if(snr>0.0 or snr < -50.0) snr=99.0; soundOutThread.setTxSNR(snr);
soundOutThread.setTxSNR(snr); soundOutThread.start(QThread::HighPriority);
soundOutThread.start(QThread::HighPriority);
}
ui->xThermo->setValue(0.0); //Set Thermo to zero ui->xThermo->setValue(0.0); //Set Thermo to zero
m_monitoring=false; m_monitoring=false;
soundInThread.setMonitoring(false); soundInThread.setMonitoring(false);
btxok=true; btxok=true;
m_transmitting=true; m_transmitting=true;
ui->tuneButton->setEnabled(true);
} }
} }
@ -1714,7 +1690,7 @@ void MainWindow::stopTx2()
{ {
//Lower PTT //Lower PTT
if(m_pttMethodIndex==0) { if(m_pttMethodIndex==0) {
m_cmnd=rig_command() + " T 0"; m_cmnd=rig_command() + " T 0"; //CAT for PTT=0
p3.start(m_cmnd); p3.start(m_cmnd);
p3.waitForFinished(); p3.waitForFinished();
} }
@ -2445,7 +2421,6 @@ void MainWindow::on_bandComboBox_currentIndexChanged(int index)
m_band=index; m_band=index;
QString t=m_dFreq[index]; QString t=m_dFreq[index];
m_dialFreq=t.toDouble(); m_dialFreq=t.toDouble();
m_dialFreq0=m_dialFreq;
dialFreqChanged2(m_dialFreq); dialFreqChanged2(m_dialFreq);
m_repeatMsg=0; m_repeatMsg=0;
if(m_catEnabled) { if(m_catEnabled) {
@ -2589,17 +2564,14 @@ void MainWindow::on_actionTx2QSO_triggered(bool checked)
void MainWindow::on_tuneButton_clicked() void MainWindow::on_tuneButton_clicked()
{ {
m_tune=!m_tune; m_tune=!m_tune;
m_repeatMsg=0;
soundOutThread.setTune(m_tune); soundOutThread.setTune(m_tune);
if(m_tune) { if(m_tune) {
ui->tuneButton->setStyleSheet(m_pbTune_style); ui->tuneButton->setStyleSheet(m_pbTune_style);
ui->tuneButton->setEnabled(false);
} else { } else {
btxok=false; btxok=false;
ui->tuneButton->setStyleSheet(""); ui->tuneButton->setStyleSheet("");
on_monitorButton_clicked(); on_monitorButton_clicked();
} }
/*
rigOpen(214,0);
rigSetFreq(10138700);
qDebug() << "Freq:" << rigFreq();
*/
} }

View File

@ -37,7 +37,6 @@ public slots:
void doubleClickOnCall2(bool shift, bool ctrl); void doubleClickOnCall2(bool shift, bool ctrl);
void readFromStdout(); void readFromStdout();
void readFromStderr(); void readFromStderr();
void readFromP3();
void jt9_error(); void jt9_error();
void p3_error(); void p3_error();
@ -158,7 +157,6 @@ private:
Ui::MainWindow *ui; Ui::MainWindow *ui;
double m_dialFreq; double m_dialFreq;
double m_dialFreq0;
qint64 m_msErase; qint64 m_msErase;
qint32 m_nDevIn; qint32 m_nDevIn;
@ -366,13 +364,6 @@ void azdist_(char* MyGrid, char* HisGrid, double* utch, int* nAz, int* nEl,
int len1, int len2); int len1, int len2);
void morse_(char* msg, int* icw, int* ncw, int len); void morse_(char* msg, int* icw, int* ncw, int len);
//void rig_control(int nrig, int verbose);
int rigOpen(int nrig, int verbose);
void rigSetFreq(int fHz);
int rigFreq();
} }
#endif // MAINWINDOW_H #endif // MAINWINDOW_H

View File

@ -33,10 +33,8 @@ QMAKE_EXTRA_COMPILERS += gfortran
} }
SOURCES += main.cpp mainwindow.cpp plotter.cpp about.cpp \ SOURCES += main.cpp mainwindow.cpp plotter.cpp about.cpp \
soundin.cpp soundout.cpp devsetup.cpp \ soundin.cpp soundout.cpp devsetup.cpp widegraph.cpp \
widegraph.cpp getfile.cpp \ getfile.cpp displaytext.cpp getdev.cpp logqso.cpp \
displaytext.cpp getdev.cpp \
logqso.cpp \
psk_reporter.cpp psk_reporter.cpp
win32 { win32 {
@ -45,9 +43,8 @@ SOURCES += killbyname.cpp
HEADERS += mainwindow.h plotter.h soundin.h soundout.h \ HEADERS += mainwindow.h plotter.h soundin.h soundout.h \
about.h devsetup.h widegraph.h getfile.h \ about.h devsetup.h widegraph.h getfile.h \
commons.h sleep.h displaytext.h \ commons.h sleep.h displaytext.h logqso.h \
logqso.h \ psk_reporter.h
psk_reporter.h
DEFINES += __cplusplus DEFINES += __cplusplus
@ -65,7 +62,6 @@ LIBS += -lportaudio -lgfortran -lfftw3f -lqwt-qt4
win32 { win32 {
INCLUDEPATH += c:/qwt-6.0.1/include INCLUDEPATH += c:/qwt-6.0.1/include
LIBS += ../wsjtx/lib/libjt9.a LIBS += ../wsjtx/lib/libjt9.a
LIBS += ../wsjtx/lib/libhamlib.dll.a
LIBS += ../wsjtx/libfftw3f_win.a LIBS += ../wsjtx/libfftw3f_win.a
LIBS += ../wsjtx/libpskreporter.a LIBS += ../wsjtx/libpskreporter.a
LIBS += ../QtSupport/palir-02.dll LIBS += ../QtSupport/palir-02.dll