mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-23 04:38:37 -05:00
Clean up code in recvpkt.F90.
Don't decode or switch buffers if not monitoring and not Auto. Don't allow mouse-picked decode from SpecJT if decoder is busy. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@999 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
36807b1a0e
commit
a3e6f63406
2
map65.py
2
map65.py
@ -1,4 +1,4 @@
|
|||||||
#--------------------------------------------------------------------- MAP65
|
#---------------------------------------------------------------------- MAP65
|
||||||
# $Date$ $Revision$
|
# $Date$ $Revision$
|
||||||
#
|
#
|
||||||
from Tkinter import *
|
from Tkinter import *
|
||||||
|
13
recvpkt.F90
13
recvpkt.F90
@ -14,7 +14,7 @@ subroutine recvpkt(iarg)
|
|||||||
include 'gcom1.f90'
|
include 'gcom1.f90'
|
||||||
include 'gcom2.f90'
|
include 'gcom2.f90'
|
||||||
equivalence (id,d8)
|
equivalence (id,d8)
|
||||||
data nblock0/0/,kb/1/,npkt/0/,nw/0/,ns0/99/
|
data nblock0/0/,kb/1/,nw/0/,ns0/99/
|
||||||
data sqave/0.0/,u/0.001/,rxnoise/0.0/,kbuf/1/,lost_tot/0/
|
data sqave/0.0/,u/0.001/,rxnoise/0.0/,kbuf/1/,lost_tot/0/
|
||||||
data multicast0/-99/
|
data multicast0/-99/
|
||||||
save
|
save
|
||||||
@ -34,14 +34,13 @@ subroutine recvpkt(iarg)
|
|||||||
call recv_pkt(center_freq)
|
call recv_pkt(center_freq)
|
||||||
|
|
||||||
! Should receive a new packet every 174/96000 = 0.0018125 s
|
! Should receive a new packet every 174/96000 = 0.0018125 s
|
||||||
npkt=npkt+1
|
|
||||||
nsec=mod(Tsec,86400.d0) !Time according to MAP65
|
nsec=mod(Tsec,86400.d0) !Time according to MAP65
|
||||||
nseclr=msec/1000 !Time according to Linrad
|
nseclr=msec/1000 !Time according to Linrad
|
||||||
fcenter=center_freq
|
fcenter=center_freq
|
||||||
|
|
||||||
! Reset buffer pointers at start of minute.
|
! Reset buffer pointers at start of minute.
|
||||||
ns=mod(nsec,60)
|
ns=mod(nsec,60)
|
||||||
if(ns.lt.ns0) then
|
if(ns.lt.ns0 .and. (lauto+monitoring.ne.0)) then
|
||||||
if(ntx.eq.0) kb=3-kb
|
if(ntx.eq.0) kb=3-kb
|
||||||
k=(kb-1)*60*96000
|
k=(kb-1)*60*96000
|
||||||
ndone1=0
|
ndone1=0
|
||||||
@ -49,7 +48,6 @@ subroutine recvpkt(iarg)
|
|||||||
ntx=0
|
ntx=0
|
||||||
lost_tot=0
|
lost_tot=0
|
||||||
kxp=k
|
kxp=k
|
||||||
npkt=0
|
|
||||||
synced=.true.
|
synced=.true.
|
||||||
endif
|
endif
|
||||||
ns0=ns
|
ns0=ns
|
||||||
@ -107,7 +105,7 @@ subroutine recvpkt(iarg)
|
|||||||
mutc=100*mutch + mutcm
|
mutc=100*mutch + mutcm
|
||||||
|
|
||||||
! If we have not transmitted in this minute, see if it's time to start FFTs
|
! If we have not transmitted in this minute, see if it's time to start FFTs
|
||||||
if(ntx.eq.0) then
|
if(ntx.eq.0 .and. lauto+monitoring.ne.0) then
|
||||||
if(ns.ge.nt1 .and. ndone1.eq.0 .and. synced) then
|
if(ns.ge.nt1 .and. ndone1.eq.0 .and. synced) then
|
||||||
nutc=mutc
|
nutc=mutc
|
||||||
fcenter=center_freq
|
fcenter=center_freq
|
||||||
@ -126,10 +124,9 @@ subroutine recvpkt(iarg)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
tt=npkt*174.0/96000.0
|
|
||||||
! if(ns.le.5 .or. ns.ge.46) write(*,3001) ns,ndone1,kb, &
|
! if(ns.le.5 .or. ns.ge.46) write(*,3001) ns,ndone1,kb, &
|
||||||
! kbuf,ntx,kk,tdiff,tt
|
! kbuf,ntx,kk,tdiff
|
||||||
!3001 format(5i4,i11,2f8.2)
|
!3001 format(5i4,i11,f8.2)
|
||||||
|
|
||||||
endif
|
endif
|
||||||
go to 10
|
go to 10
|
||||||
|
@ -236,8 +236,8 @@ def freq_range(event):
|
|||||||
|
|
||||||
#---------------------------------------------------- freeze_decode1
|
#---------------------------------------------------- freeze_decode1
|
||||||
def freeze_decode1(event):
|
def freeze_decode1(event):
|
||||||
# If decoder is busy or we are not monitoring, ignore request
|
# If decoder is busy, ignore request
|
||||||
if Audio.gcom2.ndecoding==0 or Audio.gcom2.monitoring==0:
|
if Audio.gcom2.ndecoding==0:
|
||||||
set_fqso(event)
|
set_fqso(event)
|
||||||
g.freeze_decode=1
|
g.freeze_decode=1
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user