Fixed problem with blanks in SaveDir and AzElDir.

(Poorly motivated?) attempt to find bug in saveing files.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@1092 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2009-03-03 21:10:59 +00:00
parent b1b0872ece
commit 87f7fce73f
2 changed files with 21 additions and 24 deletions

View File

@ -1166,7 +1166,9 @@ def update():
g.ndecphase=1
if Audio.gcom2.nhispol != -999:
txpol=(int(Audio.gcom2.nhispol) - 2*g.poloffset + 360) % 180
npol=int(Audio.gcom2.nhispol)
npol=180-npol #Reverse sign of x
txpol=(npol - 2*g.poloffset + 360) % 180
t="Tx pol: %d " % txpol
if txpol < 45 or txpol > 135:
t=t + 'H'
@ -1854,8 +1856,8 @@ try:
elif key == 'CSmin': options.ncsmin.set(value)
elif key == 'Nt1': options.nt1.set(value)
elif key == 'dphi': options.dphi.set(value)
elif key == 'SaveDir': options.savedir.set(value)
elif key == 'AzElDir': options.azeldir.set(value)
elif key == 'SaveDir': options.savedir.set(value.replace("#"," "))
elif key == 'AzElDir': options.azeldir.set(value.replace("#"," "))
elif key == 'TxFirst': TxFirst.set(value)
elif key == 'KB8RQ': kb8rq.set(value)
elif key == 'K2TXB': k2txb.set(value)
@ -1949,8 +1951,10 @@ f.write("fb " + str(options.fb.get()) + "\n")
f.write("fcal " + str(options.fcal.get()) + "\n")
f.write("CSmin " + str(options.ncsmin.get()) + "\n")
f.write("Nt1 " + str(options.nt1.get()) + "\n")
f.write("SaveDir " + str(options.savedir.get()) + "\n")
f.write("AzElDir " + str(options.azeldir.get()) + "\n")
savedir2=options.savedir.get().replace(" ","#")
azeldir2=options.azeldir.get().replace(" ","#")
f.write("SaveDir " + str(savedir2) + "\n")
f.write("AzElDir " + str(azeldir2) + "\n")
f.write("TxFirst " + str(TxFirst.get()) + "\n")
f.write("KB8RQ " + str(kb8rq.get()) + "\n")
f.write("K2TXB " + str(k2txb.get()) + "\n")

View File

@ -7,6 +7,8 @@ subroutine savetf2(id,fnamedate,savedir)
character*80 savedir,fname
character cdate*8,ctime2*10,czone*5,fnamedate*6
integer itt(8)
data nloc/-1/
save nloc
call date_and_time(cdate,ctime2,czone,itt)
nh=itt(5)-itt(4)/60
@ -32,31 +34,22 @@ subroutine savetf2(id,fnamedate,savedir)
open(17,file=fname,status='unknown',access='stream',err=998)
#endif
! write(17,err=997) id
do i=1,1024
i0=(i-1)*5625 + 1
call w17(id(1,i0),ierr)
if(ierr.ne.0) print*,'Error writing tf2 file'
enddo
if(nloc.eq.-1) nloc=loc(id)
n=abs(loc(id)-nloc)
if(n.eq.0 .or. n.eq.46080000) then
write(17,err=997) id
else
print*,'Address of id() clobbered???',nloc,loc(id)
endif
close(17)
go to 999
!997 print*,'Error writing tf2 file'
! print*,fname
! go to 999
997 print*,'Error writing tf2 file'
print*,fname
go to 999
998 print*,'Cannot open file:'
print*,fname
999 return
end subroutine savetf2
subroutine w17(id,ierr)
integer*2 id(4,5625)
write(17,err=998) id
ierr=0
go to 999
998 ierr=1
999 return
end subroutine w17