diff options
Diffstat (limited to 'gr-blocks/lib/check_lfsr_32k_s_impl.cc')
-rw-r--r-- | gr-blocks/lib/check_lfsr_32k_s_impl.cc | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/gr-blocks/lib/check_lfsr_32k_s_impl.cc b/gr-blocks/lib/check_lfsr_32k_s_impl.cc index 443b01ce70..48c8493d97 100644 --- a/gr-blocks/lib/check_lfsr_32k_s_impl.cc +++ b/gr-blocks/lib/check_lfsr_32k_s_impl.cc @@ -17,6 +17,8 @@ #include <cstdio> #include <cstdlib> +static constexpr bool CHECK_LFSR_DEBUG = false; + namespace gr { namespace blocks { @@ -112,11 +114,11 @@ void check_lfsr_32k_s_impl::enter_SEARCHING() d_runlength = 0; d_index = 0; // reset LFSR to beginning - if (0) - fprintf(stdout, - "check_lfsr_32k: enter_SEARCHING at offset %8ld (0x%08lx)\n", - d_ntotal, - d_ntotal); + if (CHECK_LFSR_DEBUG) + GR_LOG_DEBUG( + d_debug_logger, + boost::format("check_lfsr_32k: enter_SEARCHING at offset %8ld (0x%08lx)") % + d_ntotal % d_ntotal); enter_MATCH0(); } @@ -136,25 +138,21 @@ void check_lfsr_32k_s_impl::enter_LOCKED() d_index = 3; // already matched first 3 items - if (0) - fprintf(stdout, - "check_lfsr_32k: enter_LOCKED at offset %8ld (0x%08lx)\n", - d_ntotal, - d_ntotal); + if (CHECK_LFSR_DEBUG) + GR_LOG_DEBUG( + d_debug_logger, + boost::format("check_lfsr_32k: enter_LOCKED at offset %8ld (0x%08lx)") % + d_ntotal % d_ntotal); } void check_lfsr_32k_s_impl::log_error(unsigned short expected, unsigned short actual) { - if (0) - fprintf(stdout, - "check_lfsr_32k: expected %5d (0x%04x) got %5d (0x%04x) offset %8ld " - "(0x%08lx)\n", - expected, - expected, - actual, - actual, - d_ntotal, - d_ntotal); + if (CHECK_LFSR_DEBUG) + GR_LOG_DEBUG( + d_debug_logger, + boost::format("check_lfsr_32k: expected %5d (0x%04x) got %5d (0x%04x) " + "offset %8ld (0x%08lx)") % + expected % expected % actual % actual % d_ntotal % d_ntotal); } } /* namespace blocks */ |