Corrected deep search so that it does not test "CQ+call+rpt" messages

and any messages starting with "CQ " if flip is negative.

Implemented "double-right-click" to generate messages with 
MyCall+HisCall+rpt.

Fixed timeout of mouse-selected lists of calls at top of waterfall.



git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@564 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2007-10-25 16:31:19 +00:00
parent e618cc3c61
commit 850efa1d6f
2 changed files with 41 additions and 21 deletions

View File

@ -12,7 +12,6 @@
character*180 line
character*4 rpt(MAXRPT)
integer ncode(63,2*MAXCALLS + 2 + MAXRPT)
integer nflip(2*MAXCALLS + 2 + MAXRPT)
integer istat23(13)
real pp(2*MAXCALLS + 2 + MAXRPT)
common/mrscom/ mrs(63),mrs2(63)
@ -76,15 +75,14 @@
j2=index(callsign,' ') - 1
if(j2.le.-1) j2=12
if(j2.lt.3) j2=6
j3=index(mycall,'/')
j4=index(callsign,'/')
j3=index(mycall,'/') ! j3>0 means compound mycall
j4=index(callsign,'/') ! j4>0 means compound hiscall
callgrid(icall)=callsign(1:j2)
mz=1
if(n.eq.1 .and. j3.lt.1 .and. j4.lt.1 .and.
+ callsign(1:6).ne.' ') mz=MAXRPT+1
+ callsign(1:6).ne.' ') mz=MAXRPT+1 !Allow MyCall + HisCall + rpt
C Test for messages with MyCall + HisCall + report
do m=1,mz
if(m.gt.1) grid=rpt(m-1)
if(j3.lt.1 .and.j4.lt.1)
@ -93,15 +91,15 @@ C Test for messages with MyCall + HisCall + report
k=k+1
testmsg(k)=message
call encode65(message,ncode(1,k))
nflip(k)=flip
if(n.ge.2) then
C Insert CQ message
if(j4.lt.1) callgrid(icall)=callsign(1:j2)//' '//grid
message='CQ '//callgrid(icall)
k=k+1
testmsg(k)=message
call encode65(message,ncode(1,k))
nflip(k)=flip
if(j4.lt.1) callgrid(icall)=callsign(1:j2)//' '//grid
message='CQ '//callgrid(icall)
k=k+1
testmsg(k)=message
call encode65(message,ncode(1,k))
endif
enddo
10 continue
enddo
@ -121,7 +119,8 @@ C Insert CQ message
p2=-1.e30
do k=1,ntot
pp(k)=0.
! if(flip.gt.0.0 .or. nflip(k).lt.0) then !Skip CQ msg if flip=-1
! Test all messages if flip=+1; skip the CQ messages if flip=-1.
if(flip.gt.0.0 .or. testmsg(k)(1:3).ne.'CQ ') then
sum=0.
ref=ref0
do j=1,63
@ -137,7 +136,7 @@ C Insert CQ message
p1=p
ip1=k
endif
! endif
endif
enddo
do i=1,ntot

View File

@ -253,24 +253,33 @@ def stopmon(event=NONE):
def dbl_click_text(event):
t=text.get('1.0',END) #Entire contents of text box
t1=text.get('1.0',CURRENT) #Contents from start to cursor
dbl_click_call(t,t1,event)
dbl_click_call(t,t1,'OOO',event)
#------------------------------------------------------ dbl_click3_text
def dbl_click3_text(event):
t=text.get('1.0',END) #Entire contents of text box
t1=text.get('1.0',CURRENT) #Contents from start to mouse pointer
n=t1.rfind("\n")
rpt=t1[n+24:n+27]
if rpt[0:1] == " ": rpt=rpt[1:]
print n,rpt,t1
dbl_click_call(t,t1,rpt,event)
#------------------------------------------------------ dbl_click_msgtext
def dbl_click_msgtext(event):
t=msgtext.get('1.0',END) #Entire contents of text box
t1=msgtext.get('1.0',CURRENT) #Contents from start to cursor
dbl_click_call(t,t1,event)
dbl_click_call(t,t1,'OOO',event)
#------------------------------------------------------ dbl_click_bmtext
def dbl_click_bmtext(event):
t=bmtext.get('1.0',END) #Entire contents of text box
t1=bmtext.get('1.0',CURRENT) #Contents from start to cursor
dbl_click_call(t,t1,event)
dbl_click_call(t,t1,'OOO',event)
#------------------------------------------------------ dbl_click_ave
def dbl_click_ave(event):
t=avetext.get('1.0',END) #Entire contents of text box
t1=avetext.get('1.0',CURRENT) #Contents from start to cursor
dbl_click_call(t,t1,event)
dbl_click_call(t,t1,'OOO',event)
#------------------------------------------------------ dbl_click_call
def dbl_click_call(t,t1,event):
def dbl_click_call(t,t1,rpt,event):
global hiscall
i=len(t1) #Length to mouse pointer
i1=t1.rfind(' ')+1 #index of preceding space
@ -281,12 +290,23 @@ def dbl_click_call(t,t1,event):
i3=t1.rfind('\n')+1 #start of selected line
if i>6 and i2>i1:
try:
nsec=3600*int(t1[i3+13:i3+15]) + 60*int(t1[i3+15:i3+17])
nsec=60*int(t1[i3+2:i3+4]) + int(t1[i3+4:i3+6])
except:
nsec=0
if setseq.get(): TxFirst.set((nsec/Audio.gcom1.trperiod)%2)
lookup()
GenStdMsgs()
if rpt <> "OOO":
n=tx1.get().rfind(" ")
t2=tx1.get()[0:n+1]
tx2.delete(0,END)
tx2.insert(0,t2+rpt)
tx3.delete(0,END)
tx3.insert(0,t2+"R"+rpt)
tx4.delete(0,END)
tx4.insert(0,t2+"RRR")
tx5.delete(0,END)
tx5.insert(0,t2+"73")
i3=t[:i1].strip().rfind(' ')+1
if t[i3:i1].strip() == 'CQ':
ntx.set(1)
@ -1161,6 +1181,7 @@ def update():
lines=""
bmtext.configure(state=NORMAL)
bmtext.delete('1.0',END)
g.fc=["" for i in range(200)]
for i in range(len(lines)):
for j in range(3):
ka=14*j
@ -1430,7 +1451,7 @@ iframe2.pack(expand=1, fill=BOTH, padx=4)
iframe4 = Frame(frame, bd=2, relief=SUNKEN)
text=Text(iframe4, height=16, width=65)
text.bind('<Double-Button-1>',dbl_click_text)
#text.bind('<Double-Button-3>',dbl_click_text)
text.bind('<Double-Button-3>',dbl_click3_text)
text.bind('<Key>',textkey)
root.bind_all('<F1>', shortcuts)