Implemented Freeze/Tolerance/MouseDF features for JT6M.

Removed superfluous "#ifdef Win32" in jtaudio.c.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/trunk@67 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2006-01-09 15:42:44 +00:00
parent 5bc2a3acc3
commit 4377834835
8 changed files with 57 additions and 56 deletions

View File

@ -26,15 +26,28 @@ SRCS2F90 = a2d.f90 abc441.f90 astro0.f90 audio_init.f90 azdist0.f90 \
ftn_quit.f90 get_fname.f90 getfile.f90 horizspec.f90 hscroll.f90 \
i1tor4.f90 pix2d.f90 pix2d65.f90 rfile.f90 savedata.f90 spec.f90 \
wsjtgen.f90 runqqq.f90 fivehz.f90
SRCS2F77 = wsjt1.f fsubs1.f fsubs.f astro.f astropak.f
SRCS2C = resample.c ptt.c igray.c wrapkarn.c
SRCS2F77 = wsjt1.f avesp2.f bzap.f spec441.f spec2d.f mtdecode.f \
stdecode.f indexx.f s2shape.f flat2.f gen65.f chkmsg.f gen6m.f \
gentone.f syncf0.f syncf1.f synct.f decode6m.f avemsg6m.f \
set.f flatten.f db.f pctile.f sort.f ssort.f ps.f smooth.f ping.f \
longx.f peakup.f sync.f detect.f avemsg65.f decode65.f demod64a.f \
encode65.f extract.f flat1.f four2.f gencw.f getpfx1.f \
getpfx2.f getsnr.f graycode.f grid2k.f interleave63.f k2grid.f \
limit.f lpf1.f deep65.f morse.f nchar.f packcall.f packgrid.f \
packmsg.f packtext.f setup65.f short65.f slope.f spec2d65.f \
sync65.f unpackcall.f unpackgrid.f unpackmsg.f unpacktext.f \
xcor.f xfft.f wsjt65.f astro.f azdist.f coord.f dcoord.f \
deg2grid.f dot.f ftsky.f geocentric.f GeoDist.f grid2deg.f \
moon2.f MoonDop.f sun.f toxyz.f
SRCS2C = resample.c ptt.c igray.c wrapkarn.c
WSJT6.EXE: Audio.pyd wsjt.spec
python c:\python23\installer\Build.py wsjt.spec
-del WSJT6.EXE
REN wsjt.exe WSJT6.EXE
Audio.pyd: $(OBJS2C)
Audio.pyd: $(OBJS2C) $(SRCS2F90) $(SRCS2F77) $(SRCS2C)
python f2py.py -c \
--quiet --"fcompiler=compaqv" \
--opt="/traceback /fast /fpp /define:Win32" \
@ -78,6 +91,6 @@ igray.obj: igray.c
.PHONY : clean
clean:
-del *.o *.obj JT65code.exe Audio.pyd
-del *.o *.obj JT65code.exe wsjt6.exe Audio.pyd

View File

@ -1,31 +0,0 @@
#Makefile for WSJT
!include <dfinc.mak>
OBJS1 = pa_lib.o pa_win_mme.o jtaudio.o ...
# Much more to be done, if this is to work!
all: xcomdat.dll specjt2.dll tstsp.exe a2d.exe
xcomdat.dll xcomdat.lib: xcomdat.f xcom.f
$(FOR) $(fflags) xcomdat.f /dll /link /section:.data,RWS
specjt2.dll: specjt2.f xcom.f
$(FOR) $(fflags) specjt2.f /dll xcomdat.lib
tstsp.exe: tstsp.f xcomdat.lib
$(FOR) $(fflags) tstsp.f xcomdat.lib specjt2.lib
a2d.exe: a2d.f jtaudio.obj xcomdat.lib
$(FOR) $(fflags) /traceback /check:all a2d.f $(OBJS3) \
/link winmm.lib xcomdat.lib
clean:
-del xcomdat.dll
-del xcomdat.lib
-del xcomdat.exp
-del specjt2.dll
-del specjt2.lib
-del specjt2.exp
-del tstsp.exe
-del a2d.exe

View File

