diff --git a/map65/commons.h b/map65/commons.h index c74787c35..f7ea43d9e 100644 --- a/map65/commons.h +++ b/map65/commons.h @@ -40,6 +40,8 @@ extern struct { //This is "common/datcom/..." in Fortran char hiscall[12]; char hisgrid[6]; char datetime[20]; + int junk1; //Used to test extent of copy to shared memory + int junk2; } datcom_; } diff --git a/map65/libm65/m65.f90 b/map65/libm65/m65.f90 index 6362c9b5e..d3bd327e4 100644 --- a/map65/libm65/m65.f90 +++ b/map65/libm65/m65.f90 @@ -26,6 +26,7 @@ program m65 use timer_module, only: timer use timer_impl, only: init_timer, fini_timer + include 'njunk.f90' parameter (NFFT=32768) parameter (NSMAX=60*96000) parameter (NREAD=2048) @@ -36,7 +37,7 @@ program m65 real*8 fc0,fcenter character*80 arg,infile character mycall*12,hiscall*12,mygrid*6,hisgrid*6,datetime*20 - common/datcom/dd(4,5760000),ss(4,322,NFFT),savg(4,NFFT),fc0,nutc0,junk(38) + common/datcom/dd(4,5760000),ss(4,322,NFFT),savg(4,NFFT),fc0,nutc0,junk(NJUNK) common/npar/fcenter,nutc,idphi,mousedf,mousefqso,nagain, & ndepth,ndiskdat,neme,newdat,nfa,nfb,nfcal,nfshift, & mcall3,nkeep,ntol,nxant,nrxlog,nfsample,nxpol,nmode, & diff --git a/map65/libm65/m65a.f90 b/map65/libm65/m65a.f90 index ddf48bce9..bb8b3cdc6 100644 --- a/map65/libm65/m65a.f90 +++ b/map65/libm65/m65a.f90 @@ -70,9 +70,11 @@ subroutine m65b(m65com,nbytes) end subroutine m65b subroutine m65c(dd,ss,savg,nparams0) + + include 'njunk.f90' real*4 dd(4,5760000),ss(4,322,32768),savg(4,32768) real*8 fcenter - integer nparams0(41),nparams(41) + integer nparams0(NJUNK+2),nparams(NJUNK+2) logical ldecoded character*12 mycall,hiscall character*6 mygrid,hisgrid @@ -80,7 +82,8 @@ subroutine m65c(dd,ss,savg,nparams0) common/npar/fcenter,nutc,idphi,mousedf,mousefqso,nagain, & ndepth,ndiskdat,neme,newdat,nfa,nfb,nfcal,nfshift, & mcall3,nkeep,ntol,nxant,nrxlog,nfsample,nxpol,nmode, & - nfast,nsave,max_drift,nhsym,mycall,mygrid,hiscall,hisgrid,datetime + nfast,nsave,max_drift,nhsym,mycall,mygrid,hiscall,hisgrid, & + datetime,junk1,junk2 common/early/nhsym1,nhsym2,ldecoded(32768) equivalence (nparams,fcenter) diff --git a/map65/libm65/njunk.f90 b/map65/libm65/njunk.f90 new file mode 100644 index 000000000..319fb5ab7 --- /dev/null +++ b/map65/libm65/njunk.f90 @@ -0,0 +1 @@ + parameter(NJUNK=40) diff --git a/map65/libm65/recvpkt.f90 b/map65/libm65/recvpkt.f90 index 085b9c05e..88d51cc59 100644 --- a/map65/libm65/recvpkt.f90 +++ b/map65/libm65/recvpkt.f90 @@ -2,6 +2,7 @@ subroutine recvpkt(nsam,nblock2,userx_no,k,buf4,buf8,buf16) ! Reformat timf2 data from Linrad and stuff data into r*4 array dd(). + include 'njunk.f90' parameter (NSMAX=60*96000) !Total sample intervals per minute parameter (NFFT=32768) integer*1 userx_no @@ -11,7 +12,8 @@ subroutine recvpkt(nsam,nblock2,userx_no,k,buf4,buf8,buf16) integer*2 jd(4),kd(2),nblock2 real*4 xd(4),yd(2) real*8 fcenter - common/datcom/dd(4,5760000),ss(4,322,NFFT),savg(4,NFFT),fcenter,nutc,junk(38) + common/datcom/dd(4,5760000),ss(4,322,NFFT),savg(4,NFFT),fcenter,nutc, & + junk(NJUNK) equivalence (kd,d4) equivalence (jd,d8,yd) equivalence (xd,c16) diff --git a/map65/libm65/symspec.f90 b/map65/libm65/symspec.f90 index 2c21940f9..e4160cfd1 100644 --- a/map65/libm65/symspec.f90 +++ b/map65/libm65/symspec.f90 @@ -18,11 +18,13 @@ subroutine symspec(k,nxpol,ndiskdat,nb,nbslider,idphi,nfsample, & ! ihsym index number of this half-symbol (1-322) ! nzap number of samples zero'ed by noise blanker + include 'njunk.f90' parameter (NSMAX=60*96000) !Total sample intervals per minute parameter (NFFT=32768) !Length of FFTs real*8 ts,hsym real*8 fcenter - common/datcom/dd(4,5760000),ss(4,322,NFFT),savg(4,NFFT),fcenter,nutc,junk(38) + common/datcom/dd(4,5760000),ss(4,322,NFFT),savg(4,NFFT),fcenter,nutc, & + junk(NJUNK) real*4 ssz5a(NFFT),w(NFFT),w2a(NFFT),w2b(NFFT) complex z,zfac complex zsumx,zsumy diff --git a/map65/mainwindow.cpp b/map65/mainwindow.cpp index ddd1a3a3d..ec63e2b94 100644 --- a/map65/mainwindow.cpp +++ b/map65/mainwindow.cpp @@ -1319,7 +1319,9 @@ 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); //This causes problems!!! Why??? + memcpy(datcom_.datetime, m_dateTime.toLatin1(), 17); + datcom_.junk1=1234; + datcom_.junk2=5678; //newdat=1 ==> this is new data, must do the big FFT //nagain=1 ==> decode only at fQSO +/- Tol @@ -1333,7 +1335,7 @@ void MainWindow::decode() //decode() from += noffset; size -= noffset; } - memcpy(to, from, qMin(mem_m65.size(), size)); + memcpy(to, from, qMin(mem_m65.size(), size-8)); datcom_.nagain=0; datcom_.ndiskdat=0; m_call3Modified=false;