Decoded text now appears in main window. However, ... the next decode

request fails.  Then 3rd one is OK, 4th fails, etc., etc.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2669 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor
2012-10-16 23:32:15 +00:00
parent 3ee18fe688
commit 3c6766fc3d
9 changed files with 47 additions and 82 deletions
+16 -24
View File
@@ -1,4 +1,4 @@
subroutine decoder(ntrSeconds)
subroutine decoder(ntrSeconds,c0)
! Decoder for JT9. Can run stand-alone, reading data from *.wav files;
! or as the back end of wsjt-x, with data placed in a shared memory region.
@@ -12,21 +12,14 @@ subroutine decoder(ntrSeconds)
real*4 red(NSMAX)
integer*1 i1SoftSymbols(207)
integer*2 id2
complex c0
common/jt9com/id2(NMAX),ss(184,NSMAX),savg(NSMAX),c0(NDMAX), &
nutc,npts8,junk(20)
complex c0(NDMAX)
common/jt9com/ss(184,NSMAX),savg(NSMAX),id2(NMAX),nutc,ndiskdat, &
ntr,mousefqso,nagain,newdat,nfa,nfb,ntol,kin
ntrMinutes=ntrSeconds/60
nfa=1000
nfb=2000
ntol=500
mousedf=0
mousefqso=1500
newdat=1
nb=0
nbslider=100
f0a=0.
nsps=0
if(ntrMinutes.eq.1) nsps=6912
@@ -41,26 +34,25 @@ subroutine decoder(ntrSeconds)
! Now do the decoding
nutc=nutc0
nstandalone=1
nutc=0
tstep=kstep/12000.0
ntol=500
nfqso=1500
! Get sync, approx freq
call sync9(ss,tstep,f0a,df3,ntol,nfqso,sync,fpk,red)
fpk0=fpk
call spec9(c0,npts8,nsps,f0a,fpk,xdt,i1SoftSymbols)
call sync9(ss,tstep,df3,ntol,nfqso,sync,fpk,red)
npts8=170880 !### TEST ONLY ###
call spec9(c0,npts8,nsps,fpk,xdt,i1SoftSymbols)
call decode9(i1SoftSymbols,msg)
! open(73,file='decoded.txt',status='unknown')
iutc=0
write(*,1010) iutc,xdt,1000.0+fpk,msg,sync,fpk0
write(73,1010) iutc,xdt,1000.0+fpk,msg,sync,fpk0
1010 format(i4.4,f6.1,f7.1,2x,a22,2f9.1)
flush(73)
! close(13)
open(73,file='decoded.txt',status='unknown')
rewind 73
! write(*,1010) nutc,sync,xdt,1000.0+fpk,msg
write(73,1010) nutc,sync,xdt,1000.0+fpk,msg
1010 format(i4.4,3f7.1,2x,a22)
call flush(73)
close(73)
return
end subroutine decoder