diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-01-18 02:13:29 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-01-18 02:13:29 +0100 |
commit | 1035eb6574ac4062333e756a1ba4f47a4bfa9855 (patch) | |
tree | d2e68e91521eb16197cd09929288d5fe9c97be7a /src/output/UHD.cpp | |
parent | cf416ef85fb07da98e61d821ea1169acf57b45f6 (diff) | |
download | dabmod-1035eb6574ac4062333e756a1ba4f47a4bfa9855.tar.gz dabmod-1035eb6574ac4062333e756a1ba4f47a4bfa9855.tar.bz2 dabmod-1035eb6574ac4062333e756a1ba4f47a4bfa9855.zip |
Add antenna selection to config
Diffstat (limited to 'src/output/UHD.cpp')
-rw-r--r-- | src/output/UHD.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/output/UHD.cpp b/src/output/UHD.cpp index 8876b0e..2c571fd 100644 --- a/src/output/UHD.cpp +++ b/src/output/UHD.cpp @@ -159,10 +159,10 @@ UHD::UHD(SDRDeviceConfig& config) : tune(m_conf.lo_offset, m_conf.frequency); m_conf.frequency = m_usrp->get_tx_freq(); - etiLog.level(info) << std::fixed << std::setprecision(3) << + etiLog.level(debug) << std::fixed << std::setprecision(3) << "OutputUHD:Actual TX frequency: " << m_conf.frequency; - etiLog.level(info) << std::fixed << std::setprecision(3) << + etiLog.level(debug) << std::fixed << std::setprecision(3) << "OutputUHD:Actual RX frequency: " << m_usrp->get_tx_freq(); m_usrp->set_tx_gain(m_conf.txgain); @@ -175,18 +175,21 @@ UHD::UHD(SDRDeviceConfig& config) : m_usrp->set_rx_rate(m_conf.sampleRate); etiLog.log(debug, "OutputUHD:Actual RX Rate: %f sps.", m_usrp->get_rx_rate()); - m_usrp->set_rx_antenna("RX2"); - etiLog.log(debug, "OutputUHD:Set RX Antenna: %s", + if (not m_conf.rx_antenna.empty()) { + m_usrp->set_rx_antenna(m_conf.rx_antenna); + } + etiLog.log(debug, "OutputUHD:Actual RX Antenna: %s", m_usrp->get_rx_antenna().c_str()); + if (not m_conf.tx_antenna.empty()) { + m_usrp->set_tx_antenna(m_conf.tx_antenna); + } + etiLog.log(debug, "OutputUHD:Actual TX Antenna: %s", + m_usrp->get_tx_antenna().c_str()); + m_usrp->set_rx_gain(m_conf.rxgain); etiLog.log(debug, "OutputUHD:Actual RX Gain: %f", m_usrp->get_rx_gain()); - /* TODO - uhdFeedback = std::make_shared<OutputUHDFeedback>( - m_usrp, m_conf.dpdFeedbackServerPort, m_conf.sampleRate); - */ - const uhd::stream_args_t stream_args("fc32"); //complex floats m_rx_stream = m_usrp->get_rx_stream(stream_args); m_tx_stream = m_usrp->get_tx_stream(stream_args); |