diff options
author | Tom Rondeau | 2010-03-06 17:16:19 -0500 |
---|---|---|
committer | Tom Rondeau | 2010-03-06 17:16:19 -0500 |
commit | ebd5449ebf8c08f78cada720eb47769bdfaa4bde (patch) | |
tree | 6ec6329a023c2e9abda745ebd096af097b356cdf /gnuradio-examples/python/digital | |
parent | ff876f7cc310bbdf1c5d05f85daba0afdb33561a (diff) | |
download | gnuradio-ebd5449ebf8c08f78cada720eb47769bdfaa4bde.tar.gz gnuradio-ebd5449ebf8c08f78cada720eb47769bdfaa4bde.tar.bz2 gnuradio-ebd5449ebf8c08f78cada720eb47769bdfaa4bde.zip |
Small fixes for loopback with new code.
Diffstat (limited to 'gnuradio-examples/python/digital')
-rwxr-xr-x | gnuradio-examples/python/digital/benchmark_loopback.py | 5 | ||||
-rwxr-xr-x | gnuradio-examples/python/digital/benchmark_qt_loopback2.py | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/gnuradio-examples/python/digital/benchmark_loopback.py b/gnuradio-examples/python/digital/benchmark_loopback.py index 4cc4a7bee..47e4f2028 100755 --- a/gnuradio-examples/python/digital/benchmark_loopback.py +++ b/gnuradio-examples/python/digital/benchmark_loopback.py @@ -44,6 +44,11 @@ class my_top_block(gr.top_block): noise_power = power_in_signal/SNR noise_voltage = math.sqrt(noise_power) + # With new interface, sps does not get set by default, but + # in the loopback, we don't recalculate it; so just force it here + if(options.samples_per_symbol == None): + options.samples_per_symbol = 2 + self.txpath = transmit_path(mod_class, options) self.throttle = gr.throttle(gr.sizeof_gr_complex, options.sample_rate) self.rxpath = receive_path(demod_class, rx_callback, options) diff --git a/gnuradio-examples/python/digital/benchmark_qt_loopback2.py b/gnuradio-examples/python/digital/benchmark_qt_loopback2.py index 1cb95198e..1f236fd7f 100755 --- a/gnuradio-examples/python/digital/benchmark_qt_loopback2.py +++ b/gnuradio-examples/python/digital/benchmark_qt_loopback2.py @@ -223,6 +223,11 @@ class my_top_block(gr.top_block): self._noise_voltage = self.get_noise_voltage(self._snr_dB) + # With new interface, sps does not get set by default, but + # in the loopback, we don't recalculate it; so just force it here + if(options.samples_per_symbol == None): + options.samples_per_symbol = 2 + self.txpath = transmit_path(mod_class, options) self.throttle = gr.throttle(gr.sizeof_gr_complex, self.sample_rate()) self.rxpath = receive_path(demod_class, rx_callback, options) @@ -269,6 +274,7 @@ class my_top_block(gr.top_block): self.phase_recov = self.rxpath.packet_receiver._demodulator.phase_recov self.time_recov = self.rxpath.packet_receiver._demodulator.time_recov self.freq_recov.set_alpha(self._gain_freq) + self.freq_recov.set_beta(self._gain_freq/10.0) self.phase_recov.set_alpha(self._gain_phase) self.phase_recov.set_beta(0.25*self._gain_phase*self._gain_phase) self.time_recov.set_alpha(self._gain_clock) @@ -367,6 +373,7 @@ class my_top_block(gr.top_block): self._gain_freq = gain_freq #self._gain_freq_beta = .25 * self._gain_freq * self._gain_freq self.rxpath.packet_receiver._demodulator.freq_recov.set_alpha(self._gain_freq) + self.rxpath.packet_receiver._demodulator.freq_recov.set_beta(self._gain_freq/10.0) #self.rxpath.packet_receiver._demodulator.freq_recov.set_beta(self._gain_fre_beta) |