mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-27 14:48:46 -05:00
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:
parent
3dfe7e5117
commit
8feedd22a2
@ -63,15 +63,16 @@ subroutine decoder(ss,c0,nstandalone)
|
||||
|
||||
do nqd=1,0,-1
|
||||
limit=5000
|
||||
ccflim=3.7
|
||||
ccflim=4.0
|
||||
if(ndepth.ge.2) then
|
||||
limit=50000
|
||||
ccflim=2.9
|
||||
ccflim=3.0
|
||||
endif
|
||||
if(ndepth.ge.3 .or. nqd.eq.1) then
|
||||
limit=200000
|
||||
ccflim=2.5
|
||||
endif
|
||||
! if(nstandalone.eq.1) ccflim=0.9*ccflim
|
||||
|
||||
if(nqd.eq.1) then
|
||||
nfa1=nfqso-ntol
|
||||
@ -92,8 +93,8 @@ subroutine decoder(ss,c0,nstandalone)
|
||||
ib1=ib
|
||||
else
|
||||
do i=ia+9,ib-25
|
||||
t1=ccfred(i)/(sum(ccfred(i-8:i-6)/ccflim))
|
||||
t2=ccfred(i)/(sum(ccfred(i+23:i+25)/ccflim))
|
||||
t1=ccfred(i)/(sum(ccfred(i-8:i-6)/3.0))
|
||||
t2=ccfred(i)/(sum(ccfred(i+23:i+25)/3.0))
|
||||
if(t1.ge.ccflim .and. t2.ge.ccflim) ccfok(i)=.true.
|
||||
enddo
|
||||
ccfok(ia1:ib1)=.false.
|
||||
|
@ -97,6 +97,8 @@ program jt9
|
||||
! id2(i)=100.0*sin(6.283185307*1600.0*i/12000.0)
|
||||
! enddo
|
||||
|
||||
id2=0 !??? Why is this necessary ???
|
||||
|
||||
do iblk=1,npts/kstep
|
||||
k=iblk*kstep
|
||||
call timer('read_wav',0)
|
||||
|
@ -93,9 +93,6 @@ MainWindow::MainWindow(QSharedMemory *shdmem, QWidget *parent) :
|
||||
connect(&proc_jt9, SIGNAL(readyReadStandardError()),
|
||||
this, SLOT(readFromStderr()));
|
||||
|
||||
connect(&p3, SIGNAL(readyReadStandardOutput()),
|
||||
this, SLOT(readFromP3()));
|
||||
|
||||
connect(&p3, SIGNAL(error(QProcess::ProcessError)),
|
||||
this, SLOT(p3_error()));
|
||||
|
||||
@ -830,14 +827,6 @@ void MainWindow::dialFreqChanged2(double f)
|
||||
t.sprintf("%.6f",m_dialFreq);
|
||||
int n=t.length();
|
||||
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);
|
||||
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()
|
||||
{
|
||||
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 )) {
|
||||
icw[0]=m_ncw;
|
||||
|
||||
//Raise PTT
|
||||
if(m_pttMethodIndex==0) { //CAT control for PTT
|
||||
//Raise PTT
|
||||
if(m_pttMethodIndex==0) { //CAT control for PTT=1
|
||||
m_cmnd=rig_command() + " T 1";
|
||||
p3.start(m_cmnd);
|
||||
p3.waitForFinished();
|
||||
@ -1453,7 +1433,6 @@ void MainWindow::guiUpdate()
|
||||
}
|
||||
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);
|
||||
}
|
||||
if(m_pttMethodIndex==3) { //VOX
|
||||
m_iptt=1;
|
||||
@ -1577,7 +1556,7 @@ void MainWindow::guiUpdate()
|
||||
if(nc0 == 0) {
|
||||
|
||||
//Lower PTT
|
||||
if(m_pttMethodIndex==0) { //CAT
|
||||
if(m_pttMethodIndex==0) { //CAT for PTT=0
|
||||
m_cmnd=rig_command() + " T 0";
|
||||
p3.start(m_cmnd);
|
||||
p3.waitForFinished();
|
||||
@ -1618,9 +1597,13 @@ void MainWindow::guiUpdate()
|
||||
} else {
|
||||
lab1->setStyleSheet("QLabel{background-color: #ffff33}");
|
||||
}
|
||||
char s[37];
|
||||
sprintf(s,"Tx: %s",msgsent);
|
||||
lab1->setText(s);
|
||||
if(m_tune) {
|
||||
lab1->setText("Tx: TUNE");
|
||||
} else {
|
||||
char s[37];
|
||||
sprintf(s,"Tx: %s",msgsent);
|
||||
lab1->setText(s);
|
||||
}
|
||||
} else if(m_monitoring) {
|
||||
lab1->setStyleSheet("QLabel{background-color: #00ff00}");
|
||||
lab1->setText("Receiving ");
|
||||
@ -1638,12 +1621,6 @@ void MainWindow::guiUpdate()
|
||||
}
|
||||
m_hsym0=khsym;
|
||||
m_sec0=nsec;
|
||||
|
||||
if(m_catEnabled) {
|
||||
m_cmnd=rig_command() + " f";
|
||||
p3.start(m_cmnd);
|
||||
p3.waitForFinished();
|
||||
}
|
||||
}
|
||||
|
||||
iptt0=m_iptt;
|
||||
@ -1680,18 +1657,17 @@ QString MainWindow::rig_command()
|
||||
void MainWindow::startTx2()
|
||||
{
|
||||
if(!soundOutThread.isRunning()) {
|
||||
if(!soundOutThread.isRunning()) {
|
||||
QString t=ui->tx6->text();
|
||||
double snr=t.mid(1,5).toDouble();
|
||||
if(snr>0.0 or snr < -50.0) snr=99.0;
|
||||
soundOutThread.setTxSNR(snr);
|
||||
soundOutThread.start(QThread::HighPriority);
|
||||
}
|
||||
QString t=ui->tx6->text();
|
||||
double snr=t.mid(1,5).toDouble();
|
||||
if(snr>0.0 or snr < -50.0) snr=99.0;
|
||||
soundOutThread.setTxSNR(snr);
|
||||
soundOutThread.start(QThread::HighPriority);
|
||||
ui->xThermo->setValue(0.0); //Set Thermo to zero
|
||||
m_monitoring=false;
|
||||
soundInThread.setMonitoring(false);
|
||||
btxok=true;
|
||||
m_transmitting=true;
|
||||
ui->tuneButton->setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1714,7 +1690,7 @@ void MainWindow::stopTx2()
|
||||
{
|
||||
//Lower PTT
|
||||
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.waitForFinished();
|
||||
}
|
||||
@ -2445,7 +2421,6 @@ void MainWindow::on_bandComboBox_currentIndexChanged(int index)
|
||||
m_band=index;
|
||||
QString t=m_dFreq[index];
|
||||
m_dialFreq=t.toDouble();
|
||||
m_dialFreq0=m_dialFreq;
|
||||
dialFreqChanged2(m_dialFreq);
|
||||
m_repeatMsg=0;
|
||||
if(m_catEnabled) {
|
||||
@ -2589,17 +2564,14 @@ void MainWindow::on_actionTx2QSO_triggered(bool checked)
|
||||
void MainWindow::on_tuneButton_clicked()
|
||||
{
|
||||
m_tune=!m_tune;
|
||||
m_repeatMsg=0;
|
||||
soundOutThread.setTune(m_tune);
|
||||
if(m_tune) {
|
||||
ui->tuneButton->setStyleSheet(m_pbTune_style);
|
||||
ui->tuneButton->setEnabled(false);
|
||||
} else {
|
||||
btxok=false;
|
||||
ui->tuneButton->setStyleSheet("");
|
||||
on_monitorButton_clicked();
|
||||
}
|
||||
/*
|
||||
rigOpen(214,0);
|
||||
rigSetFreq(10138700);
|
||||
qDebug() << "Freq:" << rigFreq();
|
||||
*/
|
||||
}
|
||||
|
@ -37,7 +37,6 @@ public slots:
|
||||
void doubleClickOnCall2(bool shift, bool ctrl);
|
||||
void readFromStdout();
|
||||
void readFromStderr();
|
||||
void readFromP3();
|
||||
void jt9_error();
|
||||
void p3_error();
|
||||
|
||||
@ -158,7 +157,6 @@ private:
|
||||
Ui::MainWindow *ui;
|
||||
|
||||
double m_dialFreq;
|
||||
double m_dialFreq0;
|
||||
|
||||
qint64 m_msErase;
|
||||
qint32 m_nDevIn;
|
||||
@ -366,13 +364,6 @@ void azdist_(char* MyGrid, char* HisGrid, double* utch, int* nAz, int* nEl,
|
||||
int len1, int len2);
|
||||
|
||||
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
|
||||
|
12
wsjtx.pro
12
wsjtx.pro
@ -33,10 +33,8 @@ QMAKE_EXTRA_COMPILERS += gfortran
|
||||
}
|
||||
|
||||
SOURCES += main.cpp mainwindow.cpp plotter.cpp about.cpp \
|
||||
soundin.cpp soundout.cpp devsetup.cpp \
|
||||
widegraph.cpp getfile.cpp \
|
||||
displaytext.cpp getdev.cpp \
|
||||
logqso.cpp \
|
||||
soundin.cpp soundout.cpp devsetup.cpp widegraph.cpp \
|
||||
getfile.cpp displaytext.cpp getdev.cpp logqso.cpp \
|
||||
psk_reporter.cpp
|
||||
|
||||
win32 {
|
||||
@ -45,9 +43,8 @@ SOURCES += killbyname.cpp
|
||||
|
||||
HEADERS += mainwindow.h plotter.h soundin.h soundout.h \
|
||||
about.h devsetup.h widegraph.h getfile.h \
|
||||
commons.h sleep.h displaytext.h \
|
||||
logqso.h \
|
||||
psk_reporter.h
|
||||
commons.h sleep.h displaytext.h logqso.h \
|
||||
psk_reporter.h
|
||||
|
||||
DEFINES += __cplusplus
|
||||
|
||||
@ -65,7 +62,6 @@ LIBS += -lportaudio -lgfortran -lfftw3f -lqwt-qt4
|
||||
win32 {
|
||||
INCLUDEPATH += c:/qwt-6.0.1/include
|
||||
LIBS += ../wsjtx/lib/libjt9.a
|
||||
LIBS += ../wsjtx/lib/libhamlib.dll.a
|
||||
LIBS += ../wsjtx/libfftw3f_win.a
|
||||
LIBS += ../wsjtx/libpskreporter.a
|
||||
LIBS += ../QtSupport/palir-02.dll
|
||||
|
Loading…
Reference in New Issue
Block a user