Skip to content

Commit

Permalink
grgsm_capture: Fix device arguments
Browse files Browse the repository at this point in the history
We need a space between numchan=1 and the rest of the device arguments
otherwise when --args is specified it fails with RuntimeError: bad lexical cast

$ grgsm_capture --args=soapy

Traceback (most recent call last):
  File "/usr/local/bin/grgsm_capture", line 179, in <module>
    device_args=options.device_args)
  File "/usr/local/bin/grgsm_capture", line 57, in __init__
    osmosdr.source(args="numchan=1" + device_args )
  File "/usr/local/lib64/python2.7/site-packages/osmosdr/osmosdr_swig.py", line 1170, in make
    return _osmosdr_swig.source_make(*args, **kwargs)
RuntimeError: bad lexical cast: source type value could not be interpreted as target

Change-Id: I2d1bcee835b695c91a5c44ec78a40b2d969f611c
  • Loading branch information
velichkov authored and ptrkrysik committed May 2, 2019
1 parent 61a3ca6 commit 61e42c8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/helpers/grgsm_capture
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ class grgsm_capture(gr.top_block):
##################################################

self.sdr_source = \
osmosdr.source(args="numchan=1" + device_args )
osmosdr.source(args="numchan=" + str(1) + " " + device_args)

self.sdr_source.set_sample_rate(samp_rate)
self.sdr_source.set_center_freq(freq, 0)
self.sdr_source.set_freq_corr(freq_corr, 0)
Expand Down

0 comments on commit 61e42c8

Please sign in to comment.