summaryrefslogtreecommitdiffstats
path: root/src/OutputUHD.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2014-03-22 22:34:04 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2014-03-22 22:34:04 +0100
commitb03564a7d59d3bf15b9b8f9f2ae8bb6d8d35d955 (patch)
tree78f7a8934937902c95178899d29e91a89da21175 /src/OutputUHD.cpp
parent045c81269fcafb25484f02ef1a8f1da896d47d72 (diff)
downloaddabmod-b03564a7d59d3bf15b9b8f9f2ae8bb6d8d35d955.tar.gz
dabmod-b03564a7d59d3bf15b9b8f9f2ae8bb6d8d35d955.tar.bz2
dabmod-b03564a7d59d3bf15b9b8f9f2ae8bb6d8d35d955.zip
To USRP refclk lock loss check only if refclk is not 'internal'
Diffstat (limited to 'src/OutputUHD.cpp')
-rw-r--r--src/OutputUHD.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/OutputUHD.cpp b/src/OutputUHD.cpp
index c9e630b..bd4231e 100644
--- a/src/OutputUHD.cpp
+++ b/src/OutputUHD.cpp
@@ -206,6 +206,13 @@ OutputUHD::OutputUHD(
uwd.logger = &myLogger;
uwd.refclk_lock_loss_behaviour = myConf.refclk_lock_loss_behaviour;
+ if (myConf.refclk_src == "internal") {
+ uwd.check_refclk_loss = false;
+ }
+ else {
+ uwd.check_refclk_loss = true;
+ }
+
shared_ptr<barrier> b(new barrier(2));
mySyncBarrier = b;
@@ -320,7 +327,6 @@ void UHDWorker::process()
size_t bufsize = myTxStream->get_max_num_samps();
#endif
- bool check_refclk_loss = false;
const complexf* in;
uhd::tx_metadata_t md;
@@ -359,7 +365,7 @@ void UHDWorker::process()
#if ENABLE_UHD
// Check for ref_lock
- if (check_refclk_loss)
+ if (uwd->check_refclk_loss)
{
try {
// TODO: Is this check specific to the B100 and USRP2 ?
@@ -373,7 +379,7 @@ void UHDWorker::process()
}
}
catch (uhd::lookup_error &e) {
- check_refclk_loss = false;
+ uwd->check_refclk_loss = false;
uwd->logger->log(warn,
"OutputUHD: This USRP does not have mboard sensor for ext clock loss."
" Check disabled.");