mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-19 18:42:06 -05:00
Better updating for waterfalls after change of palette, brightness,
or contrast. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@609 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
c202049fd7
commit
183d6e1297
2
map65.py
2
map65.py
@ -1,4 +1,4 @@
|
|||||||
#--------------------------------------------------------------------- MAP65
|
#-------------------------------------------------------------------- MAP65
|
||||||
# $Date$ $Revision$
|
# $Date$ $Revision$
|
||||||
#
|
#
|
||||||
from Tkinter import *
|
from Tkinter import *
|
||||||
|
21
specjt.py
21
specjt.py
@ -35,6 +35,7 @@ b0=0
|
|||||||
c0=0
|
c0=0
|
||||||
g0=0
|
g0=0
|
||||||
g.cmap="Linrad"
|
g.cmap="Linrad"
|
||||||
|
g.cmap0="Linrad"
|
||||||
bw=96.0
|
bw=96.0
|
||||||
df=2.69165
|
df=2.69165
|
||||||
fmid=1500
|
fmid=1500
|
||||||
@ -282,7 +283,7 @@ def update():
|
|||||||
g0=sc3.get()
|
g0=sc3.get()
|
||||||
|
|
||||||
newspec=Audio.gcom2.newspec #True if new data available
|
newspec=Audio.gcom2.newspec #True if new data available
|
||||||
if newspec:
|
if newspec or brightness != b0 or contrast != c0 or g.cmap != g.cmap0:
|
||||||
Audio.spec(brightness,contrast,g0,nspeed,a,a2) #Call Fortran routine spec
|
Audio.spec(brightness,contrast,g0,nspeed,a,a2) #Call Fortran routine spec
|
||||||
n=Audio.gcom2.nlines
|
n=Audio.gcom2.nlines
|
||||||
box=(0,0,NX,130-n) #Define region
|
box=(0,0,NX,130-n) #Define region
|
||||||
@ -301,8 +302,6 @@ def update():
|
|||||||
line02.putdata(a2[NX*i:NX*(i+1)])#One row of pixels to line0
|
line02.putdata(a2[NX*i:NX*(i+1)])#One row of pixels to line0
|
||||||
im2.paste(line02,(0,i)) #Paste in new top line(s)
|
im2.paste(line02,(0,i)) #Paste in new top line(s)
|
||||||
nscroll=nscroll+n
|
nscroll=nscroll+n
|
||||||
b0=brightness #Save scale values
|
|
||||||
c0=contrast
|
|
||||||
|
|
||||||
if newspec:
|
if newspec:
|
||||||
if Audio.gcom2.monitoring:
|
if Audio.gcom2.monitoring:
|
||||||
@ -325,6 +324,7 @@ def update():
|
|||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
if newspec or brightness != b0 or contrast != c0 or g.cmap != g.cmap0:
|
||||||
pim=ImageTk.PhotoImage(im) #Convert Image to PhotoImage
|
pim=ImageTk.PhotoImage(im) #Convert Image to PhotoImage
|
||||||
graph1.delete(ALL)
|
graph1.delete(ALL)
|
||||||
pim2=ImageTk.PhotoImage(im2) #Convert Image to PhotoImage
|
pim2=ImageTk.PhotoImage(im2) #Convert Image to PhotoImage
|
||||||
@ -335,6 +335,9 @@ def update():
|
|||||||
g.ndecphase=2
|
g.ndecphase=2
|
||||||
newMinute=0
|
newMinute=0
|
||||||
Audio.gcom2.newspec=0
|
Audio.gcom2.newspec=0
|
||||||
|
b0=brightness #Save scale values
|
||||||
|
c0=contrast
|
||||||
|
g.cmap0=g.cmap
|
||||||
|
|
||||||
if (Audio.gcom2.mousedf != mousedf0 or
|
if (Audio.gcom2.mousedf != mousedf0 or
|
||||||
Audio.gcom2.mousefqso != mousefqso0 or
|
Audio.gcom2.mousefqso != mousefqso0 or
|
||||||
@ -486,14 +489,20 @@ try:
|
|||||||
key,value=params[i].split()
|
key,value=params[i].split()
|
||||||
if key == 'SpecJTGeometry': root.geometry(value)
|
if key == 'SpecJTGeometry': root.geometry(value)
|
||||||
elif key == 'UpdateInterval': nspeed0.set(value)
|
elif key == 'UpdateInterval': nspeed0.set(value)
|
||||||
elif key == 'Brightness': sc1.set(value)
|
elif key == 'Brightness':
|
||||||
elif key == 'Contrast': sc2.set(value)
|
sc1.set(value)
|
||||||
|
b0=sc1.get()
|
||||||
|
elif key == 'Contrast':
|
||||||
|
sc2.set(value)
|
||||||
|
c0=sc2.get()
|
||||||
elif key == 'DigitalGain': sc3.set(value)
|
elif key == 'DigitalGain': sc3.set(value)
|
||||||
elif key == 'DisplayAGC': display_agc.set(value)
|
elif key == 'DisplayAGC': display_agc.set(value)
|
||||||
elif key == 'AxisLabel': naxis.set(value)
|
elif key == 'AxisLabel': naxis.set(value)
|
||||||
elif key == 'MarkTones': nmark.set(value)
|
elif key == 'MarkTones': nmark.set(value)
|
||||||
elif key == 'Flatten': nflat.set(value)
|
elif key == 'Flatten': nflat.set(value)
|
||||||
elif key == 'Palette': g.cmap=value
|
elif key == 'Palette':
|
||||||
|
g.cmap=value
|
||||||
|
g.cmap0=value
|
||||||
elif key == 'Frange': nfr.set(value)
|
elif key == 'Frange': nfr.set(value)
|
||||||
elif key == 'Fmid': fmid=int(value)
|
elif key == 'Fmid': fmid=int(value)
|
||||||
else: pass
|
else: pass
|
||||||
|
Loading…
Reference in New Issue
Block a user