From 1f9b538232e23d78b4b0313cf0454515a98f5c77 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 9 May 2018 14:22:19 +0000 Subject: [PATCH] Allow Fox to work Hounds with compound calls. Needs more testing! git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8650 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- lib/decoder.f90 | 10 ++-------- mainwindow.cpp | 18 ++++++++++-------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/lib/decoder.f90 b/lib/decoder.f90 index 74434fab0..5f9913bde 100644 --- a/lib/decoder.f90 +++ b/lib/decoder.f90 @@ -453,7 +453,7 @@ contains real, intent(in) :: dt real, intent(in) :: freq character(len=37), intent(in) :: decoded - character c1*12,c2*6,g2*4,w*4,ctmp*12 + character c1*12,c2*12,g2*4,w*4,ctmp*12 integer i0,i1,i2,i3,i4,i5,i6,n30,nwrap integer, intent(in) :: nap real, intent(in) :: qual @@ -504,13 +504,7 @@ contains c2=decoded0(i1+1:i2-1) g2=decoded0(i2+1:i3-1) b0=c1.eq.params%mycall - ctmp=decoded0(i1+1:i2-1) - i6=index(ctmp,'/') - if(c1(1:3).eq.'DE ' .or. i6.gt.0) then - b0=.true. - if(i6.ge.2 .and. i6.lt.len(trim(ctmp))/2) c2=ctmp(i6+1:) - if(i6.ge.len(trim(ctmp))/2) c2=ctmp(:i6-1) - endif + if(c1(1:3).eq.'DE ' .and. index(c2,'/').ge.2) b0=.true. if(len(trim(c1)).ne.len(trim(params%mycall))) then i4=index(trim(c1),trim(params%mycall)) i5=index(trim(params%mycall),trim(c1)) diff --git a/mainwindow.cpp b/mainwindow.cpp index 1db91d2d3..cba7f36b9 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -7477,11 +7477,11 @@ void MainWindow::selectHound(QString line) m_houndCallers=m_houndCallers.remove(line+"\n"); // Remove t from sorted Hound list m_nSortedHounds--; ui->decodedTextBrowser->setText(m_houndCallers); // Populate left window with Hound callers - QString t1=houndCall + " "; + QString t1=houndCall + " "; QString t2=rpt; if(rpt.mid(0,1) != "-" and rpt.mid(0,1) != "+") t2="+" + rpt; if(t2.length()==2) t2=t2.mid(0,1) + "0" + t2.mid(1,1); - t1=t1.mid(0,7) + t2; + t1=t1.mid(0,12) + t2; ui->textBrowser4->displayFoxToBeCalled(t1,"#ffffff"); // Add hound call and rpt to tb4 t1=t1 + " " + houndGrid; // Append the grid m_houndQueue.enqueue(t1); // Put this hound into the queue @@ -7513,7 +7513,8 @@ void MainWindow::houndCallers() while(!s.atEnd()) { line=s.readLine(); nTotal++; - houndCall=line.mid(0,6).trimmed(); + int i0=line.indexOf(" "); + houndCall=line.mid(0,i0); paddedHoundCall=houndCall + " "; //Don't list a hound already in the queue if(!ui->textBrowser4->toPlainText().contains(paddedHoundCall)) { @@ -7662,7 +7663,8 @@ list1Done: while(!m_houndQueue.isEmpty()) { //Start QSO with a new Hound t=m_houndQueue.dequeue(); //Fetch new hound from queue - hc=t.mid(0,6).trimmed(); //hound call + int i0=t.indexOf(" "); + hc=t.mid(0,i0); //hound call list2 << hc; //Add new Hound to list2 m_foxQSOinProgress.enqueue(hc); //Put him in the QSO queue m_foxQSO[hc].grid=t.mid(11,4); //hound grid @@ -7687,12 +7689,15 @@ list2Done: fm=""; if(i0) hc1=Radio::base_callsign(hc1); hc2=list2.at(i); + if(hc2.indexOf("/")>0) hc2=Radio::base_callsign(hc2); m_foxQSO[hc2].ncall++; fm = hc1 + " RR73; " + hc2 + " <" + m_config.my_callsign() + "> " + m_foxQSO[hc2].sent; } if(i=n2) { hc1=list1.at(i); + if(hc1.indexOf("/")>0) hc1=Radio::base_callsign(hc1); fm = hc1 + " " + m_baseCall + " RR73"; //Standard FT8 message } @@ -7716,6 +7721,7 @@ list2Done: if(i0) hc2=Radio::base_callsign(hc2); m_foxQSO[hc2].ncall++; fm = hc2 + " " + m_baseCall + " " + m_foxQSO[hc2].sent; //Standard FT8 message } @@ -7752,9 +7758,6 @@ Transmit: bool b3=(m_foxQSO[hc].ncall >= m_maxStrikes+m_maxFoxWait); bool b4=(m_foxQSO[hc].nRR73 >= m_maxStrikes); if(b1 or b2 or b3 or b4) { -// qDebug() << m_tFoxTx << "Rem:" << hc << m_foxQSO[hc].tFoxRrpt -// << m_foxQSO[hc].tFoxTxRR73 << m_foxQSO[hc].ncall << m_foxQSO[hc].nRR73 -// << m_maxFoxWait << b1 << b2 << b3 << b4; m_foxQSO.remove(hc); m_foxQSOinProgress.removeOne(hc); } @@ -7912,7 +7915,6 @@ void MainWindow::foxTest() m_foxQSOinProgress.count(),m_foxQSO.count(), m_loggedByFox.count(),m_tFoxTx); sdiag << t << line.mid(37).trimmed() << "\n"; - // qDebug() << "aa " << t << line.mid(37).trimmed(); } } }