From 9058109de812a5a8c45a180131531b5ad10a9d7a Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 24 Oct 2011 11:31:59 -0700 Subject: uhd: added set for RX/TX iq balance and dc offset --- gr-uhd/lib/gr_uhd_usrp_source.cc | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'gr-uhd/lib/gr_uhd_usrp_source.cc') diff --git a/gr-uhd/lib/gr_uhd_usrp_source.cc b/gr-uhd/lib/gr_uhd_usrp_source.cc index 4f46fce79..421adafe1 100644 --- a/gr-uhd/lib/gr_uhd_usrp_source.cc +++ b/gr-uhd/lib/gr_uhd_usrp_source.cc @@ -146,11 +146,35 @@ public: return _dev->set_rx_bandwidth(bandwidth, chan); } - uhd::sensor_value_t get_dboard_sensor(const std::string &name, size_t chan){ + void set_dc_offset(const bool enable, size_t chan){ + #ifdef UHD_USRP_MULTI_USRP_FRONTEND_CAL_API + return _dev->set_rx_dc_offset(enable, chan); + #else + throw std::runtime_error("not implemented in this version"); + #endif + } + + void set_dc_offset(const std::complex &offset, size_t chan){ + #ifdef UHD_USRP_MULTI_USRP_FRONTEND_CAL_API + return _dev->set_rx_dc_offset(offset, chan); + #else + throw std::runtime_error("not implemented in this version"); + #endif + } + + void set_iq_balance(const std::complex &correction, size_t chan){ + #ifdef UHD_USRP_MULTI_USRP_FRONTEND_CAL_API + return _dev->set_rx_iq_balance(correction, chan); + #else + throw std::runtime_error("not implemented in this version"); + #endif + } + + uhd::sensor_value_t get_sensor(const std::string &name, size_t chan){ return _dev->get_rx_sensor(name, chan); } - std::vector get_dboard_sensor_names(size_t chan){ + std::vector get_sensor_names(size_t chan){ return _dev->get_rx_sensor_names(chan); } -- cgit