diff options
author | Tom Rondeau <tom@trondeau.com> | 2014-04-21 09:10:12 -0400 |
---|---|---|
committer | Tom Rondeau <tom@trondeau.com> | 2014-04-21 09:10:12 -0400 |
commit | f41dd8c3e10c3ca3228115c8e0b149626850fec1 (patch) | |
tree | ff38bd4f648f3e42a7e7a159f46c5d8d993ca0e6 | |
parent | 0bd6bf9a476a8447ca5dde2e899e532f4a946a6c (diff) | |
parent | 7ce93ff2060cbf8d7a0dfb6fbc0db8e241900048 (diff) |
Merge branch 'maint'
-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 |