Small fixes for loopback with new code.
authorTom Rondeau <trondeau@vt.edu>
Sat, 6 Mar 2010 22:16:19 +0000 (17:16 -0500)
committerTom Rondeau <trondeau@vt.edu>
Sat, 6 Mar 2010 22:16:19 +0000 (17:16 -0500)
gnuradio-examples/python/digital/benchmark_loopback.py
gnuradio-examples/python/digital/benchmark_qt_loopback2.py

index 4cc4a7bee3698f1a14ae36706ce9c37307dd6ef7..47e4f20288a91e23ba5b57fbf7638b2dc217bc0f 100755 (executable)
@@ -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)
index 1cb95198e67d527c5cee6709dc2d35ab2b83e4c9..1f236fd7fe5975b724258a59c1de31ffd07784fa 100755 (executable)
@@ -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)