commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r9999 - gnuradio/trunk/usrp2/firmware/lib


From: matt
Subject: [Commit-gnuradio] r9999 - gnuradio/trunk/usrp2/firmware/lib
Date: Sun, 16 Nov 2008 13:56:02 -0700 (MST)

Author: matt
Date: 2008-11-16 13:56:02 -0700 (Sun, 16 Nov 2008)
New Revision: 9999

Modified:
   gnuradio/trunk/usrp2/firmware/lib/db_rfx.c
Log:
removed old python comments


Modified: gnuradio/trunk/usrp2/firmware/lib/db_rfx.c
===================================================================
--- gnuradio/trunk/usrp2/firmware/lib/db_rfx.c  2008-11-16 20:55:07 UTC (rev 
9998)
+++ gnuradio/trunk/usrp2/firmware/lib/db_rfx.c  2008-11-16 20:56:02 UTC (rev 
9999)
@@ -525,35 +525,6 @@
   //printf("DACWORD %d\n",dacword);
   lsdac_write_rx(1,dacword);
   return true;
-  /*
-    def set_gain(self, gain):
-        """
-        Set the gain.
-
-        @param gain:  gain in decibels
-        @returns True/False
-        """
-        maxgain = self.gain_range()[1] - self._u.pga_max()
-        mingain = self.gain_range()[0]
-        if gain > maxgain:
-            pga_gain = gain-maxgain
-            assert pga_gain <= self._u.pga_max()
-            agc_gain = maxgain
-        else:
-            pga_gain = 0
-            agc_gain = gain
-        V_maxgain = .2
-        V_mingain = 1.2
-        V_fullscale = 3.3
-        dac_value = (agc_gain*(V_maxgain-V_mingain)/(maxgain-mingain) + 
V_mingain)*4096/V_fullscale
-        assert dac_value>=0 and dac_value<4096
-        return self._u.write_aux_dac(self._which, 0, int(dac_value)) and \
-               self._set_pga(int(pga_gain))
-
-    def gain_range(self):
-        return (self._u.pga_min(), self._u.pga_max() + 70, 0.05) -- For 
900-2400
-        return (self._u.pga_min(), self._u.pga_max() + 45, 0.035) -- For 400
-  */
 }
 
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]