summaryrefslogtreecommitdiffstats
path: root/src/output/SDR.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2019-03-14 08:32:26 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2019-03-14 08:32:26 +0100
commit35599ee9c8a2822c0f480673b4d8d8e87049094c (patch)
tree56be40a6f632dd5cdf00e902e3b1fa2d30cccdd1 /src/output/SDR.cpp
parente0992467867e4832b3333fb0cb5a638d05250bd3 (diff)
downloaddabmod-35599ee9c8a2822c0f480673b4d8d8e87049094c.tar.gz
dabmod-35599ee9c8a2822c0f480673b4d8d8e87049094c.tar.bz2
dabmod-35599ee9c8a2822c0f480673b4d8d8e87049094c.zip
Add analog bandwidth configuration to UHD and Soapy outputs
Diffstat (limited to 'src/output/SDR.cpp')
-rw-r--r--src/output/SDR.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/output/SDR.cpp b/src/output/SDR.cpp
index 23a947b..bacb281 100644
--- a/src/output/SDR.cpp
+++ b/src/output/SDR.cpp
@@ -75,6 +75,7 @@ SDR::SDR(SDRDeviceConfig& config, std::shared_ptr<SDRDevice> device) :
RC_ADD_PARAMETER(txgain, "TX gain");
RC_ADD_PARAMETER(rxgain, "RX gain for DPD feedback");
+ RC_ADD_PARAMETER(bandwidth, "Analog front-end bandwidth");
RC_ADD_PARAMETER(freq, "Transmission frequency");
RC_ADD_PARAMETER(muting, "Mute the output by stopping the transmitter");
RC_ADD_PARAMETER(temp, "Temperature in degrees C of the device");
@@ -376,6 +377,10 @@ void SDR::set_parameter(const string& parameter, const string& value)
ss >> m_config.rxgain;
m_device->set_rxgain(m_config.rxgain);
}
+ else if (parameter == "bandwidth") {
+ ss >> m_config.bandwidth;
+ m_device->set_bandwidth(m_config.bandwidth);
+ }
else if (parameter == "freq") {
ss >> m_config.frequency;
m_device->tune(m_config.lo_offset, m_config.frequency);
@@ -409,6 +414,9 @@ const string SDR::get_parameter(const string& parameter) const
else if (parameter == "rxgain") {
ss << m_config.rxgain;
}
+ else if (parameter == "bandwidth") {
+ ss << m_config.bandwidth;
+ }
else if (parameter == "freq") {
ss << m_config.frequency;
}