diff options
author | eb | 2006-12-16 23:53:13 +0000 |
---|---|---|
committer | eb | 2006-12-16 23:53:13 +0000 |
commit | 9d1f4b4603f181fb02100de77501ebbfd99f1df6 (patch) | |
tree | 6b78ab2e5be6dbf265cf6cecca07c9cbb61a49e9 | |
parent | a9da4b3439c7c90e4fd20d2fe1e43958656cda12 (diff) | |
download | gnuradio-9d1f4b4603f181fb02100de77501ebbfd99f1df6.tar.gz gnuradio-9d1f4b4603f181fb02100de77501ebbfd99f1df6.tar.bz2 gnuradio-9d1f4b4603f181fb02100de77501ebbfd99f1df6.zip |
fix for ticket:114
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@4106 221aa14e-8319-0410-a670-987f0aec2ac5
-rwxr-xr-x | gnuradio-examples/python/usrp/usrp_spectrum_sense.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gnuradio-examples/python/usrp/usrp_spectrum_sense.py b/gnuradio-examples/python/usrp/usrp_spectrum_sense.py index 87768649c..182d055a6 100755 --- a/gnuradio-examples/python/usrp/usrp_spectrum_sense.py +++ b/gnuradio-examples/python/usrp/usrp_spectrum_sense.py @@ -156,7 +156,8 @@ class my_graph(gr.flow_graph): self.freq_step = 0.75 * usrp_rate self.min_center_freq = self.min_freq + self.freq_step/2 - self.max_center_freq = self.max_freq - self.freq_step/2 + nsteps = math.ceil((self.max_freq - self.min_freq) / self.freq_step) + self.max_center_freq = self.min_center_freq + (nsteps * self.freq_step) self.next_freq = self.min_center_freq @@ -184,7 +185,7 @@ class my_graph(gr.flow_graph): def set_next_freq(self): target_freq = self.next_freq self.next_freq = self.next_freq + self.freq_step - if self.next_freq > self.max_center_freq: + if self.next_freq >= self.max_center_freq: self.next_freq = self.min_center_freq if not self.set_freq(target_freq): |