diff --git a/lib/ft8/foxgen.f90 b/lib/ft8/foxgen.f90 index ce74b5646..b9e39f624 100644 --- a/lib/ft8/foxgen.f90 +++ b/lib/ft8/foxgen.f90 @@ -19,7 +19,7 @@ subroutine foxgen(bSuperFox,fname) parameter (NFFT=614400,NH=NFFT/2) logical*1 bSuperFox,bMoreCQs,bSendMsg character*(*) fname - character*40 cmsg + character*40 cmsg,cmsg2 character*26 textMsg character*37 msg,msgsent integer itone(79) @@ -31,6 +31,7 @@ subroutine foxgen(bSuperFox,fname) common/foxcom/wave(NWAVE),nslots,nfreq,i3bit(5),cmsg(5),mycall(12), & textMsg,bMoreCQs,bSendMsg common/foxcom2/itone2(NN),msgbits2(77) + common/foxcom3/nslots2,cmsg2(5),itone3(151) equivalence (x,cx),(y,cy) if(bSuperFox) then @@ -42,9 +43,8 @@ subroutine foxgen(bSuperFox,fname) cmsg(n)(39:39)='1' !Set flag for text message nslots=n endif - open(25,file=fname,status='unknown') - write(25,'(a40)') cmsg(1:n) - close(25) + nslots2=nslots + cmsg2=cmsg go to 999 endif diff --git a/lib/superfox/sfox_wave_gfsk.f90 b/lib/superfox/sfox_wave_gfsk.f90 index f9d605084..6844a3fdd 100644 --- a/lib/superfox/sfox_wave_gfsk.f90 +++ b/lib/superfox/sfox_wave_gfsk.f90 @@ -10,6 +10,7 @@ subroutine sfox_wave_gfsk(fname) parameter (NPTS=(NSYM+2)*NSPS) parameter (BT=8) character*(*) fname + character*40 cmsg2 integer itone(151) real*8 dt,twopi,f0,baud,phi,dphi_peak real*8 dphi(0:NPTS-1) @@ -17,6 +18,7 @@ subroutine sfox_wave_gfsk(fname) logical first/.true./ common/foxcom/wave(NWAVE) + common/foxcom3/nslots2,cmsg2(5),itone3(151) save first,twopi,dt,hmod,dphi_peak,pulse if(first) then @@ -33,9 +35,7 @@ subroutine sfox_wave_gfsk(fname) endif wave=0. - open(25,file=trim(fname),status='unknown',err=999) - read(25,'(20i4)',err=999,end=999) itone - close(25) + itone=itone3 if(itone(1).lt.0 .or. itone(1).gt.128) go to 999 ! Generate the SuperFox waveform. diff --git a/lib/superfox/sftx_sub.f90 b/lib/superfox/sftx_sub.f90 index 17f705a36..11fea043e 100644 --- a/lib/superfox/sftx_sub.f90 +++ b/lib/superfox/sftx_sub.f90 @@ -15,7 +15,7 @@ subroutine sftx_sub(fname,foxcall0,ckey0) use sfox_mod character*(*) fname !Corrected path for sfox_1.dat character*120 line !List of SuperFox message pieces - character*40 cmsg(5) !Old-style Fox messages + character*40 cmsg !Old-style Fox messages character*26 freeTextMsg character*2 arg character*(*) ckey0 @@ -26,7 +26,6 @@ subroutine sftx_sub(fname,foxcall0,ckey0) logical crc_ok real py(0:127,0:127) !Probabilities for received synbol values integer*8 n47 - integer itone(151) !SuperFox channel-symbol values integer*1 xin(0:49) !Packed message as 7-bit symbols integer*1 xdec(0:49) !Decoded message integer*1 y(0:127) !Encoded symbols as i*1 integers @@ -35,6 +34,7 @@ subroutine sftx_sub(fname,foxcall0,ckey0) integer chansym0(127) !Transmitted symbols, data only integer chansym(127) !Received symbols, data only integer isync(24) !Symbol numbers for sync tones + common/foxcom3/nslots,cmsg(5),itone(151) data isync/1,2,4,7,11,16,22,29,37,39,42,43,45,48,52,57,63,70,78,80, & 83,84,86,89/ @@ -42,14 +42,6 @@ subroutine sftx_sub(fname,foxcall0,ckey0) fsample=12000.0 call sfox_init(7,127,50,'no',fspread,delay,fsample,24) - open(25,file=trim(fname),status='unknown') - do i=1,5 - read(25,1000,end=10) cmsg(i) -1000 format(a40) - enddo - i=6 -10 close(25) - nslots=i-1 freeTextMsg=' ' bMoreCQs=cmsg(1)(40:40).eq.'1' bSendMsg=cmsg(nslots)(39:39).eq.'1' @@ -80,11 +72,4 @@ subroutine sftx_sub(fname,foxcall0,ckey0) endif enddo -100 i1=max(index(fname,'sfox_1'),1) - fname(i1:i1+9)='sfox_2.dat' - open(25,file=trim(fname),status='unknown') - write(25,1100) itone -1100 format(20i4) - close(25) - -999 end subroutine sftx_sub +end subroutine sftx_sub