diff --git a/lib/ft4/ft4_decode.f90 b/lib/ft4/ft4_decode.f90 index 63cc6753e..4e4959b37 100644 --- a/lib/ft4/ft4_decode.f90 +++ b/lib/ft4/ft4_decode.f90 @@ -265,7 +265,7 @@ subroutine ft4_decode(cdatetime0,tbuf,nfa,nfb,nQSOProgress,ncontest,nfqso, & ip=maxloc(s4(:,k+99)) if(icos4d(k-1).eq.(ip(1)-1)) is4=is4+1 enddo - nsync=is1+is2+is3+is4 !Number of hard sync errors, 0-16 + nsync=is1+is2+is3+is4 !Number of correct hard sync symbols, 0-16 if(smax .lt. 0.7 .or. nsync .lt. 8) cycle do nseq=1,3 !Try coherent sequences of 1, 2, and 4 symbols @@ -460,17 +460,15 @@ subroutine ft4_decode(cdatetime0,tbuf,nfa,nfb,nQSOProgress,ncontest,nfqso, & fname=data_dir(1:l1+1)//'all_ft4.txt' open(24,file=trim(fname),status='unknown',position='append') write(24,1002) cdatetime0,nsnr,tsig,nint(freq),message, & - nharderror,nsync_qual,ipass,niterations,iaptype + nharderror,nsync_qual,ipass,niterations,iaptype,nsync if(hhmmss.eq.' ') write(*,1002) cdatetime0,nsnr, & tsig,nint(freq),message,nharderror,nsync_qual,ipass, & niterations,iaptype -1002 format(a17,i4,f5.1,i5,' Rx ',a37,5i5) +1002 format(a17,i4,f5.1,i5,' Rx ',a37,6i4) close(24) linex(ndecodes)=line if(ibest.ge.ibmax-15) msg0=message !Possible dupe candidate - exit - endif enddo !Sequence estimation enddo !Candidate list diff --git a/lib/ft4/ft4d.f90 b/lib/ft4/ft4d.f90 index c8dae7bda..fa7c8045a 100644 --- a/lib/ft4/ft4d.f90 +++ b/lib/ft4/ft4d.f90 @@ -54,14 +54,14 @@ program ft4d do ifile=iarg,nargs call getarg(ifile,infile) - j2=index(infile,'.wav') open(10,file=infile,status='old',access='stream') read(10) ihdr - npts=ihdr(11)/2 + npts=min(ihdr(11)/2,180000) read(10) iwave(1:npts) close(10) - cdatetime=infile(1:13)//'.000' - + cdatetime=infile + j2=index(infile,'.wav') + if(j2.ge.14) cdatetime=infile(j2-13:j2)//'000' istep=3456 nsteps=(npts-52800)/istep + 1 do n=1,nsteps diff --git a/lib/ft4/ft4sim.f90 b/lib/ft4/ft4sim.f90 index 0a9a1dcbc..1481840c8 100644 --- a/lib/ft4/ft4sim.f90 +++ b/lib/ft4/ft4sim.f90 @@ -25,9 +25,8 @@ program ft4sim nargs=iargc() if(nargs.ne.7) then print*,'Usage: ft4sim "message" f0 DT fdop del nfiles snr' - print*,'Examples: ft4sim "K1ABC W9XYZ EN37" 1500.0 0.0 0.1 1.0 10 -15' - print*,' ft4sim "WA9XYZ/R KA1ABC/R FN42" 1500.0 0.0 0.1 1.0 10 -15' - print*,' ft4sim "K1ABC RR73; W9XYZ -11" 300 0 0 0 1 -10' + print*,'Examples: ft4sim "CQ W9XYZ EN37" 1500 0.0 0.1 1.0 10 -15' + print*,' ft4sim "K1ABC W9XYZ R 539 WI" 1500 0.0 0.1 1.0 10 -15' go to 999 endif call getarg(1,msg37) !Message to be transmitted diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index b318d2528..a741d901e 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3892,10 +3892,12 @@ void MainWindow::guiUpdate() SpecOp::RTTY==m_config.special_op_id()) ) { //We're in a contest-like mode other than EU_VHF: start QSO with Tx2. ui->tx1->setEnabled(false); + ui->txb1->setEnabled(false); } if(!ui->tx1->isEnabled() and SpecOp::EU_VHF==m_config.special_op_id()) { //We're in EU_VHF mode: start QSO with Tx1. ui->tx1->setEnabled(true); + ui->txb1->setEnabled(true); } } @@ -4206,7 +4208,11 @@ void MainWindow::on_txb1_clicked() m_ntx=1; m_QSOProgress = REPLYING; ui->txrb1->setChecked(true); - if (m_transmitting) m_restart=true; + if(m_mode=="FT4") { + ft4_tx(1); + } else { + if(m_transmitting) m_restart=true; + } } else { on_txb2_clicked (); @@ -4227,7 +4233,11 @@ void MainWindow::on_txb2_clicked() m_ntx=2; m_QSOProgress = REPORT; ui->txrb2->setChecked(true); - if (m_transmitting) m_restart=true; + if(m_mode=="FT4") { + ft4_tx(2); + } else { + if(m_transmitting) m_restart=true; + } } void MainWindow::on_txb3_clicked() @@ -4235,7 +4245,11 @@ void MainWindow::on_txb3_clicked() m_ntx=3; m_QSOProgress = ROGER_REPORT; ui->txrb3->setChecked(true); - if (m_transmitting) m_restart=true; + if(m_mode=="FT4") { + ft4_tx(3); + } else { + if(m_transmitting) m_restart=true; + } } void MainWindow::on_txb4_clicked() @@ -4243,7 +4257,11 @@ void MainWindow::on_txb4_clicked() m_ntx=4; m_QSOProgress = ROGERS; ui->txrb4->setChecked(true); - if (m_transmitting) m_restart=true; + if(m_mode=="FT4") { + ft4_tx(4); + } else { + if(m_transmitting) m_restart=true; + } } void MainWindow::on_txb4_doubleClicked() @@ -4261,7 +4279,11 @@ void MainWindow::on_txb5_clicked() m_ntx=5; m_QSOProgress = SIGNOFF; ui->txrb5->setChecked(true); - if (m_transmitting) m_restart=true; + if(m_mode=="FT4") { + ft4_tx(5); + } else { + if(m_transmitting) m_restart=true; + } } void MainWindow::on_txb5_doubleClicked() @@ -4275,12 +4297,16 @@ void MainWindow::on_txb6_clicked() m_QSOProgress = CALLING; set_dateTimeQSO(-1); ui->txrb6->setChecked(true); - if (m_transmitting) m_restart=true; + if(m_mode=="FT4") { + ft4_tx(6); + } else { + if(m_transmitting) m_restart=true; + } } void MainWindow::doubleClickOnCall2(Qt::KeyboardModifiers modifiers) { - if(m_mode=="FT4" and m_inQSOwith!="") return; +//Confusing: come here after double-click on left text window, not right window. set_dateTimeQSO(-1); // reset our QSO start time m_decodedText2=true; doubleClickOnCall(modifiers); @@ -4289,7 +4315,6 @@ void MainWindow::doubleClickOnCall2(Qt::KeyboardModifiers modifiers) void MainWindow::doubleClickOnCall(Qt::KeyboardModifiers modifiers) { - if(m_mode=="FT4" and m_inQSOwith!="") return; QTextCursor cursor; if(m_mode=="ISCAT") { MessageBox::information_message (this, @@ -5149,6 +5174,7 @@ void MainWindow::clearDX () m_rptRcvd.clear (); m_qsoStart.clear (); m_qsoStop.clear (); + m_inQSOwith.clear(); genStdMsgs (QString {}); if (ui->tabWidget->currentIndex() == 1) { ui->genMsg->setText(ui->tx6->text());