diff options
author | Mark Meserve <mark.meserve@ni.com> | 2019-04-15 15:49:08 -0500 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-05-02 14:36:21 -0700 |
commit | b2dd1655de5e9f60cf65918354f25d0e4e62e241 (patch) | |
tree | 6aaa01e4e0e5471db07ce1fda6172883a1d6e6dd | |
parent | 27f027c54f10defa1eda9e69e5ba6c1597d7b9e2 (diff) | |
download | uhd-b2dd1655de5e9f60cf65918354f25d0e4e62e241.tar.gz uhd-b2dd1655de5e9f60cf65918354f25d0e4e62e241.tar.bz2 uhd-b2dd1655de5e9f60cf65918354f25d0e4e62e241.zip |
adf435x: enhance logging messages
-rw-r--r-- | host/lib/include/uhdlib/usrp/common/adf435x.hpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/host/lib/include/uhdlib/usrp/common/adf435x.hpp b/host/lib/include/uhdlib/usrp/common/adf435x.hpp index bd7b91b95..f6ce26e51 100644 --- a/host/lib/include/uhdlib/usrp/common/adf435x.hpp +++ b/host/lib/include/uhdlib/usrp/common/adf435x.hpp @@ -324,16 +324,19 @@ public: adf435x_regs_t::LDF_INT_N : adf435x_regs_t::LDF_FRAC_N; - std::string tuning_str = (int_n_mode) ? "Integer-N" : "Fractional"; - UHD_LOGGER_TRACE("ADF435X") - << boost::format("ADF 435X Frequencies (MHz): REQUESTED=%0.9f, ACTUAL=%0.9f") - % (target_freq/1e6) % (actual_freq/1e6) - << boost::format("ADF 435X Intermediates (MHz): Feedback=%0.2f, VCO=%0.2f, PFD=%0.2f, BAND=%0.2f, REF=%0.2f") - % (feedback_freq/1e6) % (vco_freq/1e6) % (pfd_freq/1e6) % (pfd_freq/BS/1e6) % (_reference_freq/1e6) - << boost::format("ADF 435X Tuning: %s") % tuning_str.c_str() - << boost::format("ADF 435X Settings: R=%d, BS=%d, N=%d, FRAC=%d, MOD=%d, T=%d, D=%d, RFdiv=%d") - % R % BS % N % FRAC % MOD % T % D % RFdiv - ; + // clang-format off + UHD_LOG_TRACE("ADF435X", boost::format( + "ADF 435X Frequencies (MHz): REQUESTED=%0.9f, ACTUAL=%0.9f") + % (target_freq / 1e6) % (actual_freq / 1e6)); + UHD_LOG_TRACE("ADF435X", boost::format( + "ADF 435X Intermediates (MHz): Feedback=%0.2f, VCO=%0.2f, PFD=%0.2f, BAND=%0.2f, REF=%0.2f") + % (feedback_freq / 1e6) % (vco_freq / 1e6) % (pfd_freq / 1e6) % (pfd_freq / BS / 1e6) % (_reference_freq / 1e6)); + UHD_LOG_TRACE("ADF435X", + "ADF 435X Tuning: " << ((int_n_mode) ? "Integer-N" : "Fractional")); + UHD_LOG_TRACE("ADF435X", boost::format( + "ADF 435X Settings: R=%d, BS=%d, N=%d, FRAC=%d, MOD=%d, T=%d, D=%d, RFdiv=%d") + % R % BS % N % FRAC % MOD % T % D % RFdiv); + // clang-format on UHD_ASSERT_THROW((_regs.frac_12_bit & ((uint16_t)~0xFFF)) == 0); UHD_ASSERT_THROW((_regs.mod_12_bit & ((uint16_t)~0xFFF)) == 0); |