]> cvs.zerfleddert.de Git - proxmark3-svn/commitdiff
put ask demod and mandemod
authormarshmellow42 <marshmellowrf@gmail.com>
Fri, 19 Dec 2014 17:39:41 +0000 (12:39 -0500)
committermarshmellow42 <marshmellowrf@gmail.com>
Fri, 19 Dec 2014 17:39:41 +0000 (12:39 -0500)
put ask demod and mandemod back until i have time to test it

client/cmddata.c

index 93aaf95342023498e4f696231b526ea33cb818b4..1f8b9fcd369851fdb0576d626c3c33eb8a34a8e6 100644 (file)
@@ -100,9 +100,9 @@ int Cmdaskdemod(const char *Cmd)
   } else {
     GraphBuffer[0] = c;
   }
-  //20% fuzz [marshmellow]
-  high=(int)(.8*high);
-  low=(int)(.8*low);
+  ////13% fuzz [marshmellow]
+  //high=(int)(0.87*high);
+  //low=(int)(0.87*low);
   for (i = 1; i < GraphTraceLen; ++i) {
     /* Transitions are detected at each peak
      * Transitions are either:
@@ -112,10 +112,10 @@ int Cmdaskdemod(const char *Cmd)
      * low for long periods, others just reach the peak and go
      * down)
      */
-    //[marhsmellow] changed == to >= for high and <= for low
-    if ((GraphBuffer[i] >= high) && (GraphBuffer[i - 1] == c)) {
+    //[marhsmellow] change == to >= for high and <= for low for fuzz
+    if ((GraphBuffer[i] == high) && (GraphBuffer[i - 1] == c)) {
       GraphBuffer[i] = 1 - c;
-    } else if ((GraphBuffer[i] <= low) && (GraphBuffer[i - 1] == (1 - c))){
+    } else if ((GraphBuffer[i] == low) && (GraphBuffer[i - 1] == (1 - c))){
       GraphBuffer[i] = c;
     } else {
       /* No transition */
Impressum, Datenschutz