@ -37,11 +37,7 @@ typedef struct _SYSTEMTIME
short Millisecond;
} SYSTEMTIME;
#ifdef Win32
extern void __stdcall GetSystemTime(SYSTEMTIME *st);
#else
extern void GetSystemTime(SYSTEMTIME *st);
#endif
// Input callback routine:
static int SoundIn( void *inputBuffer, void *outputBuffer,

View File

@ -1,4 +1,4 @@
subroutine syncf0(data,jz,NTol,jstart,f0,smax)
subroutine syncf0(data,jz,NFreeze,NTol,jstart,f0,smax)
C Does 512-pt FFTs of data with 256-pt step size.
C Finds sync tone and determines aproximate values for jstart and f0.
@ -14,12 +14,17 @@ C Finds sync tone and determines aproximate values for jstart and f0.
call zero(s2,6*128) !Clear average
df=11025./512.
ia=(1076-NTol)/df
ib=(1076+Ntol)/df
nblk=jz/256 - 6
ia=(f0-400)/df
ib=(f0+400)/df + 0.999
if(NFreeze.eq.1) then
ia=(f0-NTol)/df
ib=(f0+Ntol)/df + 0.999
endif
C Most of the time in this routine is in this loop.
nblk=jz/256 - 6
do n=1,nblk !Accumulate avg spectrum for
j=256*(n-1)+1 !512-pt blocks, stepping by 256
call move(data(j),x,512)

View File

@ -1,4 +1,4 @@
subroutine syncf1(data,jz,jstart,f0,NFreeze,smax,red)
subroutine syncf1(data,jz,jstart,f0,NFreeze,DFTolerance,smax,red)
C Does 16k FFTs of data with stepsize 15360, using only "sync on" intervals.
C Returns a refined value of f0, the sync-tone frequency.
@ -8,6 +8,7 @@ C Returns a refined value of f0, the sync-tone frequency.
parameter (NQ=NFFT/4)
parameter (NB3=3*512)
real data(jz) !Raw data
integer DFTolerance
real x(NFFT)
real red(512)
real s(NQ) !Ref spectrum for flattening and birdie-zapping
@ -41,6 +42,7 @@ C Accumulate a high-resolution average spectrum
do i=1,NQ !Normalize
s(i)=fac*s(i)
enddo
call smooth(s,NQ)
C NB: could also compute a "blue" spectrum, using the sync-off intervals.
n8=NQ/8
@ -52,14 +54,17 @@ C NB: could also compute a "blue" spectrum, using the sync-off intervals.
red(i)=10.0*red(i)/(8.0*nz)
enddo
dftol=min(DFTolerance,25)
if(nfreeze.eq.1) dftol=DFTolerance
C Find improved value for f0
smax=0.
ia=(f0-25.)/df
ib=(f0+25.)/df
if(NFreeze.eq.1) then
ia=(f0-5.)/df
ib=(f0+5.)/df
endif
ia=(f0-dftol)/df
ib=(f0+dftol)/df + 0.999
! if(NFreeze.eq.1) then
! ia=(f0-5.)/df
! ib=(f0+5.)/df
! endif
do i=ia,ib
if(s(i).gt.smax) then
smax=s(i)

11
wsjt.py
View File

@ -574,6 +574,7 @@ def ModeJT6M(event=NONE):
isync=isync6m
lsync.configure(text=slabel+str(isync))
shmsg.configure(state=DISABLED)
cbfreeze.configure(state=NORMAL)
itol=5
inctol()
ntx.set(1)
@ -973,6 +974,14 @@ def mouse_up_g1(event):
# print event.x
pass
#------------------------------------------------------ right_arrow
def right_arrow(event=NONE):
Audio.gcom2.mousedf=Audio.gcom2.mousedf+10
#------------------------------------------------------ left_arrow
def left_arrow(event=NONE):
Audio.gcom2.mousedf=Audio.gcom2.mousedf-10
#------------------------------------------------------ GenStdMsgs
def GenStdMsgs(event=NONE):
t=ToRadio.get().upper().strip()
@ -1658,6 +1667,8 @@ root.bind_all('<Alt-x>',decode_exclude)
root.bind_all('<Alt-X>',decode_exclude)
root.bind_all('<Control-l>',lookup_gen)
root.bind_all('<Control-L>',lookup_gen)
root.bind_all('<Left>',left_arrow)
root.bind_all('<Right>',right_arrow)
text.pack(side=LEFT, fill=X, padx=1)
sb = Scrollbar(iframe4, orient=VERTICAL, command=text.yview)

View File

@ -197,10 +197,12 @@
! For waterfall plot
call spec2d(dat,jz,nstep,s2,nchan,nz,psavg,sigma)
if(jz/11025.0.lt.3.9) go to 900
call syncf0(dat,jz,DFTolerance,jstart,f0,smax)
if(NFreeze.eq.1) f0=1076.66
f0=1076.66
if(NFreeze.eq.1) f0=1076.66+mousedf
call syncf0(dat,jz,NFreeze,DFTolerance,jstart,f0,smax)
call synct(dat,jz,jstart,f0,smax)
call syncf1(dat,jz,jstart,f0,NFreeze,smax,red)
call syncf1(dat,jz,jstart,f0,NFreeze,DFTolerance,smax,red)
f0a=f0
do i=1,512

View File

@ -1,6 +1,6 @@
*font: Arial 9
*Label*font: Arial 9
*Text*font: "Courier New" 10
*font: Arial 8
*Label*font: Arial 8
*Text*font: "Courier New" 9
*background: gray85
*Text*background: white
*Entry*background: white