Author: eb
Date: 2007-05-30 13:26:46 -0600 (Wed, 30 May 2007)
New Revision: 5577

Modified:
   gnuradio/trunk/gnuradio-examples/python/usrp/fm_tx4.py
Log:
Added error checking on call to set_freq

Modified: gnuradio/trunk/gnuradio-examples/python/usrp/fm_tx4.py
===================================================================
--- gnuradio/trunk/gnuradio-examples/python/usrp/fm_tx4.py      2007-05-30 
19:19:35 UTC (rev 5576)
+++ gnuradio/trunk/gnuradio-examples/python/usrp/fm_tx4.py      2007-05-30 
19:26:46 UTC (rev 5577)
@@ -104,7 +104,13 @@
         print "Using TX d'board %s" % (self.subdev.side_and_name(),)
 
         self.subdev.set_gain(self.subdev.gain_range()[1])    # set max Tx gain
-        self.set_freq(options.freq)
+        if not self.set_freq(options.freq):
+            freq_range = self.subdev.freq_range()
+            print "Failed to set frequency to %s.  Daughterboard supports %s 
to %s" % (
+                eng_notation.num_to_str(options.freq),
+                eng_notation.num_to_str(freq_range[0]),
+                eng_notation.num_to_str(freq_range[1]))
+            raise SystemExit
         self.subdev.set_enable(True)                         # enable 
transmitter
 
         sum = gr.add_cc ()



_______________________________________________
Commit-gnuradio mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/commit-gnuradio

Reply via email to