From 2b9d65408debba3f3f2a6a34c8aa33b1308c0f21 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Tue, 12 Mar 2024 08:47:23 -0400 Subject: [PATCH] Bug fix: correct the misuse of variable 'ncand' in both q65 module and a common block. --- qmap/libqmap/decode0.f90 | 2 +- qmap/libqmap/getcand2.f90 | 4 ++-- qmap/libqmap/q65b.f90 | 2 +- qmap/libqmap/q65c.f90 | 4 ++-- qmap/libqmap/qmapa.f90 | 8 ++++---- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/qmap/libqmap/decode0.f90 b/qmap/libqmap/decode0.f90 index f0f95199c..398355f34 100644 --- a/qmap/libqmap/decode0.f90 +++ b/qmap/libqmap/decode0.f90 @@ -11,7 +11,7 @@ subroutine decode0(dd,ss,savg) character mycall*12,hiscall*12,mygrid*6,hisgrid*6,datetime*20 character mycall0*12,hiscall0*12,hisgrid0*6 character*64 result - common/decodes/ndecodes,ncand,nQDecoderDone,nWDecoderBusy, & + common/decodes/ndecodes,ncand2,nQDecoderDone,nWDecoderBusy, & nWTransmitting,kHzRequested,result(50) common/npar/fcenter,nutc,fselected,mousedf,mousefqso,nagain, & ndepth,ndiskdat,ntx60,newdat,nfa,nfb,nfcal,nfshift, & diff --git a/qmap/libqmap/getcand2.f90 b/qmap/libqmap/getcand2.f90 index ac1e6f0e8..8ebfbb2dc 100644 --- a/qmap/libqmap/getcand2.f90 +++ b/qmap/libqmap/getcand2.f90 @@ -1,5 +1,5 @@ subroutine getcand2(ss,savg0,nts_q65,nagain,nhsym,ntx30a,ntx30b, & - ntol,f0_selected,bAlso30,cand,ncand) + ntol,f0_selected,bAlso30,cand,ncand2) ! Get candidates for Q65 decodes, based on presence of sync tone. @@ -110,7 +110,7 @@ subroutine getcand2(ss,savg0,nts_q65,nagain,nhsym,ntx30a,ntx30b, & endif enddo - ncand=j !Total number of candidates found + ncand2=j !Total number of candidates found return end subroutine getcand2 diff --git a/qmap/libqmap/q65b.f90 b/qmap/libqmap/q65b.f90 index 3c03ae64c..b4b325ef6 100644 --- a/qmap/libqmap/q65b.f90 +++ b/qmap/libqmap/q65b.f90 @@ -31,7 +31,7 @@ subroutine q65b(nutc,nqd,fcenter,nfcal,nfsample,ikhz,mousedf,ntol, & character*17 fname character*64 result,ctmp character*20 datetime,datetime1 - common/decodes/ndecodes,ncand,nQDecoderDone,nWDecoderBusy, & + common/decodes/ndecodes,ncand2,nQDecoderDone,nWDecoderBusy, & nWTransmitting,kHzRequested,result(50) common/cacb/ca data ifile/0/ diff --git a/qmap/libqmap/q65c.f90 b/qmap/libqmap/q65c.f90 index a6bb2366a..c714fe906 100644 --- a/qmap/libqmap/q65c.f90 +++ b/qmap/libqmap/q65c.f90 @@ -21,7 +21,7 @@ subroutine q65c character*6 mygrid,hisgrid character*20 datetime character*64 result - common/decodes/ndecodes,ncand,nQDecoderDone,nWDecoderBusy, & + common/decodes/ndecodes,ncand2,nQDecoderDone,nWDecoderBusy, & nWTransmitting,kHzRequested,result(50) common/datcom2/dd(2,5760000),ss(400,NFFT),savg(NFFT),nparams0 common/savecom/revision,fname @@ -90,7 +90,7 @@ subroutine q65c endif endif -999 return + return end subroutine q65c subroutine all_done diff --git a/qmap/libqmap/qmapa.f90 b/qmap/libqmap/qmapa.f90 index ba981fa5c..237d4c755 100644 --- a/qmap/libqmap/qmapa.f90 +++ b/qmap/libqmap/qmapa.f90 @@ -35,7 +35,7 @@ subroutine qmapa(dd,ss,savg,newdat,nutc,fcenter,ntol,nfa,nfb, & type(good_decode) found(MAX_CANDIDATES) character*64 result character*20 datetime - common/decodes/ndecodes,ncand,nQDecoderDone,nWDecoderBusy, & + common/decodes/ndecodes,ncand2,nQDecoderDone,nWDecoderBusy, & nWTransmitting,kHzRequested,result(50) save @@ -52,7 +52,7 @@ subroutine qmapa(dd,ss,savg,newdat,nutc,fcenter,ntol,nfa,nfb, & call timer('get_cand',0) ! Get a list of decoding candidates call getcand2(ss,savg,nts_q65,nagain,nhsym,ntx30a,ntx30b,ntol, & - f0_selected,bAlso30,cand,ncand) + f0_selected,bAlso30,cand,ncand2) call timer('get_cand',1) endif @@ -69,11 +69,11 @@ subroutine qmapa(dd,ss,savg,newdat,nutc,fcenter,ntol,nfa,nfb, & call timer('fftbig ',1) if(nagain.ge.2) then - ncand=1 + ncand2=1 fqso=fselected endif - do icand=1,ncand !Attempt to decode each candidate + do icand=1,ncand2 !Attempt to decode each candidate tsec=sec_midn() - tsec0 if(ndiskdat.eq.0) then ! No more realtime decode attempts if it's nearly too late, already