diff options
Diffstat (limited to 'gr-shd/apps')
-rwxr-xr-x | gr-shd/apps/shd_fft.py | 25 | ||||
-rwxr-xr-x | gr-shd/apps/shd_rx_cfile.py | 4 | ||||
-rwxr-xr-x | gr-shd/apps/shd_siggen.py | 2 |
3 files changed, 14 insertions, 17 deletions
diff --git a/gr-shd/apps/shd_fft.py b/gr-shd/apps/shd_fft.py index 42f0e18b0..81e84d383 100755 --- a/gr-shd/apps/shd_fft.py +++ b/gr-shd/apps/shd_fft.py @@ -39,7 +39,8 @@ class app_top_block(stdgui2.std_top_block): self.panel = panel parser = OptionParser(option_class=eng_option) - parser.add_option("-a", "--address", type="string", default="type=xmini", + parser.add_option("-a", "--address", type="string", + default="type=xmini", help="Address of SHD device, [default=%default]") parser.add_option("-A", "--antenna", type="string", default=None, help="select Rx Antenna where appropriate") @@ -66,23 +67,13 @@ class app_top_block(stdgui2.std_top_block): self.options = options self.show_debug_info = True - self.src = shd.xmini_source(device_addr=options.address, - io_type=shd.io_type.COMPLEX_FLOAT32, - num_channels=1) + self.src = shd.smini_source(device_addr=options.address, + io_type=shd.io_type.COMPLEX_FLOAT32, + num_channels=1) self.src.set_samp_rate(options.samp_rate) input_rate = self.src.get_samp_rate() - print "Antenna: ", self.src.get_antenna() - print "Antennas: ", self.src.get_antennas() - print "Dboard: ", self.src.get_dboard_iface() - print "Device: ", self.src.get_device - print "Center Freq: ", self.src.get_center_freq() - print "Freq Range: ", self.src.get_freq_range() - print "Gain: ", self.src.get_gain() - print "Gain Names: ", self.src.get_gain_names() - print "Gain Range: ", self.src.get_gain_range() - if options.waterfall: self.scope = \ waterfallsink2.waterfall_sink_c (panel, fft_size=1024, @@ -133,6 +124,12 @@ class app_top_block(stdgui2.std_top_block): if not(self.set_freq(options.freq)): self._set_status_msg("Failed to set initial frequency") + print "Center Freq: ", self.src.get_center_freq() + print "Freq Range: ", self.src.get_freq_range() + print "Gain: ", self.src.get_gain() + print "Gain Names: ", self.src.get_gain_names() + print "Gain Range: ", self.src.get_gain_range() + def _set_status_msg(self, msg): self.frame.GetStatusBar().SetStatusText(msg, 0) diff --git a/gr-shd/apps/shd_rx_cfile.py b/gr-shd/apps/shd_rx_cfile.py index 7ba16b4c4..007bc809f 100755 --- a/gr-shd/apps/shd_rx_cfile.py +++ b/gr-shd/apps/shd_rx_cfile.py @@ -41,12 +41,12 @@ class rx_cfile_block(gr.top_block): # Create a SHD device source if options.output_shorts: - self._src = shd.xmini_source(device_addr=options.address, + self._src = shd.smini_source(device_addr=options.address, io_type=shd.io_type.COMPLEX_INT16, num_channels=1) self._sink = gr.file_sink(gr.sizeof_short*2, filename) else: - self._src = shd.xmini_source(device_addr=options.address, + self._src = shd.smini_source(device_addr=options.address, io_type=shd.io_type.COMPLEX_FLOAT32, num_channels=1) self._sink = gr.file_sink(gr.sizeof_gr_complex, filename) diff --git a/gr-shd/apps/shd_siggen.py b/gr-shd/apps/shd_siggen.py index 9eef01587..112eeea15 100755 --- a/gr-shd/apps/shd_siggen.py +++ b/gr-shd/apps/shd_siggen.py @@ -42,7 +42,7 @@ class shd_siggen(gr.top_block): self._src = gr.sig_source_c(options.samp_rate, gr.GR_SIN_WAVE, 200, 1) - self._snk = shd.xmini_sink(device_addr=options.address, + self._snk = shd.smini_sink(device_addr=options.address, io_type=shd.io_type.COMPLEX_FLOAT32, num_channels=1) |