commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 05/11: digital: Addresses issue #812.


From: git
Subject: [Commit-gnuradio] [gnuradio] 05/11: digital: Addresses issue #812.
Date: Sun, 17 Jan 2016 18:02:47 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch maint
in repository gnuradio.

commit e7f5c67154a0573b1118498346c65f23e0a7340f
Author: Tom Rondeau <address@hidden>
Date:   Wed Jan 6 18:01:30 2016 -0500

    digital: Addresses issue #812.
    
    If the taps are all the same value, the differential taps become NaNs
    during create_diff_taps. Having this type of filter doesn't make sense
    in this algorithm, so there's nothing to fix. But now, we check to see
    if the diff taps are NaN and throw a runtime_error if detected.
---
 gr-digital/lib/pfb_clock_sync_ccf_impl.cc | 3 +++
 gr-digital/lib/pfb_clock_sync_fff_impl.cc | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/gr-digital/lib/pfb_clock_sync_ccf_impl.cc 
b/gr-digital/lib/pfb_clock_sync_ccf_impl.cc
index 60ee02a..c8e1221 100644
--- a/gr-digital/lib/pfb_clock_sync_ccf_impl.cc
+++ b/gr-digital/lib/pfb_clock_sync_ccf_impl.cc
@@ -308,6 +308,9 @@ namespace gr {
       // Normalize the taps
       for(unsigned int i = 0; i < difftaps.size(); i++) {
         difftaps[i] *= d_nfilters/pwr;
+        if(difftaps[i] != difftaps[i]) {
+          throw std::runtime_error("pfb_clock_sync_ccf::create_diff_taps 
produced NaN.");
+        }
       }
     }
 
diff --git a/gr-digital/lib/pfb_clock_sync_fff_impl.cc 
b/gr-digital/lib/pfb_clock_sync_fff_impl.cc
index 2b73aed..beb6bf5 100644
--- a/gr-digital/lib/pfb_clock_sync_fff_impl.cc
+++ b/gr-digital/lib/pfb_clock_sync_fff_impl.cc
@@ -287,6 +287,9 @@ namespace gr {
       // Normalize the taps
       for(unsigned int i = 0; i < difftaps.size(); i++) {
         difftaps[i] *= d_nfilters/pwr;
+        if(difftaps[i] != difftaps[i]) {
+          throw std::runtime_error("pfb_clock_sync_fff::create_diff_taps 
produced NaN.");
+        }
       }
     }
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]