diff --git a/lib/map65_mmdec.f90 b/lib/map65_mmdec.f90 index dc62e6e7e..3e28e5464 100644 --- a/lib/map65_mmdec.f90 +++ b/lib/map65_mmdec.f90 @@ -1,5 +1,5 @@ subroutine map65_mmdec(nutc,id2,nqd,nsubmode,nfa,nfb,nfqso,ntol,newdat, & - nagain,max_drift,mycall,hiscall,hisgrid) + nagain,max_drift,ndepth,mycall,hiscall,hisgrid) use prog_args use timer_module, only: timer @@ -15,7 +15,6 @@ subroutine map65_mmdec(nutc,id2,nqd,nsubmode,nfa,nfb,nfqso,ntol,newdat, & logical single_decode,bVHF,lnewdat,lagain,lclearave,lapcqonly integer*2 id2(300*12000) ! type(params_block) :: params - character(len=20) :: datetime character(len=12) :: mycall, hiscall character(len=6) :: hisgrid data ntr0/-1/ @@ -28,7 +27,6 @@ subroutine map65_mmdec(nutc,id2,nqd,nsubmode,nfa,nfb,nfqso,ntol,newdat, & ! hiscall=transfer(params%hiscall,hiscall) ! mygrid=transfer(params%mygrid,mygrid) ! hisgrid=transfer(params%hisgrid,hisgrid) - datetime=' ' my_q65%decoded = 0 ncontest=0 @@ -40,7 +38,6 @@ subroutine map65_mmdec(nutc,id2,nqd,nsubmode,nfa,nfb,nfqso,ntol,newdat, & lagain=(nagain.ne.0) bVHF=.true. emedelay=2.5 - ndepth=2 !Does this make it too slow? ntrperiod=60 call timer('dec_q65 ',0) diff --git a/q65w/libq65/decode0.f90 b/q65w/libq65/decode0.f90 index 772b3bb4a..916eb62b2 100644 --- a/q65w/libq65/decode0.f90 +++ b/q65w/libq65/decode0.f90 @@ -44,7 +44,8 @@ subroutine decode0(dd,ss,savg) call timer('q65wa ',0) call q65wa(dd,ss,savg,newdat,nutc,fcenter,ntol,nfa,nfb, & mousedf,mousefqso,nagain,ndecdone,nfshift,max_drift, & - nfcal,mycall,hiscall,hisgrid,nhsym,nfsample,nmode,ndop00) + nfcal,mycall,hiscall,hisgrid,nhsym,nfsample,nmode,ndepth, & + datetime,ndop00) call timer('q65wa ',1) return diff --git a/q65w/libq65/ftninit.f90 b/q65w/libq65/ftninit.f90 index 565398565..2255452b0 100644 --- a/q65w/libq65/ftninit.f90 +++ b/q65w/libq65/ftninit.f90 @@ -15,6 +15,7 @@ subroutine ftninit appd='.' addpfx=' ' + open(12,file=appd//'/all_q65w.txt',status='unknown',position='append') open(17,file=appd//'/red.dat',status='unknown') open(19,file=appd//'/livecq.txt',status='unknown') open(71,file=appd//'/debug.tmp',status='unknown') diff --git a/q65w/libq65/q65b.f90 b/q65w/libq65/q65b.f90 index 4dd038de0..7e0447e28 100644 --- a/q65w/libq65/q65b.f90 +++ b/q65w/libq65/q65b.f90 @@ -1,6 +1,6 @@ subroutine q65b(nutc,nqd,fcenter,nfcal,nfsample,ikhz,mousedf,ntol, & mycall0,hiscall0,hisgrid,mode_q65,f0,fqso,newdat,nagain, & - max_drift,ndop00) + max_drift,ndepth,datetime,ndop00) ! This routine provides an interface between MAP65 and the Q65 decoder ! in WSJT-X. All arguments are input data obtained from the MAP65 GUI. @@ -26,6 +26,7 @@ subroutine q65b(nutc,nqd,fcenter,nfcal,nfsample,ikhz,mousedf,ntol, & character*6 hisgrid character*4 grid4 character*60 result + character*20 datetime common/decodes/ndecodes,ncand,nQDecoderDone,nWDecoderBusy, & nWTransmitting,result(50) common/cacb/ca @@ -110,7 +111,7 @@ subroutine q65b(nutc,nqd,fcenter,nfcal,nfsample,ikhz,mousedf,ntol, & ! NB: Frequency of ipk is now shifted to 1000 Hz. call map65_mmdec(nutc,iwave,nqd,nsubmode,nfa,nfb,1000,ntol, & - newdat,nagain,max_drift,mycall,hiscall,hisgrid) + newdat,nagain,max_drift,ndepth,mycall,hiscall,hisgrid) MHz=fcenter freq0=MHz + 0.001d0*ikhz @@ -128,10 +129,12 @@ subroutine q65b(nutc,nqd,fcenter,nfcal,nfsample,ikhz,mousedf,ntol, & fsked=frx - 0.001*ndop00/2.0 - 1.5 write(result(ndecodes),1120) nutc,fsked,xdt0,nsnr0,trim(msg0) 1120 format(i4.4,f9.3,f7.2,i5,2x,a,i6) + write(12,1130) datetime,trim(result(ndecodes)(5:)) +1130 format(a11,1x,a) result(ndecodes)=trim(result(ndecodes))//char(0) endif -900 call flush(6) +900 flush(12) return end subroutine q65b diff --git a/q65w/libq65/q65wa.f90 b/q65w/libq65/q65wa.f90 index 1bd8bcb65..6968c22e8 100644 --- a/q65w/libq65/q65wa.f90 +++ b/q65w/libq65/q65wa.f90 @@ -1,6 +1,7 @@ subroutine q65wa(dd,ss,savg,newdat,nutc,fcenter,ntol,nfa,nfb, & mousedf,mousefqso,nagain,ndecdone,nfshift,max_drift, & - nfcal,mycall,hiscall,hisgrid,nhsym,nfsample,nmode,ndop00) + nfcal,mycall,hiscall,hisgrid,nhsym,nfsample,nmode,ndepth, & + datetime,ndop00) ! Processes timf2 data from Linrad to find and decode JT65 and Q65 signals. @@ -18,16 +19,14 @@ subroutine q65wa(dd,ss,savg,newdat,nutc,fcenter,ntol,nfa,nfb, & logical candec(MAX_CANDIDATES) type(candidate) :: cand(MAX_CANDIDATES) character*60 result + character*20 datetime common/decodes/ndecodes,ncand,nQDecoderDone,nWDecoderBusy, & nWTransmitting,result(50) common/testcom/ifreq save -! write(*,3001) newdat,ntol,nfa,nfb,mousedf,mousefqso,nagain,nfshift,max_drift -!3001 format(9i6) - + if(nagain.eq.1) ndepth=3 nagain=0 !### TEMPORARY ? ### - rewind 12 nkhz_center=nint(1000.0*(fcenter-int(fcenter))) mfa=nfa-nkhz_center+48 @@ -65,7 +64,7 @@ subroutine q65wa(dd,ss,savg,newdat,nutc,fcenter,ntol,nfa,nfb, & call timer('q65b ',0) call q65b(nutc,nqd,fcenter,nfcal,nfsample,ikhz,mousedf,ntol, & mycall,hiscall,hisgrid,mode_q65,f0,fqso,newdat, & - nagain,max_drift,ndop00) + nagain,max_drift,ndepth,datetime,ndop00) call timer('q65b ',1) if(idec.ge.0) candec(icand)=.true. enddo ! icand diff --git a/q65w/mainwindow.cpp b/q65w/mainwindow.cpp index 1b1f226ce..7d561e801 100644 --- a/q65w/mainwindow.cpp +++ b/q65w/mainwindow.cpp @@ -422,7 +422,7 @@ void MainWindow::dataSink(int k) datcom_.nagain=0; datcom_.nhsym=ihsym; QDateTime t = QDateTime::currentDateTimeUtc(); - m_dateTime=t.toString("yyyy-MMM-dd hh:mm"); + m_dateTime=t.toString("yymmdd_hhmm"); qDebug() << "aa" << "Decoder called" << ihsym;; decode(); //Start the decoder m_decode_called=true; @@ -762,7 +762,7 @@ void MainWindow::decoderFinished() //diskWriteFinished lab3->setText(t1); QDateTime now=QDateTime::currentDateTimeUtc(); float secToDecode=0.001*m_decoder_start_time.msecsTo(now); - qDebug() << "bb" << "Decoder Finished" << t1 << secToDecode; + qDebug() << "bb" << "Decoder Finished" << t1 << secToDecode << now.toString("hh:mm:ss.z"); } void MainWindow::on_actionDelete_all_iq_files_in_SaveDir_triggered() @@ -840,6 +840,7 @@ void MainWindow::freezeDecode(int n) //freezeDecode() void MainWindow::decode() //decode() { + QString fname=" "; ui->DecodeButton->setStyleSheet(m_pbdecoding_style1); if(datcom_.nagain==0 && (!m_diskData)) { @@ -853,7 +854,7 @@ void MainWindow::decode() //decode() datcom_.idphi=m_dPhi; datcom_.mousedf=m_wide_graph_window->DF(); datcom_.mousefqso=m_wide_graph_window->QSOfreq(); - datcom_.ndepth=m_ndepth; + datcom_.ndepth=m_ndepth+1; datcom_.ndiskdat=0; if(m_diskData) { datcom_.ndiskdat=1; @@ -870,6 +871,7 @@ void MainWindow::decode() //decode() int ndop00; astrosub00_(&nyear, &month, &nday, &uth, &nfreq, m_myGrid.toLatin1(),&ndop00,6); datcom_.ndop00=ndop00; //Send self Doppler to decoder, via datcom + fname=m_path.mid(i0-11,11); } } datcom_.neme=0; @@ -909,7 +911,11 @@ void MainWindow::decode() //decode() memcpy(datcom_.mygrid, mgrid.toLatin1(), 6); memcpy(datcom_.hiscall, hcall.toLatin1(), 12); memcpy(datcom_.hisgrid, hgrid.toLatin1(), 6); - memcpy(datcom_.datetime, m_dateTime.toLatin1(), 17); + if(m_diskData) { + memcpy(datcom_.datetime, fname.toLatin1(), 11); + } else { + memcpy(datcom_.datetime, m_dateTime.toLatin1(), 11); + } datcom_.junk1=1234; //Cecck for these values in m65 datcom_.junk2=5678; @@ -971,7 +977,6 @@ void MainWindow::guiUpdate() if(decodes_.ndecodes > m_fetched) { while(m_fetcheddecodedTextBrowser->append(t.trimmed()); m_fetched++; } diff --git a/q65w/mainwindow.h b/q65w/mainwindow.h index 341dc1ffd..265815b72 100644 --- a/q65w/mainwindow.h +++ b/q65w/mainwindow.h @@ -182,9 +182,6 @@ private: QString m_palette; QString m_dateTime; QString m_mode; - QString m_colors; //Why still needed? - QString m_editorCommand; //Why still needed? - QString m_modeTx; //Why still needed? QHash m_worked;