diff options
author | Johnathan Corgan <johnathan@corganlabs.com> | 2016-11-04 11:51:42 -0700 |
---|---|---|
committer | Johnathan Corgan <johnathan@corganlabs.com> | 2016-11-04 11:51:42 -0700 |
commit | 066309bebf4cdc7fabbbdb05f13dab0e4cf40ef0 (patch) | |
tree | 9f443b795a90fe2766e361a5d0d6716407a2a9d3 | |
parent | ca8fdc31088c260316499c1c27a7ba5a6f3f87f2 (diff) | |
parent | 38826d66d239aaea376bc315dee2a6c1bd33de52 (diff) |
Merge branch 'master' into next
-rw-r--r-- | gnuradio-runtime/lib/constants.cc.in | 19 | ||||
-rw-r--r-- | gr-digital/lib/msk_timing_recovery_cc_impl.cc | 8 |
2 files changed, 27 insertions, 0 deletions
diff --git a/gnuradio-runtime/lib/constants.cc.in b/gnuradio-runtime/lib/constants.cc.in index 516e2f8798..b368e9dc3f 100644 --- a/gnuradio-runtime/lib/constants.cc.in +++ b/gnuradio-runtime/lib/constants.cc.in @@ -24,6 +24,7 @@ #include <config.h> #endif +#include <stdlib.h> #include <gnuradio/constants.h> namespace gr { @@ -31,18 +32,36 @@ namespace gr { const std::string prefix() { + //Use "GR_PREFIX" environment variable when specified + const char *prefix = getenv("GR_PREFIX"); + if (prefix != NULL) return prefix; + return "@prefix@"; } const std::string sysconfdir() { + //Provide the sysconfdir in terms of prefix() + //when the "GR_PREFIX" environment var is specified. + if (getenv("GR_PREFIX") != NULL) + { + return prefix() + "/@GR_CONF_DIR@"; + } + return "@SYSCONFDIR@"; } const std::string prefsdir() { + //Provide the prefsdir in terms of sysconfdir() + //when the "GR_PREFIX" environment var is specified. + if (getenv("GR_PREFIX") != NULL) + { + return sysconfdir() + "/@CMAKE_PROJECT_NAME@/conf.d"; + } + return "@GR_PREFSDIR@"; } diff --git a/gr-digital/lib/msk_timing_recovery_cc_impl.cc b/gr-digital/lib/msk_timing_recovery_cc_impl.cc index 4b26573870..1473aa88c5 100644 --- a/gr-digital/lib/msk_timing_recovery_cc_impl.cc +++ b/gr-digital/lib/msk_timing_recovery_cc_impl.cc @@ -145,8 +145,16 @@ namespace gr { tags.erase(tags.begin()); goto out; } + if(std::abs(center) >= 1.0f) { + GR_LOG_WARN(d_logger, boost::format("work: ignoring time_est tag " + "(%.2f) outside of (-1, 1)") \ + % center); + tags.erase(tags.begin()); + goto out; + } d_mu = center; iidx = offset; + //we want positive mu, so offset iidx to compensate if(d_mu<0) { d_mu++; iidx--; |