[zaptel-commits] dbailey: branch 1.4 r4480 - /branches/1.4/kernel/wctdm24xxp/

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Wed Aug 13 15:51:31 CDT 2008


Author: dbailey
Date: Wed Aug 13 15:51:31 2008
New Revision: 4480

URL: http://svn.digium.com/view/zaptel?view=rev&rev=4480
Log:
clean up a timing issue on debounce of neon mwi detect

Modified:
    branches/1.4/kernel/wctdm24xxp/base.c
    branches/1.4/kernel/wctdm24xxp/wctdm24xxp.h

Modified: branches/1.4/kernel/wctdm24xxp/base.c
URL: http://svn.digium.com/view/zaptel/branches/1.4/kernel/wctdm24xxp/base.c?view=diff&rev=4480&r1=4479&r2=4480
==============================================================================
--- branches/1.4/kernel/wctdm24xxp/base.c (original)
+++ branches/1.4/kernel/wctdm24xxp/base.c Wed Aug 13 15:51:31 2008
@@ -194,8 +194,8 @@
 static int fwringdetect = 0;
 static int latency = VOICEBUS_DEFAULT_LATENCY;
 
-#define NEONMWI_ON_DEBOUNCE	(3)
 #define MS_PER_HOOKCHECK	(1)
+#define NEONMWI_ON_DEBOUNCE	(100/MS_PER_HOOKCHECK)
 
 static int neonmwi_monitor = 0; 	/* Note: this causes use of full wave ring detect */
 static int neonmwi_level = 75;		/* neon mwi trip voltage */
@@ -1363,9 +1363,9 @@
 
 	/* Look for neon mwi pulse */
 	if (neonmwi_monitor && !wc->mods[card].fxo.offhook) {
-		/* Look for 4 consecutive voltage readings
-		 * where the voltage is over the neon limit but
-		 * does not vary greatly from the last reading
+		/* Look for NEONMWI_ON_DEBOUNCE mS of consecutive voltage readings
+		 * where the voltage is over the neon limit butdoes not vary greatly
+		 * from the last reading
 		 */
 		if (fxo->battery == 1 &&
 			abs_voltage > neonmwi_level &&

Modified: branches/1.4/kernel/wctdm24xxp/wctdm24xxp.h
URL: http://svn.digium.com/view/zaptel/branches/1.4/kernel/wctdm24xxp/wctdm24xxp.h?view=diff&rev=4480&r1=4479&r2=4480
==============================================================================
--- branches/1.4/kernel/wctdm24xxp/wctdm24xxp.h (original)
+++ branches/1.4/kernel/wctdm24xxp/wctdm24xxp.h Wed Aug 13 15:51:31 2008
@@ -233,7 +233,6 @@
 			int neonmwi_last_voltage;
 			unsigned int neonmwi_debounce;
 			unsigned int neonmwi_offcounter;
-
 		} fxo;
 		struct fxs {
 			int oldrxhook;




More information about the zaptel-commits mailing list