summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-12-17 14:47:07 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-12-17 14:47:07 +0100
commit6be53e16ae994e20857ec92568f9ad125c73c18f (patch)
tree50114a63b4e8c41958bbd4b6b50c0be2d1f6158f
parente7a2a62e99c9c140664cfbfaa38402983fa9ff1a (diff)
downloaddabmod-6be53e16ae994e20857ec92568f9ad125c73c18f.tar.gz
dabmod-6be53e16ae994e20857ec92568f9ad125c73c18f.tar.bz2
dabmod-6be53e16ae994e20857ec92568f9ad125c73c18f.zip
Soapy: do not set master clock rate if it is 0
-rw-r--r--src/output/Soapy.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/output/Soapy.cpp b/src/output/Soapy.cpp
index 86ed3e0..8c84b84 100644
--- a/src/output/Soapy.cpp
+++ b/src/output/Soapy.cpp
@@ -71,8 +71,10 @@ Soapy::Soapy(SDRDeviceConfig& config) :
throw std::runtime_error("Cannot create SoapySDR output");
}
- m_device->setMasterClockRate(m_conf.masterClockRate);
- etiLog.level(info) << "SoapySDR master clock rate set to " <<
+ if (m_conf.masterClockRate != 0) {
+ m_device->setMasterClockRate(m_conf.masterClockRate);
+ }
+ etiLog.level(info) << "SoapySDR:Actual master clock rate: " <<
std::fixed << std::setprecision(4) <<
m_device->getMasterClockRate()/1000.0 << " kHz";