mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-23 04:38:37 -05:00
Finished(?) inserting mutex lockouts.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@1299 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
38799344b9
commit
c8e94ea0ee
@ -15,6 +15,7 @@ subroutine display(nkeep,ncsmin)
|
|||||||
integer utc(MAXLINES),utc2(MX),utcz
|
integer utc(MAXLINES),utc2(MX),utcz
|
||||||
real*8 f0
|
real*8 f0
|
||||||
|
|
||||||
|
call cs_lock('display')
|
||||||
ftol=0.02
|
ftol=0.02
|
||||||
rewind 26
|
rewind 26
|
||||||
|
|
||||||
@ -167,5 +168,7 @@ subroutine display(nkeep,ncsmin)
|
|||||||
1040 format(a40)
|
1040 format(a40)
|
||||||
enddo
|
enddo
|
||||||
call flushqqq(20)
|
call flushqqq(20)
|
||||||
999 return
|
999 continue
|
||||||
|
call cs_unlock
|
||||||
|
return
|
||||||
end subroutine display
|
end subroutine display
|
||||||
|
@ -41,14 +41,18 @@
|
|||||||
call interleave63(mr2prob,-1)
|
call interleave63(mr2prob,-1)
|
||||||
|
|
||||||
nsec1=nsec1+1
|
nsec1=nsec1+1
|
||||||
|
call cs_lock('extracta')
|
||||||
write(22,rec=1) nsec1,xlambda,maxe,200,
|
write(22,rec=1) nsec1,xlambda,maxe,200,
|
||||||
+ mrsym,mrprob,mr2sym,mr2prob
|
+ mrsym,mrprob,mr2sym,mr2prob
|
||||||
call flushqqq(22)
|
call flushqqq(22)
|
||||||
|
call cs_unlock
|
||||||
call runqqq('kvasd.exe','-q',iret)
|
call runqqq('kvasd.exe','-q',iret)
|
||||||
if(iret.ne.0) then
|
if(iret.ne.0) then
|
||||||
|
call cs_lock('extractb')
|
||||||
if(first) write(*,1000) iret
|
if(first) write(*,1000) iret
|
||||||
1000 format('Error in KV decoder, or no KV decoder present.'/
|
1000 format('Error in KV decoder, or no KV decoder present.'/
|
||||||
+ 'Return code:',i8,'. Will use BM algorithm.')
|
+ 'Return code:',i8,'. Will use BM algorithm.')
|
||||||
|
call cs_unlock
|
||||||
ndec=0
|
ndec=0
|
||||||
first=.false.
|
first=.false.
|
||||||
go to 20
|
go to 20
|
||||||
|
@ -11,8 +11,10 @@ subroutine getdphi(qphi)
|
|||||||
enddo
|
enddo
|
||||||
|
|
||||||
dphi=57.2957795*atan2(s,c)
|
dphi=57.2957795*atan2(s,c)
|
||||||
|
call cs_lock('getdphi')
|
||||||
write(11,1010) nint(dphi)
|
write(11,1010) nint(dphi)
|
||||||
1010 format('Best-fit Dphi =',i4,' deg')
|
1010 format('Best-fit Dphi =',i4,' deg')
|
||||||
|
call cs_unlock
|
||||||
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
@ -33,7 +33,9 @@ subroutine getfile2(fname,len)
|
|||||||
monitoring=0
|
monitoring=0
|
||||||
kbuf=1
|
kbuf=1
|
||||||
|
|
||||||
|
call cs_lock('getfile2a')
|
||||||
call rfile3a(fname,id,n,ierr)
|
call rfile3a(fname,id,n,ierr)
|
||||||
|
call cs_unlock
|
||||||
if(ierr.ne.0) then
|
if(ierr.ne.0) then
|
||||||
print*,'Error opening or reading file: ',fname,ierr
|
print*,'Error opening or reading file: ',fname,ierr
|
||||||
go to 999
|
go to 999
|
||||||
@ -48,7 +50,9 @@ subroutine getfile2(fname,len)
|
|||||||
enddo
|
enddo
|
||||||
sqave=174*sq/(kb-ka+1)
|
sqave=174*sq/(kb-ka+1)
|
||||||
rxnoise=10.0*log10(sqave) - 48.0
|
rxnoise=10.0*log10(sqave) - 48.0
|
||||||
|
call cs_lock('getfile2b')
|
||||||
read(filename(8:11),*,err=20,end=20) nutc
|
read(filename(8:11),*,err=20,end=20) nutc
|
||||||
|
call cs_unlock
|
||||||
go to 30
|
go to 30
|
||||||
20 nutc=0
|
20 nutc=0
|
||||||
|
|
||||||
|
2
map65.py
2
map65.py
@ -1,4 +1,4 @@
|
|||||||
#------------------------------------------------------------------------ MAP65
|
#----------------------------------------------------------------------- MAP65
|
||||||
# $Date$ $Revision$
|
# $Date$ $Revision$
|
||||||
#
|
#
|
||||||
from Tkinter import *
|
from Tkinter import *
|
||||||
|
@ -269,6 +269,7 @@ subroutine map65a(newdat)
|
|||||||
if(decoded(1:4).eq.'RO ' .or. decoded(1:4).eq.'RRR ' .or. &
|
if(decoded(1:4).eq.'RO ' .or. decoded(1:4).eq.'RRR ' .or. &
|
||||||
decoded(1:4).eq.'73 ') nsync2=nsync2-6
|
decoded(1:4).eq.'73 ') nsync2=nsync2-6
|
||||||
nwrite=nwrite+1
|
nwrite=nwrite+1
|
||||||
|
call cs_lock('map65aa')
|
||||||
if(ndphi.eq.0) then
|
if(ndphi.eq.0) then
|
||||||
write(11,1010) nkHz,ndf,npol,nutc,dt,nsync2,decoded,nkv,nqual
|
write(11,1010) nkHz,ndf,npol,nutc,dt,nsync2,decoded,nkv,nqual
|
||||||
1010 format(i3,i5,i4,i5.4,f5.1,i4,2x,a22,i5,i4,i4)
|
1010 format(i3,i5,i4,i5.4,f5.1,i4,2x,a22,i5,i4,i4)
|
||||||
@ -280,12 +281,15 @@ subroutine map65a(newdat)
|
|||||||
dt,sync2,nkv,nqual,decoded
|
dt,sync2,nkv,nqual,decoded
|
||||||
1011 format(i3,i4,i5,i4,i5.4,f5.1,f7.1,i3,i5,2x,a22)
|
1011 format(i3,i4,i5,i4,i5.4,f5.1,f7.1,i3,i5,2x,a22)
|
||||||
endif
|
endif
|
||||||
|
call cs_unlock
|
||||||
endif
|
endif
|
||||||
enddo
|
enddo
|
||||||
if(nwrite.eq.0) then
|
if(nwrite.eq.0) then
|
||||||
nfqso=mfqso + nfoffset
|
nfqso=mfqso + nfoffset
|
||||||
|
call cs_lock('map65ab')
|
||||||
write(11,1012) nfqso,nutc
|
write(11,1012) nfqso,nutc
|
||||||
1012 format(i3,9x,i5.4)
|
1012 format(i3,9x,i5.4)
|
||||||
|
call cs_unlock
|
||||||
endif
|
endif
|
||||||
|
|
||||||
endif
|
endif
|
||||||
@ -359,19 +363,23 @@ subroutine map65a(newdat)
|
|||||||
nsync2=nint(10.0*log10(sync2)) - 40 !### empirical ###
|
nsync2=nint(10.0*log10(sync2)) - 40 !### empirical ###
|
||||||
if(decoded(1:4).eq.'RO ' .or. decoded(1:4).eq.'RRR ' .or. &
|
if(decoded(1:4).eq.'RO ' .or. decoded(1:4).eq.'RRR ' .or. &
|
||||||
decoded(1:4).eq.'73 ') nsync2=nsync2-6
|
decoded(1:4).eq.'73 ') nsync2=nsync2-6
|
||||||
|
call cs_lock('map65ac')
|
||||||
write(26,1014) f0,ndf,ndf0,ndf1,ndf2,dt,npol,nsync1, &
|
write(26,1014) f0,ndf,ndf0,ndf1,ndf2,dt,npol,nsync1, &
|
||||||
nsync2,nutc,decoded,nkv,nqual,nhist
|
nsync2,nutc,decoded,nkv,nqual,nhist
|
||||||
write(21,1014) f0,ndf,ndf0,ndf1,ndf2,dt,npol,nsync1, &
|
write(21,1014) f0,ndf,ndf0,ndf1,ndf2,dt,npol,nsync1, &
|
||||||
nsync2,nutc,decoded,nkv,nqual,nhist
|
nsync2,nutc,decoded,nkv,nqual,nhist
|
||||||
1014 format(f7.3,i5,3i3,f5.1,i5,i3,i4,i5.4,2x,a22,3i3)
|
1014 format(f7.3,i5,3i3,f5.1,i5,i3,i4,i5.4,2x,a22,3i3)
|
||||||
|
call cs_unlock
|
||||||
|
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
j=j+nsiz(n)
|
j=j+nsiz(n)
|
||||||
enddo
|
enddo
|
||||||
|
call cs_lock('map65ad')
|
||||||
write(26,1015) nutc
|
write(26,1015) nutc
|
||||||
1015 format(39x,i4.4)
|
1015 format(39x,i4.4)
|
||||||
call flushqqq(26)
|
call flushqqq(26)
|
||||||
|
call cs_unlock
|
||||||
call display(nkeep,ncsmin)
|
call display(nkeep,ncsmin)
|
||||||
ndecdone=2
|
ndecdone=2
|
||||||
|
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
|
|
||||||
!----------------------------------------------------- rfile
|
|
||||||
subroutine rfile(lu,ibuf,n,ierr)
|
subroutine rfile(lu,ibuf,n,ierr)
|
||||||
|
|
||||||
integer*1 ibuf(n)
|
integer*1 ibuf(n)
|
||||||
|
|
||||||
|
call cs_lock('rfile')
|
||||||
read(lu,end=998) ibuf
|
read(lu,end=998) ibuf
|
||||||
ierr=0
|
ierr=0
|
||||||
go to 999
|
go to 999
|
||||||
998 ierr=1002
|
998 ierr=1002
|
||||||
999 return
|
999 continue
|
||||||
|
call cs_unlock
|
||||||
|
return
|
||||||
end subroutine rfile
|
end subroutine rfile
|
||||||
|
@ -10,6 +10,7 @@ subroutine savetf2(id,fnamedate,savedir)
|
|||||||
data nloc/-1/
|
data nloc/-1/
|
||||||
save nloc
|
save nloc
|
||||||
|
|
||||||
|
call cs_lock('savetf2')
|
||||||
call date_and_time(cdate,ctime2,czone,itt)
|
call date_and_time(cdate,ctime2,czone,itt)
|
||||||
nh=itt(5)-itt(4)/60
|
nh=itt(5)-itt(4)/60
|
||||||
nm=itt(6)
|
nm=itt(6)
|
||||||
@ -51,5 +52,7 @@ subroutine savetf2(id,fnamedate,savedir)
|
|||||||
998 print*,'Cannot open file:'
|
998 print*,'Cannot open file:'
|
||||||
print*,fname
|
print*,fname
|
||||||
|
|
||||||
999 return
|
999 continue
|
||||||
|
call cs_unlock
|
||||||
|
return
|
||||||
end subroutine savetf2
|
end subroutine savetf2
|
||||||
|
@ -84,10 +84,7 @@ subroutine symspec(id,kbuf,kk,kkdone,nutc,newdat)
|
|||||||
enddo
|
enddo
|
||||||
nz2=nz2+n2
|
nz2=nz2+n2
|
||||||
pctblank=nclip*100.0/nz2
|
pctblank=nclip*100.0/nz2
|
||||||
! write(*,3002) nblank,n2,nz2,nclip,kkk,kkdone,pctblank,sqave
|
|
||||||
!3002 format(4i6,2i9,f8.1,f10.0)
|
|
||||||
endif
|
endif
|
||||||
!###
|
|
||||||
|
|
||||||
do nn=1,ntot
|
do nn=1,ntot
|
||||||
i0=ts+hsym !Starting sample pointer
|
i0=ts+hsym !Starting sample pointer
|
||||||
@ -150,8 +147,10 @@ subroutine symspec(id,kbuf,kk,kkdone,nutc,newdat)
|
|||||||
! if(n.eq.ntot) then
|
! if(n.eq.ntot) then
|
||||||
if(n.ge.279) then
|
if(n.ge.279) then
|
||||||
call move(ssz5,ss5,322*NFFT)
|
call move(ssz5,ss5,322*NFFT)
|
||||||
|
call cs_lock('symspec')
|
||||||
write(utcdata,1002) nutc
|
write(utcdata,1002) nutc
|
||||||
1002 format(i4.4)
|
1002 format(i4.4)
|
||||||
|
call cs_unlock
|
||||||
utcdata=utcdata(1:2)//':'//utcdata(3:4)
|
utcdata=utcdata(1:2)//':'//utcdata(3:4)
|
||||||
newspec=1
|
newspec=1
|
||||||
call move(ssz,ss,4*322*NFFT)
|
call move(ssz,ss,4*322*NFFT)
|
||||||
|
10
wsjtgen.F90
10
wsjtgen.F90
@ -69,10 +69,12 @@ subroutine wsjtgen
|
|||||||
go to 14
|
go to 14
|
||||||
12 print*,'Cannot open test file ',msg(2:)
|
12 print*,'Cannot open test file ',msg(2:)
|
||||||
go to 999
|
go to 999
|
||||||
14 read(18) hdr
|
14 call cs_lock('wsjtgena')
|
||||||
|
read(18) hdr
|
||||||
if(ndata.gt.NTxMax) ndata=NTxMax
|
if(ndata.gt.NTxMax) ndata=NTxMax
|
||||||
call rfile(18,iwave,ndata,ierr)
|
call rfile(18,iwave,ndata,ierr)
|
||||||
close(18)
|
close(18)
|
||||||
|
call cs_unlock
|
||||||
if(ierr.ne.0) print*,'Error reading test file ',msg(2:)
|
if(ierr.ne.0) print*,'Error reading test file ',msg(2:)
|
||||||
nwave=ndata/2
|
nwave=ndata/2
|
||||||
do i=nwave,NTXMAX
|
do i=nwave,NTXMAX
|
||||||
@ -90,13 +92,15 @@ subroutine wsjtgen
|
|||||||
if(msg(2:2).eq.'C' .or. msg(2:2).eq.'c') freq=1764
|
if(msg(2:2).eq.'C' .or. msg(2:2).eq.'c') freq=1764
|
||||||
if(msg(2:2).eq.'D' .or. msg(2:2).eq.'d') freq=2205
|
if(msg(2:2).eq.'D' .or. msg(2:2).eq.'d') freq=2205
|
||||||
if(freq.eq.1000.0) then
|
if(freq.eq.1000.0) then
|
||||||
|
call cs_lock('wsjtgenb')
|
||||||
read(msg(2:),*,err=1) freq
|
read(msg(2:),*,err=1) freq
|
||||||
goto 2
|
goto 2
|
||||||
1 txmsg='@1000'
|
1 txmsg='@1000'
|
||||||
nmsg=5
|
nmsg=5
|
||||||
nmsg0=5
|
nmsg0=5
|
||||||
|
2 call cs_unlock
|
||||||
endif
|
endif
|
||||||
2 nwave=60*fsample_out
|
nwave=60*fsample_out
|
||||||
dpha=twopi*freq/fsample_out
|
dpha=twopi*freq/fsample_out
|
||||||
do i=1,nwave
|
do i=1,nwave
|
||||||
iwave(i)=32767.0*sin(i*dpha)
|
iwave(i)=32767.0*sin(i*dpha)
|
||||||
@ -108,7 +112,9 @@ subroutine wsjtgen
|
|||||||
if(mode(5:5).eq.'A') mode65=1
|
if(mode(5:5).eq.'A') mode65=1
|
||||||
if(mode(5:5).eq.'B') mode65=2
|
if(mode(5:5).eq.'B') mode65=2
|
||||||
if(mode(5:5).eq.'C') mode65=4
|
if(mode(5:5).eq.'C') mode65=4
|
||||||
|
call cs_lock('wsjtgenc')
|
||||||
call gen65(msg,mode65,samfacout,iwave,nwave,sendingsh,msgsent)
|
call gen65(msg,mode65,samfacout,iwave,nwave,sendingsh,msgsent)
|
||||||
|
call cs_unlock
|
||||||
|
|
||||||
if(lcwid) then
|
if(lcwid) then
|
||||||
! Generate and insert the CW ID.
|
! Generate and insert the CW ID.
|
||||||
|
Loading…
Reference in New Issue
Block a user