apps/osmocom_fft: recover when .step property is not given for a range

This commit is contained in:
Dimitri Stolnikov 2013-11-06 21:27:04 +01:00
parent 7d2a577571
commit 0d10f5e9bc
1 changed files with 2 additions and 2 deletions

View File

@ -338,7 +338,7 @@ class app_top_block(stdgui2.std_top_block, pubsub):
key=GAIN_KEY(gain_name),
minimum=range.start(),
maximum=range.stop(),
step_size=range.step(),
step_size=range.step() or (range.stop() - range.start())/10,
)
gain_hbox.AddSpacer(3)
@ -379,7 +379,7 @@ class app_top_block(stdgui2.std_top_block, pubsub):
key=BWIDTH_KEY,
minimum=bw_range.start(),
maximum=bw_range.stop(),
step_size=bw_range.step(),
step_size=bw_range.step() or (bw_range.stop() - bw_range.start())/100,
)
bwidth_hbox.AddSpacer(3)