mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-12-19 09:26:03 -05:00
Fix a bug that can arise as a result of a false decode.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3660 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
2589347c01
commit
6541c1da85
@ -51,7 +51,7 @@ OBJS1 = pctile.o graycode.o sort.o ssort.o \
|
|||||||
extract.o fchisq65.o demod64a.o chkhist.o interleave63.o ccf2.o \
|
extract.o fchisq65.o demod64a.o chkhist.o interleave63.o ccf2.o \
|
||||||
move.o indexx.o graycode65.o twkfreq65.o smo121.o \
|
move.o indexx.o graycode65.o twkfreq65.o smo121.o \
|
||||||
wrapkarn.o init_rs.o encode_rs.o decode_rs.o gen65.o fil4.o \
|
wrapkarn.o init_rs.o encode_rs.o decode_rs.o gen65.o fil4.o \
|
||||||
flat3.o polfit.o determ.o
|
flat3.o polfit.o determ.o badmsg.o
|
||||||
|
|
||||||
libjt9.a: $(OBJS1)
|
libjt9.a: $(OBJS1)
|
||||||
ar cr libjt9.a $(OBJS1)
|
ar cr libjt9.a $(OBJS1)
|
||||||
|
@ -42,7 +42,7 @@ OBJS1 = pctile.o graycode.o sort.o ssort.o \
|
|||||||
extract.o fchisq65.o demod64a.o chkhist.o interleave63.o ccf2.o \
|
extract.o fchisq65.o demod64a.o chkhist.o interleave63.o ccf2.o \
|
||||||
move.o indexx.o graycode65.o twkfreq65.o smo121.o \
|
move.o indexx.o graycode65.o twkfreq65.o smo121.o \
|
||||||
wrapkarn.o init_rs.o encode_rs.o decode_rs.o gen65.o fil4.o \
|
wrapkarn.o init_rs.o encode_rs.o decode_rs.o gen65.o fil4.o \
|
||||||
flat3.o polfit.o determ.o
|
flat3.o polfit.o determ.o badmsg.o
|
||||||
|
|
||||||
libjt9.a: $(OBJS1)
|
libjt9.a: $(OBJS1)
|
||||||
ar cr libjt9.a $(OBJS1)
|
ar cr libjt9.a $(OBJS1)
|
||||||
|
18
lib/badmsg.f90
Normal file
18
lib/badmsg.f90
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
logical function badmsg(msg)
|
||||||
|
character*22 msg
|
||||||
|
character*42 c
|
||||||
|
data c/'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ +-./?'/
|
||||||
|
|
||||||
|
do i=1,22
|
||||||
|
do j=1,42
|
||||||
|
if(msg(i:i).eq.c(j:j)) go to 10
|
||||||
|
enddo
|
||||||
|
badmsg=.true.
|
||||||
|
return
|
||||||
|
10 continue
|
||||||
|
enddo
|
||||||
|
badmsg=.false.
|
||||||
|
|
||||||
|
return
|
||||||
|
end function badmsg
|
||||||
|
|
@ -4,7 +4,7 @@ subroutine extract(s3,nadd,ncount,nhist,decoded,ltext,nbmkv)
|
|||||||
character decoded*22
|
character decoded*22
|
||||||
integer era(51),dat4(12),indx(64)
|
integer era(51),dat4(12),indx(64)
|
||||||
integer mrsym(63),mr2sym(63),mrprob(63),mr2prob(63)
|
integer mrsym(63),mr2sym(63),mrprob(63),mr2prob(63)
|
||||||
logical nokv,ltext
|
logical nokv,ltext,badmsg
|
||||||
data nokv/.false./,nsec1/0/
|
data nokv/.false./,nsec1/0/
|
||||||
save
|
save
|
||||||
|
|
||||||
@ -81,9 +81,9 @@ subroutine extract(s3,nadd,ncount,nhist,decoded,ltext,nbmkv)
|
|||||||
#endif
|
#endif
|
||||||
call timer('kvasd ',1)
|
call timer('kvasd ',1)
|
||||||
if(iret.ne.0) then
|
if(iret.ne.0) then
|
||||||
if(.not.nokv) write(*,1000)
|
if(.not.nokv) 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.',i12)
|
||||||
nokv=.true.
|
! nokv=.true.
|
||||||
go to 900
|
go to 900
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -93,6 +93,10 @@ subroutine extract(s3,nadd,ncount,nhist,decoded,ltext,nbmkv)
|
|||||||
ltext=.false.
|
ltext=.false.
|
||||||
if(ncount.ge.0) then
|
if(ncount.ge.0) then
|
||||||
call unpackmsg(dat4,decoded) !Unpack the user message
|
call unpackmsg(dat4,decoded) !Unpack the user message
|
||||||
|
if(badmsg(decoded)) then
|
||||||
|
ncount=-1
|
||||||
|
go to 900
|
||||||
|
endif
|
||||||
if(iand(dat4(10),8).ne.0) ltext=.true.
|
if(iand(dat4(10),8).ne.0) ltext=.true.
|
||||||
nbmkv=2
|
nbmkv=2
|
||||||
endif
|
endif
|
||||||
|
@ -9,7 +9,7 @@ subroutine unpackcall(ncall,word,iv2,psfx)
|
|||||||
iv2=0
|
iv2=0
|
||||||
if(n.ge.262177560) go to 20
|
if(n.ge.262177560) go to 20
|
||||||
word='......'
|
word='......'
|
||||||
if(n.ge.262177560) go to 999 !Plain text message ...
|
! if(n.ge.262177560) go to 999 !Plain text message ...
|
||||||
i=mod(n,27)+11
|
i=mod(n,27)+11
|
||||||
word(6:6)=c(i:i)
|
word(6:6)=c(i:i)
|
||||||
n=n/27
|
n=n/27
|
||||||
@ -37,7 +37,7 @@ subroutine unpackcall(ncall,word,iv2,psfx)
|
|||||||
20 if(n.ge.267796946) go to 999
|
20 if(n.ge.267796946) go to 999
|
||||||
|
|
||||||
! We have a JT65v2 message
|
! We have a JT65v2 message
|
||||||
if((n.ge.262178563) .and. (n.le.264002071)) Then
|
if((n.ge.262178563) .and. (n.le.264002071)) then
|
||||||
! CQ with prefix
|
! CQ with prefix
|
||||||
iv2=1
|
iv2=1
|
||||||
n=n-262178563
|
n=n-262178563
|
||||||
@ -52,9 +52,8 @@ subroutine unpackcall(ncall,word,iv2,psfx)
|
|||||||
n=n/37
|
n=n/37
|
||||||
i=n+1
|
i=n+1
|
||||||
psfx(1:1)=c(i:i)
|
psfx(1:1)=c(i:i)
|
||||||
endif
|
|
||||||
|
|
||||||
if((n.ge.264002072) .and. (n.le.265825580)) Then
|
else if((n.ge.264002072) .and. (n.le.265825580)) then
|
||||||
! QRZ with prefix
|
! QRZ with prefix
|
||||||
iv2=2
|
iv2=2
|
||||||
n=n-264002072
|
n=n-264002072
|
||||||
@ -69,9 +68,8 @@ subroutine unpackcall(ncall,word,iv2,psfx)
|
|||||||
n=n/37
|
n=n/37
|
||||||
i=n+1
|
i=n+1
|
||||||
psfx(1:1)=c(i:i)
|
psfx(1:1)=c(i:i)
|
||||||
endif
|
|
||||||
|
|
||||||
if((n.ge.265825581) .and. (n.le.267649089)) Then
|
else if((n.ge.265825581) .and. (n.le.267649089)) then
|
||||||
! DE with prefix
|
! DE with prefix
|
||||||
iv2=3
|
iv2=3
|
||||||
n=n-265825581
|
n=n-265825581
|
||||||
@ -86,9 +84,8 @@ subroutine unpackcall(ncall,word,iv2,psfx)
|
|||||||
n=n/37
|
n=n/37
|
||||||
i=n+1
|
i=n+1
|
||||||
psfx(1:1)=c(i:i)
|
psfx(1:1)=c(i:i)
|
||||||
endif
|
|
||||||
|
|
||||||
if((n.ge.267649090) .and. (n.le.267698374)) Then
|
else if((n.ge.267649090) .and. (n.le.267698374)) then
|
||||||
! CQ with suffix
|
! CQ with suffix
|
||||||
iv2=4
|
iv2=4
|
||||||
n=n-267649090
|
n=n-267649090
|
||||||
@ -100,9 +97,8 @@ subroutine unpackcall(ncall,word,iv2,psfx)
|
|||||||
n=n/37
|
n=n/37
|
||||||
i=n+1
|
i=n+1
|
||||||
psfx(1:1)=c(i:i)
|
psfx(1:1)=c(i:i)
|
||||||
endif
|
|
||||||
|
|
||||||
if((n.ge.267698375) .and. (n.le.267747659)) Then
|
else if((n.ge.267698375) .and. (n.le.267747659)) then
|
||||||
! QRZ with suffix
|
! QRZ with suffix
|
||||||
iv2=5
|
iv2=5
|
||||||
n=n-267698375
|
n=n-267698375
|
||||||
@ -114,9 +110,8 @@ subroutine unpackcall(ncall,word,iv2,psfx)
|
|||||||
n=n/37
|
n=n/37
|
||||||
i=n+1
|
i=n+1
|
||||||
psfx(1:1)=c(i:i)
|
psfx(1:1)=c(i:i)
|
||||||
endif
|
|
||||||
|
|
||||||
if((n.ge.267747660) .and. (n.le.267796944)) Then
|
else if((n.ge.267747660) .and. (n.le.267796944)) then
|
||||||
! DE with suffix
|
! DE with suffix
|
||||||
iv2=6
|
iv2=6
|
||||||
n=n-267747660
|
n=n-267747660
|
||||||
@ -128,12 +123,15 @@ subroutine unpackcall(ncall,word,iv2,psfx)
|
|||||||
n=n/37
|
n=n/37
|
||||||
i=n+1
|
i=n+1
|
||||||
psfx(1:1)=c(i:i)
|
psfx(1:1)=c(i:i)
|
||||||
endif
|
|
||||||
|
|
||||||
if(n.eq.267796945) Then
|
else if(n.eq.267796945) then
|
||||||
! DE with no prefix or suffix
|
! DE with no prefix or suffix
|
||||||
iv2=7
|
iv2=7
|
||||||
psfx = ' '
|
psfx = ' '
|
||||||
|
else
|
||||||
|
iv2=8
|
||||||
|
word=' '
|
||||||
|
psfx=' '
|
||||||
endif
|
endif
|
||||||
|
|
||||||
999 if(word(1:3).eq.'3D0') word='3DA0'//word(4:)
|
999 if(word(1:3).eq.'3D0') word='3DA0'//word(4:)
|
||||||
|
@ -52,6 +52,7 @@ subroutine unpackmsg(dat,msg)
|
|||||||
if(iv2.eq.5) msg='QRZ '//c2(:n2)//'/'//psfx(:n1)//' '//grid
|
if(iv2.eq.5) msg='QRZ '//c2(:n2)//'/'//psfx(:n1)//' '//grid
|
||||||
if(iv2.eq.6) msg='DE '//c2(:n2)//'/'//psfx(:n1)//' '//grid
|
if(iv2.eq.6) msg='DE '//c2(:n2)//'/'//psfx(:n1)//' '//grid
|
||||||
if(iv2.eq.7) msg='DE '//c2(:n2)//' '//grid
|
if(iv2.eq.7) msg='DE '//c2(:n2)//' '//grid
|
||||||
|
if(iv2.eq.8) msg=' '
|
||||||
go to 100
|
go to 100
|
||||||
else
|
else
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//------------------------------------------------------------ MainWindow
|
//----------------------------------------------------------- MainWindow
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "ui_mainwindow.h"
|
#include "ui_mainwindow.h"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user