Must reallocate some arrays when FST280 submode changes.

This commit is contained in:
Joe Taylor 2020-06-19 10:16:04 -04:00
parent a4e32807d9
commit 297c1a0dcb
2 changed files with 10 additions and 9 deletions

View File

@ -19,10 +19,11 @@ subroutine get_fst280_bitmetrics(cd,nss,hmod,bitmetrics,badsync)
real s4(0:3,NN)
data icos8/0,1,3,2,1,0,2,3/
data graymap/0,1,3,2/
data first/.true./
save first,one,cp
data first/.true./,nss0/-1/
save first,one,cp,nss0
if(first) then
if(nss.ne.nss0 .and. allocated(c1)) deallocate(c1)
if(first .or. nss.ne.nss0) then
allocate(c1(nss,0:3))
one=.false.
do i=0,65535

View File

@ -292,13 +292,12 @@ contains
integer hmod,isyncword(0:7)
real f0save
data isyncword/0,1,3,2,1,0,2,3/
data first/.true./
data f0save/0.0/
save first,twopi,dt,fac,f0save
data first/.true./,f0save/0.0/,nss0/-1/
save first,twopi,dt,fac,f0save,nss0
p(z1)=(real(z1*fac)**2 + aimag(z1*fac)**2)**0.5 !Compute power
p(z1)=(real(z1*fac)**2 + aimag(z1*fac)**2)**0.5 !Statement function for power
if( first ) then
if(nss.ne.nss0 .and. allocated(csync)) deallocate(csync,csynct)
if(first .or. nss.ne.nss0) then
allocate( csync(8*nss) )
allocate( csynct(8*nss) )
twopi=8.0*atan(1.0)
@ -314,6 +313,7 @@ contains
enddo
enddo
first=.false.
nss0=nss
fac=1.0/(8.0*nss)
endif