From 1e614345d4327d89342a4b847938ad7eb16a2249 Mon Sep 17 00:00:00 2001 From: Ben Hilburn Date: Wed, 3 Oct 2012 10:58:39 -0400 Subject: UHD: improved capabilities for uhd_fft.grc. --- gr-uhd/examples/grc/uhd_fft.grc | 739 +++++++++++++++++++++++++++++++++------- 1 file changed, 621 insertions(+), 118 deletions(-) (limited to 'gr-uhd/examples') diff --git a/gr-uhd/examples/grc/uhd_fft.grc b/gr-uhd/examples/grc/uhd_fft.grc index 29c375065..2582b5e3b 100644 --- a/gr-uhd/examples/grc/uhd_fft.grc +++ b/gr-uhd/examples/grc/uhd_fft.grc @@ -1,6 +1,6 @@ - Sat Oct 8 10:26:30 2011 + Mon Jun 18 14:20:11 2012 options @@ -13,7 +13,7 @@ title - UHD FFT Plotter + UHD FFT author @@ -21,7 +21,7 @@ description - FFT waveform plot + UHD FFT Waveform Plotter window_size @@ -43,13 +43,17 @@ run True + + max_nouts + 0 + realtime_scheduling _coordinate - (10, 10) + (15, 15) _rotation @@ -57,34 +61,22 @@ - parameter + import id - gain + import_0 _enabled True - label - Default Gain - - - value - 0 - - - type - eng_float - - - short_id - g + import + import numpy _coordinate - (633, 17) + (15, 121) _rotation @@ -95,7 +87,7 @@ parameter id - freq + param_samp_rate _enabled @@ -103,11 +95,11 @@ label - Default Frequency + Sample Rate value - 2.45e9 + 1e6 type @@ -115,11 +107,11 @@ short_id - f + s _coordinate - (485, 18) + (358, 14) _rotation @@ -130,7 +122,7 @@ parameter id - address + param_freq _enabled @@ -138,23 +130,23 @@ label - IP Address + Default Frequency value - addr=192.168.11.2 + 2.45e9 type - string + eng_float short_id - a + f _coordinate - (205, 16) + (508, 14) _rotation @@ -165,7 +157,7 @@ parameter id - samp_rate + param_gain _enabled @@ -173,11 +165,11 @@ label - Sample Rate + Default Gain value - 1e6 + 0 type @@ -185,11 +177,11 @@ short_id - s + g _coordinate - (359, 18) + (672, 13) _rotation @@ -197,10 +189,10 @@ - wxgui_fftsink2 + wxgui_scopesink2 id - wxgui_fftsink2_0 + wxgui_scopesink2_0 _enabled @@ -212,55 +204,35 @@ title - FFT Plot + Scope Plot samp_rate samp_rate - baseband_freq - tun_freq - - - y_per_div - 10 - - - y_divs - 10 - - - ref_level - 10 - - - ref_scale - 2.0 + v_scale + 0 - fft_size - 1024 + v_offset + 0 - fft_rate - 30 + t_scale + 0 - peak_hold + ac_couple False - average + xy_mode False - avg_alpha - 0 - - - win - None + num_inputs + 1 win_size @@ -272,11 +244,19 @@ notebook - + nb0, 2 + + + trig_mode + gr.gr_TRIG_MODE_AUTO + + + y_axis_label + Counts _coordinate - (479, 176) + (314, 250) _rotation @@ -295,7 +275,15 @@ type - complex + fc32 + + + otw + + + + stream_args + dev_addr @@ -314,7 +302,11 @@ 1 - ref_source0 + clock_source0 + + + + time_source0 @@ -322,7 +314,11 @@ - ref_source1 + clock_source1 + + + + time_source1 @@ -330,7 +326,11 @@ - ref_source2 + clock_source2 + + + + time_source2 @@ -338,7 +338,11 @@ - ref_source3 + clock_source3 + + + + time_source3 @@ -346,7 +350,11 @@ - ref_source4 + clock_source4 + + + + time_source4 @@ -354,7 +362,11 @@ - ref_source5 + clock_source5 + + + + time_source5 @@ -362,7 +374,11 @@ - ref_source6 + clock_source6 + + + + time_source6 @@ -370,7 +386,11 @@ - ref_source7 + clock_source7 + + + + time_source7 @@ -387,19 +407,19 @@ center_freq0 - tun_freq + freq gain0 - tun_gain + gain ant0 - + ant bw0 - 0 + samp_rate center_freq1 @@ -899,7 +919,7 @@ _coordinate - (212, 216) + (37, 394) _rotation @@ -907,46 +927,65 @@ - variable_slider + variable_function_probe id - tun_freq + chan0_lo_locked _enabled True - label - UHD Freq (Hz) + value + uhd.sensor_value("", False, "") - value - freq + block_id + uhd_usrp_source_0 - min - 2.4e9 + function_name + get_sensor - max - 2.5e9 + function_args + "'lo_locked'" - num_steps - 100 + poll_rate + 10 + + + _coordinate + (583, 432) + + + _rotation + 0 + + + + notebook + + id + nb0 + + + _enabled + True style - wx.SL_HORIZONTAL + wx.NB_TOP - converver - float_converter + labels + ['FFT', 'Waterfall', 'Scope'] grid_pos - + 0, 0, 1, 8 notebook @@ -954,7 +993,7 @@ _coordinate - (36, 376) + (15, 172) _rotation @@ -962,63 +1001,527 @@ - variable_slider + variable_chooser id - tun_gain + ant_xcvr _enabled - True + False label - UHD Gain + Antenna value - gain + "J2" - min - 0 + choices + ["J2","J1"] - max - 20 + labels + ["J2","J1"] - num_steps - 100 + type + radio_buttons style - wx.SL_HORIZONTAL + wx.RA_HORIZONTAL + + + grid_pos + + + + notebook + + + + _coordinate + (830, 278) + + + _rotation + 0 + + + + variable_static_text + + id + lo_locked_probe + + + _enabled + True + + + label + LO Locked + + + value + chan0_lo_locked.to_bool() converver - float_converter + str_converter + + + formatter + lambda x: x and "True" or "False" grid_pos + 1, 7, 1, 1 + + + notebook + + _coordinate + (583, 314) + + + _rotation + 0 + + + + variable_chooser + + id + ant + + + _enabled + True + + + label + Antenna + + + value + "RX2" + + + choices + ["RX2","TX/RX"] + + + labels + ["RX2","TX/RX"] + + + type + radio_buttons + + + style + wx.RA_HORIZONTAL + + + grid_pos + 1, 4, 1, 2 + notebook _coordinate - (177, 377) + (830, 130) _rotation 0 + + parameter + + id + address + + + _enabled + True + + + label + IP Address + + + value + + + + type + string + + + short_id + a + + + _coordinate + (190, 15) + + + _rotation + 0 + + + + wxgui_fftsink2 + + id + fft + + + _enabled + True + + + type + complex + + + title + FFT Plot + + + samp_rate + samp_rate + + + baseband_freq + freq + + + y_per_div + 10 + + + y_divs + 15 + + + ref_level + 0 + + + ref_scale + 2.0 + + + fft_size + 1024 + + + fft_rate + 15 + + + peak_hold + False + + + average + False + + + avg_alpha + 0 + + + win + None + + + win_size + (-1, 400) + + + grid_pos + + + + notebook + nb0, 0 + + + freqvar + None + + + _coordinate + (314, 359) + + + _rotation + 0 + + + + wxgui_waterfallsink2 + + id + wxgui_waterfallsink2_0 + + + _enabled + True + + + type + complex + + + title + Waterfall Plot + + + samp_rate + samp_rate + + + baseband_freq + 0 + + + dynamic_range + 100 + + + ref_level + 0 + + + ref_scale + 2.0 + + + fft_size + 512 + + + fft_rate + 15 + + + average + False + + + avg_alpha + 0 + + + win + None + + + win_size + (-1, 400) + + + grid_pos + + + + notebook + nb0, 1 + + + freqvar + None + + + _coordinate + (313, 573) + + + _rotation + 0 + + + + variable_text_box + + id + samp_rate + + + _enabled + True + + + label + Sample Rate + + + value + param_samp_rate + + + converver + float_converter + + + formatter + None + + + grid_pos + 1, 0, 1, 3 + + + notebook + + + + _coordinate + (358, 129) + + + _rotation + 0 + + + + variable_slider + + id + freq + + + _enabled + True + + + label + RX Tune Frequency + + + value + param_freq + + + min + 50e6 + + + max + 6e9 + + + num_steps + 1000 + + + style + wx.SL_HORIZONTAL + + + converver + float_converter + + + grid_pos + 3, 0, 1, 8 + + + notebook + + + + _coordinate + (510, 128) + + + _rotation + 0 + + + + variable_slider + + id + gain + + + _enabled + True + + + label + RX Gain + + + value + param_gain + + + min + 0 + + + max + 31.5 + + + num_steps + 63 + + + style + wx.SL_HORIZONTAL + + + converver + float_converter + + + grid_pos + 2, 0, 1, 8 + + + notebook + + + + _coordinate + (679, 130) + + + _rotation + 0 + + + + uhd_usrp_source_0 + wxgui_scopesink2_0 + 0 + 0 + + + uhd_usrp_source_0 + wxgui_waterfallsink2_0 + 0 + 0 + uhd_usrp_source_0 - wxgui_fftsink2_0 + fft 0 0 -- cgit