From 9f760483d37e7a733bbee11e83600668bff29307 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 17 Jul 2013 14:18:18 +0000 Subject: [PATCH] 1. Double-click on a yellow Tx message should not copy the message again, and if CTRL is held down it should set Tx as well as Rx freq. Fixed. 2. Improve the logic for suppressing duplicate JT65 decodes. 3. Disable the "Advanced" item on Setup menu. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3491 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- lib/jt65a.f90 | 12 +++++++++--- mainwindow.cpp | 14 ++++++++------ mainwindow.ui | 19 +++++++++++-------- wsjtx.iss | 2 +- 4 files changed, 29 insertions(+), 18 deletions(-) diff --git a/lib/jt65a.f90 b/lib/jt65a.f90 index 4dba69241..b22e45c75 100644 --- a/lib/jt65a.f90 +++ b/lib/jt65a.f90 @@ -20,9 +20,10 @@ subroutine jt65a(dd,npts,newdat,nutc,nfa,nfqso,ntol,nagain,ndecoded) endif df=12000.0/NFFT !df = 12000.0/16384 = 0.732 Hz - ftol=15.0 !Frequency tolerance (Hz) + ftol=16.0 !Frequency tolerance (Hz) mode65=1 !Decoding JT65A only, for now. done=.false. + freq0=-999. do nqd=1,0,-1 if(nqd.eq.1) then !Quick decode, at fQSO @@ -35,7 +36,6 @@ subroutine jt65a(dd,npts,newdat,nutc,nfa,nfqso,ntol,nagain,ndecoded) ia=max(51,nint(fa/df)) ib=min(NSZ-51,nint(fb/df)) - freq0=-999. thresh0=1.5 do i=ia,ib !Search over freq range @@ -66,6 +66,12 @@ subroutine jt65a(dd,npts,newdat,nutc,nfa,nfqso,ntol,nagain,ndecoded) nbmkv,nhist,decoded) call timer('decod65a',1) +! write(71,3001) ia,ib,i,nfqso,freq0,freq,freq+a(1),decoded +!3001 format(4i6,3f10.3,2x,a22) +! call flush(71) + + if(freq+a(1)-freq0.lt.ftol) cycle + if(decoded.ne.' ') then ndecoded=1 nfreq=nint(freq+a(1)) @@ -79,7 +85,7 @@ subroutine jt65a(dd,npts,newdat,nutc,nfa,nfqso,ntol,nagain,ndecoded) write(13,1012) nutc,nint(sync1),nsnr,dt,float(nfreq),ndrift, & decoded,nbmkv 1012 format(i4.4,i4,i5,f6.1,f8.0,i4,3x,a22,' JT65',i4) - freq0=freq + freq0=freq+a(1) i2=min(NSZ,i+15) !### ??? ### done(i:i2)=.true. endif diff --git a/mainwindow.cpp b/mainwindow.cpp index 82396841d..ce7809d48 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1420,7 +1420,7 @@ void MainWindow::readFromStdout() //readFromStdout QString bg="white"; if(t.indexOf(" CQ ")>0) bg="#66ff66"; //green if(m_myCall!="" and t.indexOf(" "+m_myCall+" ")>0) bg="#ff6666"; //red - bool bQSO=abs(t.mid(14,4).toInt() - g_pWideGraph->rxFreq()) < 10; + bool bQSO=abs(t.mid(14,4).toInt() - g_pWideGraph->rxFreq()) <= 10; QString t1=t.replace("\n","").mid(0,t.length()-4); QString s = "
" + t1 + "
"; @@ -2004,7 +2004,7 @@ void MainWindow::doubleClickOnCall(bool shift, bool ctrl) QString t1 = t.mid(0,i2); //contents up to \n on selected line int i1=t1.lastIndexOf("\n") + 1; //points to first char of line QString t2 = t1.mid(i1,i2-i1); //selected line - if(t2.indexOf("Tx:")==7) return; //Ignore Tx line +// if(t2.indexOf("Tx")==6) return; //Ignore Tx line int i4=t.mid(i1).length(); if(i4>55) i4=55; QString t3=t.mid(i1,i4); @@ -2014,7 +2014,7 @@ void MainWindow::doubleClickOnCall(bool shift, bool ctrl) if(t4.length() <5) return; //Skip the rest if no decoded text int i9=m_QSOmsg.indexOf(t2); - if(i9<0) { + if(i9<0 and t2.indexOf("Tx")==-1) { QString bg="white"; if(t2.indexOf(" CQ ")>0) bg="#66ff66"; //green if(m_myCall!="" and t2.indexOf(" "+m_myCall+" ")>0) bg="#ff6666"; //red @@ -2032,9 +2032,11 @@ void MainWindow::doubleClickOnCall(bool shift, bool ctrl) int nfreq=t4.at(3).toInt(); if(t4.at(1)=="Tx") nfreq=t4.at(2).toInt(); - g_pWideGraph->setRxFreq(nfreq); //Set Rx freq - if(t4.at(1)=="Tx") return; - + g_pWideGraph->setRxFreq(nfreq); //Set Rx freq + if(t4.at(1)=="Tx") { + if(ctrl) ui->TxFreqSpinBox->setValue(nfreq); //Set Tx freq + return; + } if(t4.at(4)=="@") { m_modeTx="JT9"; ui->pbTxMode->setText("Tx JT9 @"); diff --git a/mainwindow.ui b/mainwindow.ui index 60abbeff5..8b6395af3 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -84,7 +84,7 @@ <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Courier New'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> false @@ -869,7 +869,7 @@ p, li { white-space: pre-wrap; } - buttonGroup + buttonGroup @@ -903,7 +903,7 @@ p, li { white-space: pre-wrap; } true - buttonGroup + buttonGroup @@ -934,7 +934,7 @@ p, li { white-space: pre-wrap; } - buttonGroup + buttonGroup @@ -1102,7 +1102,7 @@ p, li { white-space: pre-wrap; } - buttonGroup + buttonGroup @@ -1250,7 +1250,7 @@ p, li { white-space: pre-wrap; } - buttonGroup + buttonGroup @@ -1281,7 +1281,7 @@ p, li { white-space: pre-wrap; } - buttonGroup + buttonGroup @@ -2191,7 +2191,7 @@ p, li { white-space: pre-wrap; } 0 0 760 - 25 + 21 @@ -2213,6 +2213,9 @@ p, li { white-space: pre-wrap; } Setup + + false + Advanced diff --git a/wsjtx.iss b/wsjtx.iss index 397219f0b..8d550fabc 100644 --- a/wsjtx.iss +++ b/wsjtx.iss @@ -1,6 +1,6 @@ [Setup] AppName=wsjtx -AppVerName=wsjtx Version 1.1.0 r3487 +AppVerName=wsjtx Version 1.1.0 r3488 AppCopyright=Copyright (C) 2001-2013 by Joe Taylor, K1JT DefaultDirName=c:\wsjtx2 DefaultGroupName=wsjtx2