From 9c0fb5e15da3c8ccbc1c8537671703411b210fcf Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 10 Mar 2010 19:33:38 -0800 Subject: Filled in dboard code for basics and lf type boards. The dboard is now just a uint16 (dont bother with the enums). The dboard manager now registers subdevs with a name. The basic board code uses a static block to register itself. --- host/lib/simple_device.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'host/lib/simple_device.cpp') diff --git a/host/lib/simple_device.cpp b/host/lib/simple_device.cpp index 63a17c52d..76f3c1262 100644 --- a/host/lib/simple_device.cpp +++ b/host/lib/simple_device.cpp @@ -179,7 +179,12 @@ public: return get_xx_rates(_rx_ddc[std::string("decims")], _rx_ddc[std::string("rate")]); } - tune_result_t set_rx_freq(double target_freq, double lo_offset){ + tune_result_t set_rx_freq(double target_freq){ + double lo_offset = 0.0; + //if the local oscillator will be in the passband, use an offset + if (wax::cast(_rx_subdev[SUBDEV_PROP_LO_INTERFERES])){ + lo_offset = get_rx_rate()*2.0; + } return tune(target_freq, lo_offset, _rx_subdev, _rx_ddc, false/* not tx */); } @@ -242,7 +247,12 @@ public: return get_xx_rates(_tx_duc[std::string("interps")], _tx_duc[std::string("rate")]); } - tune_result_t set_tx_freq(double target_freq, double lo_offset){ + tune_result_t set_tx_freq(double target_freq){ + double lo_offset = 0.0; + //if the local oscillator will be in the passband, use an offset + if (wax::cast(_tx_subdev[SUBDEV_PROP_LO_INTERFERES])){ + lo_offset = get_tx_rate()*2.0; + } return tune(target_freq, lo_offset, _tx_subdev, _tx_duc, true/* is tx */); } -- cgit v1.2.3