|
|
|
@ -113,7 +113,11 @@ class app_top_block(stdgui2.std_top_block, pubsub):
|
|
|
|
|
if options.gain is None:
|
|
|
|
|
# if no gain was specified, use the mid-point in dB
|
|
|
|
|
r = self.src.get_gain_range()
|
|
|
|
|
options.gain = float(r.start()+r.stop())/2
|
|
|
|
|
try: # empty gain range returned in file= mode
|
|
|
|
|
options.gain = float(r.start()+r.stop())/2
|
|
|
|
|
except RuntimeError:
|
|
|
|
|
options.gain = 0
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
if options.center_freq is None:
|
|
|
|
|
# if no freq was specified, use the mid-point in Hz
|
|
|
|
@ -241,16 +245,21 @@ class app_top_block(stdgui2.std_top_block, pubsub):
|
|
|
|
|
)
|
|
|
|
|
freq_hbox.AddSpacer(5)
|
|
|
|
|
|
|
|
|
|
forms.slider(
|
|
|
|
|
parent=self.panel, sizer=freq_hbox,
|
|
|
|
|
proportion=3,
|
|
|
|
|
ps=self,
|
|
|
|
|
key=CENTER_FREQ_KEY,
|
|
|
|
|
minimum=self[FREQ_RANGE_KEY].start(),
|
|
|
|
|
maximum=self[FREQ_RANGE_KEY].stop(),
|
|
|
|
|
num_steps=101,
|
|
|
|
|
)
|
|
|
|
|
freq_hbox.AddSpacer(3)
|
|
|
|
|
try: # range.start() == range.stop() in file= mode
|
|
|
|
|
|
|
|
|
|
forms.slider(
|
|
|
|
|
parent=self.panel, sizer=freq_hbox,
|
|
|
|
|
proportion=3,
|
|
|
|
|
ps=self,
|
|
|
|
|
key=CENTER_FREQ_KEY,
|
|
|
|
|
minimum=self[FREQ_RANGE_KEY].start(),
|
|
|
|
|
maximum=self[FREQ_RANGE_KEY].stop(),
|
|
|
|
|
num_steps=101,
|
|
|
|
|
)
|
|
|
|
|
freq_hbox.AddSpacer(3)
|
|
|
|
|
|
|
|
|
|
except AssertionError:
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
corr_hbox.AddSpacer(3)
|
|
|
|
|
forms.text_box(
|
|
|
|
|