commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] gnuradio-core/src/lib/general gr_pwr_squelch_cc.cc


From: Johnathan Corgan
Subject: [Commit-gnuradio] gnuradio-core/src/lib/general gr_pwr_squelch_cc.cc
Date: Sun, 18 Jun 2006 16:45:20 +0000

CVSROOT:        /sources/gnuradio
Module name:    gnuradio-core
Changes by:     Johnathan Corgan <jcorgan>      06/06/18 16:45:20

Modified files:
        src/lib/general: gr_pwr_squelch_cc.cc 

Log message:
        Fixed window direction bug and removed remaining debugging comments.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnuradio-core/src/lib/general/gr_pwr_squelch_cc.cc?cvsroot=gnuradio&r1=1.2&r2=1.3

Patches:
Index: gr_pwr_squelch_cc.cc
===================================================================
RCS file: /sources/gnuradio/gnuradio-core/src/lib/general/gr_pwr_squelch_cc.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- gr_pwr_squelch_cc.cc        18 Jun 2006 07:06:31 -0000      1.2
+++ gr_pwr_squelch_cc.cc        18 Jun 2006 16:45:20 -0000      1.3
@@ -25,7 +25,6 @@
 #endif
 
 #include <cmath>
-//#include <cstdio>
 #include <gr_pwr_squelch_cc.h>
 #include <gr_io_signature.h>
 
@@ -111,34 +110,27 @@
     // Update squelch state based on power vs. threshold
     switch(d_state) {
       case ST_MUTED:
-        if (f >= d_threshold) {
-         //putchar('A');
+        if (f >= d_threshold) 
           d_state = d_ramp ? ST_ATTACK : ST_UNMUTED; // If not ramping, go 
straight to unmuted
-       }
         break;
 
       case ST_UNMUTED:
-        if (f < d_threshold) {
-         //putchar('D');
+        if (f < d_threshold)
           d_state = d_ramp ? ST_DECAY : ST_MUTED;    // If not ramping, go 
straight to muted
-       }
         break;
 
       case ST_ATTACK:
         d_envelope = 0.5-std::cos(M_PI*(++d_ramped)/d_ramp)/2.0; // FIXME: 
precalculate window for speed
         if (d_ramped >= d_ramp) {                    // use >= in case d_ramp 
is set to lower value elsewhere
-         //putchar('a');
          d_state = ST_UNMUTED;
          d_envelope = 1.0;
         }
         break;
 
       case ST_DECAY:
-        d_envelope = 0.5-std::cos(M_PI*(d_ramp-(--d_ramped))/d_ramp)/2.0; // 
FIXME: precalculate window for speed
-        if (d_ramped == 0) {
+        d_envelope = 0.5-std::cos(M_PI*(--d_ramped)/d_ramp)/2.0; // FIXME: 
precalculate window for speed
+        if (d_ramped == 0)
          d_state = ST_MUTED;
-         //putchar('d');
-       }
         break;
     };
        




reply via email to

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