- self.u.set_mux(usrp.determine_rx_mux_value(self.u, self._rx_subdev_spec))
-
- def set_freq(self, target_freq):
- """
- Set the center frequency we're interested in.
-
- @param target_freq: frequency in Hz
- @rypte: bool
-
- Tuning is a two step process. First we ask the front-end to
- tune as close to the desired frequency as it can. Then we use
- the result of that operation and our target_frequency to
- determine the value for the digital up converter.
- """
- r = self.u.tune(0, self.subdev, target_freq)
- if r:
- return True
-
- return False
-
- def set_gain(self, gain):
- """
- Sets the analog gain in the USRP
- """
- if gain is None:
- r = self.subdev.gain_range()
- gain = (r[0] + r[1])/2 # set gain to midpoint
- self.gain = gain
- return self.subdev.set_gain(gain)
-
- def set_auto_tr(self, enable):
- return self.subdev.set_auto_tr(enable)
-