mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-05-29 12:52:28 -04:00
Many changes to reduce map65.py and specjt.py to supporting JT65 only.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@326 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
0074262ee4
commit
659b430fbf
240
map65.py
240
map65.py
@ -42,16 +42,12 @@ root_geom=""
|
|||||||
|
|
||||||
#------------------------------------------------------ Global variables
|
#------------------------------------------------------ Global variables
|
||||||
appdir=os.getcwd()
|
appdir=os.getcwd()
|
||||||
isync=0
|
isync=1
|
||||||
isync441=2
|
|
||||||
isync6m=-10
|
|
||||||
isync65=1
|
|
||||||
isync_save=0
|
isync_save=0
|
||||||
iclip=0
|
iclip=0
|
||||||
itol=5 #Default tol=400 Hz
|
itol=5 #Default tol=500 Hz
|
||||||
ntol=(10,25,50,100,200,400,600) #List of available tolerances
|
ntol=(10,20,50,100,200,500,1000) #List of available tolerances
|
||||||
idsec=0
|
idsec=0
|
||||||
#irdsec=0
|
|
||||||
lauto=0
|
lauto=0
|
||||||
altmsg=0
|
altmsg=0
|
||||||
bm_geom=""
|
bm_geom=""
|
||||||
@ -73,14 +69,11 @@ ndepth=IntVar()
|
|||||||
nel=0
|
nel=0
|
||||||
nblank=IntVar()
|
nblank=IntVar()
|
||||||
ncall=0
|
ncall=0
|
||||||
ncwtrperiod=120
|
|
||||||
ndmiles=0
|
ndmiles=0
|
||||||
ndkm=0
|
ndkm=0
|
||||||
ndebug=IntVar()
|
ndebug=IntVar()
|
||||||
neme=IntVar()
|
neme=IntVar()
|
||||||
nfreeze=IntVar()
|
nfreeze=IntVar()
|
||||||
nhotaz=0
|
|
||||||
nhotabetter=0
|
|
||||||
nopen=0
|
nopen=0
|
||||||
nosh441=IntVar()
|
nosh441=IntVar()
|
||||||
noshjt65=IntVar()
|
noshjt65=IntVar()
|
||||||
@ -173,19 +166,6 @@ def testmsgs():
|
|||||||
tx5.insert(0,"@1000")
|
tx5.insert(0,"@1000")
|
||||||
tx6.insert(0,"@2000")
|
tx6.insert(0,"@2000")
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------ textsize
|
|
||||||
def textsize():
|
|
||||||
global textheight
|
|
||||||
if textheight <= 9:
|
|
||||||
textheight=21
|
|
||||||
else:
|
|
||||||
if mode.get()[:4]=='JT65':
|
|
||||||
textheight=7
|
|
||||||
else:
|
|
||||||
textheight=9
|
|
||||||
text.configure(height=textheight)
|
|
||||||
|
|
||||||
#------------------------------------------------------ logqso
|
#------------------------------------------------------ logqso
|
||||||
def logqso(event=NONE):
|
def logqso(event=NONE):
|
||||||
t=time.strftime("%Y-%b-%d,%H:%M",time.gmtime())
|
t=time.strftime("%Y-%b-%d,%H:%M",time.gmtime())
|
||||||
@ -216,12 +196,12 @@ def stopmon(event=NONE):
|
|||||||
#------------------------------------------------------ dbl_click_text
|
#------------------------------------------------------ dbl_click_text
|
||||||
def dbl_click_text(event):
|
def dbl_click_text(event):
|
||||||
t=text.get('1.0',END) #Entire contents of text box
|
t=text.get('1.0',END) #Entire contents of text box
|
||||||
t1=text.get('1.0',CURRENT) #Contents from start to mouse pointer
|
t1=text.get('1.0',CURRENT) #Contents from start to cursor
|
||||||
dbl_click_call(t,t1,event)
|
dbl_click_call(t,t1,event)
|
||||||
#------------------------------------------------------ dbl_click_ave
|
#------------------------------------------------------ dbl_click_ave
|
||||||
def dbl_click_ave(event):
|
def dbl_click_ave(event):
|
||||||
t=avetext.get('1.0',END) #Entire contents of text box
|
t=avetext.get('1.0',END) #Entire contents of text box
|
||||||
t1=avetext.get('1.0',CURRENT) #Contents from start to mouse pointer
|
t1=avetext.get('1.0',CURRENT) #Contents from start to cursor
|
||||||
dbl_click_call(t,t1,event)
|
dbl_click_call(t,t1,event)
|
||||||
#------------------------------------------------------ dbl_click_call
|
#------------------------------------------------------ dbl_click_call
|
||||||
def dbl_click_call(t,t1,event):
|
def dbl_click_call(t,t1,event):
|
||||||
@ -356,10 +336,6 @@ def txmute(event=NONE):
|
|||||||
def savelast(event=NONE):
|
def savelast(event=NONE):
|
||||||
Audio.gcom2.nsavelast=1
|
Audio.gcom2.nsavelast=1
|
||||||
|
|
||||||
#------------------------------------------------------ stub
|
|
||||||
def stub(event=NONE):
|
|
||||||
MsgBox("Sorry, this function is not yet implemented.")
|
|
||||||
|
|
||||||
#------------------------------------------------------ MsgBox
|
#------------------------------------------------------ MsgBox
|
||||||
def MsgBox(t):
|
def MsgBox(t):
|
||||||
msg=Pmw.MessageDialog(root,buttons=('OK',),message_text=t)
|
msg=Pmw.MessageDialog(root,buttons=('OK',),message_text=t)
|
||||||
@ -498,7 +474,7 @@ def cleartext():
|
|||||||
|
|
||||||
#------------------------------------------------------ ModeJT65
|
#------------------------------------------------------ ModeJT65
|
||||||
def ModeJT65():
|
def ModeJT65():
|
||||||
global slabel,isync,isync65,textheight,itol
|
global slabel,isync,textheight,itol
|
||||||
cleartext()
|
cleartext()
|
||||||
lab2.configure(text='FileID Sync dB DT DF W')
|
lab2.configure(text='FileID Sync dB DT DF W')
|
||||||
lab4.configure(fg='gray85')
|
lab4.configure(fg='gray85')
|
||||||
@ -507,7 +483,6 @@ def ModeJT65():
|
|||||||
iframe4b.pack(after=iframe4,expand=1, fill=X, padx=4)
|
iframe4b.pack(after=iframe4,expand=1, fill=X, padx=4)
|
||||||
textheight=7
|
textheight=7
|
||||||
text.configure(height=textheight)
|
text.configure(height=textheight)
|
||||||
isync=isync65
|
|
||||||
slabel="Sync "
|
slabel="Sync "
|
||||||
lsync.configure(text=slabel+str(isync))
|
lsync.configure(text=slabel+str(isync))
|
||||||
bclravg.configure(state=NORMAL)
|
bclravg.configure(state=NORMAL)
|
||||||
@ -568,7 +543,7 @@ def about(event=NONE):
|
|||||||
MAP65 is a weak signal communications program designed primarily
|
MAP65 is a weak signal communications program designed primarily
|
||||||
for the Earth-Moon-Earth (EME) propagation path.
|
for the Earth-Moon-Earth (EME) propagation path.
|
||||||
|
|
||||||
Copyright (c) 2001-2006 by Joseph H. Taylor, Jr., K1JT, with
|
Copyright (c) 2001-2007 by Joseph H. Taylor, Jr., K1JT, with
|
||||||
contributions from additional authors. MAP65 is Open Source
|
contributions from additional authors. MAP65 is Open Source
|
||||||
software, licensed under the GNU General Public License (GPL).
|
software, licensed under the GNU General Public License (GPL).
|
||||||
Source code and programming information may be found at
|
Source code and programming information may be found at
|
||||||
@ -598,7 +573,6 @@ Shift+F6 Decode all wave files in directory
|
|||||||
F8 Set JT65A mode
|
F8 Set JT65A mode
|
||||||
Shift+F8 Set JT65B mode
|
Shift+F8 Set JT65B mode
|
||||||
Ctrl+F8 Set JT65C mode
|
Ctrl+F8 Set JT65C mode
|
||||||
Shift+Ctrl+F8 Set CW mode
|
|
||||||
F10 Show SpecJT
|
F10 Show SpecJT
|
||||||
Shift+F10 Show astronomical data
|
Shift+F10 Show astronomical data
|
||||||
Alt+1 to Alt+6 Tx1 to Tx6
|
Alt+1 to Alt+6 Tx1 to Tx6
|
||||||
@ -652,12 +626,12 @@ def what2send(event=NONE):
|
|||||||
screenf5.geometry(root_geom[root_geom.index("+"):])
|
screenf5.geometry(root_geom[root_geom.index("+"):])
|
||||||
if g.Win32: screenf5.iconbitmap("wsjt.ico")
|
if g.Win32: screenf5.iconbitmap("wsjt.ico")
|
||||||
t="""
|
t="""
|
||||||
To optimize your chances of completing a valid QSO using WSJT,
|
To optimize your chances of completing a valid JT65 QSO, use
|
||||||
use the following standard procedures and *do not* exchange pertinent
|
the following standard procedures and *do not* exchange pertinent
|
||||||
information by other means (e.g., internet, telephone, ...) while the
|
information by other means (e.g., internet, telephone, ...) while
|
||||||
QSO is in progress!
|
the QSO is in progress!
|
||||||
|
|
||||||
JT65: If you have received
|
If you have received
|
||||||
... less than both calls, send both calls and your grid locator.
|
... less than both calls, send both calls and your grid locator.
|
||||||
... both calls, send both calls, your grid locator, and OOO.
|
... both calls, send both calls, your grid locator, and OOO.
|
||||||
... both calls and OOO, send RO.
|
... both calls and OOO, send RO.
|
||||||
@ -705,22 +679,13 @@ def prefixes(event=NONE):
|
|||||||
def azdist():
|
def azdist():
|
||||||
if len(HisGrid.get().strip())<4:
|
if len(HisGrid.get().strip())<4:
|
||||||
labAz.configure(text="")
|
labAz.configure(text="")
|
||||||
labHotAB.configure(text="",bg='gray85')
|
|
||||||
labDist.configure(text="")
|
labDist.configure(text="")
|
||||||
else:
|
else:
|
||||||
if mode.get()[:4]=="JT65" or mode.get()[:2]=="CW":
|
labAz.configure(text="Az: %d" % (naz,))
|
||||||
labAz.configure(text="Az: %d" % (naz,))
|
if options.mileskm.get()==0:
|
||||||
labHotAB.configure(text="",bg='gray85')
|
labDist.configure(text=str(ndmiles)+" mi")
|
||||||
else:
|
else:
|
||||||
labAz.configure(text="Az: %d El: %d" % (naz,nel))
|
labDist.configure(text=str(int(1.609344*ndmiles))+" km")
|
||||||
if nhotabetter:
|
|
||||||
labHotAB.configure(text="Hot A: "+str(nhotaz),bg='#FF9900')
|
|
||||||
else:
|
|
||||||
labHotAB.configure(text="Hot B: "+str(nhotaz),bg='#FF9900')
|
|
||||||
if options.mileskm.get()==0:
|
|
||||||
labDist.configure(text=str(ndmiles)+" mi")
|
|
||||||
else:
|
|
||||||
labDist.configure(text=str(int(1.609344*ndmiles))+" km")
|
|
||||||
|
|
||||||
#------------------------------------------------------ incsync
|
#------------------------------------------------------ incsync
|
||||||
def incsync(event):
|
def incsync(event):
|
||||||
@ -755,9 +720,7 @@ def decclip(event):
|
|||||||
#------------------------------------------------------ inctol
|
#------------------------------------------------------ inctol
|
||||||
def inctol(event=NONE):
|
def inctol(event=NONE):
|
||||||
global itol
|
global itol
|
||||||
maxitol=5
|
maxitol=6
|
||||||
if mode.get()[:4]=='JT65':
|
|
||||||
maxitol=6
|
|
||||||
if itol<maxitol: itol=itol+1
|
if itol<maxitol: itol=itol+1
|
||||||
ltol.configure(text='Tol '+str(ntol[itol]))
|
ltol.configure(text='Tol '+str(ntol[itol]))
|
||||||
|
|
||||||
@ -795,26 +758,9 @@ def toggle_shift(event):
|
|||||||
bg='white'
|
bg='white'
|
||||||
lshift.configure(text='Shift 0.0',bg=bg)
|
lshift.configure(text='Shift 0.0',bg=bg)
|
||||||
|
|
||||||
#------------------------------------------------------ inctrperiod
|
|
||||||
def inctrperiod(event):
|
|
||||||
global ncwtrperiod
|
|
||||||
if mode.get()[:2]=="CW":
|
|
||||||
if ncwtrperiod==120: ncwtrperiod=150
|
|
||||||
if ncwtrperiod==60: ncwtrperiod=120
|
|
||||||
Audio.gcom1.trperiod=ncwtrperiod
|
|
||||||
|
|
||||||
#------------------------------------------------------ dectrperiod
|
|
||||||
def dectrperiod(event):
|
|
||||||
global ncwtrperiod
|
|
||||||
if mode.get()[:2]=="CW":
|
|
||||||
if ncwtrperiod==120: ncwtrperiod=60
|
|
||||||
if ncwtrperiod==150: ncwtrperiod=120
|
|
||||||
Audio.gcom1.trperiod=ncwtrperiod
|
|
||||||
|
|
||||||
#------------------------------------------------------ erase
|
#------------------------------------------------------ erase
|
||||||
def erase(event=NONE):
|
def erase(event=NONE):
|
||||||
graph1.delete(ALL)
|
graph1.delete(ALL)
|
||||||
if mode.get()[:4]!="JT65" and mode.get()[:2]!="CW": graph2.delete(ALL)
|
|
||||||
text.configure(state=NORMAL)
|
text.configure(state=NORMAL)
|
||||||
text.delete('1.0',END)
|
text.delete('1.0',END)
|
||||||
text.configure(state=DISABLED)
|
text.configure(state=DISABLED)
|
||||||
@ -883,50 +829,36 @@ def toggleauto(event=NONE):
|
|||||||
#----------------------------------------------------- dtdf_change
|
#----------------------------------------------------- dtdf_change
|
||||||
# Readout of graphical cursor location
|
# Readout of graphical cursor location
|
||||||
def dtdf_change(event):
|
def dtdf_change(event):
|
||||||
if mode.get()[:4]!="JT65":
|
if event.y<40 and Audio.gcom2.nspecial==0:
|
||||||
t="%.1f" % (event.x*30.0/500.0,)
|
lab1.configure(text='Time (s)',bg="#33FFFF") #light blue
|
||||||
lab6.configure(text=t,bg='green')
|
t="%.1f" % (12.0*event.x/500.0-2.0,)
|
||||||
|
lab6.configure(text=t,bg="#33FFFF")
|
||||||
|
elif (event.y>=40 and event.y<95) or \
|
||||||
|
(event.y<95 and Audio.gcom2.nspecial>0):
|
||||||
|
lab1.configure(text='DF (Hz)',bg='red')
|
||||||
|
idf=Audio.gcom2.idf
|
||||||
|
t="%d" % int(idf+1200.0*event.x/500.0-600.0,)
|
||||||
|
lab6.configure(text=t,bg="red")
|
||||||
else:
|
else:
|
||||||
if event.y<40 and Audio.gcom2.nspecial==0:
|
lab1.configure(text='Time (s)',bg='green')
|
||||||
lab1.configure(text='Time (s)',bg="#33FFFF") #light blue
|
t="%.1f" % (53.0*event.x/500.0,)
|
||||||
t="%.1f" % (12.0*event.x/500.0-2.0,)
|
lab6.configure(text=t,bg="green")
|
||||||
lab6.configure(text=t,bg="#33FFFF")
|
|
||||||
elif (event.y>=40 and event.y<95) or \
|
|
||||||
(event.y<95 and Audio.gcom2.nspecial>0):
|
|
||||||
lab1.configure(text='DF (Hz)',bg='red')
|
|
||||||
idf=Audio.gcom2.idf
|
|
||||||
t="%d" % int(idf+1200.0*event.x/500.0-600.0,)
|
|
||||||
lab6.configure(text=t,bg="red")
|
|
||||||
else:
|
|
||||||
lab1.configure(text='Time (s)',bg='green')
|
|
||||||
t="%.1f" % (53.0*event.x/500.0,)
|
|
||||||
lab6.configure(text=t,bg="green")
|
|
||||||
|
|
||||||
#---------------------------------------------------- mouse_click_g1
|
#---------------------------------------------------- mouse_click_g1
|
||||||
def mouse_click_g1(event):
|
def mouse_click_g1(event):
|
||||||
global nopen
|
global nopen
|
||||||
if not nopen:
|
if not nopen:
|
||||||
if mode.get()[:4]=="JT65":
|
Audio.gcom2.mousedf=int(Audio.gcom2.idf+(event.x-250)*2.4)
|
||||||
Audio.gcom2.mousedf=int(Audio.gcom2.idf+(event.x-250)*2.4)
|
|
||||||
else:
|
|
||||||
if Audio.gcom2.ndecoding==0: #If decoder is busy, ignore
|
|
||||||
Audio.gcom2.nagain=1
|
|
||||||
Audio.gcom2.mousebutton=event.num #Left=1, Right=3
|
|
||||||
Audio.gcom2.npingtime=int(195+60*event.x) #Time (ms) of mouse-picked ping
|
|
||||||
if Audio.gcom2.ndecoding0==4:
|
|
||||||
Audio.gcom2.ndecoding=4 #Decode from recorded file
|
|
||||||
elif Audio.gcom2.ndecoding0==1:
|
|
||||||
Audio.gcom2.ndecoding=5 #Decode data in main screen
|
|
||||||
nopen=0
|
nopen=0
|
||||||
|
|
||||||
#------------------------------------------------------ double-click_g1
|
#------------------------------------------------------ double-click_g1
|
||||||
def double_click_g1(event):
|
def double_click_g1(event):
|
||||||
if g.mode[:4]=='JT65' and Audio.gcom2.ndecoding==0:
|
if Audio.gcom2.ndecoding==0:
|
||||||
g.freeze_decode=1
|
g.freeze_decode=1
|
||||||
|
|
||||||
#------------------------------------------------------ mouse_up_g1
|
#------------------------------------------------------ mouse_up_g1
|
||||||
|
#(### What is this for? ###)
|
||||||
def mouse_up_g1(event):
|
def mouse_up_g1(event):
|
||||||
# print event.x
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
#------------------------------------------------------ right_arrow
|
#------------------------------------------------------ right_arrow
|
||||||
@ -973,8 +905,7 @@ def GenAltMsgs(event=NONE):
|
|||||||
ToRadio.insert(0,t)
|
ToRadio.insert(0,t)
|
||||||
if k2txb.get()!=0: ntx.set(1)
|
if k2txb.get()!=0: ntx.set(1)
|
||||||
Audio.gcom2.hiscall=(ToRadio.get()+' ')[:12]
|
Audio.gcom2.hiscall=(ToRadio.get()+' ')[:12]
|
||||||
if mode.get()[:4]=="JT65" and ToRadio.get().find("/") == -1 and \
|
if ToRadio.get().find("/") == -1 and options.MyCall.get().find("/") == -1:
|
||||||
options.MyCall.get().find("/") == -1:
|
|
||||||
for m in (tx1, tx2, tx3, tx4, tx5, tx6):
|
for m in (tx1, tx2, tx3, tx4, tx5, tx6):
|
||||||
m.delete(0,99)
|
m.delete(0,99)
|
||||||
t=ToRadio.get() + " "+options.MyCall.get()
|
t=ToRadio.get() + " "+options.MyCall.get()
|
||||||
@ -1160,20 +1091,20 @@ def bandmap(event=NONE):
|
|||||||
bm.geometry(bm_geom)
|
bm.geometry(bm_geom)
|
||||||
if g.Win32: bm.iconbitmap("wsjt.ico")
|
if g.Win32: bm.iconbitmap("wsjt.ico")
|
||||||
iframe_bm1 = Frame(bm, bd=1, relief=SUNKEN)
|
iframe_bm1 = Frame(bm, bd=1, relief=SUNKEN)
|
||||||
text=Text(iframe_bm1, height=35, width=30, bg="Navy", fg="yellow")
|
text=Text(iframe_bm1, height=35, width=32, bg="Navy", fg="yellow")
|
||||||
text.pack(side=LEFT, fill=X, padx=1)
|
text.pack(side=LEFT, fill=X, padx=1)
|
||||||
sb = Scrollbar(iframe_bm1, orient=VERTICAL, command=text.yview)
|
sb = Scrollbar(iframe_bm1, orient=VERTICAL, command=text.yview)
|
||||||
sb.pack(side=RIGHT, fill=Y)
|
sb.pack(side=RIGHT, fill=Y)
|
||||||
text.configure(yscrollcommand=sb.set)
|
text.configure(yscrollcommand=sb.set)
|
||||||
text.insert(END,'144.118 K1JT\n')
|
text.insert(END,'144.103 CQ EA3DXU JN11\n')
|
||||||
text.insert(END,'144.127 KB8RQ')
|
text.insert(END,'144.118 OH6KTL RA3AQ KO85 OOO')
|
||||||
iframe_bm1.pack(expand=1, fill=X, padx=4)
|
iframe_bm1.pack(expand=1, fill=X, padx=4)
|
||||||
|
|
||||||
#------------------------------------------------------ update
|
#------------------------------------------------------ update
|
||||||
def update():
|
def update():
|
||||||
global root_geom,isec0,naz,nel,ndmiles,ndkm,nhotaz,nhotabetter,nopen, \
|
global root_geom,isec0,naz,nel,ndmiles,ndkm,nhotaz,nhotabetter,nopen, \
|
||||||
im,pim,cmap0,isync,isync441,isync6m,isync65,isync_save,idsec, \
|
im,pim,cmap0,isync,isync_save,idsec,first,itol,txsnrdb,tx6alt,\
|
||||||
first,itol,txsnrdb,tx6alt,bm_geom
|
bm_geom
|
||||||
|
|
||||||
utc=time.gmtime(time.time()+0.1*idsec)
|
utc=time.gmtime(time.time()+0.1*idsec)
|
||||||
isec=utc[5]
|
isec=utc[5]
|
||||||
@ -1184,7 +1115,10 @@ def update():
|
|||||||
Audio.gcom2.utcdate=t[:12]
|
Audio.gcom2.utcdate=t[:12]
|
||||||
ldate.configure(text=t)
|
ldate.configure(text=t)
|
||||||
root_geom=root.geometry()
|
root_geom=root.geometry()
|
||||||
bm_geom=bm.geometry()
|
try:
|
||||||
|
bm_geom=bm.geometry()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
utchours=utc[3]+utc[4]/60.0 + utc[5]/3600.0
|
utchours=utc[3]+utc[4]/60.0 + utc[5]/3600.0
|
||||||
naz,nel,ndmiles,ndkm,nhotaz,nhotabetter=Audio.azdist0( \
|
naz,nel,ndmiles,ndkm,nhotaz,nhotabetter=Audio.azdist0( \
|
||||||
options.MyGrid.get().upper(),HisGrid.get().upper(),utchours)
|
options.MyGrid.get().upper(),HisGrid.get().upper(),utchours)
|
||||||
@ -1204,15 +1138,14 @@ def update():
|
|||||||
g.ndop=g.ndop00
|
g.ndop=g.ndop00
|
||||||
g.dfdt=g.dfdt0
|
g.dfdt=g.dfdt0
|
||||||
|
|
||||||
if mode.get()[:4]=='JT65' or mode.get()[:2]=='CW' :
|
graph2.delete(ALL)
|
||||||
graph2.delete(ALL)
|
graph2.create_text(80,13,anchor=CENTER,text="Moon",font=g2font)
|
||||||
graph2.create_text(80,13,anchor=CENTER,text="Moon",font=g2font)
|
graph2.create_text(13,37,anchor=W, text="Az: %6.2f" % g.AzMoon,font=g2font)
|
||||||
graph2.create_text(13,37,anchor=W, text="Az: %6.2f" % g.AzMoon,font=g2font)
|
graph2.create_text(13,61,anchor=W, text="El: %6.2f" % g.ElMoon,font=g2font)
|
||||||
graph2.create_text(13,61,anchor=W, text="El: %6.2f" % g.ElMoon,font=g2font)
|
graph2.create_text(13,85,anchor=W, text="Dop:%6d" % g.ndop,font=g2font)
|
||||||
graph2.create_text(13,85,anchor=W, text="Dop:%6d" % g.ndop,font=g2font)
|
graph2.create_text(13,109,anchor=W,text="Dgrd:%5.1f" % g.Dgrd,font=g2font)
|
||||||
graph2.create_text(13,109,anchor=W,text="Dgrd:%5.1f" % g.Dgrd,font=g2font)
|
|
||||||
|
|
||||||
if g.freeze_decode and mode.get()[:4]=='JT65':
|
if g.freeze_decode:
|
||||||
itol=2
|
itol=2
|
||||||
ltol.configure(text='Tol '+str(50))
|
ltol.configure(text='Tol '+str(50))
|
||||||
Audio.gcom2.dftolerance=50
|
Audio.gcom2.dftolerance=50
|
||||||
@ -1269,11 +1202,7 @@ def update():
|
|||||||
bdecode.configure(bg='gray85',activebackground='gray95')
|
bdecode.configure(bg='gray85',activebackground='gray95')
|
||||||
if Audio.gcom2.ndecoding: #Set button bg=light_blue while decoding
|
if Audio.gcom2.ndecoding: #Set button bg=light_blue while decoding
|
||||||
bdecode.configure(bg='#66FFFF',activebackground='#66FFFF')
|
bdecode.configure(bg='#66FFFF',activebackground='#66FFFF')
|
||||||
if mode.get()[:2]=="CW":
|
msg5.configure(text="TR Period: %d s" % (Audio.gcom1.trperiod,), \
|
||||||
msg5.configure(text="TR Period: %d s" % (Audio.gcom1.trperiod,), \
|
|
||||||
bg='white')
|
|
||||||
else:
|
|
||||||
msg5.configure(text="TR Period: %d s" % (Audio.gcom1.trperiod,), \
|
|
||||||
bg='gray85')
|
bg='gray85')
|
||||||
|
|
||||||
tx1.configure(bg='white')
|
tx1.configure(bg='white')
|
||||||
@ -1335,44 +1264,32 @@ def update():
|
|||||||
text.see(END)
|
text.see(END)
|
||||||
# text.configure(state=DISABLED)
|
# text.configure(state=DISABLED)
|
||||||
|
|
||||||
if mode.get()[:4]=='JT65':
|
try:
|
||||||
try:
|
f=open(appdir+'/decoded.ave',mode='r')
|
||||||
f=open(appdir+'/decoded.ave',mode='r')
|
lines=f.readlines()
|
||||||
lines=f.readlines()
|
f.close()
|
||||||
f.close()
|
except:
|
||||||
except:
|
lines[0]=""
|
||||||
lines[0]=""
|
lines[1]=""
|
||||||
lines[1]=""
|
avetext.configure(state=NORMAL)
|
||||||
avetext.configure(state=NORMAL)
|
avetext.delete('1.0',END)
|
||||||
avetext.delete('1.0',END)
|
if len(lines)>1:
|
||||||
if len(lines)>1:
|
avetext.insert(END,lines[0])
|
||||||
avetext.insert(END,lines[0])
|
avetext.insert(END,lines[1])
|
||||||
avetext.insert(END,lines[1])
|
# avetext.configure(state=DISABLED)
|
||||||
# avetext.configure(state=DISABLED)
|
|
||||||
Audio.gcom2.ndecdone=2
|
Audio.gcom2.ndecdone=2
|
||||||
|
|
||||||
if g.cmap != cmap0:
|
if g.cmap != cmap0:
|
||||||
im.putpalette(g.palette)
|
im.putpalette(g.palette)
|
||||||
cmap0=g.cmap
|
cmap0=g.cmap
|
||||||
|
|
||||||
if mode.get()[:4]=='JT65':
|
plot_large()
|
||||||
plot_large()
|
|
||||||
else:
|
|
||||||
im.putdata(Audio.gcom2.b)
|
|
||||||
pim=ImageTk.PhotoImage(im) #Convert Image to PhotoImage
|
|
||||||
graph1.delete(ALL)
|
|
||||||
# NB: top two lines are probably invisible ...
|
|
||||||
graph1.create_image(0,0,anchor='nw',image=pim)
|
|
||||||
t=g.filetime(g.ftnstr(Audio.gcom2.decodedfile))
|
|
||||||
graph1.create_text(100,80,anchor=W,text=t,fill="white")
|
|
||||||
plot_small()
|
|
||||||
if loopall: opennext()
|
if loopall: opennext()
|
||||||
nopen=0
|
nopen=0
|
||||||
|
|
||||||
# Save some parameters
|
# Save some parameters
|
||||||
g.mode=mode.get()
|
g.mode=mode.get()
|
||||||
g.report=report.get()
|
g.report=report.get()
|
||||||
isync65=isync
|
|
||||||
Audio.gcom1.txfirst=TxFirst.get()
|
Audio.gcom1.txfirst=TxFirst.get()
|
||||||
try:
|
try:
|
||||||
Audio.gcom1.samfacin=options.samfacin.get()
|
Audio.gcom1.samfacin=options.samfacin.get()
|
||||||
@ -1461,7 +1378,6 @@ setupbutton['menu'] = setupmenu
|
|||||||
setupmenu.add('command', label = 'Options', command = options1, \
|
setupmenu.add('command', label = 'Options', command = options1, \
|
||||||
accelerator='F2')
|
accelerator='F2')
|
||||||
setupmenu.add_separator()
|
setupmenu.add_separator()
|
||||||
setupmenu.add('command', label = 'Toggle size of text window', command=textsize)
|
|
||||||
setupmenu.add('command', label = 'Generate messages for test tones', command=testmsgs)
|
setupmenu.add('command', label = 'Generate messages for test tones', command=testmsgs)
|
||||||
setupmenu.add_separator()
|
setupmenu.add_separator()
|
||||||
setupmenu.add_checkbutton(label = 'F4 sets Tx6',variable=kb8rq)
|
setupmenu.add_checkbutton(label = 'F4 sets Tx6',variable=kb8rq)
|
||||||
@ -1478,6 +1394,8 @@ viewmenu=Menu(viewbutton,tearoff=0)
|
|||||||
viewbutton['menu']=viewmenu
|
viewbutton['menu']=viewmenu
|
||||||
viewmenu.add('command', label = 'SpecJT', command = showspecjt, \
|
viewmenu.add('command', label = 'SpecJT', command = showspecjt, \
|
||||||
accelerator='F10')
|
accelerator='F10')
|
||||||
|
viewmenu.add('command', label = 'Band Map', command = bandmap, \
|
||||||
|
accelerator='Ctrl+F10')
|
||||||
viewmenu.add('command', label = 'Astronomical data', command = astro1, \
|
viewmenu.add('command', label = 'Astronomical data', command = astro1, \
|
||||||
accelerator='Shift+F10')
|
accelerator='Shift+F10')
|
||||||
|
|
||||||
@ -1498,8 +1416,6 @@ modemenu.add_radiobutton(label = 'JT65B', variable=mode, command = ModeJT65B, \
|
|||||||
accelerator='Shift+F8')
|
accelerator='Shift+F8')
|
||||||
modemenu.add_radiobutton(label = 'JT65C', variable=mode, command = ModeJT65C, \
|
modemenu.add_radiobutton(label = 'JT65C', variable=mode, command = ModeJT65C, \
|
||||||
accelerator='Ctrl+F8')
|
accelerator='Ctrl+F8')
|
||||||
#modemenu.add_radiobutton(label = 'Echo', variable=mode, command = ModeEcho,
|
|
||||||
# state=DISABLED)
|
|
||||||
|
|
||||||
#------------------------------------------------------ Decode menu
|
#------------------------------------------------------ Decode menu
|
||||||
decodebutton = Menubutton(mbar, text = 'Decode')
|
decodebutton = Menubutton(mbar, text = 'Decode')
|
||||||
@ -1618,6 +1534,7 @@ root.bind_all('<Shift-F8>', ModeJT65B)
|
|||||||
root.bind_all('<Control-F8>', ModeJT65C)
|
root.bind_all('<Control-F8>', ModeJT65C)
|
||||||
root.bind_all('<F10>', showspecjt)
|
root.bind_all('<F10>', showspecjt)
|
||||||
root.bind_all('<Shift-F10>', astro1)
|
root.bind_all('<Shift-F10>', astro1)
|
||||||
|
root.bind_all('<Control-F10>', bandmap)
|
||||||
|
|
||||||
root.bind_all('<Alt-Key-1>',btx1)
|
root.bind_all('<Alt-Key-1>',btx1)
|
||||||
root.bind_all('<Alt-Key-2>',btx2)
|
root.bind_all('<Alt-Key-2>',btx2)
|
||||||
@ -1865,8 +1782,6 @@ msg4=Message(iframe6, text='Message #4', width=300,relief=SUNKEN)
|
|||||||
msg4.pack(side=LEFT, fill=X, padx=1)
|
msg4.pack(side=LEFT, fill=X, padx=1)
|
||||||
msg5=Message(iframe6, text='Message #5', width=300,relief=SUNKEN)
|
msg5=Message(iframe6, text='Message #5', width=300,relief=SUNKEN)
|
||||||
msg5.pack(side=LEFT, fill=X, padx=1)
|
msg5.pack(side=LEFT, fill=X, padx=1)
|
||||||
Widget.bind(msg5,'<Button-1>',inctrperiod)
|
|
||||||
Widget.bind(msg5,'<Button-3>',dectrperiod)
|
|
||||||
msg7=Message(iframe6, text=' ', width=300,relief=SUNKEN)
|
msg7=Message(iframe6, text=' ', width=300,relief=SUNKEN)
|
||||||
msg7.pack(side=RIGHT, fill=X, padx=1)
|
msg7.pack(side=RIGHT, fill=X, padx=1)
|
||||||
iframe6.pack(expand=1, fill=X, padx=4)
|
iframe6.pack(expand=1, fill=X, padx=4)
|
||||||
@ -1982,9 +1897,7 @@ try:
|
|||||||
elif key == 'ShOK': ShOK.set(value)
|
elif key == 'ShOK': ShOK.set(value)
|
||||||
elif key == 'Nsave': nsave.set(value)
|
elif key == 'Nsave': nsave.set(value)
|
||||||
elif key == 'Band': nfreq.set(value)
|
elif key == 'Band': nfreq.set(value)
|
||||||
elif key == 'S441': isync441=int(value)
|
elif key == 'Sync': isync=int(value)
|
||||||
elif key == 'S6m': isync6m=int(value)
|
|
||||||
elif key == 'Sync': isync65=int(value)
|
|
||||||
elif key == 'Clip': iclip=int(value)
|
elif key == 'Clip': iclip=int(value)
|
||||||
elif key == 'Zap': nzap.set(value)
|
elif key == 'Zap': nzap.set(value)
|
||||||
elif key == 'NB': nblank.set(value)
|
elif key == 'NB': nblank.set(value)
|
||||||
@ -2002,16 +1915,12 @@ try:
|
|||||||
lookup() #Maybe should save HisGrid, instead?
|
lookup() #Maybe should save HisGrid, instead?
|
||||||
elif key == 'MRUDir': mrudir=value.replace("#"," ")
|
elif key == 'MRUDir': mrudir=value.replace("#"," ")
|
||||||
elif key == 'AstroGeometry': g.astro_geom0 =value
|
elif key == 'AstroGeometry': g.astro_geom0 =value
|
||||||
elif key == 'CWTRPeriod':
|
|
||||||
ncwtrperiod=int(value)
|
|
||||||
if mode.get()[:2]=="CW": Audio.gcom1.trperiod=ncwtrperiod
|
|
||||||
else: pass
|
else: pass
|
||||||
except:
|
except:
|
||||||
print 'Error reading MAP65.INI, continuing with defaults.'
|
print 'Error reading MAP65.INI, continuing with defaults.'
|
||||||
print key,value
|
print key,value
|
||||||
|
|
||||||
g.mode=mode.get()
|
g.mode=mode.get()
|
||||||
isync=isync65
|
|
||||||
lsync.configure(text=slabel+str(isync))
|
lsync.configure(text=slabel+str(isync))
|
||||||
lclip.configure(text='Clip '+str(iclip))
|
lclip.configure(text='Clip '+str(iclip))
|
||||||
Audio.gcom2.appdir=(appdir+' ')[:80]
|
Audio.gcom2.appdir=(appdir+' ')[:80]
|
||||||
@ -2027,7 +1936,7 @@ bandmap()
|
|||||||
import astro
|
import astro
|
||||||
import specjt
|
import specjt
|
||||||
|
|
||||||
# SpecJT has a "mainloop", so does not return until it is terminated.
|
# SpecJT has a "mainloop", so it does not return until terminated.
|
||||||
#root.mainloop() #Superseded by mainloop in SpecJT
|
#root.mainloop() #Superseded by mainloop in SpecJT
|
||||||
|
|
||||||
# Clean up and save user options before terminating
|
# Clean up and save user options before terminating
|
||||||
@ -2077,9 +1986,7 @@ f.write("Report " + g.report + "\n")
|
|||||||
f.write("ShOK " + str(ShOK.get()) + "\n")
|
f.write("ShOK " + str(ShOK.get()) + "\n")
|
||||||
f.write("Nsave " + str(nsave.get()) + "\n")
|
f.write("Nsave " + str(nsave.get()) + "\n")
|
||||||
f.write("Band " + str(nfreq.get()) + "\n")
|
f.write("Band " + str(nfreq.get()) + "\n")
|
||||||
f.write("S441 " + str(isync441) + "\n")
|
f.write("Sync " + str(isync) + "\n")
|
||||||
f.write("S6m " + str(isync6m) + "\n")
|
|
||||||
f.write("Sync " + str(isync65) + "\n")
|
|
||||||
f.write("Clip " + str(iclip) + "\n")
|
f.write("Clip " + str(iclip) + "\n")
|
||||||
f.write("Zap " + str(nzap.get()) + "\n")
|
f.write("Zap " + str(nzap.get()) + "\n")
|
||||||
f.write("NB " + str(nblank.get()) + "\n")
|
f.write("NB " + str(nblank.get()) + "\n")
|
||||||
@ -2095,7 +2002,6 @@ mrudir2=mrudir.replace(" ","#")
|
|||||||
f.write("MRUDir " + mrudir2 + "\n")
|
f.write("MRUDir " + mrudir2 + "\n")
|
||||||
if g.astro_geom[:7]=="200x200": g.astro_geom="316x373" + g.astro_geom[7:]
|
if g.astro_geom[:7]=="200x200": g.astro_geom="316x373" + g.astro_geom[7:]
|
||||||
f.write("AstroGeometry " + g.astro_geom + "\n")
|
f.write("AstroGeometry " + g.astro_geom + "\n")
|
||||||
f.write("CWTRPeriod " + str(ncwtrperiod) + "\n")
|
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
Audio.ftn_quit()
|
Audio.ftn_quit()
|
||||||
|
129
specjt.py
129
specjt.py
@ -4,7 +4,6 @@ from tkMessageBox import showwarning
|
|||||||
import time
|
import time
|
||||||
import os
|
import os
|
||||||
import Pmw
|
import Pmw
|
||||||
import smeter
|
|
||||||
import Audio
|
import Audio
|
||||||
import g
|
import g
|
||||||
import string
|
import string
|
||||||
@ -96,26 +95,6 @@ def pal_AFMHot():
|
|||||||
im.putpalette(Colormap2Palette(colormapAFMHot),"RGB")
|
im.putpalette(Colormap2Palette(colormapAFMHot),"RGB")
|
||||||
|
|
||||||
#--------------------------------------------------- Command button routines
|
#--------------------------------------------------- Command button routines
|
||||||
#--------------------------------------------------- rx_volume
|
|
||||||
def rx_volume():
|
|
||||||
for path in string.split(os.environ["PATH"], os.pathsep):
|
|
||||||
file = os.path.join(path, "sndvol32") + ".exe"
|
|
||||||
try:
|
|
||||||
return os.spawnv(os.P_NOWAIT, file, (file,) + (" -r",))
|
|
||||||
except os.error:
|
|
||||||
pass
|
|
||||||
raise os.error, "Cannot find "+file
|
|
||||||
|
|
||||||
#--------------------------------------------------- tx_volume
|
|
||||||
def tx_volume():
|
|
||||||
for path in string.split(os.environ["PATH"], os.pathsep):
|
|
||||||
file = os.path.join(path, "sndvol32") + ".exe"
|
|
||||||
try:
|
|
||||||
return os.spawnv(os.P_NOWAIT, file, (file,))
|
|
||||||
except os.error:
|
|
||||||
pass
|
|
||||||
raise os.error, "Cannot find "+file
|
|
||||||
|
|
||||||
#---------------------------------------------------- fdf_change
|
#---------------------------------------------------- fdf_change
|
||||||
# Readout of graphical cursor location
|
# Readout of graphical cursor location
|
||||||
def fdf_change(event):
|
def fdf_change(event):
|
||||||
@ -151,32 +130,30 @@ def df_mark():
|
|||||||
# Mark sync tone and top JT65 tone (green) and shorthand tones (red)
|
# Mark sync tone and top JT65 tone (green) and shorthand tones (red)
|
||||||
if(frange==2000):
|
if(frange==2000):
|
||||||
dx=288.7 + (1500-fmid)/df
|
dx=288.7 + (1500-fmid)/df
|
||||||
if g.mode[:4]=="JT65":
|
color='green'
|
||||||
color='green'
|
x1=(Audio.gcom2.mousedf + 6.6*fstep)/df + dx
|
||||||
x1=(Audio.gcom2.mousedf + 6.6*fstep)/df + dx
|
c.create_line(x1-0.5,25,x1-0.5,12,fill=color)
|
||||||
c.create_line(x1-0.5,25,x1-0.5,12,fill=color)
|
c.create_line(x1+0.5,25,x1+0.5,12,fill=color)
|
||||||
c.create_line(x1+0.5,25,x1+0.5,12,fill=color)
|
for i in range(5):
|
||||||
for i in range(5):
|
x1=(Audio.gcom2.mousedf + i*fstep)/df + dx
|
||||||
x1=(Audio.gcom2.mousedf + i*fstep)/df + dx
|
j=12
|
||||||
j=12
|
if i>0: j=15
|
||||||
if i>0: j=15
|
if i!=1: c.create_line(x1-0.5,25,x1-0.5,j,fill=color)
|
||||||
if i!=1: c.create_line(x1-0.5,25,x1-0.5,j,fill=color)
|
if i!=1: c.create_line(x1+0.5,25,x1+0.5,j,fill=color)
|
||||||
if i!=1: c.create_line(x1+0.5,25,x1+0.5,j,fill=color)
|
color='red'
|
||||||
color='red'
|
|
||||||
if(frange==4000):
|
if(frange==4000):
|
||||||
dx=375 + (1270.5-fmid)/(2*df)
|
dx=375 + (1270.5-fmid)/(2*df)
|
||||||
if g.mode[:4]=="JT65":
|
color='green'
|
||||||
color='green'
|
x1=(Audio.gcom2.mousedf + 6.6*fstep)/(2*df) + dx
|
||||||
x1=(Audio.gcom2.mousedf + 6.6*fstep)/(2*df) + dx
|
c.create_line(x1-0.5,25,x1-0.5,12,fill=color)
|
||||||
c.create_line(x1-0.5,25,x1-0.5,12,fill=color)
|
c.create_line(x1+0.5,25,x1+0.5,12,fill=color)
|
||||||
c.create_line(x1+0.5,25,x1+0.5,12,fill=color)
|
for i in range(5):
|
||||||
for i in range(5):
|
x1=(Audio.gcom2.mousedf + i*fstep)/(2*df) + dx
|
||||||
x1=(Audio.gcom2.mousedf + i*fstep)/(2*df) + dx
|
j=12
|
||||||
j=12
|
if i>0: j=15
|
||||||
if i>0: j=15
|
if i!=1: c.create_line(x1-0.5,25,x1-0.5,j,fill=color)
|
||||||
if i!=1: c.create_line(x1-0.5,25,x1-0.5,j,fill=color)
|
if i!=1: c.create_line(x1+0.5,25,x1+0.5,j,fill=color)
|
||||||
if i!=1: c.create_line(x1+0.5,25,x1+0.5,j,fill=color)
|
color='red'
|
||||||
color='red'
|
|
||||||
|
|
||||||
#---------------------------------------------------- change_fmid
|
#---------------------------------------------------- change_fmid
|
||||||
def change_fmid1():
|
def change_fmid1():
|
||||||
@ -275,7 +252,6 @@ def update():
|
|||||||
else:
|
else:
|
||||||
newdat=0
|
newdat=0
|
||||||
|
|
||||||
sm.updateProgress(newValue=Audio.gcom1.level) #S-meter bar
|
|
||||||
if newdat or brightness!=b0 or contrast!=c0 or logm!=logm0:
|
if newdat or brightness!=b0 or contrast!=c0 or logm!=logm0:
|
||||||
if brightness==b0 and contrast==c0 and logm==logm0 and nspeed<6:
|
if brightness==b0 and contrast==c0 and logm==logm0 and nspeed<6:
|
||||||
n=Audio.gcom2.nlines
|
n=Audio.gcom2.nlines
|
||||||
@ -321,8 +297,7 @@ def update():
|
|||||||
|
|
||||||
newMinute=0
|
newMinute=0
|
||||||
|
|
||||||
if (Audio.gcom2.mousedf != mousedf0 or Audio.gcom2.dftolerance != tol0) \
|
if (Audio.gcom2.mousedf != mousedf0 or Audio.gcom2.dftolerance != tol0):
|
||||||
and g.mode[:4]=='JT65':
|
|
||||||
df_mark()
|
df_mark()
|
||||||
|
|
||||||
# The following int() calls are to ensure that the values copied to
|
# The following int() calls are to ensure that the values copied to
|
||||||
@ -336,7 +311,6 @@ def update():
|
|||||||
nfreeze0=int(Audio.gcom2.nfreeze)
|
nfreeze0=int(Audio.gcom2.nfreeze)
|
||||||
|
|
||||||
if g.mode!=mode0:
|
if g.mode!=mode0:
|
||||||
# if g.mode[:4]=="JT65" and nspeed0.get()>5: nspeed0.set(3)
|
|
||||||
draw_axis()
|
draw_axis()
|
||||||
mode0=g.mode
|
mode0=g.mode
|
||||||
|
|
||||||
@ -391,20 +365,19 @@ def draw_axis():
|
|||||||
c.create_text(x,y,text=str(ix))
|
c.create_text(x,y,text=str(ix))
|
||||||
c.create_line(i,25,i,j,fill='black')
|
c.create_line(i,25,i,j,fill='black')
|
||||||
|
|
||||||
if g.mode[:4]=="JT65":
|
dx=288.7 + (1500-fmid)/df
|
||||||
dx=288.7 + (1500-fmid)/df
|
dff=df
|
||||||
dff=df
|
if frange==4000:
|
||||||
if frange==4000:
|
dx=375 + (1270.5-fmid)/(2*df)
|
||||||
dx=375 + (1270.5-fmid)/(2*df)
|
dff=2*df
|
||||||
dff=2*df
|
if Audio.gcom2.nfreeze==0:
|
||||||
if Audio.gcom2.nfreeze==0:
|
x1=(Audio.gcom2.mousedf-600)/dff + dx
|
||||||
x1=(Audio.gcom2.mousedf-600)/dff + dx
|
x2=(Audio.gcom2.mousedf+600)/dff + dx
|
||||||
x2=(Audio.gcom2.mousedf+600)/dff + dx
|
else:
|
||||||
else:
|
tol=Audio.gcom2.dftolerance
|
||||||
tol=Audio.gcom2.dftolerance
|
x1=(Audio.gcom2.mousedf-tol)/dff + dx
|
||||||
x1=(Audio.gcom2.mousedf-tol)/dff + dx
|
x2=(Audio.gcom2.mousedf+tol)/dff + dx
|
||||||
x2=(Audio.gcom2.mousedf+tol)/dff + dx
|
c.create_line(x1,25,x2,25,fill='green',width=2)
|
||||||
c.create_line(x1,25,x2,25,fill='green',width=2)
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
for ix in range(1,31):
|
for ix in range(1,31):
|
||||||
@ -436,9 +409,6 @@ setupmenu.add_checkbutton(label='Flatten spectra',variable=nflat)
|
|||||||
setupmenu.add_checkbutton(label='Mark JT65 tones only if Freeze is checked',
|
setupmenu.add_checkbutton(label='Mark JT65 tones only if Freeze is checked',
|
||||||
variable=nmark)
|
variable=nmark)
|
||||||
setupmenu.add_separator()
|
setupmenu.add_separator()
|
||||||
setupmenu.add('command', label = 'Rx volume control', command = rx_volume)
|
|
||||||
setupmenu.add('command', label = 'Tx volume control', command = tx_volume)
|
|
||||||
setupmenu.add_separator()
|
|
||||||
setupmenu.add_radiobutton(label='Frequency axis',command=df_mark,
|
setupmenu.add_radiobutton(label='Frequency axis',command=df_mark,
|
||||||
value=0,variable=naxis)
|
value=0,variable=naxis)
|
||||||
setupmenu.add_radiobutton(label='JT65 DF axis',command=df_mark,
|
setupmenu.add_radiobutton(label='JT65 DF axis',command=df_mark,
|
||||||
@ -479,10 +449,8 @@ bfmid3.pack(side=LEFT)
|
|||||||
bfmid2.pack(side=LEFT)
|
bfmid2.pack(side=LEFT)
|
||||||
|
|
||||||
#------------------------------------------------- Speed selection buttons
|
#------------------------------------------------- Speed selection buttons
|
||||||
for i in (7, 6, 5, 4, 3, 2, 1):
|
for i in (5, 4, 3, 2, 1):
|
||||||
t=str(i)
|
t=str(i)
|
||||||
if i==6: t="H1"
|
|
||||||
if i==7: t="H2"
|
|
||||||
Radiobutton(mbar,text=t,value=i,variable=nspeed0).pack(side=RIGHT)
|
Radiobutton(mbar,text=t,value=i,variable=nspeed0).pack(side=RIGHT)
|
||||||
nspeed0.set(6)
|
nspeed0.set(6)
|
||||||
lab2=Label(mbar,text='Speed: ',bd=0)
|
lab2=Label(mbar,text='Speed: ',bd=0)
|
||||||
@ -496,7 +464,7 @@ Widget.bind(c,"<Shift-Button-2>",freq_range)
|
|||||||
Widget.bind(c,"<Shift-Button-3>",freq_range)
|
Widget.bind(c,"<Shift-Button-3>",freq_range)
|
||||||
#Widget.bind(c,"<Control-Button-1>",freq_center)
|
#Widget.bind(c,"<Control-Button-1>",freq_center)
|
||||||
|
|
||||||
graph1=Canvas(iframe1, bg='black', width=750, height=300,bd=0,cursor='crosshair')
|
graph1=Canvas(iframe1, bg='black', width=750, height=130,bd=0,cursor='crosshair')
|
||||||
graph1.pack(side=TOP)
|
graph1.pack(side=TOP)
|
||||||
Widget.bind(graph1,"<Motion>",fdf_change)
|
Widget.bind(graph1,"<Motion>",fdf_change)
|
||||||
#Widget.bind(graph1,"<Button-1>",decode_request)
|
#Widget.bind(graph1,"<Button-1>",decode_request)
|
||||||
@ -505,6 +473,23 @@ Widget.bind(graph1,"<Button-1>",set_freezedf)
|
|||||||
Widget.bind(graph1,"<Double-Button-1>",freeze_decode)
|
Widget.bind(graph1,"<Double-Button-1>",freeze_decode)
|
||||||
iframe1.pack(expand=1, fill=X)
|
iframe1.pack(expand=1, fill=X)
|
||||||
|
|
||||||
|
c2=Canvas(iframe1, bg='white', width=750, height=25,bd=0)
|
||||||
|
c2.pack(side=TOP)
|
||||||
|
Widget.bind(c2,"<Shift-Button-1>",freq_range)
|
||||||
|
Widget.bind(c2,"<Shift-Button-2>",freq_range)
|
||||||
|
Widget.bind(c2,"<Shift-Button-3>",freq_range)
|
||||||
|
#Widget.bind(c2,"<Control-Button-1>",freq_center)
|
||||||
|
|
||||||
|
graph2=Canvas(iframe1, bg='black', width=750, height=130,bd=0,cursor='crosshair')
|
||||||
|
graph2.pack(side=TOP)
|
||||||
|
Widget.bind(graph2,"<Motion>",fdf_change)
|
||||||
|
#Widget.bind(graph2,"<Button-1>",decode_request)
|
||||||
|
#Widget.bind(graph2,"<Button-3>",decode_request)
|
||||||
|
Widget.bind(graph2,"<Button-1>",set_freezedf)
|
||||||
|
Widget.bind(graph2,"<Double-Button-1>",freeze_decode)
|
||||||
|
iframe1.pack(expand=1, fill=X)
|
||||||
|
|
||||||
|
|
||||||
#-------------------------------------------------- Status frame
|
#-------------------------------------------------- Status frame
|
||||||
iframe2 = Frame(frame, bd=1, relief=SUNKEN)
|
iframe2 = Frame(frame, bd=1, relief=SUNKEN)
|
||||||
status=Pmw.MessageBar(iframe2,entry_width=17,entry_relief=GROOVE)
|
status=Pmw.MessageBar(iframe2,entry_width=17,entry_relief=GROOVE)
|
||||||
@ -526,10 +511,6 @@ sc3=Scale(iframe2,from_=-100.0,to_=100.0,orient='horizontal',
|
|||||||
showvalue=0,sliderlength=5)
|
showvalue=0,sliderlength=5)
|
||||||
sc3.pack(side=LEFT)
|
sc3.pack(side=LEFT)
|
||||||
balloon.bind(sc3,"Gain", "Digital Gain")
|
balloon.bind(sc3,"Gain", "Digital Gain")
|
||||||
sm=smeter.Smeter(iframe2,fillColor='slateblue',width=150,
|
|
||||||
doLabel=1)
|
|
||||||
sm.frame.pack(side=RIGHT)
|
|
||||||
balloon.bind(sm.frame,"Rx noise level","Rx noise level")
|
|
||||||
iframe2.pack(expand=1, fill=X)
|
iframe2.pack(expand=1, fill=X)
|
||||||
|
|
||||||
#----------------------------------------------- Restore params from INI file
|
#----------------------------------------------- Restore params from INI file
|
||||||
|
Loading…
x
Reference in New Issue
Block a user