diff options
-rw-r--r-- | gr-digital/lib/pfb_clock_sync_ccf_impl.cc | 7 | ||||
-rw-r--r-- | gr-digital/lib/pfb_clock_sync_fff_impl.cc | 5 |
2 files changed, 9 insertions, 3 deletions
diff --git a/gr-digital/lib/pfb_clock_sync_ccf_impl.cc b/gr-digital/lib/pfb_clock_sync_ccf_impl.cc index 995b1cd1b5..60ee02aea5 100644 --- a/gr-digital/lib/pfb_clock_sync_ccf_impl.cc +++ b/gr-digital/lib/pfb_clock_sync_ccf_impl.cc @@ -68,6 +68,9 @@ namespace gr { d_max_dev(max_rate_deviation), d_osps(osps), d_error(0), d_out_idx(0) { + if(taps.size() == 0) + throw std::runtime_error("pfb_clock_sync_ccf: please specify a filter.\n"); + // Let scheduler adjust our relative_rate. enable_update_rate(true); @@ -421,7 +424,7 @@ namespace gr { tags.erase(tags.begin()); } } - + while(d_out_idx < d_osps) { d_filtnum = (int)floor(d_k); @@ -498,7 +501,7 @@ namespace gr { pmt::mp(-2.0f), pmt::mp(2.0f), pmt::mp(0.0f), "", "Error signal of loop", RPC_PRIVLVL_MIN, DISPTIME | DISPOPTSTRIP))); - + add_rpc_variable( rpcbasic_sptr(new rpcbasic_register_get<pfb_clock_sync_ccf, float>( alias(), "rate", diff --git a/gr-digital/lib/pfb_clock_sync_fff_impl.cc b/gr-digital/lib/pfb_clock_sync_fff_impl.cc index c5a8b6eec5..2b73aed699 100644 --- a/gr-digital/lib/pfb_clock_sync_fff_impl.cc +++ b/gr-digital/lib/pfb_clock_sync_fff_impl.cc @@ -65,6 +65,9 @@ namespace gr { d_max_dev(max_rate_deviation), d_osps(osps), d_error(0), d_out_idx(0) { + if(taps.size() == 0) + throw std::runtime_error("pfb_clock_sync_ccf: please specify a filter.\n"); + // Let scheduler adjust our relative_rate. enable_update_rate(true); @@ -388,7 +391,7 @@ namespace gr { while(i < noutput_items) { while(d_out_idx < d_osps) { d_filtnum = (int)floor(d_k); - + // Keep the current filter number in [0, d_nfilters] // If we've run beyond the last filter, wrap around and go to next sample // If we've gone below 0, wrap around and go to previous sample |