simplfied the code while i was looking at it
authorJosh Blum <josh@joshknows.com>
Mon, 12 Oct 2009 22:44:17 +0000 (15:44 -0700)
committerJosh Blum <josh@joshknows.com>
Mon, 12 Oct 2009 22:44:17 +0000 (15:44 -0700)
gnuradio-core/src/python/gnuradio/blks2impl/stream_to_vector_decimator.py

index 39c8b5050259cc0a94256d80e063a240cc879cb3..8f75729c91c24a3c0e032e53b40d3863e1f23519 100644 (file)
@@ -72,8 +72,7 @@ class stream_to_vector_decimator(gr.hier_block2):
         self.one_in_n.set_n(self._decim)
 
     def _update_decimator(self):
-        self._decim = max(1, int(round(self._sample_rate/self._vec_len/self._vec_rate)))
-        self.one_in_n.set_n(self._decim)
+        self.set_decimation(self._sample_rate/self._vec_len/self._vec_rate)
 
     def decimation(self):
         """