[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r9850 - gnuradio/branches/developers/jcorgan/u2-wip/gr
From: |
jcorgan |
Subject: |
[Commit-gnuradio] r9850 - gnuradio/branches/developers/jcorgan/u2-wip/gr-usrp2/src |
Date: |
Sat, 25 Oct 2008 16:39:23 -0600 (MDT) |
Author: jcorgan
Date: 2008-10-25 16:39:22 -0600 (Sat, 25 Oct 2008)
New Revision: 9850
Modified:
gnuradio/branches/developers/jcorgan/u2-wip/gr-usrp2/src/usrp2.i
Log:
wip, adds gain_range and freq_range compatibility functions.
Modified: gnuradio/branches/developers/jcorgan/u2-wip/gr-usrp2/src/usrp2.i
===================================================================
--- gnuradio/branches/developers/jcorgan/u2-wip/gr-usrp2/src/usrp2.i
2008-10-25 22:31:29 UTC (rev 9849)
+++ gnuradio/branches/developers/jcorgan/u2-wip/gr-usrp2/src/usrp2.i
2008-10-25 22:39:22 UTC (rev 9850)
@@ -226,6 +226,18 @@
free_long_ptr(rate)
return result
+def __gain_range(self):
+ return [self.gain_min(),
+ self.gain_max(),
+ self.gain_db_per_step()]
+
+# NOTE: USRP1 uses a length three tuple here (3rd value is 'freq step'),
+# but it's not really useful. We let an index error happen here
+# to identify code using it.
+def __freq_range(self):
+ return [self.freq_min(),
+ self.freq_max()]
+
usrp2_source_32fc_sptr.set_center_freq = __set_center_freq
usrp2_source_16sc_sptr.set_center_freq = __set_center_freq
usrp2_sink_32fc_sptr.set_center_freq = __set_center_freq
@@ -241,4 +253,14 @@
usrp2_sink_32fc_sptr.dac_rate = __dac_rate
usrp2_sink_16sc_sptr.dac_rate = __dac_rate
+usrp2_source_32fc_sptr.gain_range = __gain_range
+usrp2_source_16sc_sptr.gain_range = __gain_range
+usrp2_sink_32fc_sptr.gain_range = __gain_range
+usrp2_sink_16sc_sptr.gain_range = __gain_range
+
+usrp2_source_32fc_sptr.freq_range = __freq_range
+usrp2_source_16sc_sptr.freq_range = __freq_range
+usrp2_sink_32fc_sptr.freq_range = __freq_range
+usrp2_sink_16sc_sptr.freq_range = __freq_range
+
%}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r9850 - gnuradio/branches/developers/jcorgan/u2-wip/gr-usrp2/src,
jcorgan <=