From 4af9c58bb0a04ea1b85376c7ffd260c0b0ba2432 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Mon, 15 Jan 2024 13:45:00 -0500 Subject: [PATCH] Send needed arguments to q65c(). --- qmap/libqmap/decode0.f90 | 4 ---- qmap/libqmap/q65c.f90 | 12 ++++++++---- qmap/mainwindow.cpp | 9 ++++++--- qmap/mainwindow.h | 4 +--- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/qmap/libqmap/decode0.f90 b/qmap/libqmap/decode0.f90 index 455bf21d4..41bbe0349 100644 --- a/qmap/libqmap/decode0.f90 +++ b/qmap/libqmap/decode0.f90 @@ -49,9 +49,5 @@ subroutine decode0(dd,ss,savg) datetime,ndop00,fselected,bAlso30,nhsym,NCFOM) call timer('qmapa ',1) - - write(*,3001) n60,datetime(1:11),nutc,newdat,nsave,ntx30a,ntx30b,ndecodes -3001 format('A',i3,1x,a11,i6.4,5i5) - return end subroutine decode0 diff --git a/qmap/libqmap/q65c.f90 b/qmap/libqmap/q65c.f90 index edf333bcb..2b58ae84f 100644 --- a/qmap/libqmap/q65c.f90 +++ b/qmap/libqmap/q65c.f90 @@ -1,4 +1,4 @@ -subroutine q65c(itimer) +subroutine q65c(fname,revision) use timer_module, only: timer use timer_impl, only: fini_timer !, limtrace @@ -14,12 +14,14 @@ subroutine q65c(itimer) integer nparams0(NJUNK+3),nparams(NJUNK+3) logical first logical*1 bAlso30 + character*(*) fname,revision character*12 mycall,hiscall character*6 mygrid,hisgrid character*20 datetime - + character*60 result + common/decodes/ndecodes,ncand,nQDecoderDone,nWDecoderBusy, & + nWTransmitting,result(50) common/datcom2/dd(2,5760000),ss(400,NFFT),savg(NFFT),nparams0 - !### REMEMBER that /npar/ is not updated until nparams=nparams0 is executed. ### common/npar/fcenter,nutc,fselected,mousedf,mousefqso,nagain, & ndepth,ndiskdat,ntx60,newdat,nn1,nn2,nfcal,nfshift, & @@ -69,6 +71,9 @@ subroutine q65c(itimer) call timer('decode0 ',0) call decode0(dd,ss,savg) call timer('decode0 ',1) + + write(*,3001) n60,datetime(1:11),nutc,newdat,nsave,ntx30a,ntx30b,ndecodes +3001 format('A',i3,1x,a11,i6.4,5i5) return end subroutine q65c @@ -80,7 +85,6 @@ subroutine all_done call timer('decode0 ',101) call fini_timer - print*,'All Done' return end subroutine all_done diff --git a/qmap/mainwindow.cpp b/qmap/mainwindow.cpp index 745966277..f3869f264 100644 --- a/qmap/mainwindow.cpp +++ b/qmap/mainwindow.cpp @@ -923,7 +923,7 @@ void MainWindow::decode() //decode() saveFileName=m_saveDir + "/" + m_dateTime + ".qm"; } - qDebug() << "aa" << m_n60 << datcom_.nhsym << m_revision << saveFileName; +// qDebug() << "aa" << m_n60 << datcom_.nhsym << m_revision << saveFileName; //No need to call decoder for first half, if we transmitted in the first half: if((datcom_.nhsym<=200) and (m_nTx30a>5)) return; @@ -931,8 +931,11 @@ void MainWindow::decode() //decode() //No need to call decoder in second half, if we transmitted in that half: if((datcom_.nhsym>200) and (m_nTx30b>5)) return; - int zero=0; - watcher3.setFuture(QtConcurrent::run (std::bind (q65c_, &zero))); + int len1=saveFileName.length(); + int len2=m_revision.length(); + watcher3.setFuture(QtConcurrent::run (std::bind (q65c_, + saveFileName.toLatin1().constData(), + m_revision.toLatin1().constData(), len1, len2))); decodeBusy(true); } diff --git a/qmap/mainwindow.h b/qmap/mainwindow.h index 37f79548b..2b3c82047 100644 --- a/qmap/mainwindow.h +++ b/qmap/mainwindow.h @@ -199,9 +199,7 @@ extern "C" { void astrosub00_ (int* nyear, int* month, int* nday, double* uth, int* nfreq, const char* mygrid, int* ndop00, int len1); - void q65c_(int* itimer); -// void q65c_(const char* fname, const char* revision, int* itimer, -// int len1, int len2); + void q65c_(const char* fname, const char* revision, int len1, int len2); void all_done_();